diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-18 22:04:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-18 22:04:18 -0500 |
commit | 9c67334031ba979db7e1596f9015b1c134c23876 (patch) | |
tree | 3e89f99a0f3823d1eb76551719e5ffcbbb95b989 /src/shader_recompiler/backend/glasm | |
parent | 1fb33bd1e19fe0855072b08a91353a3b457fa85d (diff) | |
parent | 60e0d4a177803891720af4c5978bbf2604bed276 (diff) |
Merge pull request #9253 from vonchenplus/attr_layer
shader: Implement miss attribute layer
Diffstat (limited to 'src/shader_recompiler/backend/glasm')
-rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm.cpp | 1 | ||||
-rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index 3b0176bf68..0cb1e193e8 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp @@ -320,6 +320,7 @@ void SetupOptions(const IR::Program& program, const Profile& profile, } if (stage == Stage::Fragment) { header += "OPTION ARB_draw_buffers;"; + header += "OPTION ARB_fragment_layer_viewport;"; } } 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 d6562c842d..f0bd84ab2d 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 @@ -104,6 +104,9 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr, Scal case IR::Attribute::PrimitiveId: ctx.Add("MOV.F {}.x,primitive.id;", inst); break; + case IR::Attribute::Layer: + ctx.Add("MOV.F {}.x,fragment.layer;", inst); + break; case IR::Attribute::PositionX: case IR::Attribute::PositionY: case IR::Attribute::PositionZ: |