summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-10-21 16:53:46 -0700
committerJason Ekstrand <[email protected]>2016-11-16 10:11:29 -0800
commit3c1ee052bdb3585d85ca6a95223de790cafe657a (patch)
treed913855b0dc70359966f9cb7cb7e191c4bc30ddd /src
parent72878f9f53b9a44dd8575c7b8d1929c8995c1876 (diff)
anv: Bring back anv_cmd_buffer_emit_state_base_address
This reverts most of commit 52904ba85c7e1e3092601e3497bfbc246b00b84a. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_cmd_buffer.c18
-rw-r--r--src/intel/vulkan/anv_private.h2
2 files changed, 20 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c
index ff9d0e47ab8..18348999242 100644
--- a/src/intel/vulkan/anv_cmd_buffer.c
+++ b/src/intel/vulkan/anv_cmd_buffer.c
@@ -292,6 +292,24 @@ VkResult anv_ResetCommandBuffer(
return anv_cmd_buffer_reset(cmd_buffer);
}
+void
+anv_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer)
+{
+ switch (cmd_buffer->device->info.gen) {
+ case 7:
+ if (cmd_buffer->device->info.is_haswell)
+ return gen75_cmd_buffer_emit_state_base_address(cmd_buffer);
+ else
+ return gen7_cmd_buffer_emit_state_base_address(cmd_buffer);
+ case 8:
+ return gen8_cmd_buffer_emit_state_base_address(cmd_buffer);
+ case 9:
+ return gen9_cmd_buffer_emit_state_base_address(cmd_buffer);
+ default:
+ unreachable("unsupported gen\n");
+ }
+}
+
void anv_CmdBindPipeline(
VkCommandBuffer commandBuffer,
VkPipelineBindPoint pipelineBindPoint,
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 06614d5c29b..84fbbcf068a 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1269,6 +1269,8 @@ void anv_cmd_buffer_setup_attachments(struct anv_cmd_buffer *cmd_buffer,
struct anv_framebuffer *framebuffer,
const VkClearValue *clear_values);
+void anv_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer);
+
struct anv_state
anv_cmd_buffer_push_constants(struct anv_cmd_buffer *cmd_buffer,
gl_shader_stage stage);