dawn-cmake/test/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.spvasm
Ben Clayton 5ac96af72c test: Add FXC test cases for indexing arrays in structs
Also move:
  test/fxc_bugs/vector_assignment_in_loop
to
  test/bug/fxc/vector_assignment_in_loop

Change-Id: I7bbfc476fdb7a3296025609625e322fed8d16285
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59444
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-07-23 16:44:52 +00:00

66 lines
2.6 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 29
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %UBO "UBO"
OpMemberName %UBO 0 "dynamic_idx"
OpName %ubo "ubo"
OpName %Result "Result"
OpMemberName %Result 0 "out"
OpName %result "result"
OpName %SSBO "SSBO"
OpMemberName %SSBO 0 "data"
OpName %ssbo "ssbo"
OpName %f "f"
OpDecorate %UBO Block
OpMemberDecorate %UBO 0 Offset 0
OpDecorate %ubo NonWritable
OpDecorate %ubo DescriptorSet 0
OpDecorate %ubo Binding 0
OpDecorate %Result Block
OpMemberDecorate %Result 0 Offset 0
OpDecorate %result DescriptorSet 0
OpDecorate %result Binding 2
OpDecorate %SSBO Block
OpMemberDecorate %SSBO 0 Offset 0
OpDecorate %_arr_int_uint_4 ArrayStride 4
OpDecorate %ssbo DescriptorSet 0
OpDecorate %ssbo Binding 1
%int = OpTypeInt 32 1
%UBO = OpTypeStruct %int
%_ptr_Uniform_UBO = OpTypePointer Uniform %UBO
%ubo = OpVariable %_ptr_Uniform_UBO Uniform
%Result = OpTypeStruct %int
%_ptr_StorageBuffer_Result = OpTypePointer StorageBuffer %Result
%result = OpVariable %_ptr_StorageBuffer_Result StorageBuffer
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%SSBO = OpTypeStruct %_arr_int_uint_4
%_ptr_StorageBuffer_SSBO = OpTypePointer StorageBuffer %SSBO
%ssbo = OpVariable %_ptr_StorageBuffer_SSBO StorageBuffer
%void = OpTypeVoid
%14 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_1 = OpConstant %int 1
%int_3 = OpConstant %int 3
%f = OpFunction %void None %14
%17 = OpLabel
%20 = OpAccessChain %_ptr_Uniform_int %ubo %uint_0
%21 = OpLoad %int %20
%23 = OpAccessChain %_ptr_StorageBuffer_int %ssbo %uint_0 %21
OpStore %23 %int_1
%25 = OpAccessChain %_ptr_StorageBuffer_int %result %uint_0
%27 = OpAccessChain %_ptr_StorageBuffer_int %ssbo %uint_0 %int_3
%28 = OpLoad %int %27
OpStore %25 %28
OpReturn
OpFunctionEnd