anv: Get rid of anv_cmd_buffer_emit_state_base_address
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 17 Oct 2016 17:13:07 +0000 (10:13 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 18 Oct 2016 00:41:35 +0000 (17:41 -0700)
All code that would have once called this can now call the gen-specific
version.  The switching version is no longer needed.

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
src/intel/vulkan/genX_blorp_exec.c

index 26a2be6090e9b1682e56a87d56fb9f342cf8abf7..72f4f28172bc8d8896aa350d93b6ca58f8555654 100644 (file)
@@ -348,24 +348,6 @@ 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 49b33986a80f29c25cefe687a0ff837cb582eb3e..a4a1dd0ddc490bb5a176c353d433a70d9a691878 100644 (file)
@@ -1319,8 +1319,6 @@ void gen8_cmd_buffer_emit_depth_viewport(struct anv_cmd_buffer *cmd_buffer,
                                          bool depth_clamp_enable);
 void gen7_cmd_buffer_emit_scissor(struct anv_cmd_buffer *cmd_buffer);
 
-void anv_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer);
-
 void anv_cmd_state_setup_attachments(struct anv_cmd_buffer *cmd_buffer,
                                      const VkRenderPassBeginInfo *info);
 
index d43de913f7f7795e636ab209cf12e3eb14fafc37..185aff6b589421ae7ba5014d571f0a2de3b0f5ec 100644 (file)
@@ -97,7 +97,7 @@ blorp_alloc_binding_table(struct blorp_batch *batch, unsigned num_entries,
       /* Re-emit state base addresses so we get the new surface state base
        * address before we start emitting binding tables etc.
        */
-      anv_cmd_buffer_emit_state_base_address(cmd_buffer);
+      genX(cmd_buffer_emit_state_base_address)(cmd_buffer);
 
       bt_state = anv_cmd_buffer_alloc_binding_table(cmd_buffer, num_entries,
                                                     &state_offset);