Skip to content

Add InterlockedOr tests#1195

Open
bob80905 wants to merge 10 commits into
llvm:mainfrom
bob80905:add_interlockedor_tests
Open

Add InterlockedOr tests#1195
bob80905 wants to merge 10 commits into
llvm:mainfrom
bob80905:add_interlockedor_tests

Conversation

@bob80905
Copy link
Copy Markdown
Contributor

This PR adds tests for the InterlockedOr HLSL function.
It tests all existing overloads of this function, including the declarations of this function as members of resources.
It also includes a fix to texture element type processing, as there was not a case to account for uint32 element types.
Fixes #101

Comment thread test/Feature/HLSLLib/InterlockedOr.resources.typed.int64.test Outdated
Comment thread test/Feature/HLSLLib/InterlockedOr.resources.int64.test Outdated
#--- end

# REQUIRES: Int64 && Int64GroupSharedAtomics
# REQUIRES: Int64 && Int64GroupSharedAtomics && SM_6_6
Copy link
Copy Markdown
Contributor

@Icohedron Icohedron May 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting change. Do we want to add REQUIRES: SM_6_X to every test?

Every test has a # RUN: %dxc_target -HV 202x -T cs_6_6 -Fo %t.o %t/source.hlsl line specifying the target shader model (cs_6_6 implies SM_6_6).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's definitely up for conversation. The reason I added it is because there was a machine I ran against that did not have shader model 6.6 support. So this test shouldn't run on machines that don't have GPUs that support high enough shader models.
Here is the failure: https://github.com/llvm/offload-test-suite/actions/runs/25931189782/job/76225188838#step:13:338
Its directly complaining about shader model target incompatibility, so I think the proper resolution is to add these availability features.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting change. Do we want to add REQUIRES: SM_6_X to every test?

Every test has a # RUN: %dxc_target -HV 202x -T cs_6_6 -Fo %t.o %t/source.hlsl line specifying the target shader model (cs_6_6 implies SM_6_6).

Hmm I hear why you did this. I'm wondering if there is a way we can unify the run line and the requires. It would suck if these fell out of sync. Maybe a cleanup task for later?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a follow up issue here: #1219

Comment thread .github/workflows/windows-nvidia-clang-vk.yaml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test for InterlockedOr

4 participants