projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be91f23
)
anv: Assert that alignments are not 0 for align_*
author
Jordan Justen
<jordan.l.justen@intel.com>
Wed, 6 Jan 2016 23:40:01 +0000
(15:40 -0800)
committer
Jordan Justen
<jordan.l.justen@intel.com>
Thu, 7 Jan 2016 18:37:35 +0000
(10:37 -0800)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
src/vulkan/anv_private.h
patch
|
blob
|
history
diff --git
a/src/vulkan/anv_private.h
b/src/vulkan/anv_private.h
index 5bd50258c8ae42d125d92aa42a8bb1d61e1e5a88..0cd8ab6facdd453fa59087ae22147638b279d9c1 100644
(file)
--- a/
src/vulkan/anv_private.h
+++ b/
src/vulkan/anv_private.h
@@
-83,18
+83,21
@@
typedef union _VK_LOADER_DATA {
static inline uint32_t
align_u32(uint32_t v, uint32_t a)
{
+ assert(a != 0 && a == (a & -a));
return (v + a - 1) & ~(a - 1);
}
static inline uint64_t
align_u64(uint64_t v, uint64_t a)
{
+ assert(a != 0 && a == (a & -a));
return (v + a - 1) & ~(a - 1);
}
static inline int32_t
align_i32(int32_t v, int32_t a)
{
+ assert(a != 0 && a == (a & -a));
return (v + a - 1) & ~(a - 1);
}