From: Kristian Høgsberg Kristensen Date: Wed, 26 Aug 2015 11:08:51 +0000 (-0700) Subject: vk: Use vk* entrypoints in meta, not driver_layer pointers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5e90f3f48f6fe866f3c2f94745df82c959d09b5;p=mesa.git vk: Use vk* entrypoints in meta, not driver_layer pointers 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 --- diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index 557404fa746..25c60488a80 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -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) diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index d01001911ef..6ce963d8374 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -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 },