On Thu, Aug 25, 2016 at 7:09 AM, Pohjolainen, Topi < topi.pohjolai...@gmail.com> wrote:
> On Tue, Aug 23, 2016 at 11:08:00AM -0700, Jason Ekstrand wrote: > > We were inferring the format from the surface but that doesn't always > work > > as the surface format is the texture format and we want the render format > > (which may be different on i965). > > Makes sense: > > Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> > > Does this fix anything currently or are just preparing for something? > Yes, but nothing that causes piglit fails. There are some RGBX formats that aren't renderable but we were trying to render to them. Not a huge deal but it triggered some asserts that I tried to add to isl_surf_fill_state. --Jason > > > > Signed-off-by: Jason Ekstrand <ja...@jlekstrand.net> > > Cc: Topi Pohjolainen <topi.pohjolai...@intel.com> > > --- > > src/mesa/drivers/dri/i965/blorp.h | 2 +- > > src/mesa/drivers/dri/i965/blorp_clear.c | 4 ++-- > > src/mesa/drivers/dri/i965/brw_blorp.c | 4 +++- > > 3 files changed, 6 insertions(+), 4 deletions(-) > > > > diff --git a/src/mesa/drivers/dri/i965/blorp.h > b/src/mesa/drivers/dri/i965/blorp.h > > index c20e2be..22b5760 100644 > > --- a/src/mesa/drivers/dri/i965/blorp.h > > +++ b/src/mesa/drivers/dri/i965/blorp.h > > @@ -68,7 +68,7 @@ brw_blorp_blit(struct brw_context *brw, > > void > > blorp_fast_clear(struct brw_context *brw, > > const struct brw_blorp_surf *surf, > > - uint32_t level, uint32_t layer, > > + uint32_t level, uint32_t layer, enum isl_format format, > > uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1); > > > > void > > diff --git a/src/mesa/drivers/dri/i965/blorp_clear.c > b/src/mesa/drivers/dri/i965/blorp_clear.c > > index 2da08f8..9e6b2a9 100644 > > --- a/src/mesa/drivers/dri/i965/blorp_clear.c > > +++ b/src/mesa/drivers/dri/i965/blorp_clear.c > > @@ -99,7 +99,7 @@ brw_blorp_params_get_clear_kernel(struct brw_context > *brw, > > > > void > > blorp_fast_clear(struct brw_context *brw, const struct brw_blorp_surf > *surf, > > - uint32_t level, uint32_t layer, > > + uint32_t level, uint32_t layer, enum isl_format format, > > uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1) > > { > > struct brw_blorp_params params; > > @@ -119,7 +119,7 @@ blorp_fast_clear(struct brw_context *brw, const > struct brw_blorp_surf *surf, > > brw_blorp_params_get_clear_kernel(brw, ¶ms, true); > > > > brw_blorp_surface_info_init(brw, ¶ms.dst, surf, level, layer, > > - surf->surf->format, true); > > + format, true); > > > > brw_blorp_exec(brw, ¶ms); > > } > > diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c > b/src/mesa/drivers/dri/i965/brw_blorp.c > > index f4c2740..b504861 100644 > > --- a/src/mesa/drivers/dri/i965/brw_blorp.c > > +++ b/src/mesa/drivers/dri/i965/brw_blorp.c > > @@ -647,7 +647,9 @@ do_single_blorp_clear(struct brw_context *brw, > struct gl_framebuffer *fb, > > DBG("%s (fast) to mt %p level %d layer %d\n", __FUNCTION__, > > irb->mt, irb->mt_level, irb->mt_layer); > > > > - blorp_fast_clear(brw, &surf, level, layer, x0, y0, x1, y1); > > + blorp_fast_clear(brw, &surf, level, layer, > > + brw->render_target_format[format], > > + x0, y0, x1, y1); > > > > /* Now that the fast clear has occurred, put the buffer in > > * INTEL_FAST_CLEAR_STATE_CLEAR so that we won't waste time doing > > -- > > 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