[Mesa-dev] [PATCH 1/4] i965: Fix issues with number of VS URB entries on Cherryview/Broxton.

Jordan Justen jordan.l.justen at intel.com
Sun Jun 12 00:36:09 UTC 2016


Series Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

On 2016-06-10 14:19:43, Kenneth Graunke wrote:
> Cherryview/Broxton annoyingly have a minimum number of VS URB entries
> of 34, which is not a multiple of 8.  When the VS size is less than 9,
> the number of VS entries has to be a multiple of 8.
> 
> Notably, BLORP programmed the minimum number of VS URB entries (34), with
> a size of 1 (less than 9), which is invalid.
> 
> It seemed like this could be a problem in the regular URB code as well,
> so I went ahead and updated that to be safe.
> 
> Cc: "12.0" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/gen7_blorp.c | 5 +++--
>  src/mesa/drivers/dri/i965/gen7_urb.c   | 2 ++
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c b/src/mesa/drivers/dri/i965/gen7_blorp.c
> index 270fe57..235f0b5 100644
> --- a/src/mesa/drivers/dri/i965/gen7_blorp.c
> +++ b/src/mesa/drivers/dri/i965/gen7_blorp.c
> @@ -67,8 +67,9 @@ gen7_blorp_emit_urb_config(struct brw_context *brw)
>        push_constant_bytes / chunk_size_bytes;
>     const unsigned vs_size = 1;
>     const unsigned vs_start = push_constant_chunks;
> +   const unsigned min_vs_entries = ALIGN(brw->urb.min_vs_entries, 8);
>     const unsigned vs_chunks =
> -      DIV_ROUND_UP(brw->urb.min_vs_entries * vs_size * 64, chunk_size_bytes);
> +      DIV_ROUND_UP(min_vs_entries * vs_size * 64, chunk_size_bytes);
>  
>     if (gen7_blorp_skip_urb_config(brw))
>        return;
> @@ -83,7 +84,7 @@ gen7_blorp_emit_urb_config(struct brw_context *brw)
>                                   urb_size / 2 /* fs_size */);
>  
>     gen7_emit_urb_state(brw,
> -                       brw->urb.min_vs_entries /* num_vs_entries */,
> +                       min_vs_entries /* num_vs_entries */,
>                         vs_size,
>                         vs_start,
>                         0 /* num_hs_entries */,
> diff --git a/src/mesa/drivers/dri/i965/gen7_urb.c b/src/mesa/drivers/dri/i965/gen7_urb.c
> index a412a42..387ed2e 100644
> --- a/src/mesa/drivers/dri/i965/gen7_urb.c
> +++ b/src/mesa/drivers/dri/i965/gen7_urb.c
> @@ -234,6 +234,8 @@ gen7_upload_urb(struct brw_context *brw)
>      */
>     unsigned vs_min_entries =
>        tess_present && brw->gen == 8 ? 192 : brw->urb.min_vs_entries;
> +   /* Min VS Entries isn't a multiple of 8 on Cherryview/Broxton; round up */
> +   vs_min_entries = ALIGN(vs_min_entries, vs_granularity);
>  
>     unsigned vs_chunks =
>        DIV_ROUND_UP(vs_min_entries * vs_entry_size_bytes, chunk_size_bytes);
> -- 
> 2.8.3
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list