anv: Bring back anv_cmd_buffer_emit_state_base_address
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 21 Oct 2016 23:53:46 +0000 (16:53 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 16 Nov 2016 18:11:29 +0000 (10:11 -0800)
This reverts most of commit 52904ba85c7e1e3092601e3497bfbc246b00b84a.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/vulkan/anv_cmd_buffer.c
src/intel/vulkan/anv_private.h

index ff9d0e47ab8a297f049555eaec76e18e8757ab82..183489992427526040feafc22d2cb973743955eb 100644 (file)
@@ -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,
index 06614d5c29b6107b0cdad20241e1160d6773ce00..84fbbcf068ab60792419b590164d82a1ad1f9380 100644 (file)
@@ -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);