<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 24, 2018 at 11:13 AM, 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"><span class="">On Wednesday, January 24, 2018 2:03:41 AM PST Jason Ekstrand wrote:<br>
> Instead of keeping an array of booleans, we now hang onto an array of<br>
> isl_aux_usage enums. This means that the thing we are passing from<br>
> brw_draw.c to surface state setup is the thing that surface state setup<br>
> actually needs instead of an input to compute what it needs.<br>
><br>
> Cc: <a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.<wbr>org</a><br>
</span>[snip]<br>
<span class="">> @@ -497,7 +498,8 @@ brw_predraw_resolve_inputs(<wbr>struct brw_context *brw, bool rendering)<br>
> }<br>
><br>
> static void<br>
> -brw_predraw_resolve_<wbr>framebuffer(struct brw_context *brw)<br>
> +brw_predraw_resolve_<wbr>framebuffer(struct brw_context *brw,<br>
> + bool *draw_aux_buffer_disabled)<br>
> {<br>
> struct gl_context *ctx = &brw->ctx;<br>
> struct intel_renderbuffer *depth_irb;<br>
> @@ -550,7 +552,8 @@ brw_predraw_resolve_<wbr>framebuffer(struct brw_context *brw)<br>
> enum isl_aux_usage aux_usage =<br>
> intel_miptree_render_aux_<wbr>usage(brw, irb->mt, isl_format,<br>
> blend_enabled,<br>
> - brw->draw_aux_buffer_disabled[<wbr>i]);<br>
> + draw_aux_buffer_disabled[i]);<br>
> + brw->draw_aux_usage[i] = aux_usage;<br>
<br>
</span>I'm concerned this might break compute shaders. Sure, they don't have<br>
renderbuffers. However, the code to emit SURFACE_STATEs for textures<br>
calls brw_aux_surface_disabled which brw->draw_aux_usage[]. It only<br>
accesses elements 0..fb->_NumColorDrawBuffers-1, but I suspect there's<br>
still a framebuffer bound when doing a compute dispatch - it's just<br>
not relevant.<br></blockquote><div><br></div>Compute shaders will never call this as it is the framebuffer funciton. They only call predraw_resolve_inputs.<br><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This appears to be the only place that sets brw->draw_aux_usage[],<br>
and it isn't called for compute shaders.<br>
<br>
I'd say to just whack it back to "don't override things", but that<br>
means knowing what the actual usage is, which sounds painful...<br>
</blockquote></div><br></div></div>