-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No validation against OpStore
being used to store to an object with OpTypeImage
.
#4796
Labels
Comments
OpStore
being used to store to an objecth with OpTypeImage
.OpStore
being used to store to an object with OpTypeImage
.
The same should probably also be applied for acceleration structures, which seems to have been added to a more recent VUID that superseeds
|
svenvh
added a commit
to svenvh/SPIRV-Tools
that referenced
this issue
Aug 9, 2023
Ensure that the validator rejects stores to objects of types `OpTypeImage`, `OpTypeSampler`, `OpTypeSampledImage`, `OpTypeAccelerationStructureKHR`, and arrays of these types, according to `VUID-StandaloneSpirv-OpTypeImage-06924`. Fixes KhronosGroup#4796 Signed-off-by: Sven van Haastregt <[email protected]>
svenvh
added a commit
to svenvh/SPIRV-Tools
that referenced
this issue
Apr 19, 2024
Ensure that the validator rejects stores to objects of types `OpTypeSampledImage` and `OpTypeAccelerationStructureKHR`, according to `VUID-StandaloneSpirv-OpTypeImage-06924`. Stores to objects of types `OpTypeImage` and `OpTypeSampler` should be rejected too, but HLSL-to-SPIR-V translation by glslang and shaderc seems to result in some violations; so leave validation of those as future work. Contributes to KhronosGroup#4796 Signed-off-by: Sven van Haastregt <[email protected]>
svenvh
added a commit
to svenvh/SPIRV-Tools
that referenced
this issue
Sep 20, 2024
Ensure that the validator rejects stores to objects of types `OpTypeSampledImage` and `OpTypeAccelerationStructureKHR`, according to `VUID-StandaloneSpirv-OpTypeImage-06924`. Stores to objects of types `OpTypeImage` and `OpTypeSampler` should be rejected too, but HLSL-to-SPIR-V translation by glslang and shaderc seems to result in some violations; so leave validation of those as future work. Contributes to KhronosGroup#4796 Signed-off-by: Sven van Haastregt <[email protected]>
svenvh
added a commit
to svenvh/SPIRV-Tools
that referenced
this issue
Sep 20, 2024
Ensure that the validator rejects stores to objects of types `OpTypeImage`, `OpTypeSampler`, `OpTypeSampledImage`, `OpTypeAccelerationStructureKHR`, and arrays of these types, according to `VUID-StandaloneSpirv-OpTypeImage-06924`. Guard the check behind the before_hlsl_legalization option, as sometimes we may have temporaries or local variables that are expected to get optimized away. Fixes KhronosGroup#4796 Signed-off-by: Sven van Haastregt <[email protected]> Change-Id: Ie035c01c5f94e7bdfc16b5c6c85705f302b7bda3
alan-baker
pushed a commit
that referenced
this issue
Sep 23, 2024
Ensure that the validator rejects stores to objects of types `OpTypeImage`, `OpTypeSampler`, `OpTypeSampledImage`, `OpTypeAccelerationStructureKHR`, and arrays of these types, according to `VUID-StandaloneSpirv-OpTypeImage-06924`. Guard the check behind the before_hlsl_legalization option, as sometimes we may have temporaries or local variables that are expected to get optimized away. Fixes #4796 Change-Id: Ie035c01c5f94e7bdfc16b5c6c85705f302b7bda3 Signed-off-by: Sven van Haastregt <[email protected]>
Keenuts
pushed a commit
to Keenuts/SPIRV-Tools
that referenced
this issue
Nov 12, 2024
Ensure that the validator rejects stores to objects of types `OpTypeImage`, `OpTypeSampler`, `OpTypeSampledImage`, `OpTypeAccelerationStructureKHR`, and arrays of these types, according to `VUID-StandaloneSpirv-OpTypeImage-06924`. Guard the check behind the before_hlsl_legalization option, as sometimes we may have temporaries or local variables that are expected to get optimized away. Fixes KhronosGroup#4796 Change-Id: Ie035c01c5f94e7bdfc16b5c6c85705f302b7bda3 Signed-off-by: Sven van Haastregt <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We found some invalid SPIR-V being generated by DXC. It turns out that
spirv-val
does not catch the invalid SPIR-V either.I have attached an example shader to illustrate the issue.
bin_lines.cs.hlsl#main#SPIR-V#cs_6_6.txt
This contradicts Vulkan's spec, https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-StandaloneSpirv-OpTypeImage-04661 :
"Objects of types OpTypeImage, OpTypeSampler, OpTypeSampledImage, and arrays of these types must not be stored to or modified"
The text was updated successfully, but these errors were encountered: