summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-05-15 14:29:46 -0400
committerRob Clark <[email protected]>2018-05-15 15:15:33 -0400
commitd89f58a6b8436b59dcf3b896c0ccddabed3f78fd (patch)
treea4b380ab5b57f46e9c859c8bede95bd577a40391 /src/mesa/state_tracker/st_program.c
parent3e27b377f2c0e1644c466cdb32872b771300ffda (diff)
mesa/st: handle vert_attrib_mask in nir case too
Note, actually fixes 9987a072cb, but the problems don't show up until 19a91841c3. Fixes: 19a91841c3 st/mesa: Use Array._DrawVAO in st_atom_array.c. Fixes: 9987a072cb st/mesa: Make the input_to_index array available. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index a52c9f82569..a7671b7fd1d 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -634,13 +634,6 @@ st_create_vp_variant(struct st_context *st,
fprintf(stderr, "mesa: cannot emulate deprecated features\n");
}
- for (unsigned index = 0; index < vpv->num_inputs; ++index) {
- unsigned attr = stvp->index_to_input[index];
- if (attr == ST_DOUBLE_ATTRIB_PLACEHOLDER)
- continue;
- vpv->vert_attrib_mask |= 1u << attr;
- }
-
if (ST_DEBUG & DEBUG_TGSI) {
tgsi_dump(vpv->tgsi.tokens, 0);
debug_printf("\n");
@@ -672,6 +665,13 @@ st_get_vp_variant(struct st_context *st,
/* create now */
vpv = st_create_vp_variant(st, stvp, key);
if (vpv) {
+ for (unsigned index = 0; index < vpv->num_inputs; ++index) {
+ unsigned attr = stvp->index_to_input[index];
+ if (attr == ST_DOUBLE_ATTRIB_PLACEHOLDER)
+ continue;
+ vpv->vert_attrib_mask |= 1u << attr;
+ }
+
/* insert into list */
vpv->next = stvp->variants;
stvp->variants = vpv;