From 9fae6ee02659463259e9d7d90a2edf5261887503 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Tue, 29 Mar 2016 13:31:30 -0700 Subject: anv/meta: Don't set the dynamic state for disabled operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CmdSet* functions dirty the CommandBuffer's dynamic state. This causes the new state to be emitted when CmdDraw is called. Since we don't need the state that would be emitted, don't call the CmdSet* functions. Signed-off-by: Nanley Chery Reviewed-by: Kristian Høgsberg Kristensen --- src/intel/vulkan/anv_meta_resolve.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'src/intel/vulkan/anv_meta_resolve.c') diff --git a/src/intel/vulkan/anv_meta_resolve.c b/src/intel/vulkan/anv_meta_resolve.c index 8c1bdc06f84..87ebcaad215 100644 --- a/src/intel/vulkan/anv_meta_resolve.c +++ b/src/intel/vulkan/anv_meta_resolve.c @@ -41,9 +41,7 @@ static void meta_resolve_save(struct anv_meta_saved_state *saved_state, struct anv_cmd_buffer *cmd_buffer) { - anv_meta_save(saved_state, cmd_buffer, - (1 << VK_DYNAMIC_STATE_VIEWPORT) | - (1 << VK_DYNAMIC_STATE_SCISSOR)); + anv_meta_save(saved_state, cmd_buffer, 0); cmd_buffer->state.dynamic.viewport.count = 0; cmd_buffer->state.dynamic.scissor.count = 0; @@ -481,7 +479,6 @@ emit_resolve(struct anv_cmd_buffer *cmd_buffer, struct anv_device *device = cmd_buffer->device; VkDevice device_h = anv_device_to_handle(device); VkCommandBuffer cmd_buffer_h = anv_cmd_buffer_to_handle(cmd_buffer); - const struct anv_framebuffer *fb = cmd_buffer->state.framebuffer; const struct anv_image *src_image = src_iview->image; const struct vertex_attrs vertex_data[3] = { @@ -609,30 +606,6 @@ emit_resolve(struct anv_cmd_buffer *cmd_buffer, /*copyCount*/ 0, /*copies */ NULL); - ANV_CALL(CmdSetViewport)(cmd_buffer_h, - /*firstViewport*/ 0, - /*viewportCount*/ 1, - (VkViewport[]) { - { - .x = 0, - .y = 0, - .width = fb->width, - .height = fb->height, - .minDepth = 0.0, - .maxDepth = 1.0, - }, - }); - - ANV_CALL(CmdSetScissor)(cmd_buffer_h, - /*firstScissor*/ 0, - /*scissorCount*/ 1, - (VkRect2D[]) { - { - .offset = { 0, 0 }, - .extent = (VkExtent2D) { fb->width, fb->height }, - }, - }); - VkPipeline pipeline_h = *get_pipeline_h(device, src_image->samples); ANV_FROM_HANDLE(anv_pipeline, pipeline, pipeline_h); -- cgit v1.2.3