projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e58fc5
)
i965/vec4: Add auxiliary func to build a writemask from a component size
author
Eduardo Lima Mitev
<elima@igalia.com>
Tue, 16 Jun 2015 18:53:28 +0000
(20:53 +0200)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Mon, 3 Aug 2015 16:40:47 +0000
(09:40 -0700)
New method brw_writemask_for_size() will return a writemask with the first
'size' components activated.
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_reg.h
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_reg.h
b/src/mesa/drivers/dri/i965/brw_reg.h
index 4867148c12fca39c86574136786c6b12db60bfbe..31806f769bd48da85c48092f93a916f220ed6879 100644
(file)
--- a/
src/mesa/drivers/dri/i965/brw_reg.h
+++ b/
src/mesa/drivers/dri/i965/brw_reg.h
@@
-950,6
+950,12
@@
brw_set_writemask(struct brw_reg reg, unsigned mask)
return reg;
}
+static inline unsigned
+brw_writemask_for_size(unsigned n)
+{
+ return (1 << n) - 1;
+}
+
static inline struct brw_reg
negate(struct brw_reg reg)
{