[Mesa-dev] [PATCH 12/15] i965: abort linking if URB read length greater than 15

Kenneth Graunke kenneth at whitecape.org
Wed May 4 10:43:04 UTC 2016


On Thursday, April 28, 2016 1:40:42 PM PDT Antia Puentes wrote:
> From: "Juan A. Suarez Romero" <jasuarez at igalia.com>
> 
> In scalar mode, URB read length limit is 15. Abort if we go beyond it.
> ---
>  src/mesa/drivers/dri/i965/brw_vec4.cpp | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/
i965/brw_vec4.cpp
> index 9816f0d..04287fb 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> @@ -2148,6 +2148,14 @@ brw_compile_vs(const struct brw_compiler *compiler, 
void *log_data,
>        prog_data->base.urb_read_length =
>           DIV_ROUND_UP(MAX2(nr_attribute_slots, 1), 2);
>  
> +   if (is_scalar && prog_data->base.urb_read_length > 15) {
> +      if (error_str)
> +         *error_str = ralloc_strdup(mem_ctx,
> +                                    "Too many attributes. Try to reduce the 
"
> +                                    "number of attributes or their size");
> +      return NULL;
> +   }
> +
>     prog_data->nr_attributes = nr_attributes;
>     prog_data->nr_attribute_slots = nr_attribute_slots;
>  
> 

Have you hit this limit?  I'm probably doing my math wrong, but it
doesn't seem like we should ever hit it...

I'm not sure we can legally just say no - we may need to resort to
pulling URB data...

--Ken
-------------- 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/20160504/dc10601e/attachment.sig>


More information about the mesa-dev mailing list