aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-12-11 11:45:09 +1100
committerTimothy Arceri <[email protected]>2018-01-05 11:58:55 +1100
commit9755eeb15a1396e36afc068d31aa109adbdd3082 (patch)
tree87ab6c260fdeac1a83ffd3a2c3c6285fe14f73ab /src/gallium/auxiliary/tgsi/tgsi_from_mesa.c
parent452586b56ab4cc787cd5843f6fd89e682e24ec79 (diff)
gallium/tgsi: add patch support to tgsi_get_gl_varying_semantic()
Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_from_mesa.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_from_mesa.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c b/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c
index c014115918e..659156b5190 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c
@@ -154,9 +154,14 @@ tgsi_get_gl_varying_semantic(gl_varying_slot attr,
default:
assert(attr >= VARYING_SLOT_VAR0 ||
(attr >= VARYING_SLOT_TEX0 && attr <= VARYING_SLOT_TEX7));
- *semantic_name = TGSI_SEMANTIC_GENERIC;
- *semantic_index =
- tgsi_get_generic_gl_varying_index(attr, needs_texcoord_semantic);
+ if (attr >= VARYING_SLOT_PATCH0) {
+ *semantic_name = TGSI_SEMANTIC_PATCH;
+ *semantic_index = attr - VARYING_SLOT_PATCH0;
+ } else {
+ *semantic_name = TGSI_SEMANTIC_GENERIC;
+ *semantic_index =
+ tgsi_get_generic_gl_varying_index(attr, needs_texcoord_semantic);
+ }
break;
}
}