<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 13, 2017 at 4:33 PM, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Monday, November 6, 2017 1:38:55 PM PST Jason Ekstrand wrote:<br>
> In theory, this will let us track the depth and render caches<br>
> separately. Right now, they're just wrappers around<br>
> brw_render_cache_set_*<br>
> ---<br>
> src/mesa/drivers/dri/i965/brw_<wbr>draw.c | 12 +++++------<br>
> src/mesa/drivers/dri/i965/brw_<wbr>misc_state.c | 4 ++--<br>
> src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c | 10 ++++-----<br>
> src/mesa/drivers/dri/i965/<wbr>intel_fbo.c | 29 +++++++++++++++++++++++++++<br>
> src/mesa/drivers/dri/i965/<wbr>intel_fbo.h | 6 ++++++<br>
> src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 2 +-<br>
> 6 files changed, 49 insertions(+), 14 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_draw.c b/src/mesa/drivers/dri/i965/<wbr>brw_draw.c<br>
> index 10b6298..8920b00 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>brw_draw.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>brw_draw.c<br>
> @@ -426,7 +426,7 @@ brw_predraw_resolve_inputs(<wbr>struct brw_context *brw, bool rendering)<br>
> min_layer, num_layers,<br>
> disable_aux);<br>
><br>
> - brw_render_cache_set_check_<wbr>flush(brw, tex_obj->mt->bo);<br>
> + brw_cache_flush_for_read(brw, tex_obj->mt->bo);<br>
><br>
> if (tex_obj->base.StencilSampling ||<br>
> tex_obj->mt->format == MESA_FORMAT_S_UINT8) {<br>
> @@ -450,7 +450,7 @@ brw_predraw_resolve_inputs(<wbr>struct brw_context *brw, bool rendering)<br>
><br>
> intel_miptree_prepare_image(<wbr>brw, tex_obj->mt);<br>
><br>
> - brw_render_cache_set_check_<wbr>flush(brw, tex_obj->mt->bo);<br>
> + brw_cache_flush_for_read(brw, tex_obj->mt->bo);<br>
> }<br>
> }<br>
> }<br>
> @@ -561,11 +561,11 @@ brw_postdraw_set_buffers_need_<wbr>resolve(struct brw_context *brw)<br>
> depth_written);<br>
> }<br>
> if (depth_written)<br>
> - brw_render_cache_set_add_bo(<wbr>brw, depth_irb->mt->bo);<br>
> + brw_depth_cache_add_bo(brw, depth_irb->mt->bo);<br>
> }<br>
><br>
> if (stencil_irb && brw->stencil_write_enabled)<br>
> - brw_render_cache_set_add_bo(<wbr>brw, stencil_irb->mt->bo);<br>
> + brw_depth_cache_add_bo(brw, stencil_irb->mt->bo);<br>
><br>
> for (unsigned i = 0; i < fb->_NumColorDrawBuffers; i++) {<br>
> struct intel_renderbuffer *irb =<br>
> @@ -578,7 +578,7 @@ brw_postdraw_set_buffers_need_<wbr>resolve(struct brw_context *brw)<br>
> _mesa_get_render_format(ctx, intel_rb_format(irb));<br>
> enum isl_format isl_format = brw_isl_format_for_mesa_<wbr>format(mesa_format);<br>
><br>
> - brw_render_cache_set_add_bo(<wbr>brw, irb->mt->bo);<br>
> + brw_render_cache_add_bo(brw, irb->mt->bo);<br>
> intel_miptree_finish_render(<wbr>brw, irb->mt, irb->mt_level,<br>
> irb->mt_layer, irb->layer_count,<br>
> isl_format,<br>
> @@ -593,7 +593,7 @@ intel_renderbuffer_move_temp_<wbr>back(struct brw_context *brw,<br>
> if (irb->align_wa_mt == NULL)<br>
> return;<br>
><br>
> - brw_render_cache_set_check_<wbr>flush(brw, irb->align_wa_mt->bo);<br>
> + brw_cache_flush_for_read(brw, irb->align_wa_mt->bo);<br>
><br>
> intel_miptree_copy_slice(brw, irb->align_wa_mt, 0, 0,<br>
> irb->mt,<br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_misc_state.c b/src/mesa/drivers/dri/i965/<wbr>brw_misc_state.c<br>
> index 53137cc..fd96485 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>brw_misc_state.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>brw_misc_state.c<br>
> @@ -333,9 +333,9 @@ brw_emit_depthbuffer(struct brw_context *brw)<br>
> }<br>
><br>
> if (depth_mt)<br>
> - brw_render_cache_set_check_<wbr>flush(brw, depth_mt->bo);<br>
> + brw_cache_flush_for_depth(brw, depth_mt->bo);<br>
> if (stencil_mt)<br>
> - brw_render_cache_set_check_<wbr>flush(brw, stencil_mt->bo);<br>
> + brw_cache_flush_for_depth(brw, stencil_mt->bo);<br>
><br>
> brw->vtbl.emit_depth_stencil_<wbr>hiz(brw, depth_mt, depth_offset,<br>
> depthbuffer_format, depth_surface_type,<br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c b/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c<br>
> index 3c7a7b4..296a83b 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c<br>
> @@ -215,8 +215,8 @@ genX(blorp_exec)(struct blorp_batch *batch,<br>
> * data.<br>
> */<br>
> if (params->src.enabled)<br>
> - brw_render_cache_set_check_<wbr>flush(brw, params->src.addr.buffer);<br>
> - brw_render_cache_set_check_<wbr>flush(brw, params->dst.addr.buffer);<br>
> + brw_cache_flush_for_read(brw, params->src.addr.buffer);<br>
> + brw_cache_flush_for_render(<wbr>brw, params->dst.addr.buffer);<br>
<br>
</div></div>This drops the cache flush, because brw_cache_flush_for_render<br>
is an empty function. I don't think you intended to do that.<br></blockquote><div><br></div><div>I'll just leave the brw_render_cache_set_check_flush in here until the last patch.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You probably want brw_cache_flush_for_render to do<br>
brw_render_cache_set_check_<wbr>flush until patch 4.<br>
<br>
Otherwise, the series is:<br>
Reviewed-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br></blockquote><div> </div></div></div><div class="gmail_extra">Thanks!<br></div></div>