diff options
| author | 2021-04-18 09:07:48 +0200 | |
|---|---|---|
| committer | 2021-07-22 21:51:28 -0400 | |
| commit | f69d0b91ffad7d9ab827f55a9297b8f6da815cc9 (patch) | |
| tree | 5b75418c9ca3fa934f68fe0772ae4e876f802a5b /src/shader_recompiler/backend | |
| parent | shader: Add coarse derivatives (diff) | |
| download | yuzu-f69d0b91ffad7d9ab827f55a9297b8f6da815cc9.tar.gz yuzu-f69d0b91ffad7d9ab827f55a9297b8f6da815cc9.tar.xz yuzu-f69d0b91ffad7d9ab827f55a9297b8f6da815cc9.zip | |
shader: Address feedback
Diffstat (limited to 'src/shader_recompiler/backend')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.cpp | 2 | ||||
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index c4d5874ca..5d6fdeb65 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp | |||
| @@ -341,7 +341,7 @@ void SetupCapabilities(const Profile& profile, const Info& info, EmitContext& ct | |||
| 341 | if (!ctx.profile.xfb_varyings.empty()) { | 341 | if (!ctx.profile.xfb_varyings.empty()) { |
| 342 | ctx.AddCapability(spv::Capability::TransformFeedback); | 342 | ctx.AddCapability(spv::Capability::TransformFeedback); |
| 343 | } | 343 | } |
| 344 | if (info.uses_derivates) { | 344 | if (info.uses_derivatives) { |
| 345 | ctx.AddCapability(spv::Capability::DerivativeControl); | 345 | ctx.AddCapability(spv::Capability::DerivativeControl); |
| 346 | } | 346 | } |
| 347 | // TODO: Track this usage | 347 | // TODO: Track this usage |
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp index 1030404c0..ed57e44a2 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | |||
| @@ -404,10 +404,7 @@ Id EmitIsHelperInvocation(EmitContext& ctx) { | |||
| 404 | } | 404 | } |
| 405 | 405 | ||
| 406 | Id EmitYDirection(EmitContext& ctx) { | 406 | Id EmitYDirection(EmitContext& ctx) { |
| 407 | if (ctx.profile.y_negate) { | 407 | return ctx.Constant(ctx.F32[1], ctx.profile.y_negate ? -1.0f : 1.0f); |
| 408 | return ctx.Constant(ctx.F32[1], -1.0f); | ||
| 409 | } | ||
| 410 | return ctx.Constant(ctx.F32[1], 1.0f); | ||
| 411 | } | 408 | } |
| 412 | 409 | ||
| 413 | Id EmitLoadLocal(EmitContext& ctx, Id word_offset) { | 410 | Id EmitLoadLocal(EmitContext& ctx, Id word_offset) { |