[Mesa-dev] [v4 09/11] i965: Set render state for lossless compressed
Ben Widawsky
ben at bwidawsk.net
Tue May 10 18:01:14 UTC 2016
On Tue, May 10, 2016 at 08:14:00PM +0300, Pohjolainen, Topi wrote:
> On Thu, Apr 21, 2016 at 02:59:04PM +0300, Topi Pohjolainen wrote:
> > v2: Add support for blorp and removed the support for meta
> >
> > Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> > ---
> > src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 3 +++
> > src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 6 ++++++
> > src/mesa/drivers/dri/i965/brw_draw.c | 7 ++++++-
> > 3 files changed, 15 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> > index 74fe3c0..84f4ca5 100644
> > --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> > +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> > @@ -107,6 +107,9 @@ brw_blorp_blit_miptrees(struct brw_context *brw,
> > brw_blorp_exec(brw, ¶ms);
> >
> > intel_miptree_slice_set_needs_hiz_resolve(dst_mt, dst_level, dst_layer);
> > +
> > + if (intel_miptree_is_lossless_compressed(brw, dst_mt))
> > + dst_mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_UNRESOLVED;
> > }
> >
> > static int
> > diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> > index b1da935..bf8d231 100644
> > --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> > +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> > @@ -398,6 +398,12 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,
> > * redundant clears.
> > */
> > irb->mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_CLEAR;
> > + } else if (intel_miptree_is_lossless_compressed(brw, irb->mt)) {
> > + /* Compressed buffers can be cleared also using normal rep-clear. In
> > + * such case they bahave such as if they were drawn using normal 3D
> > + * render pipeline, and we simply mark the mcs as dirty.
> > + */
> > + irb->mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_UNRESOLVED;
>
> We discussed in irc with Ben that this should be only hit with partial
> clears. I added:
>
> assert(partial_clear);
Can you make it:
assert(partial_clear && !fast_clear)?
>
> I didn't see this trigger, and Ben, I didn't actually see assertion failures
> in your test run either. The two deqp regressions:
>
> piglit.spec.arb_pixel_buffer_object.texsubimage pbo.sklm64
> piglit.spec.arb_pixel_buffer_object.texsubimage-unpack pbo.sklm64
>
> are actually real rendering errors that I haven't seen before. We analysed
> this a little with Ken and were able to make these pass with:
>
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> index 7cfaae7..363b558 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
> @@ -30,6 +30,7 @@
> #include "util/ralloc.h"
>
> #include "intel_fbo.h"
> +#include "intel_reg.h"
>
> #include "brw_blorp.h"
> #include "brw_meta_util.h"
> @@ -435,6 +436,9 @@ brw_blorp_resolve_color(struct brw_context *brw, struct intel_mipmap_tree *mt)
>
> brw_blorp_exec(brw, ¶ms);
> mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_RESOLVED;
> +
> + brw_emit_pipe_control_flush(brw,
> + PIPE_CONTROL_RENDER_TARGET_FLUSH);
> }
>
> } /* extern "C" */
>
>
> In bspec there is:
>
> "When performing a render target resolve, PIPE_CONTROL with end of pipe sync
> must be delivered."
More information about the mesa-dev
mailing list