mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 14:10:09 +01:00
glsl: handle partial swizzles in opt_dead_code_local correctly
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
e27333a568
commit
0f6360eedb
1 changed files with 6 additions and 3 deletions
|
|
@ -106,9 +106,12 @@ public:
|
|||
|
||||
int used = 0;
|
||||
used |= 1 << ir->mask.x;
|
||||
used |= 1 << ir->mask.y;
|
||||
used |= 1 << ir->mask.z;
|
||||
used |= 1 << ir->mask.w;
|
||||
if (ir->mask.num_components > 1)
|
||||
used |= 1 << ir->mask.y;
|
||||
if (ir->mask.num_components > 2)
|
||||
used |= 1 << ir->mask.z;
|
||||
if (ir->mask.num_components > 3)
|
||||
used |= 1 << ir->mask.w;
|
||||
|
||||
use_channels(deref->var, used);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue