From 4485cf3eaf142cfd5f8470e86739acc67d4e12ea Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 6 Mar 2025 14:26:34 -0800 Subject: Update SPIRV-Tools and fix new validation errors. (#6511) * Update SPIRV-Tools and fix new validation errors. * Implement pointers for glsl target. * Reworked packStorage/unpackStorage code gen to operate on pointers rather than values. --- tests/hlsl-intrinsic/const-buffer-pointer.slang | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'tests/hlsl-intrinsic') diff --git a/tests/hlsl-intrinsic/const-buffer-pointer.slang b/tests/hlsl-intrinsic/const-buffer-pointer.slang index 060871307..9fd8a23d8 100644 --- a/tests/hlsl-intrinsic/const-buffer-pointer.slang +++ b/tests/hlsl-intrinsic/const-buffer-pointer.slang @@ -1,33 +1,27 @@ //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-via-glsl //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 // SPV: OpConvertPtrToU -// SPV: OpIAdd -// SPV: OpConvertUToPtr -// SPV: OpLoad +// SPV: OpINotEqual struct MyStruct { float4 position; float4x4 transform; } -// CHECK: layout(buffer_reference, std430, buffer_reference_align = 16) readonly buffer BufferPointer_MyStruct +// CHECK: layout(buffer_reference, std430, buffer_reference_align = 4) readonly buffer BufferPointer_MyStruct // CHECK-NEXT: { // CHECK-NEXT: MyStruct{{.*}} _data; // CHECK-NEXT: } -// CHECK: struct Globals +// CHECK: struct ConstBufferPointer // CHECK-NEXT: { -// CHECK-NEXT: BufferPointer_MyStruct{{.*}} pStruct +// CHECK-NEXT: BufferPointer_MyStruct{{.*}} _ptr // CHECK-NEXT: } -// CHECK: void main -// CHECK: MyStruct{{.*}} s{{.*}} = ((gGlobals{{.*}}.pStruct{{.*}})._data); - struct Globals { ConstBufferPointer pStruct; -- cgit v1.2.3