diff options
| author | Yong He <yonghe@outlook.com> | 2025-01-07 22:26:31 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-07 22:26:31 -0800 |
| commit | c43f6fa55aca23365c86c6ec1737d42be74d9d3e (patch) | |
| tree | 2c49bc1dbd12ae5f46d682a3f240465931471060 /tests/vkray | |
| parent | 1a56f58fdd0c704e6dc0fad0f0ec33a25a35e60b (diff) | |
Lower varying parameters as pointers instead of SSA values. (#5919)
* Add executable test on matrix-typed vertex input.
* Fix emit logic of matrix layout qualifier.
* Pass fragment shader varying input by constref to allow EvaluateAttributeAtCentroid etc. to be implemented correctly.
Diffstat (limited to 'tests/vkray')
| -rw-r--r-- | tests/vkray/anyhit.slang | 2 | ||||
| -rw-r--r-- | tests/vkray/anyhit.slang.glsl | 17 |
2 files changed, 13 insertions, 6 deletions
diff --git a/tests/vkray/anyhit.slang b/tests/vkray/anyhit.slang index 45d35b1fa..8f5a6e597 100644 --- a/tests/vkray/anyhit.slang +++ b/tests/vkray/anyhit.slang @@ -57,7 +57,6 @@ void main( // SPIRV: OpEntryPoint // SPIRV: BuiltIn HitTriangleVertexPositionsKHR // SPIRV: OpTypePointer HitAttribute{{NV|KHR}} -// SPIRV: OpTypePointer HitAttribute{{NV|KHR}} // SPIRV: OpVariable{{.*}}HitAttribute{{NV|KHR}} // SPIRV: OpIgnoreIntersectionKHR // SPIRV: OpTerminateRayKHR @@ -70,7 +69,6 @@ void main( // GL_SPIRV: OpEntryPoint // GL_SPIRV: BuiltIn HitTriangleVertexPositionsKHR // GL_SPIRV-DAG: OpTypePointer HitAttribute{{NV|KHR}} -// GL_SPIRV-DAG: OpTypePointer HitAttribute{{NV|KHR}} // GL_SPIRV: OpTerminateRayKHR // GL_SPIRV: OpIgnoreIntersectionKHR // GL_SPIRV-DAG: %{{.*}} = OpAccessChain %{{.*}} %{{.*}} %{{.*}} diff --git a/tests/vkray/anyhit.slang.glsl b/tests/vkray/anyhit.slang.glsl index 8255599b9..4d2e5a0dd 100644 --- a/tests/vkray/anyhit.slang.glsl +++ b/tests/vkray/anyhit.slang.glsl @@ -8,7 +8,7 @@ struct Params_0 }; layout(binding = 0) -layout(std140) uniform _S1 +layout(std140) uniform block_Params_0 { int mode_0; }gParams_0; @@ -23,20 +23,21 @@ struct SphereHitAttributes_0 vec3 normal_0; }; -hitAttributeEXT SphereHitAttributes_0 _S2; +hitAttributeEXT SphereHitAttributes_0 _S1; struct ShadowRay_0 { vec4 hitDistance_0; + vec3 dummyOut_0; }; -rayPayloadInEXT ShadowRay_0 _S3; +rayPayloadInEXT ShadowRay_0 _S2; void main() { if(gParams_0.mode_0 != 0) { - if((textureLod(sampler2D(gParams_alphaMap_0,gParams_sampler_0), (_S2.normal_0.xy), (0.0)).x) > 0.0) + if((textureLod(sampler2D(gParams_alphaMap_0,gParams_sampler_0), (_S1.normal_0.xy), (0.0)).x) > 0.0) { terminateRayEXT;; } @@ -45,6 +46,14 @@ void main() ignoreIntersectionEXT;; } } + + vec3 _S3 = (gl_HitTriangleVertexPositionsEXT[(0U)]); + _S2.dummyOut_0 = _S3; + vec3 _S4 = (gl_HitTriangleVertexPositionsEXT[(1U)]); + vec3 _S5 = _S3 + _S4; + _S2.dummyOut_0 = _S5; + vec3 _S6 = (gl_HitTriangleVertexPositionsEXT[(2U)]); + _S2.dummyOut_0 = _S5 + _S6; return; } |
