From: Nicolai Hähnle <[email protected]>

Purely as a shorthand in the remainder of the function.
---
 src/gallium/drivers/radeonsi/si_state_shaders.c | 13 ++++++-------
 1 file 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 f57e7730905..583d7c9d3ca 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1372,33 +1372,32 @@ static unsigned si_get_alpha_test_func(struct 
si_context *sctx)
 
 static void si_shader_selector_key_vs(struct si_context *sctx,
                                      struct si_shader_selector *vs,
                                      struct si_shader_key *key,
                                      struct si_vs_prolog_bits *prolog_key)
 {
        if (!sctx->vertex_elements ||
            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,
                                         struct si_shader_selector *vs,
                                         struct si_shader_key *key)
 {
        struct si_shader_selector *ps = sctx->ps_shader.cso;
 
        key->opt.clip_disable =
                sctx->queued.named.rasterizer->clip_plane_enable == 0 &&
-- 
2.20.1

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to