dawn-cmake/test/tint/bug/chromium/1367602_storage_space.wgsl.expected.spvasm
Zhaoming Jiang 6ab5d3c151 Tint/transform: make AddBlockAttribute always do wrapping if possible
This CL make transform AddBlockAttribute always try to wrap types used
by buffer variables into a struct, in order to generate valid GLSL code
for assigning one buffer struct variable to another buffer struct
variable.

Fixed: tint:1735
Change-Id: I009d8a9ca7ecea1dc0ad6164275c964a18acb33f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108023
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
2022-11-02 02:25:38 +00:00

51 lines
2.1 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 18
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %v_block "v_block"
OpMemberName %v_block 0 "inner"
OpName %v "v"
OpName %b_block "b_block"
OpMemberName %b_block 0 "inner"
OpName %A "A"
OpMemberName %A 0 "a"
OpName %b "b"
OpName %unused_entry_point "unused_entry_point"
OpDecorate %v_block Block
OpMemberDecorate %v_block 0 Offset 0
OpDecorate %_arr_int_uint_1000000 ArrayStride 4
OpDecorate %v NonWritable
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
OpDecorate %b_block Block
OpMemberDecorate %b_block 0 Offset 0
OpMemberDecorate %A 0 Offset 0
OpDecorate %_arr_float_uint_1000000 ArrayStride 4
OpDecorate %b NonWritable
OpDecorate %b DescriptorSet 0
OpDecorate %b Binding 1
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_1000000 = OpConstant %uint 1000000
%_arr_int_uint_1000000 = OpTypeArray %int %uint_1000000
%v_block = OpTypeStruct %_arr_int_uint_1000000
%_ptr_StorageBuffer_v_block = OpTypePointer StorageBuffer %v_block
%v = OpVariable %_ptr_StorageBuffer_v_block StorageBuffer
%float = OpTypeFloat 32
%_arr_float_uint_1000000 = OpTypeArray %float %uint_1000000
%A = OpTypeStruct %_arr_float_uint_1000000
%b_block = OpTypeStruct %A
%_ptr_StorageBuffer_b_block = OpTypePointer StorageBuffer %b_block
%b = OpVariable %_ptr_StorageBuffer_b_block StorageBuffer
%void = OpTypeVoid
%14 = OpTypeFunction %void
%unused_entry_point = OpFunction %void None %14
%17 = OpLabel
OpReturn
OpFunctionEnd