diff options
author | Chad Versace <[email protected]> | 2016-01-13 16:24:14 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2016-01-14 22:53:05 -0800 |
commit | 4c2bafb9bff8f5979c4cf31f5decdaaffdf1c2cb (patch) | |
tree | 76acaabc0c665a86f79957de5829fb7b8f5105ea | |
parent | f2700d665c99c45ab79c3cb42dad24c0c3c13edd (diff) |
anv: Define zero() macro
zero(x) memsets x to zero. Eliminates bugs due to errors in memset's
size param.
-rw-r--r-- | src/vulkan/anv_private.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 3acf9796a5e..5a31ec9c50a 100644 --- 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 |