summaryrefslogtreecommitdiffstats
path: root/tests/hlsl-intrinsic
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-03-06 14:26:34 -0800
committerGitHub <noreply@github.com>2025-03-06 14:26:34 -0800
commit4485cf3eaf142cfd5f8470e86739acc67d4e12ea (patch)
treec6ce220dfe5f3ab25ea558f2512f3761c9565c69 /tests/hlsl-intrinsic
parent55dd2deaff82bbdb72e125ba4b350030b7e5f427 (diff)
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.
Diffstat (limited to 'tests/hlsl-intrinsic')
-rw-r--r--tests/hlsl-intrinsic/const-buffer-pointer.slang16
1 files changed, 5 insertions, 11 deletions
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<MyStruct> pStruct;