[Mesa-dev] [PATCH 1/3] i965: Move hiz resolve to after renderbuffer resizing

Paul Berry stereotype441 at gmail.com
Thu Aug 16 14:07:58 PDT 2012


On 14 August 2012 16:58, Chad Versace <chad.versace at linux.intel.com> wrote:

> Do all pre-draw hiz resolves *after* the renderbuffers are resized by
> intel_prepare_render. Otherwise, we may resolve buffers that are
> immediately discarded afterwards.
>
> Fixes the assertion failure below when resizing windows in KDE and under
> some unknown circumstance in Chrome OS:
>     intel_resolve_map.c:46: intel_resolve_map_set: Assertion
>     `(*tail)->need == need' failed.
>
> Also, remove the comment that "resolves must occur [...] before setting up
> any hardware state". That was true when resolves were implemented with
> meta-ops, but no longer with blorp.
>

Does "before setting up any hardware state" mean "before issuing any
commands to the batch buffer"?  If so then I think this is still necessary,
since blorp issues a bunch of commands to the batch buffer that change the
hardware state.

But it looks like this with this patch, we are still doing resolves before
setting up any hardware state, so I think we're ok.

Assuming the comment is fixed (or you can explain to me why I'm wrong),
this patch is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>


>
> CC: Stephane Marchesin <marcheu at chromium.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52252
> Reported-by: Lu Hua <huax.lu at intel.com>
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_draw.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_draw.c
> b/src/mesa/drivers/dri/i965/brw_draw.c
> index ccfc306..0b1a4e0 100644
> --- a/src/mesa/drivers/dri/i965/brw_draw.c
> +++ b/src/mesa/drivers/dri/i965/brw_draw.c
> @@ -433,11 +433,6 @@ static bool brw_try_draw_prims( struct gl_context
> *ctx,
>      */
>     brw_validate_textures( brw );
>
> -   /* Resolves must occur after updating state and finalizing textures but
> -    * before setting up any hardware state for this draw call.
> -    */
> -   brw_predraw_resolve_buffers(brw);
> -
>     /* Bind all inputs, derive varying and size information:
>      */
>     brw_merge_inputs( brw, arrays );
> @@ -458,6 +453,11 @@ static bool brw_try_draw_prims( struct gl_context
> *ctx,
>
>     intel_prepare_render(intel);
>
> +   /* Resolves must occur after updating state, resizing renderbuffers,
> +    * and finalizing textures.
> +    */
> +   brw_predraw_resolve_buffers(brw);
> +
>     for (i = 0; i < nr_prims; i++) {
>        int estimated_max_prim_size;
>
> --
> 1.7.11.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120816/d7411dc4/attachment.html>


More information about the mesa-dev mailing list