[Mesa-dev] [PATCH] i965: Use miptree to decide format on multi-plane images for gen < 7

Jason Ekstrand jason at jlekstrand.net
Sat Jun 25 23:04:39 UTC 2016


On Jun 25, 2016 12:24 PM, "Jordan Justen" <jordan.l.justen at intel.com> wrote:
>
> This wasn't handled correctly for multi-plane images on gen < 7 in
> 727a9b24933d384f5440ed4318fb720ed11d6dd1.
>
> Reported-by: Mark Janes <mark.a.janes at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96674
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> Cc: "12.0" <mesa-stable at lists.freedesktop.org>
> ---
>  src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> index d241ec9..eed16ac 100644
> --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> @@ -316,7 +316,8 @@ brw_update_texture_surface(struct gl_context *ctx,
>     surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,
>                           6 * 4, 32, surf_offset);
>
> -   uint32_t tex_format = translate_tex_format(brw, intelObj->_Format,
> +   mesa_format mesa_fmt = plane == 0 ? intelObj->_Format : mt->format;

I thought Kristian's original code checked for OES_EXTERNAL in order to
determine what format to use.  Is it OK to grab it from the intelObj for
plane 0?

In any case, this is strictly an improvement.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

> +   uint32_t tex_format = translate_tex_format(brw, mesa_fmt,
>                                                sampler->sRGBDecode);
>
>     if (for_gather) {
> --
> 2.8.1
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160625/cdbd8ca8/attachment.html>


More information about the mesa-dev mailing list