mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
anv: Define zero() macro
zero(x) memsets x to zero. Eliminates bugs due to errors in memset's size param.
This commit is contained in:
parent
f2700d665c
commit
4c2bafb9bf
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue