mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-05 11:45:54 +00:00
When these are used inside a function, we were not unwrapping the array from the struct that we wrapped it in. Fixed: tint:1385 Change-Id: Ide7bbd802394bf09819265be48d978ec9346adfe Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77180 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: James Price <jrprice@google.com>
44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 20
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint GLCompute %main "main"
|
|
OpExecutionMode %main LocalSize 16 16 1
|
|
OpName %data_block "data_block"
|
|
OpMemberName %data_block 0 "inner"
|
|
OpName %data "data"
|
|
OpName %foo "foo"
|
|
OpName %main "main"
|
|
OpDecorate %data_block Block
|
|
OpMemberDecorate %data_block 0 Offset 0
|
|
OpDecorate %_runtimearr_int ArrayStride 4
|
|
OpDecorate %data NonWritable
|
|
OpDecorate %data DescriptorSet 0
|
|
OpDecorate %data Binding 1
|
|
%int = OpTypeInt 32 1
|
|
%_runtimearr_int = OpTypeRuntimeArray %int
|
|
%data_block = OpTypeStruct %_runtimearr_int
|
|
%_ptr_StorageBuffer_data_block = OpTypePointer StorageBuffer %data_block
|
|
%data = OpVariable %_ptr_StorageBuffer_data_block StorageBuffer
|
|
%6 = OpTypeFunction %int
|
|
%uint = OpTypeInt 32 0
|
|
%uint_0 = OpConstant %uint 0
|
|
%int_0 = OpConstant %int 0
|
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
|
%void = OpTypeVoid
|
|
%15 = OpTypeFunction %void
|
|
%foo = OpFunction %int None %6
|
|
%8 = OpLabel
|
|
%13 = OpAccessChain %_ptr_StorageBuffer_int %data %uint_0 %int_0
|
|
%14 = OpLoad %int %13
|
|
OpReturnValue %14
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %15
|
|
%18 = OpLabel
|
|
%19 = OpFunctionCall %int %foo
|
|
OpReturn
|
|
OpFunctionEnd
|