projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2700d6
)
anv: Define zero() macro
author
Chad Versace
<chad.versace@intel.com>
Thu, 14 Jan 2016 00:24:14 +0000
(16:24 -0800)
committer
Chad Versace
<chad.versace@intel.com>
Fri, 15 Jan 2016 06:53:05 +0000
(22:53 -0800)
zero(x) memsets x to zero. Eliminates bugs due to errors in memset's
size param.
src/vulkan/anv_private.h
patch
|
blob
|
history
diff --git
a/src/vulkan/anv_private.h
b/src/vulkan/anv_private.h
index 3acf9796a5e0bb23c9887fab692aca7ed0dbbbc3..5a31ec9c50a841ca9b1855051852a501a1703ad8 100644
(file)
--- a/
src/vulkan/anv_private.h
+++ b/
src/vulkan/anv_private.h
@@
-152,6
+152,8
@@
anv_clear_mask(uint32_t *inout_mask, uint32_t clear_mask)
memcpy((dest), (src), (count) * sizeof(*(src))); \
})
+#define zero(x) (memset(&(x), 0, sizeof(x)))
+
/* Define no kernel as 1, since that's an illegal offset for a kernel */
#define NO_KERNEL 1