Vulkan UI: Set up the blitter.
This commit is contained in:
@@ -1,56 +1,64 @@
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: Khronos Glslang Reference Front End; 1
|
||||
; Bound: 49
|
||||
; Bound: 60
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %main "main" %_ %vfetch_pos %vtx_uv
|
||||
OpEntryPoint Vertex %main "main" %gl_VertexIndex %_ %vtx_uv
|
||||
OpSource GLSL 450
|
||||
OpName %main "main"
|
||||
OpName %vfetch_pos "vfetch_pos"
|
||||
OpName %gl_VertexIndex "gl_VertexIndex"
|
||||
OpName %indexable "indexable"
|
||||
OpName %gl_PerVertex "gl_PerVertex"
|
||||
OpMemberName %gl_PerVertex 0 "gl_Position"
|
||||
OpMemberName %gl_PerVertex 1 "gl_PointSize"
|
||||
OpMemberName %gl_PerVertex 2 "gl_ClipDistance"
|
||||
OpMemberName %gl_PerVertex 3 "gl_CullDistance"
|
||||
OpName %_ ""
|
||||
OpName %vfetch_pos "vfetch_pos"
|
||||
OpName %vtx_uv "vtx_uv"
|
||||
OpName %PushConstants "PushConstants"
|
||||
OpMemberName %PushConstants 0 "src_uv"
|
||||
OpName %push_constants "push_constants"
|
||||
OpDecorate %gl_VertexIndex BuiltIn VertexIndex
|
||||
OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
|
||||
OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
|
||||
OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
|
||||
OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
|
||||
OpDecorate %gl_PerVertex Block
|
||||
OpDecorate %vfetch_pos Location 0
|
||||
OpDecorate %vtx_uv Location 0
|
||||
OpMemberDecorate %PushConstants 0 Offset 0
|
||||
OpDecorate %PushConstants Block
|
||||
%void = OpTypeVoid
|
||||
%3 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%v2float = OpTypeVector %float 2
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_v2float_uint_4 = OpTypeArray %v2float %uint_4
|
||||
%float_0 = OpConstant %float 0
|
||||
%14 = OpConstantComposite %v2float %float_0 %float_0
|
||||
%float_1 = OpConstant %float 1
|
||||
%16 = OpConstantComposite %v2float %float_1 %float_0
|
||||
%17 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%18 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%19 = OpConstantComposite %_arr_v2float_uint_4 %14 %16 %17 %18
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Input_int = OpTypePointer Input %int
|
||||
%gl_VertexIndex = OpVariable %_ptr_Input_int Input
|
||||
%_ptr_Function__arr_v2float_uint_4 = OpTypePointer Function %_arr_v2float_uint_4
|
||||
%v4float = OpTypeVector %float 4
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_float_uint_1 = OpTypeArray %float %uint_1
|
||||
%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
|
||||
%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
|
||||
%_ = OpVariable %_ptr_Output_gl_PerVertex Output
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%v2float = OpTypeVector %float 2
|
||||
%_ptr_Input_v2float = OpTypePointer Input %v2float
|
||||
%vfetch_pos = OpVariable %_ptr_Input_v2float Input
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_n2 = OpConstant %float -2
|
||||
%22 = OpConstantComposite %v2float %float_2 %float_n2
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_n1 = OpConstant %float -1
|
||||
%26 = OpConstantComposite %v2float %float_1 %float_n1
|
||||
%float_0 = OpConstant %float 0
|
||||
%37 = OpConstantComposite %v2float %float_2 %float_2
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_ptr_Output_v2float = OpTypePointer Output %v2float
|
||||
%vtx_uv = OpVariable %_ptr_Output_v2float Output
|
||||
@@ -60,23 +68,30 @@
|
||||
%_ptr_PushConstant_v4float = OpTypePointer PushConstant %v4float
|
||||
%main = OpFunction %void None %3
|
||||
%5 = OpLabel
|
||||
%19 = OpLoad %v2float %vfetch_pos
|
||||
%23 = OpFMul %v2float %19 %22
|
||||
%27 = OpFSub %v2float %23 %26
|
||||
%29 = OpCompositeExtract %float %27 0
|
||||
%30 = OpCompositeExtract %float %27 1
|
||||
%31 = OpCompositeConstruct %v4float %29 %30 %float_0 %float_1
|
||||
%33 = OpAccessChain %_ptr_Output_v4float %_ %int_0
|
||||
OpStore %33 %31
|
||||
%36 = OpLoad %v2float %vfetch_pos
|
||||
%41 = OpAccessChain %_ptr_PushConstant_v4float %push_constants %int_0
|
||||
%42 = OpLoad %v4float %41
|
||||
%43 = OpVectorShuffle %v2float %42 %42 2 3
|
||||
%44 = OpFMul %v2float %36 %43
|
||||
%45 = OpAccessChain %_ptr_PushConstant_v4float %push_constants %int_0
|
||||
%46 = OpLoad %v4float %45
|
||||
%47 = OpVectorShuffle %v2float %46 %46 0 1
|
||||
%48 = OpFAdd %v2float %44 %47
|
||||
OpStore %vtx_uv %48
|
||||
%vfetch_pos = OpVariable %_ptr_Function_v2float Function
|
||||
%indexable = OpVariable %_ptr_Function__arr_v2float_uint_4 Function
|
||||
%23 = OpLoad %int %gl_VertexIndex
|
||||
OpStore %indexable %19
|
||||
%26 = OpAccessChain %_ptr_Function_v2float %indexable %23
|
||||
%27 = OpLoad %v2float %26
|
||||
OpStore %vfetch_pos %27
|
||||
%35 = OpLoad %v2float %vfetch_pos
|
||||
%38 = OpFMul %v2float %35 %37
|
||||
%39 = OpFSub %v2float %38 %18
|
||||
%40 = OpCompositeExtract %float %39 0
|
||||
%41 = OpCompositeExtract %float %39 1
|
||||
%42 = OpCompositeConstruct %v4float %40 %41 %float_0 %float_1
|
||||
%44 = OpAccessChain %_ptr_Output_v4float %_ %int_0
|
||||
OpStore %44 %42
|
||||
%47 = OpLoad %v2float %vfetch_pos
|
||||
%52 = OpAccessChain %_ptr_PushConstant_v4float %push_constants %int_0
|
||||
%53 = OpLoad %v4float %52
|
||||
%54 = OpVectorShuffle %v2float %53 %53 2 3
|
||||
%55 = OpFMul %v2float %47 %54
|
||||
%56 = OpAccessChain %_ptr_PushConstant_v4float %push_constants %int_0
|
||||
%57 = OpLoad %v4float %56
|
||||
%58 = OpVectorShuffle %v2float %57 %57 0 1
|
||||
%59 = OpFAdd %v2float %55 %58
|
||||
OpStore %vtx_uv %59
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user