[Mesa-dev] [PATCH 32/40] i965/blorp/gen7: Prepare blorp being the very first renderer

Kenneth Graunke kenneth at whitecape.org
Mon Apr 18 07:59:11 UTC 2016

On Saturday, April 16, 2016 4:43:00 PM PDT Topi Pohjolainen wrote:
> I noticed using one synthetic benchmark a sequence where hiz depth
> operations are run first followed by a color buffer clear. In such
> case there is a difference between blorp and meta clear where meta
> configures L3 but blorp doesn't. I didn't see any problems in
> practise without the configure but this is the right thing to do.
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/gen7_blorp.cpp | 1 +
>  1 file changed, 1 insertion(+)
> diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/
> index ef96ec5..b85a6a5 100644
> --- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
> +++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
> @@ -802,6 +802,7 @@ gen7_blorp_exec(struct brw_context *brw,
>                                   params->dst.num_samples > 1 ?
>                                   (1 << params->dst.num_samples) - 1 : 1);
>     gen6_blorp_emit_state_base_address(brw, params);
> +   gen7_l3_state.emit(brw);
>     gen6_blorp_emit_vertices(brw, params);
>     gen7_blorp_emit_urb_config(brw);
>     if (params->use_wm_prog) {

Hmm...I'm not sure about this.  It configures the L3 based on the
GL context's active shader stages...which are not the shaders that
BLORP will be using.

We could instead call gen7_restore_default_l3_config().

However...I suspect that pretty much any L3 configuration the driver
sets up will work for BLORP's purposes.  If we're just worried about
BLORP being the first operation (before normal drawing), it might make
sense to have brw_upload_initial_gpu_state() call
gen7_restore_default_l3_config().  Then just let BLORP inherit the last
state we programmed.

I don't know exactly what the kernel guarantees, though.  It's probably
wise to check with Curro on what he thinks the right approach is.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160418/972a62b9/attachment-0001.sig>

More information about the mesa-dev mailing list