diff options
author | Marek Olšák <[email protected]> | 2015-06-13 13:50:12 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-07-23 00:59:29 +0200 |
commit | 0af240e9401c12f4237f4a36a2474fe2cc590404 (patch) | |
tree | 4f5320f766bd378d60786f4e3bec67ce4e47247f /src/glsl/ast_to_hir.cpp | |
parent | d07023894434325de850faabf005224f7b8ef4b8 (diff) |
glsl: use separate varying slots for patch varyings
The idea is to allow 32 normal varyings and 32 patch varyings,
a total of 64. Previously, only a total of 32 was allowed.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 1cc0731e932..a45b6e8f026 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2367,7 +2367,10 @@ validate_explicit_location(const struct ast_type_qualifier *qual, case MESA_SHADER_TESS_CTRL: case MESA_SHADER_TESS_EVAL: case MESA_SHADER_GEOMETRY: - var->data.location = qual->location + VARYING_SLOT_VAR0; + if (var->data.patch) + var->data.location = qual->location + VARYING_SLOT_PATCH0; + else + var->data.location = qual->location + VARYING_SLOT_VAR0; break; case MESA_SHADER_FRAGMENT: |