projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf164d9
)
glsl: set mask via initialisation list rather than in constructor body
author
Timothy Arceri
<tarceri@itsqueeze.com>
Sat, 20 May 2017 03:54:20 +0000
(13:54 +1000)
committer
Timothy Arceri
<tarceri@itsqueeze.com>
Mon, 22 May 2017 04:21:55 +0000
(14:21 +1000)
Potentially more efficient as it may avoid the struct being initialised
twice.
Also add var to the initialisation list while we are here.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/compiler/glsl/ir.cpp
patch
|
blob
|
history
diff --git
a/src/compiler/glsl/ir.cpp
b/src/compiler/glsl/ir.cpp
index 123de99005c442b7f69840e79f0e876968b86c90..2d0c4c051abb118810d87a8b138b670fa29b323d 100644
(file)
--- a/
src/compiler/glsl/ir.cpp
+++ b/
src/compiler/glsl/ir.cpp
@@
-1590,10
+1590,8
@@
ir_swizzle::ir_swizzle(ir_rvalue *val, const unsigned *comp,
}
ir_swizzle::ir_swizzle(ir_rvalue *val, ir_swizzle_mask mask)
- : ir_rvalue(ir_type_swizzle)
+ : ir_rvalue(ir_type_swizzle)
, mask(mask), val(val)
{
- this->val = val;
- this->mask = mask;
this->type = glsl_type::get_instance(val->type->base_type,
mask.num_components, 1);
}