vk: Add and use an anv_block_pool_size() helper
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Aug 2015 08:18:09 +0000 (01:18 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Aug 2015 08:18:09 +0000 (01:18 -0700)
src/vulkan/anv_cmd_buffer.c
src/vulkan/anv_private.h

index 3b9e67fdd0f375ca0815e1096f23d2e675148539..9ee5cf8b24757a18ff8996fd715805b772bdb57a 100644 (file)
@@ -136,7 +136,8 @@ anv_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer)
    struct anv_device *device = cmd_buffer->device;
    struct anv_bo *scratch_bo = NULL;
 
-   cmd_buffer->state.scratch_size = device->scratch_block_pool.size;
+   cmd_buffer->state.scratch_size =
+      anv_block_pool_size(&device->scratch_block_pool);
    if (cmd_buffer->state.scratch_size > 0)
       scratch_bo = &device->scratch_block_pool.bo;
 
index 563d7a573bdeaa323eefe58e33e9034955545efa..b30dd7d51adca4c909ab3a5d48153f5c2fc5b9ba 100644 (file)
@@ -253,6 +253,12 @@ struct anv_block_pool {
    union anv_free_list free_list;
 };
 
+static inline uint32_t
+anv_block_pool_size(struct anv_block_pool *pool)
+{
+   return pool->size;
+}
+
 struct anv_block_state {
    union {
       struct {