anv/cmd_buffer: Expose ensure_push_constant_*
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 17 Oct 2016 17:10:26 +0000 (10:10 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 18 Oct 2016 00:41:35 +0000 (17:41 -0700)
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/intel/vulkan/anv_cmd_buffer.c
src/intel/vulkan/anv_private.h

index 3c2d032aa92775f731b420fc078c848a085336b4..98257f897d5aaf91b5cb141dce2da7a37a580abc 100644 (file)
@@ -200,7 +200,7 @@ anv_cmd_state_setup_attachments(struct anv_cmd_buffer *cmd_buffer,
    }
 }
 
-static VkResult
+VkResult
 anv_cmd_buffer_ensure_push_constants_size(struct anv_cmd_buffer *cmd_buffer,
                                           gl_shader_stage stage, uint32_t size)
 {
@@ -222,11 +222,6 @@ anv_cmd_buffer_ensure_push_constants_size(struct anv_cmd_buffer *cmd_buffer,
    return VK_SUCCESS;
 }
 
-#define anv_cmd_buffer_ensure_push_constant_field(cmd_buffer, stage, field) \
-   anv_cmd_buffer_ensure_push_constants_size(cmd_buffer, stage, \
-      (offsetof(struct anv_push_constants, field) + \
-       sizeof(cmd_buffer->state.push_constants[0]->field)))
-
 static VkResult anv_create_cmd_buffer(
     struct anv_device *                         device,
     struct anv_cmd_pool *                       pool,
index 9454e08bda78e9e7bc557c0eea574fc35fbe3f5c..5584d562aaa3ad527aa5a7007855cea461ef1e00 100644 (file)
@@ -1286,6 +1286,14 @@ void anv_cmd_buffer_prepare_execbuf(struct anv_cmd_buffer *cmd_buffer);
 
 VkResult anv_cmd_buffer_reset(struct anv_cmd_buffer *cmd_buffer);
 
+VkResult
+anv_cmd_buffer_ensure_push_constants_size(struct anv_cmd_buffer *cmd_buffer,
+                                          gl_shader_stage stage, uint32_t size);
+#define anv_cmd_buffer_ensure_push_constant_field(cmd_buffer, stage, field) \
+   anv_cmd_buffer_ensure_push_constants_size(cmd_buffer, stage, \
+      (offsetof(struct anv_push_constants, field) + \
+       sizeof(cmd_buffer->state.push_constants[0]->field)))
+
 VkResult anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
                                            unsigned stage, struct anv_state *bt_state);
 VkResult anv_cmd_buffer_emit_samplers(struct anv_cmd_buffer *cmd_buffer,