[vulkan] Point list rendering improvements

Implement register and vertex-shader-written point size. Fix point size
computation in geometry shader (convert pixel size to NDC scale using
viewport size). Fix point sprite coordinate generation.
This commit is contained in:
Dan Weatherford
2016-11-02 23:48:21 -05:00
parent c1db89b4dd
commit 6f6e638f2f
14 changed files with 1501 additions and 1296 deletions

View File

@@ -7,99 +7,101 @@
OpCapability Sampled1D
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main" %47 %51
OpExecutionMode %4 OriginUpperLeft
OpEntryPoint Fragment %main "main" %in_interpolators %oC
OpExecutionMode %main OriginUpperLeft
OpSource GLSL 450
OpName %4 "main"
OpName %16 "consts_type"
OpMemberName %16 0 "float_consts"
OpMemberName %16 1 "loop_consts"
OpMemberName %16 2 "bool_consts"
OpName %18 "consts"
OpName %19 "push_consts_type"
OpMemberName %19 0 "window_scale"
OpMemberName %19 1 "vtx_fmt"
OpMemberName %19 2 "alpha_test"
OpMemberName %19 3 "ps_param_gen"
OpName %21 "push_constants"
OpName %26 "textures1D"
OpName %31 "textures2D"
OpName %36 "textures3D"
OpName %41 "textures4D"
OpName %47 "in_interpolators"
OpName %51 "oC"
OpDecorate %11 ArrayStride 16
OpDecorate %13 ArrayStride 16
OpDecorate %15 ArrayStride 16
OpMemberDecorate %16 0 Offset 0
OpMemberDecorate %16 1 Offset 8192
OpMemberDecorate %16 2 Offset 8704
OpDecorate %16 Block
OpDecorate %18 DescriptorSet 0
OpDecorate %18 Binding 1
OpMemberDecorate %19 0 Offset 0
OpMemberDecorate %19 1 Offset 16
OpMemberDecorate %19 2 Offset 32
OpMemberDecorate %19 3 Offset 48
OpDecorate %19 Block
OpDecorate %26 DescriptorSet 1
OpDecorate %26 Binding 0
OpDecorate %31 DescriptorSet 1
OpDecorate %31 Binding 1
OpDecorate %36 DescriptorSet 1
OpDecorate %36 Binding 2
OpDecorate %41 DescriptorSet 1
OpDecorate %41 Binding 3
OpDecorate %47 Location 0
OpDecorate %51 Location 0
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%7 = OpTypeFloat 32
%8 = OpTypeVector %7 4
%9 = OpTypeInt 32 0
%10 = OpConstant %9 512
%11 = OpTypeArray %8 %10
%12 = OpConstant %9 32
%13 = OpTypeArray %9 %12
%14 = OpConstant %9 8
%15 = OpTypeArray %9 %14
%16 = OpTypeStruct %11 %13 %15
%17 = OpTypePointer Uniform %16
%18 = OpVariable %17 Uniform
%19 = OpTypeStruct %8 %8 %8 %9
%20 = OpTypePointer PushConstant %19
%21 = OpVariable %20 PushConstant
%22 = OpTypeImage %7 1D 0 0 0 1 Unknown
OpName %main "main"
OpName %consts_type "consts_type"
OpMemberName %consts_type 0 "float_consts"
OpMemberName %consts_type 1 "loop_consts"
OpMemberName %consts_type 2 "bool_consts"
OpName %consts "consts"
OpName %push_consts_type "push_consts_type"
OpMemberName %push_consts_type 0 "window_scale"
OpMemberName %push_consts_type 1 "vtx_fmt"
OpMemberName %push_consts_type 2 "point_size"
OpMemberName %push_consts_type 3 "alpha_test"
OpMemberName %push_consts_type 4 "ps_param_gen"
OpName %push_constants "push_constants"
OpName %textures1D "textures1D"
OpName %textures2D "textures2D"
OpName %textures3D "textures3D"
OpName %textures4D "textures4D"
OpName %in_interpolators "in_interpolators"
OpName %oC "oC"
OpDecorate %_arr_v4float_10 ArrayStride 16
OpDecorate %_arr_uint_12 ArrayStride 16
OpDecorate %_arr_uint_14 ArrayStride 16
OpMemberDecorate %consts_type 0 Offset 0
OpMemberDecorate %consts_type 1 Offset 8192
OpMemberDecorate %consts_type 2 Offset 8704
OpDecorate %consts_type Block
OpDecorate %consts DescriptorSet 0
OpDecorate %consts Binding 1
OpMemberDecorate %push_consts_type 0 Offset 0
OpMemberDecorate %push_consts_type 1 Offset 16
OpMemberDecorate %push_consts_type 2 Offset 32
OpMemberDecorate %push_consts_type 3 Offset 48
OpMemberDecorate %push_consts_type 4 Offset 64
OpDecorate %push_consts_type Block
OpDecorate %textures1D DescriptorSet 1
OpDecorate %textures1D Binding 0
OpDecorate %textures2D DescriptorSet 1
OpDecorate %textures2D Binding 1
OpDecorate %textures3D DescriptorSet 1
OpDecorate %textures3D Binding 2
OpDecorate %textures4D DescriptorSet 1
OpDecorate %textures4D Binding 3
OpDecorate %in_interpolators Location 0
OpDecorate %oC Location 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%uint = OpTypeInt 32 0
%10 = OpConstant %uint 512
%_arr_v4float_10 = OpTypeArray %v4float %10
%12 = OpConstant %uint 32
%_arr_uint_12 = OpTypeArray %uint %12
%14 = OpConstant %uint 8
%_arr_uint_14 = OpTypeArray %uint %14
%consts_type = OpTypeStruct %_arr_v4float_10 %_arr_uint_12 %_arr_uint_14
%_ptr_Uniform_consts_type = OpTypePointer Uniform %consts_type
%consts = OpVariable %_ptr_Uniform_consts_type Uniform
%push_consts_type = OpTypeStruct %v4float %v4float %v4float %v4float %uint
%_ptr_PushConstant_push_consts_type = OpTypePointer PushConstant %push_consts_type
%push_constants = OpVariable %_ptr_PushConstant_push_consts_type PushConstant
%22 = OpTypeImage %float 1D 0 0 0 1 Unknown
%23 = OpTypeSampledImage %22
%24 = OpTypeArray %23 %12
%25 = OpTypePointer UniformConstant %24
%26 = OpVariable %25 UniformConstant
%27 = OpTypeImage %7 2D 0 0 0 1 Unknown
%_arr_23_12 = OpTypeArray %23 %12
%_ptr_UniformConstant__arr_23_12 = OpTypePointer UniformConstant %_arr_23_12
%textures1D = OpVariable %_ptr_UniformConstant__arr_23_12 UniformConstant
%27 = OpTypeImage %float 2D 0 0 0 1 Unknown
%28 = OpTypeSampledImage %27
%29 = OpTypeArray %28 %12
%30 = OpTypePointer UniformConstant %29
%31 = OpVariable %30 UniformConstant
%32 = OpTypeImage %7 3D 0 0 0 1 Unknown
%_arr_28_12 = OpTypeArray %28 %12
%_ptr_UniformConstant__arr_28_12 = OpTypePointer UniformConstant %_arr_28_12
%textures2D = OpVariable %_ptr_UniformConstant__arr_28_12 UniformConstant
%32 = OpTypeImage %float 3D 0 0 0 1 Unknown
%33 = OpTypeSampledImage %32
%34 = OpTypeArray %33 %12
%35 = OpTypePointer UniformConstant %34
%36 = OpVariable %35 UniformConstant
%37 = OpTypeImage %7 Cube 0 0 0 1 Unknown
%_arr_33_12 = OpTypeArray %33 %12
%_ptr_UniformConstant__arr_33_12 = OpTypePointer UniformConstant %_arr_33_12
%textures3D = OpVariable %_ptr_UniformConstant__arr_33_12 UniformConstant
%37 = OpTypeImage %float Cube 0 0 0 1 Unknown
%38 = OpTypeSampledImage %37
%39 = OpTypeArray %38 %12
%40 = OpTypePointer UniformConstant %39
%41 = OpVariable %40 UniformConstant
%42 = OpConstant %9 16
%43 = OpTypeArray %8 %42
%44 = OpConstant %9 1
%45 = OpTypeArray %43 %44
%46 = OpTypePointer Input %45
%47 = OpVariable %46 Input
%48 = OpConstant %9 4
%49 = OpTypeArray %8 %48
%50 = OpTypePointer Output %49
%51 = OpVariable %50 Output
%4 = OpFunction %2 None %3
%_arr_38_12 = OpTypeArray %38 %12
%_ptr_UniformConstant__arr_38_12 = OpTypePointer UniformConstant %_arr_38_12
%textures4D = OpVariable %_ptr_UniformConstant__arr_38_12 UniformConstant
%42 = OpConstant %uint 16
%_arr_v4float_42 = OpTypeArray %v4float %42
%44 = OpConstant %uint 1
%_arr__arr_v4float_42_44 = OpTypeArray %_arr_v4float_42 %44
%_ptr_Input__arr__arr_v4float_42_44 = OpTypePointer Input %_arr__arr_v4float_42_44
%in_interpolators = OpVariable %_ptr_Input__arr__arr_v4float_42_44 Input
%48 = OpConstant %uint 4
%_arr_v4float_48 = OpTypeArray %v4float %48
%_ptr_Output__arr_v4float_48 = OpTypePointer Output %_arr_v4float_48
%oC = OpVariable %_ptr_Output__arr_v4float_48 Output
%main = OpFunction %void None %3
%5 = OpLabel
OpReturn
OpFunctionEnd