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>
This commit is contained in:
Dave Airlie 2022-02-03 12:58:45 +10:00 committed by Marge Bot
parent a448695eee
commit cd4d2e920c
1 changed files with 1 additions and 1 deletions

View File

@ -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 +