diff options
author | Jason Ekstrand <[email protected]> | 2015-10-15 13:45:07 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-10-15 13:45:07 -0700 |
commit | 6dc4cad994ca03b71f99b79856d8d8ff5cf3ed83 (patch) | |
tree | 108b15d74ae3ed94f6a1d431edd96cd87a33d087 /src/vulkan | |
parent | 896c1c65d67089417709f567c03e6930fc7af958 (diff) |
anv/cmd_buffer: Add an alloc_surface_state helper
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/anv_batch_chain.c | 6 | ||||
-rw-r--r-- | src/vulkan/anv_private.h | 2 | ||||
-rw-r--r-- | src/vulkan/gen7_state.c | 3 | ||||
-rw-r--r-- | src/vulkan/gen8_state.c | 3 |
4 files changed, 10 insertions, 4 deletions
diff --git a/src/vulkan/anv_batch_chain.c b/src/vulkan/anv_batch_chain.c index c621c0745b7..77fbd6635c0 100644 --- a/src/vulkan/anv_batch_chain.c +++ b/src/vulkan/anv_batch_chain.c @@ -484,6 +484,12 @@ anv_cmd_buffer_alloc_binding_table(struct anv_cmd_buffer *cmd_buffer, } struct anv_state +anv_cmd_buffer_alloc_surface_state(struct anv_cmd_buffer *cmd_buffer) +{ + return anv_state_stream_alloc(&cmd_buffer->surface_state_stream, 64, 64); +} + +struct anv_state anv_cmd_buffer_alloc_dynamic_state(struct anv_cmd_buffer *cmd_buffer, uint32_t size, uint32_t alignment) { diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 757a149289f..bcfb6fada50 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -992,6 +992,8 @@ struct anv_state anv_cmd_buffer_alloc_binding_table(struct anv_cmd_buffer *cmd_buffer, uint32_t entries, uint32_t *state_offset); struct anv_state +anv_cmd_buffer_alloc_surface_state(struct anv_cmd_buffer *cmd_buffer); +struct anv_state anv_cmd_buffer_alloc_dynamic_state(struct anv_cmd_buffer *cmd_buffer, uint32_t size, uint32_t alignment); diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c index d317fa4ec16..aef97838e17 100644 --- a/src/vulkan/gen7_state.c +++ b/src/vulkan/gen7_state.c @@ -118,8 +118,7 @@ gen7_alloc_surface_state(struct anv_device *device, struct anv_cmd_buffer *cmd_buffer) { if (cmd_buffer) { - return anv_state_stream_alloc(&cmd_buffer->surface_state_stream, - 64, 64); + return anv_cmd_buffer_alloc_surface_state(cmd_buffer); } else { return anv_state_pool_alloc(&device->surface_state_pool, 64, 64); } diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c index 9be3bf46021..d9438127f2a 100644 --- a/src/vulkan/gen8_state.c +++ b/src/vulkan/gen8_state.c @@ -104,8 +104,7 @@ gen8_alloc_surface_state(struct anv_device *device, struct anv_cmd_buffer *cmd_buffer) { if (cmd_buffer) { - return anv_state_stream_alloc(&cmd_buffer->surface_state_stream, - 64, 64); + return anv_cmd_buffer_alloc_surface_state(cmd_buffer); } else { return anv_state_pool_alloc(&device->surface_state_pool, 64, 64); } |