diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-02 06:48:49 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:37 +0200 |
commit | 6577a63d368afa57d5f29df40e524af30eaabffa (patch) | |
tree | f7f8395570364499933551332c4c9c92c00d650d /src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | |
parent | glsl: Implement transform feedback (diff) | |
download | yuzu-6577a63d368afa57d5f29df40e524af30eaabffa.tar yuzu-6577a63d368afa57d5f29df40e524af30eaabffa.tar.gz yuzu-6577a63d368afa57d5f29df40e524af30eaabffa.tar.bz2 yuzu-6577a63d368afa57d5f29df40e524af30eaabffa.tar.lz yuzu-6577a63d368afa57d5f29df40e524af30eaabffa.tar.xz yuzu-6577a63d368afa57d5f29df40e524af30eaabffa.tar.zst yuzu-6577a63d368afa57d5f29df40e524af30eaabffa.zip |
Diffstat (limited to '')
-rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | 5 |
1 files changed, 5 insertions, 0 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 c48492a17..ebaf50abd 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 @@ -226,6 +226,11 @@ void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view val ctx.Add("gl_Position.{}={};", swizzle, value); break; case IR::Attribute::ViewportIndex: + if (ctx.stage != Stage::Geometry && !ctx.supports_viewport_layer) { + // LOG_WARNING(..., "Shader stores viewport index but device does not support viewport + // layer extension"); + break; + } ctx.Add("gl_ViewportIndex=floatBitsToInt({});", value); break; case IR::Attribute::ClipDistance0: |