Vulkan UI: Fix invalid push constant usage in immediate.frag/vert (and update shaders)
This commit is contained in:
@@ -4,81 +4,79 @@
|
||||
; Bound: 49
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability ClipDistance
|
||||
OpCapability CullDistance
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %4 "main" %13 %18 %35
|
||||
OpEntryPoint Vertex %main "main" %_ %vfetch_pos %vtx_uv
|
||||
OpSource GLSL 450
|
||||
OpName %4 "main"
|
||||
OpName %11 "gl_PerVertex"
|
||||
OpMemberName %11 0 "gl_Position"
|
||||
OpMemberName %11 1 "gl_PointSize"
|
||||
OpMemberName %11 2 "gl_ClipDistance"
|
||||
OpMemberName %11 3 "gl_CullDistance"
|
||||
OpName %13 ""
|
||||
OpName %18 "vfetch_pos"
|
||||
OpName %35 "vtx_uv"
|
||||
OpName %37 "PushConstants"
|
||||
OpMemberName %37 0 "src_uv"
|
||||
OpName %39 "push_constants"
|
||||
OpMemberDecorate %11 0 BuiltIn Position
|
||||
OpMemberDecorate %11 1 BuiltIn PointSize
|
||||
OpMemberDecorate %11 2 BuiltIn ClipDistance
|
||||
OpMemberDecorate %11 3 BuiltIn CullDistance
|
||||
OpDecorate %11 Block
|
||||
OpDecorate %18 Location 0
|
||||
OpDecorate %35 Location 0
|
||||
OpMemberDecorate %37 0 Offset 0
|
||||
OpDecorate %37 Block
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeFunction %2
|
||||
%6 = OpTypeFloat 32
|
||||
%7 = OpTypeVector %6 4
|
||||
%8 = OpTypeInt 32 0
|
||||
%9 = OpConstant %8 1
|
||||
%10 = OpTypeArray %6 %9
|
||||
%11 = OpTypeStruct %7 %6 %10 %10
|
||||
%12 = OpTypePointer Output %11
|
||||
%13 = OpVariable %12 Output
|
||||
%14 = OpTypeInt 32 1
|
||||
%15 = OpConstant %14 0
|
||||
%16 = OpTypeVector %6 2
|
||||
%17 = OpTypePointer Input %16
|
||||
%18 = OpVariable %17 Input
|
||||
%20 = OpConstant %6 2
|
||||
%21 = OpConstant %6 -2
|
||||
%22 = OpConstantComposite %16 %20 %21
|
||||
%24 = OpConstant %6 1
|
||||
%25 = OpConstant %6 -1
|
||||
%26 = OpConstantComposite %16 %24 %25
|
||||
%28 = OpConstant %6 0
|
||||
%32 = OpTypePointer Output %7
|
||||
%34 = OpTypePointer Output %16
|
||||
%35 = OpVariable %34 Output
|
||||
%37 = OpTypeStruct %7
|
||||
%38 = OpTypePointer PushConstant %37
|
||||
%39 = OpVariable %38 PushConstant
|
||||
%40 = OpTypePointer PushConstant %7
|
||||
%4 = OpFunction %2 None %3
|
||||
OpName %main "main"
|
||||
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"
|
||||
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
|
||||
%uint = OpTypeInt 32 0
|
||||
%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
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_ptr_Output_v2float = OpTypePointer Output %v2float
|
||||
%vtx_uv = OpVariable %_ptr_Output_v2float Output
|
||||
%PushConstants = OpTypeStruct %v4float
|
||||
%_ptr_PushConstant_PushConstants = OpTypePointer PushConstant %PushConstants
|
||||
%push_constants = OpVariable %_ptr_PushConstant_PushConstants PushConstant
|
||||
%_ptr_PushConstant_v4float = OpTypePointer PushConstant %v4float
|
||||
%main = OpFunction %void None %3
|
||||
%5 = OpLabel
|
||||
%19 = OpLoad %16 %18
|
||||
%23 = OpFMul %16 %19 %22
|
||||
%27 = OpFSub %16 %23 %26
|
||||
%29 = OpCompositeExtract %6 %27 0
|
||||
%30 = OpCompositeExtract %6 %27 1
|
||||
%31 = OpCompositeConstruct %7 %29 %30 %28 %24
|
||||
%33 = OpAccessChain %32 %13 %15
|
||||
%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 %16 %18
|
||||
%41 = OpAccessChain %40 %39 %15
|
||||
%42 = OpLoad %7 %41
|
||||
%43 = OpVectorShuffle %16 %42 %42 2 3
|
||||
%44 = OpFMul %16 %36 %43
|
||||
%45 = OpAccessChain %40 %39 %15
|
||||
%46 = OpLoad %7 %45
|
||||
%47 = OpVectorShuffle %16 %46 %46 0 1
|
||||
%48 = OpFAdd %16 %44 %47
|
||||
OpStore %35 %48
|
||||
%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
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user