diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-20 07:40:21 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:39 +0200 |
commit | 3a2dd1b48310e2912e7f7f90da15bff555ef7256 (patch) | |
tree | 873c0d23ee8b69723e0648152b7c5c09e04ec03a /src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | |
parent | gl_graphics_pipeline: Inline hash and operator== key functions (diff) | |
download | yuzu-3a2dd1b48310e2912e7f7f90da15bff555ef7256.tar yuzu-3a2dd1b48310e2912e7f7f90da15bff555ef7256.tar.gz yuzu-3a2dd1b48310e2912e7f7f90da15bff555ef7256.tar.bz2 yuzu-3a2dd1b48310e2912e7f7f90da15bff555ef7256.tar.lz yuzu-3a2dd1b48310e2912e7f7f90da15bff555ef7256.tar.xz yuzu-3a2dd1b48310e2912e7f7f90da15bff555ef7256.tar.zst yuzu-3a2dd1b48310e2912e7f7f90da15bff555ef7256.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp index 20b925877..bc195d248 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp @@ -157,6 +157,14 @@ void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, ScalarF32 value, "Viewport stored outside of geometry shader not supported by device"); } break; + case IR::Attribute::ViewportMask: + // NV_viewport_array2 is required to access result.viewportmask, regardless of shader stage. + if (ctx.profile.support_viewport_index_layer_non_geometry) { + ctx.Add("MOV.F result.viewportmask[0].x,{};", value); + } else { + LOG_WARNING(Shader_GLASM, "Device does not support storing to ViewportMask"); + } + break; case IR::Attribute::PointSize: ctx.Add("MOV.F result.pointsize.x,{};", value); break; |