dawn-cmake/test/tint/shader_io/vertex_input_builtins.wgsl....

53 lines
2.2 KiB
Plaintext
Raw Permalink Normal View History

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 27
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %main "main" %vertex_index_1 %instance_index_1 %value %vertex_point_size
OpName %vertex_index_1 "vertex_index_1"
OpName %instance_index_1 "instance_index_1"
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %main_inner "main_inner"
OpName %vertex_index "vertex_index"
OpName %instance_index "instance_index"
OpName %main "main"
OpDecorate %vertex_index_1 BuiltIn VertexIndex
OpDecorate %instance_index_1 BuiltIn InstanceIndex
OpDecorate %value BuiltIn Position
OpDecorate %vertex_point_size BuiltIn PointSize
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%vertex_index_1 = OpVariable %_ptr_Input_uint Input
%instance_index_1 = OpVariable %_ptr_Input_uint Input
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%9 = OpConstantNull %v4float
%value = OpVariable %_ptr_Output_v4float Output %9
%_ptr_Output_float = OpTypePointer Output %float
%12 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %12
%13 = OpTypeFunction %v4float %uint %uint
%void = OpTypeVoid
%19 = OpTypeFunction %void
%float_1 = OpConstant %float 1
%main_inner = OpFunction %v4float None %13
%vertex_index = OpFunctionParameter %uint
%instance_index = OpFunctionParameter %uint
%17 = OpLabel
%18 = OpIAdd %uint %vertex_index %instance_index
OpReturnValue %9
OpFunctionEnd
%main = OpFunction %void None %19
%22 = OpLabel
%24 = OpLoad %uint %vertex_index_1
%25 = OpLoad %uint %instance_index_1
%23 = OpFunctionCall %v4float %main_inner %24 %25
OpStore %value %23
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd