summaryrefslogtreecommitdiff
path: root/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/intel/vulkan/genX_cmd_buffer.c')
-rw-r--r--lib/mesa/src/intel/vulkan/genX_cmd_buffer.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c b/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c
index 8b249093b..cf7629f2f 100644
--- a/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c
+++ b/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c
@@ -1413,14 +1413,22 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
anv_layout_to_aux_usage(devinfo, image, aspect, 0, initial_layout);
enum isl_aux_usage final_aux_usage =
anv_layout_to_aux_usage(devinfo, image, aspect, 0, final_layout);
+ enum anv_fast_clear_type initial_fast_clear =
+ anv_layout_to_fast_clear_type(devinfo, image, aspect, initial_layout);
+ enum anv_fast_clear_type final_fast_clear =
+ anv_layout_to_fast_clear_type(devinfo, image, aspect, final_layout);
/* We must override the anv_layout_to_* functions because they are unaware of
* acquire/release direction.
*/
if (mod_acquire) {
initial_aux_usage = isl_mod_info->aux_usage;
+ initial_fast_clear = isl_mod_info->supports_clear_color ?
+ initial_fast_clear : ANV_FAST_CLEAR_NONE;
} else if (mod_release) {
final_aux_usage = isl_mod_info->aux_usage;
+ final_fast_clear = isl_mod_info->supports_clear_color ?
+ final_fast_clear : ANV_FAST_CLEAR_NONE;
}
/* The current code assumes that there is no mixing of CCS_E and CCS_D.
@@ -1443,10 +1451,6 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
/* If the initial layout supports more fast clear than the final layout
* then we need at least a partial resolve.
*/
- const enum anv_fast_clear_type initial_fast_clear =
- anv_layout_to_fast_clear_type(devinfo, image, aspect, initial_layout);
- const enum anv_fast_clear_type final_fast_clear =
- anv_layout_to_fast_clear_type(devinfo, image, aspect, final_layout);
if (final_fast_clear < initial_fast_clear)
resolve_op = ISL_AUX_OP_PARTIAL_RESOLVE;
@@ -1822,7 +1826,7 @@ genX(BeginCommandBuffer)(
const struct anv_image_view * const iview =
anv_cmd_buffer_get_depth_stencil_view(cmd_buffer);
- if (iview) {
+ if (iview && (iview->image->vk.aspects & VK_IMAGE_ASPECT_DEPTH_BIT)) {
VkImageLayout layout =
cmd_buffer->state.subpass->depth_stencil_attachment->layout;
@@ -4206,6 +4210,9 @@ void genX(CmdDrawIndirectByteCountEXT)(
genX(cmd_buffer_flush_state)(cmd_buffer);
+ if (cmd_buffer->state.conditional_render_enabled)
+ genX(cmd_emit_conditional_render_predicate)(cmd_buffer);
+
if (vs_prog_data->uses_firstvertex ||
vs_prog_data->uses_baseinstance)
emit_base_vertex_instance(cmd_buffer, firstVertex, firstInstance);
@@ -4240,6 +4247,7 @@ void genX(CmdDrawIndirectByteCountEXT)(
anv_batch_emit(&cmd_buffer->batch, GENX(3DPRIMITIVE), prim) {
prim.IndirectParameterEnable = true;
+ prim.PredicateEnable = cmd_buffer->state.conditional_render_enabled;
prim.VertexAccessType = SEQUENTIAL;
prim.PrimitiveTopologyType = cmd_buffer->state.gfx.primitive_topology;
}