Procházet zdrojové kódy

glsl: handle partial swizzles in opt_dead_code_local correctly

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
tags/17.0-branchpoint
Marek Olšák před 9 roky
rodič
revize
0f6360eedb
1 změnil soubory, kde provedl 6 přidání a 3 odebrání
  1. 6
    3
      src/compiler/glsl/opt_dead_code_local.cpp

+ 6
- 3
src/compiler/glsl/opt_dead_code_local.cpp Zobrazit soubor

@@ -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);


Načítá se…
Zrušit
Uložit