diff options
Diffstat (limited to 'tests/hlsl-intrinsic/const-buffer-pointer.slang')
| -rw-r--r-- | tests/hlsl-intrinsic/const-buffer-pointer.slang | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/hlsl-intrinsic/const-buffer-pointer.slang b/tests/hlsl-intrinsic/const-buffer-pointer.slang index eddfc3be0..ec242fa07 100644 --- a/tests/hlsl-intrinsic/const-buffer-pointer.slang +++ b/tests/hlsl-intrinsic/const-buffer-pointer.slang @@ -1,8 +1,10 @@ //TEST:SIMPLE(filecheck=CHECK):-target glsl -profile glsl_450 -entry main -stage compute //TEST:SIMPLE(filecheck=SPV):-target spirv -profile glsl_450 -entry main -stage compute - +//TEST:SIMPLE(filecheck=SPV):-target spirv -profile glsl_450 -entry main -stage compute -emit-spirv-directly +// SPV: OpMemoryModel PhysicalStorageBuffer64 // SPV: OpEntryPoint GLCompute {{.*}} "main" {{.*}} - +// SPV: OpTypePointer PhysicalStorageBuffer +// SPV: OpINotEqual struct MyStruct { float4 position; @@ -34,6 +36,9 @@ RWStructuredBuffer<uint> outputBuffer; [numthreads(1,1,1)] void main(int3 tid: SV_DispatchThreadID) { - MyStruct s = gGlobals.pStruct.get(); - outputBuffer[tid.x] = uint(s.position.x); + if (gGlobals.pStruct.isValid()) + { + MyStruct s = gGlobals.pStruct.get(); + outputBuffer[tid.x] = uint(s.position.x); + } } |
