diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-12 06:35:31 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-13 22:33:05 +0100 |
commit | 62560f1e6356747e7a2723eab12528e657a76a4f (patch) | |
tree | e2dfe618bcba36e1c4be6b46ea0a892a2b1fe8d4 | |
parent | maxwell_3d: Add padding words to XFB entries (diff) | |
download | yuzu-62560f1e6356747e7a2723eab12528e657a76a4f.tar yuzu-62560f1e6356747e7a2723eab12528e657a76a4f.tar.gz yuzu-62560f1e6356747e7a2723eab12528e657a76a4f.tar.bz2 yuzu-62560f1e6356747e7a2723eab12528e657a76a4f.tar.lz yuzu-62560f1e6356747e7a2723eab12528e657a76a4f.tar.xz yuzu-62560f1e6356747e7a2723eab12528e657a76a4f.tar.zst yuzu-62560f1e6356747e7a2723eab12528e657a76a4f.zip |
-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: // Clear Position to avoid reading trash on the Z conversion. const auto position_index = out_indices.position.value(); const Id position = AccessElement(t_out_float4, out_vertex, position_index); - OpStore(position, ConstantNull(t_float4)); + OpStore(position, v_varying_default); if (specialization.point_size) { const u32 point_size_index = out_indices.point_size.value(); @@ -794,7 +794,7 @@ private: } Id type = GetTypeVectorDefinitionLut(Type::Float).at(num_components - 1); - Id varying_default = ConstantNull(type); + Id varying_default = v_varying_default; if (IsOutputAttributeArray()) { const u32 num = GetNumOutputVertices(); type = TypeArray(type, Constant(t_uint, num)); @@ -2650,6 +2650,10 @@ private: const Id v_float_zero = Constant(t_float, 0.0f); const Id v_float_one = Constant(t_float, 1.0f); + // Nvidia uses these defaults for varyings (e.g. position and generic attributes) + const Id v_varying_default = + ConstantComposite(t_float4, v_float_zero, v_float_zero, v_float_zero, v_float_one); + const Id v_true = ConstantTrue(t_bool); const Id v_false = ConstantFalse(t_bool); |