summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_private.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-04-26 03:32:06 -0700
committerJason Ekstrand <[email protected]>2017-05-04 19:07:54 -0700
commite049dea5b280bebd6480823a4cddd70baf46fea7 (patch)
treece81b8789b8db8aaf0e0145c2b5a8047f544f64b /src/intel/vulkan/anv_private.h
parent45e1829274f9d23d58c9b73188d9413f9e36a751 (diff)
anv/allocator: Return a null state for zero-size allocations
Reviewed-by: Juan A. Suarez Romero <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r--src/intel/vulkan/anv_private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 21d0ac2122f..8652f105f92 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -490,6 +490,8 @@ struct anv_state {
void *map;
};
+#define ANV_STATE_NULL ((struct anv_state) { .alloc_size = 0 })
+
struct anv_fixed_size_state_pool {
size_t state_size;
union anv_free_list free_list;