diff options
author | Nicolai Hähnle <[email protected]> | 2019-04-01 15:45:25 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2019-05-13 17:07:23 +0200 |
commit | 8a951c3d2f89f7d070ffb47e5db4351fd4c43401 (patch) | |
tree | ec8c2595a56504cb6fea2fc4ad7d219b6f4510a1 | |
parent | 81fe33735a5562ac224679ce548ee90b0d3f3402 (diff) |
radeonsi: store sctx->vertex_elements in a local in si_shader_selector_key_vs
Purely as a shorthand in the remainder of the function.
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index db4c77da2ff..a9c5c7b9e4d 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1379,19 +1379,18 @@ static void si_shader_selector_key_vs(struct si_context *sctx, vs->info.properties[TGSI_PROPERTY_VS_BLIT_SGPRS]) return; - prolog_key->instance_divisor_is_one = - sctx->vertex_elements->instance_divisor_is_one; - prolog_key->instance_divisor_is_fetched = - sctx->vertex_elements->instance_divisor_is_fetched; + struct si_vertex_elements *elts = sctx->vertex_elements; + + prolog_key->instance_divisor_is_one = elts->instance_divisor_is_one; + prolog_key->instance_divisor_is_fetched = elts->instance_divisor_is_fetched; /* Prefer a monolithic shader to allow scheduling divisions around * VBO loads. */ if (prolog_key->instance_divisor_is_fetched) key->opt.prefer_mono = 1; - unsigned count = MIN2(vs->info.num_inputs, - sctx->vertex_elements->count); - memcpy(key->mono.vs_fix_fetch, sctx->vertex_elements->fix_fetch, count); + unsigned count = MIN2(vs->info.num_inputs, elts->count); + memcpy(key->mono.vs_fix_fetch, elts->fix_fetch, count); } static void si_shader_selector_key_hw_vs(struct si_context *sctx, |