diff options
author | Jason Ekstrand <[email protected]> | 2016-03-08 16:54:07 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-03-08 16:54:07 -0800 |
commit | 28cbc45b3c83d645bb2b805a0ed6008e2f9dad61 (patch) | |
tree | f271f2fc153c3260c0cd88431d0dad0e27cd31de /src/intel/vulkan | |
parent | 42b4c0fa6e0909e9622b03d56393ddec173ebe5d (diff) |
anv/cmd_buffer: Split flush_state into two functions
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_genX.h | 1 | ||||
-rw-r--r-- | src/intel/vulkan/gen7_cmd_buffer.c | 11 | ||||
-rw-r--r-- | src/intel/vulkan/gen8_cmd_buffer.c | 11 |
3 files changed, 21 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_genX.h b/src/intel/vulkan/anv_genX.h index a8b96e48be5..f98127ba238 100644 --- a/src/intel/vulkan/anv_genX.h +++ b/src/intel/vulkan/anv_genX.h @@ -42,6 +42,7 @@ void genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer *cmd_buffer, void genX(flush_pipeline_select_3d)(struct anv_cmd_buffer *cmd_buffer); void genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer); +void genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer); void genX(cmd_buffer_flush_compute_state)(struct anv_cmd_buffer *cmd_buffer); diff --git a/src/intel/vulkan/gen7_cmd_buffer.c b/src/intel/vulkan/gen7_cmd_buffer.c index 8dce586eec7..d552f1b4b8a 100644 --- a/src/intel/vulkan/gen7_cmd_buffer.c +++ b/src/intel/vulkan/gen7_cmd_buffer.c @@ -462,6 +462,8 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer) } } + cmd_buffer->state.vb_dirty &= ~vb_emit; + if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_PIPELINE) { /* If somebody compiled a pipeline after starting a command buffer the * scratch bo may have grown since we started this cmd buffer (and @@ -521,6 +523,14 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer) if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_DYNAMIC_SCISSOR) gen7_cmd_buffer_emit_scissor(cmd_buffer); + genX(cmd_buffer_flush_dynamic_state)(cmd_buffer); +} + +void +genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer) +{ + struct anv_pipeline *pipeline = cmd_buffer->state.pipeline; + if (cmd_buffer->state.dirty & (ANV_CMD_DIRTY_PIPELINE | ANV_CMD_DIRTY_RENDER_TARGETS | ANV_CMD_DIRTY_DYNAMIC_LINE_WIDTH | @@ -622,7 +632,6 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer) .BufferEndingAddress = { buffer->bo, buffer->offset + buffer->size }); } - cmd_buffer->state.vb_dirty &= ~vb_emit; cmd_buffer->state.dirty = 0; } diff --git a/src/intel/vulkan/gen8_cmd_buffer.c b/src/intel/vulkan/gen8_cmd_buffer.c index 0d27c27f5b7..f1c82235d3d 100644 --- a/src/intel/vulkan/gen8_cmd_buffer.c +++ b/src/intel/vulkan/gen8_cmd_buffer.c @@ -279,6 +279,8 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer) } } + cmd_buffer->state.vb_dirty &= ~vb_emit; + if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_PIPELINE) { /* If somebody compiled a pipeline after starting a command buffer the * scratch bo may have grown since we started this cmd buffer (and @@ -324,6 +326,14 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer) if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_DYNAMIC_SCISSOR) gen7_cmd_buffer_emit_scissor(cmd_buffer); + genX(cmd_buffer_flush_dynamic_state)(cmd_buffer); +} + +void +genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer) +{ + struct anv_pipeline *pipeline = cmd_buffer->state.pipeline; + if (cmd_buffer->state.dirty & (ANV_CMD_DIRTY_PIPELINE | ANV_CMD_DIRTY_DYNAMIC_LINE_WIDTH)) { __emit_sf_state(cmd_buffer); @@ -452,7 +462,6 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer) ); } - cmd_buffer->state.vb_dirty &= ~vb_emit; cmd_buffer->state.dirty = 0; } |