[Mesa-dev] [PATCH 2/3] i965/blorp: Use more temporary isl_format variables
Jason Ekstrand
jason at jlekstrand.net
Thu Oct 26 18:20:57 UTC 2017
On Thu, Oct 26, 2017 at 9:10 AM, Pohjolainen, Topi <
topi.pohjolainen at gmail.com> wrote:
> On Wed, Oct 25, 2017 at 02:58:40PM -0700, Jason Ekstrand wrote:
> > On Mon, Oct 23, 2017 at 11:07 PM, Pohjolainen, Topi <
> > topi.pohjolainen at gmail.com> wrote:
> >
> > > On Mon, Oct 23, 2017 at 05:23:08PM -0700, Jason Ekstrand wrote:
> > > > ---
> > > > src/mesa/drivers/dri/i965/brw_blorp.c | 15 +++++++--------
> > > > 1 file changed, 7 insertions(+), 8 deletions(-)
> > > >
> > > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c
> > > b/src/mesa/drivers/dri/i965/brw_blorp.c
> > > > index f7d128d..05204a9 100644
> > > > --- a/src/mesa/drivers/dri/i965/brw_blorp.c
> > > > +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
> > > > @@ -329,6 +329,8 @@ brw_blorp_blit_miptrees(struct brw_context *brw,
> > > > intel_miptree_prepare_access(brw, src_mt, src_level, 1,
> src_layer,
> > > 1,
> > > > src_aux_usage, src_clear_supported);
> > > >
> > > > + enum isl_format dst_isl_format =
> > > > + brw_blorp_to_isl_format(brw, dst_format, true);
> > > > enum isl_aux_usage dst_aux_usage =
> > > > intel_miptree_render_aux_usage(brw, dst_mt, encode_srgb,
> false);
> > > > const bool dst_clear_supported = dst_aux_usage !=
> ISL_AUX_USAGE_NONE;
> > > > @@ -352,10 +354,9 @@ brw_blorp_blit_miptrees(struct brw_context *brw,
> > > > struct blorp_batch batch;
> > > > blorp_batch_init(&brw->blorp, &batch, brw, 0);
> > > > blorp_blit(&batch, &src_surf, src_level, src_layer,
> > > > - brw_blorp_to_isl_format(brw, src_format, false),
> > > src_isl_swizzle,
> > > > + src_isl_format, src_isl_swizzle,
> > >
> > > This is functional change, isn't it? It effectively switches from
> > > brw_blorp_to_isl_format() to brw_isl_format_for_mesa_format().
> > >
> >
> > Good catch! We also need to change the declaration of src_isl_format to
> > use brw_blorp_to_isl_format which, while it looks like a functional
> change,
> > isn't because the only difference is for render or depth and we
> explicitly
> > disable HiZ usage. Would you rather that be a precursor patch?
>
> Not really. If you like though you could add a word or two in the commit.
>
Gah! That was patch 1 in the series and we both missed it. Best of both
worlds, I guess. :)
> Series:
>
> Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
>
Thanks!
> >
> >
> > > > &dst_surf, dst_level, dst_layer,
> > > > - brw_blorp_to_isl_format(brw, dst_format, true),
> > > > - ISL_SWIZZLE_IDENTITY,
> > > > + dst_isl_format, ISL_SWIZZLE_IDENTITY,
> > > > src_x0, src_y0, src_x1, src_y1,
> > > > dst_x0, dst_y0, dst_x1, dst_y1,
> > > > filter, mirror_x, mirror_y);
> > > > @@ -1158,6 +1159,7 @@ do_single_blorp_clear(struct brw_context *brw,
> > > struct gl_framebuffer *fb,
> > > > mesa_format format = irb->Base.Base.Format;
> > > > if (!encode_srgb && _mesa_get_format_color_encoding(format) ==
> > > GL_SRGB)
> > > > format = _mesa_get_srgb_format_linear(format);
> > > > + enum isl_format isl_format = brw->mesa_to_isl_render_
> format[format];
> > > >
> > > > x0 = fb->_Xmin;
> > > > x1 = fb->_Xmax;
> > > > @@ -1256,8 +1258,7 @@ do_single_blorp_clear(struct brw_context *brw,
> > > struct gl_framebuffer *fb,
> > > >
> > > > struct blorp_batch batch;
> > > > blorp_batch_init(&brw->blorp, &batch, brw, 0);
> > > > - blorp_fast_clear(&batch, &surf,
> > > > - brw->mesa_to_isl_render_format[format],
> > > > + blorp_fast_clear(&batch, &surf, isl_format,
> > > > level, irb->mt_layer, num_layers,
> > > > x0, y0, x1, y1);
> > > > blorp_batch_finish(&batch);
> > > > @@ -1290,9 +1291,7 @@ do_single_blorp_clear(struct brw_context *brw,
> > > struct gl_framebuffer *fb,
> > > >
> > > > struct blorp_batch batch;
> > > > blorp_batch_init(&brw->blorp, &batch, brw, 0);
> > > > - blorp_clear(&batch, &surf,
> > > > - brw->mesa_to_isl_render_format[format],
> > > > - ISL_SWIZZLE_IDENTITY,
> > > > + blorp_clear(&batch, &surf, isl_format, ISL_SWIZZLE_IDENTITY,
> > > > level, irb->mt_layer, num_layers,
> > > > x0, y0, x1, y1,
> > > > clear_color, color_write_disable);
> > > > --
> > > > 2.5.0.400.gff86faf
> > > >
> > > > _______________________________________________
> > > > mesa-dev mailing list
> > > > mesa-dev at lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171026/3984fe83/attachment-0001.html>
More information about the mesa-dev
mailing list