projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e27333a
)
glsl: handle partial swizzles in opt_dead_code_local correctly
author
Marek Olšák
<marek.olsak@amd.com>
Mon, 7 Nov 2016 21:56:21 +0000
(22:56 +0100)
committer
Marek Olšák
<marek.olsak@amd.com>
Thu, 10 Nov 2016 17:34:55 +0000
(18:34 +0100)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/opt_dead_code_local.cpp
patch
|
blob
|
history
diff --git
a/src/compiler/glsl/opt_dead_code_local.cpp
b/src/compiler/glsl/opt_dead_code_local.cpp
index fc979afcd81caea316857b48bd9a7d5eff5337c1..a4038794c6bfed8451501f35778844f443075678 100644
(file)
--- a/
src/compiler/glsl/opt_dead_code_local.cpp
+++ b/
src/compiler/glsl/opt_dead_code_local.cpp
@@
-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);