Skip to content
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

Slang-test anyhit and closesthit fails with spirv-tools upgrade #5105

Closed
cheneym2 opened this issue Sep 18, 2024 · 2 comments
Closed

Slang-test anyhit and closesthit fails with spirv-tools upgrade #5105

cheneym2 opened this issue Sep 18, 2024 · 2 comments
Assignees
Labels
goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang kind:bug something doesn't work like it should

Comments

@cheneym2
Copy link
Collaborator

Upgrading SPIRV-Tools causes a test regression. The change in SPIRV-Tools responsible is:

0c40b591a305942abdcc090ef3fbf39d3326572d [OPT] Add SPV_KHR_ray_tracing_position_fetch to allow lists (#5757)

tests/vkray/anyhit.slang
tests/vkray/anyhit.slang.1

Supported backends: glslang spirv-dis gcc genericcpp llvm spirv-opt
error: slang-test: tests/vkray/closesthit.slang:53:15: error: CHECK-DAG: expected string not found in input
// CHECK-DAG: OpDecorate %{{.*}} BuiltIn HitTriangleVertexPositionsKHR
^

error: slang-test: actual-output:20:40: note: scanning from here
OpEntryPoint ClosestHitKHR %main "main" %42 %40 %19 %gl_PrimitiveID %13 %gl_InstanceID %ShaderRecord %colors %47
^

error: slang-test: actual-output:37:1: note: possible intended match here
OpDecorate %13 BuiltIn InstanceCustomIndexKHR
^

FAILED test: 'tests/vkray/closesthit.slang'
error: slang-test: tests/vkray/closesthit.slang:53:15: error: CHECK-DAG: expected string not found in input
// CHECK-DAG: OpDecorate %{{.*}} BuiltIn HitTriangleVertexPositionsKHR
^

error: slang-test: actual-output:17:40: note: scanning from here
OpEntryPoint ClosestHitKHR %main "main" %42 %40 %19 %gl_PrimitiveID %13 %gl_InstanceID %ShaderRecord %colors %47
^

error: slang-test: actual-output:34:1: note: possible intended match here
OpDecorate %13 BuiltIn InstanceCustomIndexKHR
^

FAILED test: 'tests/vkray/closesthit.slang.1'

@cheneym2 cheneym2 self-assigned this Sep 18, 2024
@cheneym2 cheneym2 added this to the Q3 2024 (Summer) milestone Sep 18, 2024
@cheneym2
Copy link
Collaborator Author

Regression is specifically due to adding the vertex fetch extension to the allow list in: source/opt/aggressive_dead_code_elim_pass.cpp

It is added to several other allow lists, but those are not causing the regression.

@cheneym2
Copy link
Collaborator Author

Uploading the before (a.txt ), and after (b.txt) dumps.

a.txt
b.txt

cheneym2 added a commit to cheneym2/slang that referenced this issue Sep 18, 2024
Adds dummy usage to the intersection positions fetched
from HitTriangleVertexPositions to prevent DCE from
removing their usage.

Fixes shader-slang#5105
@jkwak-work jkwak-work added the kind:bug something doesn't work like it should label Sep 18, 2024
@bmillsNV bmillsNV added the goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang kind:bug something doesn't work like it should
Projects
None yet
Development

No branches or pull requests

3 participants