diff options
author | Dave Airlie <airlied@redhat.com> | 2022-02-03 12:58:45 +1000 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-02-04 06:31:15 +0000 |
commit | cd4d2e920cbf05b000b8288a8f78987f23c182c3 (patch) | |
tree | e63c881df37f9ed6ae4390e1e39dd3f28ba1f69c | |
parent | a448695eee1cffe59ebdd641f746b0f4bdb5f115 (diff) |
llvmpipe: just move opaque alpha lookup closer to use.
Saves looking this up before checking the variant.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14846>
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_tri.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index e988ddfe641..76c803ae785 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -233,7 +233,6 @@ check_opaque(struct lp_setup_context *setup, { const struct lp_fragment_shader_variant *variant = setup->fs.current.variant; - const struct lp_tgsi_channel_info *alpha_info = &variant->shader->info.cbuf[0][3]; if (variant->opaque) return TRUE; @@ -241,6 +240,7 @@ check_opaque(struct lp_setup_context *setup, if (!variant->potentially_opaque) return FALSE; + const struct lp_tgsi_channel_info *alpha_info = &variant->shader->info.cbuf[0][3]; if (alpha_info->file == TGSI_FILE_CONSTANT) { const float *constants = setup->fs.current.jit_context.constants[0]; float alpha = constants[alpha_info->u.index*4 + |