diff options
| author | 2021-06-26 01:14:06 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:39 -0400 | |
| commit | 5643a909bc3fa9f497d2f2e68650f823ed2944ac (patch) | |
| tree | 9fd367abf424ed751d0053e22b7bc53ed6b4e61c /src/shader_recompiler/backend/glsl | |
| parent | glsl: Fix shared and local memory declarations (diff) | |
| download | yuzu-5643a909bc3fa9f497d2f2e68650f823ed2944ac.tar.gz yuzu-5643a909bc3fa9f497d2f2e68650f823ed2944ac.tar.xz yuzu-5643a909bc3fa9f497d2f2e68650f823ed2944ac.zip | |
shader: Fix disabled and unwritten attributes and varyings
Diffstat (limited to 'src/shader_recompiler/backend/glsl')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index 16e2a8502..d5424301b 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | |||
| @@ -179,8 +179,12 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr, | |||
| 179 | const char swizzle{"xyzw"[element]}; | 179 | const char swizzle{"xyzw"[element]}; |
| 180 | if (IR::IsGeneric(attr)) { | 180 | if (IR::IsGeneric(attr)) { |
| 181 | const u32 index{IR::GenericAttributeIndex(attr)}; | 181 | const u32 index{IR::GenericAttributeIndex(attr)}; |
| 182 | if (!ctx.runtime_info.previous_stage_stores.Generic(index)) { | 182 | if (!ctx.runtime_info.previous_stage_stores.Generic(index, element)) { |
| 183 | ctx.AddF32("{}=0.f;", inst, attr); | 183 | if (element == 3) { |
| 184 | ctx.AddF32("{}=1.f;", inst, attr); | ||
| 185 | } else { | ||
| 186 | ctx.AddF32("{}=0.f;", inst, attr); | ||
| 187 | } | ||
| 184 | return; | 188 | return; |
| 185 | } | 189 | } |
| 186 | ctx.AddF32("{}=in_attr{}{}.{};", inst, index, InputVertexIndex(ctx, vertex), swizzle); | 190 | ctx.AddF32("{}=in_attr{}{}.{};", inst, index, InputVertexIndex(ctx, vertex), swizzle); |