diff options
| author | cheneym2 <acheney@nvidia.com> | 2024-09-19 16:02:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-19 13:02:49 -0700 |
| commit | 9d40ce4e8921ef468281c91f052dbd443ecf56e2 (patch) | |
| tree | aedc7f27628e8f382a4cf6c99f3cdc5f48b506db /tests/vkray | |
| parent | 1560326cb698432b3a6b52456f96314243a078cb (diff) | |
Update spirv-tools version (#5089)
* Update spirv-headers and spirv-tools versions
* Fix compute-derivative regressions with upgraded spirv headers
Extension was promoted from NV to KHR while retaining same enums.
Fixes #5106
* Prevent DCE on ray trace position fetch
Adds dummy usage to the intersection positions fetched
from HitTriangleVertexPositions to prevent DCE from
removing their usage.
Fixes #5105
* Update spirv-tools-generated
* More DerivativeGroup*KHR test fixes
Add fixes for a missing test intrinsic-derivative-function-in-compute.slang
Use the {{NV|KHR}} syntax to tolerate either enum.
Fixes #5106
* Squash tabs in closesthit test
* HACK test CI
* Avoid multiple IncomingRayPayloadKHR storage params
* Revert "HACK test CI"
This reverts commit c2556ea2baef0bd48e4c86f90cf17dfab80015c1.
* Avoid multiple IncomingRayPayloadKHR storage params in anyhit
Diffstat (limited to 'tests/vkray')
| -rw-r--r-- | tests/vkray/anyhit.slang | 11 | ||||
| -rw-r--r-- | tests/vkray/closesthit.slang | 35 |
2 files changed, 24 insertions, 22 deletions
diff --git a/tests/vkray/anyhit.slang b/tests/vkray/anyhit.slang index 641fa3059..45d35b1fa 100644 --- a/tests/vkray/anyhit.slang +++ b/tests/vkray/anyhit.slang @@ -12,6 +12,7 @@ struct SphereHitAttributes struct ShadowRay { float4 hitDistance; + float3 dummyOut; }; struct Params @@ -42,13 +43,13 @@ void main( } uint index = 0U; - HitTriangleVertexPosition(index); + ioPayload.dummyOut = HitTriangleVertexPosition(index); - index = 1U; - HitTriangleVertexPosition(index); + index = 1U; + ioPayload.dummyOut += HitTriangleVertexPosition(index); - index = 2U; - HitTriangleVertexPosition(index); + index = 2U; + ioPayload.dummyOut += HitTriangleVertexPosition(index); } // SPIRV-DAG: OpCapability RayTracing diff --git a/tests/vkray/closesthit.slang b/tests/vkray/closesthit.slang index 31728abc1..b7d40e5f9 100644 --- a/tests/vkray/closesthit.slang +++ b/tests/vkray/closesthit.slang @@ -5,6 +5,7 @@ struct ReflectionRay { float4 color; + float3 dummyOut; }; StructuredBuffer<float4> colors; @@ -12,33 +13,33 @@ StructuredBuffer<float4> colors; layout(shaderRecordNV) cbuffer ShaderRecord { - uint shaderRecordID; + uint shaderRecordID; } void main( - BuiltInTriangleIntersectionAttributes attributes, - in out ReflectionRay ioPayload) + BuiltInTriangleIntersectionAttributes attributes, + in out ReflectionRay ioPayload) { - uint materialID = (InstanceIndex() << 1) - + InstanceID() - + PrimitiveIndex() - + HitKind() - + shaderRecordID; + uint materialID = (InstanceIndex() << 1) + + InstanceID() + + PrimitiveIndex() + + HitKind() + + shaderRecordID; - float4 color = colors[materialID]; + float4 color = colors[materialID]; - color *= RayTCurrent() - RayTMin(); + color *= RayTCurrent() - RayTMin(); - ioPayload.color = color; + ioPayload.color = color; - uint index = 0U; - HitTriangleVertexPosition(index); + uint index = 0U; + ioPayload.dummyOut = HitTriangleVertexPosition(index); - index = 1U; - HitTriangleVertexPosition(index); + index = 1U; + ioPayload.dummyOut += HitTriangleVertexPosition(index); - index = 2U; - HitTriangleVertexPosition(index); + index = 2U; + ioPayload.dummyOut += HitTriangleVertexPosition(index); } // CHECK: OpCapability RayTracing |
