mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-15 09:35:57 +00:00
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>
43 lines
1.7 KiB
Plaintext
43 lines
1.7 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 18
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint GLCompute %f "f"
|
|
OpExecutionMode %f LocalSize 1 1 1
|
|
OpName %ssbo_block "ssbo_block"
|
|
OpMemberName %ssbo_block 0 "inner"
|
|
OpName %SSBO "SSBO"
|
|
OpMemberName %SSBO 0 "m"
|
|
OpName %ssbo "ssbo"
|
|
OpName %f "f"
|
|
OpDecorate %ssbo_block Block
|
|
OpMemberDecorate %ssbo_block 0 Offset 0
|
|
OpMemberDecorate %SSBO 0 Offset 0
|
|
OpMemberDecorate %SSBO 0 ColMajor
|
|
OpMemberDecorate %SSBO 0 MatrixStride 8
|
|
OpDecorate %ssbo DescriptorSet 0
|
|
OpDecorate %ssbo Binding 0
|
|
%float = OpTypeFloat 32
|
|
%v2float = OpTypeVector %float 2
|
|
%mat2v2float = OpTypeMatrix %v2float 2
|
|
%SSBO = OpTypeStruct %mat2v2float
|
|
%ssbo_block = OpTypeStruct %SSBO
|
|
%_ptr_StorageBuffer_ssbo_block = OpTypePointer StorageBuffer %ssbo_block
|
|
%ssbo = OpVariable %_ptr_StorageBuffer_ssbo_block StorageBuffer
|
|
%void = OpTypeVoid
|
|
%8 = OpTypeFunction %void
|
|
%uint = OpTypeInt 32 0
|
|
%uint_0 = OpConstant %uint 0
|
|
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
|
|
%f = OpFunction %void None %8
|
|
%11 = OpLabel
|
|
%15 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %ssbo %uint_0 %uint_0
|
|
%16 = OpLoad %mat2v2float %15
|
|
%17 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %ssbo %uint_0 %uint_0
|
|
OpStore %17 %16
|
|
OpReturn
|
|
OpFunctionEnd
|