summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_meta_clear.c
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2016-03-29 13:31:30 -0700
committerNanley Chery <[email protected]>2016-04-13 17:52:20 -0700
commit9fae6ee02659463259e9d7d90a2edf5261887503 (patch)
tree0223b0f7fd5091e2a2890caf71e9ba3a0713101a /src/intel/vulkan/anv_meta_clear.c
parent76b0ba087c50a271867f98eaf2acf0364d5b706e (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_clear.c')
-rw-r--r--src/intel/vulkan/anv_meta_clear.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/intel/vulkan/anv_meta_clear.c b/src/intel/vulkan/anv_meta_clear.c
index 50085894b9c..7512afeb584 100644
--- a/src/intel/vulkan/anv_meta_clear.c
+++ b/src/intel/vulkan/anv_meta_clear.c
@@ -44,7 +44,6 @@ meta_clear_begin(struct anv_meta_saved_state *saved_state,
{
anv_meta_save(saved_state, cmd_buffer,
(1 << VK_DYNAMIC_STATE_VIEWPORT) |
- (1 << VK_DYNAMIC_STATE_SCISSOR) |
(1 << VK_DYNAMIC_STATE_STENCIL_REFERENCE) |
(1 << VK_DYNAMIC_STATE_STENCIL_WRITE_MASK));
@@ -397,26 +396,6 @@ emit_color_clear(struct anv_cmd_buffer *cmd_buffer,
.offset = state.offset,
};
- ANV_CALL(CmdSetViewport)(cmd_buffer_h, 0, 1,
- (VkViewport[]) {
- {
- .x = 0,
- .y = 0,
- .width = fb->width,
- .height = fb->height,
- .minDepth = 0.0,
- .maxDepth = 1.0,
- },
- });
-
- ANV_CALL(CmdSetScissor)(cmd_buffer_h, 0, 1,
- (VkRect2D[]) {
- {
- .offset = { 0, 0 },
- .extent = { fb->width, fb->height },
- }
- });
-
ANV_CALL(CmdBindVertexBuffers)(cmd_buffer_h, 0, 1,
(VkBuffer[]) { anv_buffer_to_handle(&vertex_buffer) },
(VkDeviceSize[]) { 0 });
@@ -596,14 +575,6 @@ emit_depthstencil_clear(struct anv_cmd_buffer *cmd_buffer,
},
});
- ANV_CALL(CmdSetScissor)(cmd_buffer_h, 0, 1,
- (VkRect2D[]) {
- {
- .offset = { 0, 0 },
- .extent = { fb->width, fb->height },
- }
- });
-
if (aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
ANV_CALL(CmdSetStencilReference)(cmd_buffer_h, VK_STENCIL_FACE_FRONT_BIT,
clear_value.stencil);