diff options
author | Nanley Chery <[email protected]> | 2016-03-29 13:31:30 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2016-04-13 17:52:20 -0700 |
commit | 9fae6ee02659463259e9d7d90a2edf5261887503 (patch) | |
tree | 0223b0f7fd5091e2a2890caf71e9ba3a0713101a /src/intel/vulkan/anv_meta_resolve.c | |
parent | 76b0ba087c50a271867f98eaf2acf0364d5b706e (diff) |
anv/meta: Don't set the dynamic state for disabled operations
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 <[email protected]>
Reviewed-by: Kristian Høgsberg Kristensen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_meta_resolve.c')
-rw-r--r-- | src/intel/vulkan/anv_meta_resolve.c | 29 |
1 files changed, 1 insertions, 28 deletions
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); |