vk: Use vk* entrypoints in meta, not driver_layer pointers
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Wed, 26 Aug 2015 11:08:51 +0000 (04:08 -0700)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Thu, 3 Sep 2015 18:53:09 +0000 (11:53 -0700)
We'll change the dispatch mechanism again in a later commit. Stop using
the driver_layer function pointers and just use the public entry points.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
src/vulkan/anv_device.c
src/vulkan/anv_meta.c

index 557404fa746ea03e345794dc9c31832cd87cf883..25c60488a803614c4a98b96a94810e4683efe6fb 100644 (file)
@@ -1380,15 +1380,6 @@ anv_buffer_view_create(
    return VK_SUCCESS;
 }
 
-
-VkResult anv_CreateBufferView(
-    VkDevice                                    _device,
-    const VkBufferViewCreateInfo*               pCreateInfo,
-    VkBufferView*                               pView)
-{
-   return driver_layer->CreateBufferView(_device, pCreateInfo, pView);
-}
-
 VkResult anv_DestroyBufferView(
     VkDevice                                    _device,
     VkBufferView                                _bview)
@@ -1402,14 +1393,6 @@ VkResult anv_DestroyBufferView(
    return VK_SUCCESS;
 }
 
-VkResult anv_CreateSampler(
-    VkDevice                                    _device,
-    const VkSamplerCreateInfo*                  pCreateInfo,
-    VkSampler*                                  pSampler)
-{
-   return driver_layer->CreateSampler(_device, pCreateInfo, pSampler);
-}
-
 VkResult anv_DestroySampler(
     VkDevice                                    _device,
     VkSampler                                   _sampler)
@@ -1880,14 +1863,6 @@ VkResult anv_DestroyDynamicViewportState(
    return VK_SUCCESS;
 }
 
-VkResult anv_CreateDynamicRasterState(
-    VkDevice                                    _device,
-    const VkDynamicRasterStateCreateInfo*       pCreateInfo,
-    VkDynamicRasterState*                       pState)
-{
-   return driver_layer->CreateDynamicRasterState(_device, pCreateInfo, pState);
-}
-
 VkResult anv_DestroyDynamicRasterState(
     VkDevice                                    _device,
     VkDynamicRasterState                        _rs_state)
@@ -1941,14 +1916,6 @@ VkResult anv_DestroyDynamicColorBlendState(
    return VK_SUCCESS;
 }
 
-VkResult anv_CreateDynamicDepthStencilState(
-    VkDevice                                    _device,
-    const VkDynamicDepthStencilStateCreateInfo* pCreateInfo,
-    VkDynamicDepthStencilState*                 pState)
-{
-   return driver_layer->CreateDynamicDepthStencilState(_device, pCreateInfo, pState);
-}
-
 VkResult anv_DestroyDynamicDepthStencilState(
     VkDevice                                    _device,
     VkDynamicDepthStencilState                  _ds_state)
index d01001911eff4fbd8039a45b37e97088c7ae511f..6ce963d83742d86b82f4c9d0793ba7a5564162e1 100644 (file)
@@ -318,7 +318,7 @@ meta_emit_clear(struct anv_cmd_buffer *cmd_buffer,
       anv_CmdBindDynamicColorBlendState(anv_cmd_buffer_to_handle(cmd_buffer),
                                         device->meta_state.shared.cb_state);
 
-   driver_layer->CmdDraw(anv_cmd_buffer_to_handle(cmd_buffer), 0, 3, 0, num_instances);
+   vkCmdDraw(anv_cmd_buffer_to_handle(cmd_buffer), 0, 3, 0, num_instances);
 }
 
 void
@@ -734,7 +734,7 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
          .dependencyCount = 0,
       }, &pass);
 
-   driver_layer->CmdBeginRenderPass(anv_cmd_buffer_to_handle(cmd_buffer),
+   vkCmdBeginRenderPass(anv_cmd_buffer_to_handle(cmd_buffer),
       &(VkRenderPassBeginInfo) {
          .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
          .renderPass = pass,
@@ -755,9 +755,9 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
                              device->meta_state.blit.pipeline_layout, 0, 1,
                              &set, 0, NULL);
 
-   driver_layer->CmdDraw(anv_cmd_buffer_to_handle(cmd_buffer), 0, 3, 0, 1);
+   vkCmdDraw(anv_cmd_buffer_to_handle(cmd_buffer), 0, 3, 0, 1);
 
-   driver_layer->CmdEndRenderPass(anv_cmd_buffer_to_handle(cmd_buffer));
+   vkCmdEndRenderPass(anv_cmd_buffer_to_handle(cmd_buffer));
 
    /* At the point where we emit the draw call, all data from the
     * descriptor sets, etc. has been used.  We are free to delete it.
@@ -1383,7 +1383,7 @@ void anv_CmdClearColorImage(
                   .dependencyCount = 0,
                }, &pass);
 
-            driver_layer->CmdBeginRenderPass(anv_cmd_buffer_to_handle(cmd_buffer),
+            vkCmdBeginRenderPass(anv_cmd_buffer_to_handle(cmd_buffer),
                &(VkRenderPassBeginInfo) {
                   .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
                   .renderArea = {
@@ -1411,7 +1411,7 @@ void anv_CmdClearColorImage(
             meta_emit_clear(cmd_buffer, 1, &instance_data,
                             (VkClearDepthStencilValue) {0});
 
-            driver_layer->CmdEndRenderPass(anv_cmd_buffer_to_handle(cmd_buffer));
+            vkCmdEndRenderPass(anv_cmd_buffer_to_handle(cmd_buffer));
          }
       }
    }
@@ -1473,19 +1473,19 @@ anv_device_init_meta(struct anv_device *device)
    anv_device_init_meta_clear_state(device);
    anv_device_init_meta_blit_state(device);
 
-   anv_CreateDynamicRasterState(anv_device_to_handle(device),
+   vkCreateDynamicRasterState(anv_device_to_handle(device),
       &(VkDynamicRasterStateCreateInfo) {
          .sType = VK_STRUCTURE_TYPE_DYNAMIC_RASTER_STATE_CREATE_INFO,
       },
       &device->meta_state.shared.rs_state);
 
-   anv_CreateDynamicColorBlendState(anv_device_to_handle(device),
+   vkCreateDynamicColorBlendState(anv_device_to_handle(device),
       &(VkDynamicColorBlendStateCreateInfo) {
          .sType = VK_STRUCTURE_TYPE_DYNAMIC_COLOR_BLEND_STATE_CREATE_INFO
       },
       &device->meta_state.shared.cb_state);
 
-   anv_CreateDynamicDepthStencilState(anv_device_to_handle(device),
+   vkCreateDynamicDepthStencilState(anv_device_to_handle(device),
       &(VkDynamicDepthStencilStateCreateInfo) {
          .sType = VK_STRUCTURE_TYPE_DYNAMIC_DEPTH_STENCIL_STATE_CREATE_INFO
       },