Re: [Mesa-dev] [PATCH 05/43] i965/blorp: Properly handle mt->first_level
On Tue, May 16, 2017 at 11:16 PM, Pohjolainen, Topi < topi.pohjolai...@gmail.com> wrote: > On Tue, May 16, 2017 at 03:44:59PM -0700, Jason Ekstrand wrote: > > The guts of blorp and ISL don't understand i965's partial miptrees. > > Instead, we need to subtract off first_level before we hand anything off > > to blorp. > > --- > > src/mesa/drivers/dri/i965/brw_blorp.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c > b/src/mesa/drivers/dri/i965/brw_blorp.c > > index ebc4612..64aa4c9 100644 > > --- a/src/mesa/drivers/dri/i965/brw_blorp.c > > +++ b/src/mesa/drivers/dri/i965/brw_blorp.c > > @@ -271,6 +271,9 @@ blorp_surf_for_miptree(struct brw_context *brw, > > } > > assert((surf->aux_usage == ISL_AUX_USAGE_NONE) == > >(surf->aux_addr.buffer == NULL)); > > Here it would be nice to have an assert: > > assert(*level >= mt->first_level); > I'm happy to add that explicitly here. However it is already checked above by check_level_layer. > > + > > + /* ISL wants real levels, not offset ones. */ > > + *level -= mt->first_level; > > } > > > > static enum isl_format > > -- > > 2.5.0.400.gff86faf > > > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 05/43] i965/blorp: Properly handle mt->first_level
On Tue, May 16, 2017 at 03:44:59PM -0700, Jason Ekstrand wrote: > The guts of blorp and ISL don't understand i965's partial miptrees. > Instead, we need to subtract off first_level before we hand anything off > to blorp. > --- > src/mesa/drivers/dri/i965/brw_blorp.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c > b/src/mesa/drivers/dri/i965/brw_blorp.c > index ebc4612..64aa4c9 100644 > --- a/src/mesa/drivers/dri/i965/brw_blorp.c > +++ b/src/mesa/drivers/dri/i965/brw_blorp.c > @@ -271,6 +271,9 @@ blorp_surf_for_miptree(struct brw_context *brw, > } > assert((surf->aux_usage == ISL_AUX_USAGE_NONE) == >(surf->aux_addr.buffer == NULL)); Here it would be nice to have an assert: assert(*level >= mt->first_level); > + > + /* ISL wants real levels, not offset ones. */ > + *level -= mt->first_level; > } > > static enum isl_format > -- > 2.5.0.400.gff86faf > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 05/43] i965/blorp: Properly handle mt->first_level
The guts of blorp and ISL don't understand i965's partial miptrees. Instead, we need to subtract off first_level before we hand anything off to blorp. --- src/mesa/drivers/dri/i965/brw_blorp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index ebc4612..64aa4c9 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -271,6 +271,9 @@ blorp_surf_for_miptree(struct brw_context *brw, } assert((surf->aux_usage == ISL_AUX_USAGE_NONE) == (surf->aux_addr.buffer == NULL)); + + /* ISL wants real levels, not offset ones. */ + *level -= mt->first_level; } static enum isl_format -- 2.5.0.400.gff86faf ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev