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:
parent
a448695eee
commit
cd4d2e920c
|
@ -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 +
|
||||
|
|
Loading…
Reference in New Issue