The BTI_MAX_ID is to prevent a workaround image could not get a valid
128 + ID slot. I think it's better to relax the assertion check here
but put an assert to the place where the workaround image index is
larger than 128 indeed.

On Wed, Dec 24, 2014 at 01:50:52PM +0800, [email protected] wrote:
> From: Luo Xionghu <[email protected]>
> 
> this patch revert fb4bced99b7c08d0d43386abf33448860fb7fc41 as the spec
> defined the min_max_parameter_size's min value is 1024;
> the BTI_MAX_NUM and btiBase could be 130 because of 128 images with 1
> const surface and 1 private surface.
> 
> Signed-off-by: Luo Xionghu <[email protected]>
> ---
>  backend/src/backend/program.h |    2 +-
>  src/cl_gen75_device.h         |    2 +-
>  src/cl_gen7_device.h          |    2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/backend/src/backend/program.h b/backend/src/backend/program.h
> index a457d52..8c1bb75 100644
> --- a/backend/src/backend/program.h
> +++ b/backend/src/backend/program.h
> @@ -67,7 +67,7 @@ enum gbe_get_arg_info_value {
>  #define BTI_PRIVATE 1
>  #define BTI_RESERVED_NUM 2
>  #define BTI_MAX_IMAGE_NUM 128
> -#define BTI_MAX_ID (BTI_MAX_IMAGE_NUM + BTI_RESERVED_NUM - 1)
> +#define BTI_MAX_ID (BTI_MAX_IMAGE_NUM + BTI_RESERVED_NUM)
>  
>  /*! Constant buffer values (ie values to setup in the constant buffer) */
>  enum gbe_curbe_type {
> diff --git a/src/cl_gen75_device.h b/src/cl_gen75_device.h
> index 768721d..8cf2dcd 100644
> --- a/src/cl_gen75_device.h
> +++ b/src/cl_gen75_device.h
> @@ -19,7 +19,7 @@
>  
>  /* Common fields for both SNB devices (either GT1 or GT2)
>   */
> -.max_parameter_size = sizeof(cl_mem) * 128,
> +.max_parameter_size = 1024,
>  .global_mem_cache_line_size = 128, /* XXX */
>  .global_mem_cache_size = 8 << 10, /* XXX */
>  .local_mem_type = CL_GLOBAL,
> diff --git a/src/cl_gen7_device.h b/src/cl_gen7_device.h
> index 5197817..6857f8a 100644
> --- a/src/cl_gen7_device.h
> +++ b/src/cl_gen7_device.h
> @@ -18,7 +18,7 @@
>   */
>  
>  /* Common fields for both IVB devices (either GT1 or GT2) */
> -.max_parameter_size = sizeof(cl_mem) * 128,
> +.max_parameter_size = 1024,
>  .global_mem_cache_line_size = 128, /* XXX */
>  .global_mem_cache_size = 8 << 10, /* XXX */
>  .local_mem_type = CL_GLOBAL,
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Beignet mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to