diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-05-19 21:32:03 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:32 +0200 |
commit | accad56ee7cc9f77886d164701a35f1e89a3519b (patch) | |
tree | 34b272f1f70d0c4d926877c4e960ccec0084ce17 /src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | |
parent | glasm: Implement gl_PointSize stores (diff) | |
download | yuzu-accad56ee7cc9f77886d164701a35f1e89a3519b.tar yuzu-accad56ee7cc9f77886d164701a35f1e89a3519b.tar.gz yuzu-accad56ee7cc9f77886d164701a35f1e89a3519b.tar.bz2 yuzu-accad56ee7cc9f77886d164701a35f1e89a3519b.tar.lz yuzu-accad56ee7cc9f77886d164701a35f1e89a3519b.tar.xz yuzu-accad56ee7cc9f77886d164701a35f1e89a3519b.tar.zst yuzu-accad56ee7cc9f77886d164701a35f1e89a3519b.zip |
Diffstat (limited to '')
-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 f362dd2c8..6484387bc 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 @@ -7,6 +7,7 @@ #include "shader_recompiler/backend/glasm/emit_context.h" #include "shader_recompiler/backend/glasm/emit_glasm_instructions.h" #include "shader_recompiler/frontend/ir/value.h" +#include "shader_recompiler/profile.h" namespace Shader::Backend::GLASM { namespace { @@ -102,6 +103,13 @@ void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, ScalarF32 value, case IR::Attribute::PositionW: ctx.Add("MOV.F result.position.{},{};", swizzle, value); break; + case IR::Attribute::ViewportIndex: + if (ctx.stage == Stage::Geometry || ctx.profile.support_viewport_index_layer_non_geometry) { + ctx.Add("MOV.F result.viewport.x,{};", value); + } else { + // LOG_WARNING + } + break; default: throw NotImplementedException("Set attribute {}", attr); } |