[Mesa-stable] [Mesa-dev] [PATCH 3/4] i965: Replace draw_aux_buffer_disabled with draw_aux_usage

Kenneth Graunke kenneth at whitecape.org
Wed Jan 24 19:13:21 UTC 2018


On Wednesday, January 24, 2018 2:03:41 AM PST Jason Ekstrand wrote:
> Instead of keeping an array of booleans, we now hang onto an array of
> isl_aux_usage enums.  This means that the thing we are passing from
> brw_draw.c to surface state setup is the thing that surface state setup
> actually needs instead of an input to compute what it needs.
> 
> Cc: mesa-stable at lists.freedesktop.org
[snip]
> @@ -497,7 +498,8 @@ brw_predraw_resolve_inputs(struct brw_context *brw, bool rendering)
>  }
>  
>  static void
> -brw_predraw_resolve_framebuffer(struct brw_context *brw)
> +brw_predraw_resolve_framebuffer(struct brw_context *brw,
> +                                bool *draw_aux_buffer_disabled)
>  {
>     struct gl_context *ctx = &brw->ctx;
>     struct intel_renderbuffer *depth_irb;
> @@ -550,7 +552,8 @@ brw_predraw_resolve_framebuffer(struct brw_context *brw)
>        enum isl_aux_usage aux_usage =
>           intel_miptree_render_aux_usage(brw, irb->mt, isl_format,
>                                          blend_enabled,
> -                                        brw->draw_aux_buffer_disabled[i]);
> +                                        draw_aux_buffer_disabled[i]);
> +      brw->draw_aux_usage[i] = aux_usage;

I'm concerned this might break compute shaders.  Sure, they don't have
renderbuffers.  However, the code to emit SURFACE_STATEs for textures
calls brw_aux_surface_disabled which brw->draw_aux_usage[].  It only
accesses elements 0..fb->_NumColorDrawBuffers-1, but I suspect there's
still a framebuffer bound when doing a compute dispatch - it's just
not relevant.

This appears to be the only place that sets brw->draw_aux_usage[],
and it isn't called for compute shaders.

I'd say to just whack it back to "don't override things", but that
means knowing what the actual usage is, which sounds painful...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20180124/90c32483/attachment.sig>


More information about the mesa-stable mailing list