diff options
| author | 2020-03-12 02:35:31 -0300 | |
|---|---|---|
| committer | 2020-03-13 18:33:05 -0300 | |
| commit | 62560f1e6356747e7a2723eab12528e657a76a4f (patch) | |
| tree | e2dfe618bcba36e1c4be6b46ea0a892a2b1fe8d4 /src | |
| parent | maxwell_3d: Add padding words to XFB entries (diff) | |
| download | yuzu-62560f1e6356747e7a2723eab12528e657a76a4f.tar.gz yuzu-62560f1e6356747e7a2723eab12528e657a76a4f.tar.xz yuzu-62560f1e6356747e7a2723eab12528e657a76a4f.zip | |
vk_shader_decompiler: Fix default varying regression
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp index ed78bba02..7d51bf9af 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | |||
| @@ -423,7 +423,7 @@ private: | |||
| 423 | // Clear Position to avoid reading trash on the Z conversion. | 423 | // Clear Position to avoid reading trash on the Z conversion. |
| 424 | const auto position_index = out_indices.position.value(); | 424 | const auto position_index = out_indices.position.value(); |
| 425 | const Id position = AccessElement(t_out_float4, out_vertex, position_index); | 425 | const Id position = AccessElement(t_out_float4, out_vertex, position_index); |
| 426 | OpStore(position, ConstantNull(t_float4)); | 426 | OpStore(position, v_varying_default); |
| 427 | 427 | ||
| 428 | if (specialization.point_size) { | 428 | if (specialization.point_size) { |
| 429 | const u32 point_size_index = out_indices.point_size.value(); | 429 | const u32 point_size_index = out_indices.point_size.value(); |
| @@ -794,7 +794,7 @@ private: | |||
| 794 | } | 794 | } |
| 795 | 795 | ||
| 796 | Id type = GetTypeVectorDefinitionLut(Type::Float).at(num_components - 1); | 796 | Id type = GetTypeVectorDefinitionLut(Type::Float).at(num_components - 1); |
| 797 | Id varying_default = ConstantNull(type); | 797 | Id varying_default = v_varying_default; |
| 798 | if (IsOutputAttributeArray()) { | 798 | if (IsOutputAttributeArray()) { |
| 799 | const u32 num = GetNumOutputVertices(); | 799 | const u32 num = GetNumOutputVertices(); |
| 800 | type = TypeArray(type, Constant(t_uint, num)); | 800 | type = TypeArray(type, Constant(t_uint, num)); |
| @@ -2650,6 +2650,10 @@ private: | |||
| 2650 | const Id v_float_zero = Constant(t_float, 0.0f); | 2650 | const Id v_float_zero = Constant(t_float, 0.0f); |
| 2651 | const Id v_float_one = Constant(t_float, 1.0f); | 2651 | const Id v_float_one = Constant(t_float, 1.0f); |
| 2652 | 2652 | ||
| 2653 | // Nvidia uses these defaults for varyings (e.g. position and generic attributes) | ||
| 2654 | const Id v_varying_default = | ||
| 2655 | ConstantComposite(t_float4, v_float_zero, v_float_zero, v_float_zero, v_float_one); | ||
| 2656 | |||
| 2653 | const Id v_true = ConstantTrue(t_bool); | 2657 | const Id v_true = ConstantTrue(t_bool); |
| 2654 | const Id v_false = ConstantFalse(t_bool); | 2658 | const Id v_false = ConstantFalse(t_bool); |
| 2655 | 2659 | ||