key, key_size, kernel, kernel_size,
NULL, 0,
prog_data, prog_data_size,
- NULL, &bind_map);
+ NULL, 0, NULL, &bind_map);
if (!bin)
return false;
case 11:
device->blorp.exec = gen11_blorp_exec;
break;
+ case 12:
+ device->blorp.exec = gen12_blorp_exec;
+ break;
default:
unreachable("Unknown hardware generation");
}
* buffer. We have a single global buffer that stores the 1.0 value.
*/
const struct anv_address clear_color_addr = (struct anv_address) {
- .bo = (struct anv_bo *)&device->hiz_clear_bo
+ .bo = device->hiz_clear_bo,
};
blorp_surf->clear_color_addr = anv_to_blorp_address(clear_color_addr);
}
struct blorp_address src = {
.buffer = cmd_buffer->device->dynamic_state_pool.block_pool.bo,
.offset = tmp_data.offset,
- .mocs = cmd_buffer->device->default_mocs,
+ .mocs = cmd_buffer->device->isl_dev.mocs.internal,
};
struct blorp_address dst = {
.buffer = dst_buffer->address.bo,
ISL_AUX_USAGE_NONE, &stencil);
}
+ /* Blorp may choose to clear stencil using RGBA32_UINT for better
+ * performance. If it does this, we need to flush it out of the depth
+ * cache before rendering to it.
+ */
+ cmd_buffer->state.pending_pipe_bits |=
+ ANV_PIPE_DEPTH_CACHE_FLUSH_BIT | ANV_PIPE_CS_STALL_BIT;
+
blorp_clear_depth_stencil(&batch, &depth, &stencil,
level, base_layer, layer_count,
area.offset.x, area.offset.y,
(aspects & VK_IMAGE_ASPECT_STENCIL_BIT) ? 0xff : 0,
stencil_value);
+ /* Blorp may choose to clear stencil using RGBA32_UINT for better
+ * performance. If it does this, we need to flush it out of the render
+ * cache before someone starts trying to do stencil on it.
+ */
+ cmd_buffer->state.pending_pipe_bits |=
+ ANV_PIPE_RENDER_TARGET_CACHE_FLUSH_BIT | ANV_PIPE_CS_STALL_BIT;
+
struct blorp_surf stencil_shadow;
if ((aspects & VK_IMAGE_ASPECT_STENCIL_BIT) &&
get_blorp_surf_for_anv_shadow_image(cmd_buffer->device, image,
struct blorp_batch batch;
blorp_batch_init(&cmd_buffer->device->blorp, &batch, cmd_buffer,
- predicate ? BLORP_BATCH_PREDICATE_ENABLE : 0);
+ BLORP_BATCH_PREDICATE_ENABLE * predicate +
+ BLORP_BATCH_NO_UPDATE_CLEAR_COLOR * !clear_value);
struct blorp_surf surf;
get_blorp_surf_for_anv_image(cmd_buffer->device, image, aspect,
/* Blorp will store the clear color for us if we provide the clear color
* address and we are doing a fast clear. So we save the clear value into
- * the blorp surface. However, in some situations we want to do a fast clear
- * without changing the clear value stored in the state buffer. For those
- * cases, we set the clear color address pointer to NULL, so blorp will not
- * try to store a garbage color.
+ * the blorp surface.
*/
- if (mcs_op == ISL_AUX_OP_FAST_CLEAR) {
- if (clear_value)
- surf.clear_color = *clear_value;
- else
- surf.clear_color_addr.buffer = NULL;
- }
+ if (clear_value)
+ surf.clear_color = *clear_value;
/* From the Sky Lake PRM Vol. 7, "Render Target Fast Clear":
*
struct blorp_batch batch;
blorp_batch_init(&cmd_buffer->device->blorp, &batch, cmd_buffer,
- predicate ? BLORP_BATCH_PREDICATE_ENABLE : 0);
+ BLORP_BATCH_PREDICATE_ENABLE * predicate +
+ BLORP_BATCH_NO_UPDATE_CLEAR_COLOR * !clear_value);
struct blorp_surf surf;
get_blorp_surf_for_anv_image(cmd_buffer->device, image, aspect,
/* Blorp will store the clear color for us if we provide the clear color
* address and we are doing a fast clear. So we save the clear value into
- * the blorp surface. However, in some situations we want to do a fast clear
- * without changing the clear value stored in the state buffer. For those
- * cases, we set the clear color address pointer to NULL, so blorp will not
- * try to store a garbage color.
+ * the blorp surface.
*/
- if (ccs_op == ISL_AUX_OP_FAST_CLEAR) {
- if (clear_value)
- surf.clear_color = *clear_value;
- else
- surf.clear_color_addr.buffer = NULL;
- }
+ if (clear_value)
+ surf.clear_color = *clear_value;
/* From the Sky Lake PRM Vol. 7, "Render Target Fast Clear":
*