[Mesa-dev] [PATCH 07/15] i965/blorp: Use 16 pixel dispatch on Gen7 when there is a WM program.

Chad Versace chad.versace at linux.intel.com
Tue May 22 11:37:27 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/11/2012 11:03 AM, Paul Berry wrote:
> When executing a blorp operation on Gen7 that does not need a WM
> program (i.e. a HiZ operation), we use 32-pixel dispatch mode because
> it's faster.  However, when executing a blorp operation that does need
> a WM program, we need to use 16-pixel dispatch, because blorp WM
> programs are compiled assuming 16-pixel dispatch.
> ---
>  src/mesa/drivers/dri/i965/gen7_blorp.cpp |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
> index dee342f..97289bb 100644
> --- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
> +++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
> @@ -453,7 +453,13 @@ gen7_blorp_emit_ps_config(struct brw_context *brw,
>  
>     dw2 = dw4 = dw5 = 0;
>     dw4 |= (brw->max_wm_threads - 1) << max_threads_shift;
> -   dw4 |= GEN7_PS_32_DISPATCH_ENABLE;
> +   if (prog_data) {
> +      /* Program has been compiled for 16-pixel dispatch */
> +      dw4 |= GEN7_PS_16_DISPATCH_ENABLE;
> +   } else {
> +      /* No program, so we can safely dispatch up to 32 pixels at a time */
> +      dw4 |= GEN7_PS_32_DISPATCH_ENABLE;
> +   }
>     if (intel->is_haswell)
>        dw4 |= SET_FIELD(1, HSW_PS_SAMPLE_MASK); /* 1 sample for now */
>     if (params->use_wm_prog) {


This is
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>.

I don't like that the dispatch width is implicit knowledge throughout the
code. But, I see that in gen7_wm_state.c that we use similiar logic. Blargh.
It would be nice to see the implicit knowledge made explicit, but that task
is for another day.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPu9zmAAoJEAIvNt057x8i1p8P/0eC3Rn5+PhMgQcI2QXW1xAi
vUGF/KZ7ALsEZ/sAH6k1+5y6Otm/AUlf0iuuDrIUF+GNuOqJMzGlrIrWeygtAczB
JCdfscFUd/vnwiPCDbTxowAJazw5LKrsux/nxphWkZbg/vBhaejBq1c8KJJF7dPh
cDvBnTn84XK49vHrNDNxK8+daXQaqwKnJXjOONS3VYsACUFR7OLg5Q9rhab7Ov1u
sL6w+xzdqxLBKE08VOvbNXl0tv8/ieNvcA1j0QVtsPElvLVtW8iw407bFR4vcpIk
WyOcRLwl8SJ5jSVA9Z0MzGkEzjKeTOQWW663wGmmeo7qZ6Ir1FE1xI9ZLWp+1HS2
w1aPoOmnkRy62OSTMIEQVW/+vKb8eo39wz97kCYoUb0fP5uG1Rd7iFEPkemZxZH2
kWNGbJBBrRkMtIYqivOH29WSX/3lxh9gOAF5PTNzBY41bkXKkh5FFiM0vnqdfSLS
wLTifxG4wpWvanxjl7WnNdw9ys8u82RhoIIFIPyY6+YVxACeVoG3tzkG8S11XdB4
bhTR+RoGTo5YQlVfGlBEBon++//7k1POlPQu4WfxLgKCCtbksL6IUctH+1u2ngnl
vc6MnWF0EN1QcHLIT9D+MULQPfwzNymFaxNJsVyL0lK4rw3H1hMpAEGkZaeWNTg4
8z7psCB5MS4TjZT+e5Fe
=MsL8
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list