Re: [Mesa-dev] [PATCH] anv: increase ANV_MAX_STATE_SIZE_LOG2 limit to 256 kB

2017-01-15 Thread Samuel Iglesias Gonsálvez
On Fri, 2017-01-13 at 08:29 -0800, Jason Ekstrand wrote:
On Fri, Jan 13, 2017 at 1:33 AM, Samuel Iglesias Gonsálvez 
 wrote:
Fixes crash in dEQP-VK.ubo.random.all_shared_buffer.48 due to a

fragment shader code bigger than 128 kB.


This patch increases the allocation size limit to 256 kB.

That limit will have to be changed two places.  Where you did and also where we 
init the instruction_block_pool in anv_device.c
 

OK

> > Signed-off-by: Samuel Iglesias Gonsálvez 
> > 
> > ---
> > 
> > 
> > 
> > OpenGL driver compares the code size against the allocated cache
> > buffer
> > 
> > object size and allocates more if needed. I don't know how
> > plausible
> > 
> > is to have something similar in ANV instead of hardcoding the
> > maximum
> > 
> > size.
> > 
> > 
> > 
> > Anyway, if setting it to 256 kB is too much for some reason, please
> > discard
> > 
> > this patch.
> > 
> > 
> > 
> >  src/intel/vulkan/anv_private.h | 2 +-
> > 
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > 
> > 
> > diff --git a/src/intel/vulkan/anv_private.h
> > b/src/intel/vulkan/anv_private.h
> > 
> > index 2342fcbfeb4..cd3f17648dd 100644
> > 
> > --- a/src/intel/vulkan/anv_private.h
> > 
> > +++ b/src/intel/vulkan/anv_private.h
> > 
> > @@ -393,7 +393,7 @@ struct anv_fixed_size_state_pool {
> > 
> >  };
> > 
> > 
> > 
> >  #define ANV_MIN_STATE_SIZE_LOG2 6
> > 
> > -#define ANV_MAX_STATE_SIZE_LOG2 17
> > 
> > +#define ANV_MAX_STATE_SIZE_LOG2 18
> 
> Let's make it 1 MB while we're at it.  I'm tired of bumping this.
>  

OK! I will send a patch for this.

Sam



 #define ANV_STATE_BUCKETS (ANV_MAX_STATE_SIZE_LOG2 - ANV_MIN_STATE_SIZE_LOG2 + 
1)


--

2.11.0


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] anv: increase ANV_MAX_STATE_SIZE_LOG2 limit to 256 kB

2017-01-13 Thread Jason Ekstrand
On Fri, Jan 13, 2017 at 1:33 AM, Samuel Iglesias Gonsálvez <
sigles...@igalia.com> wrote:

> Fixes crash in dEQP-VK.ubo.random.all_shared_buffer.48 due to a
> fragment shader code bigger than 128 kB.
>
> This patch increases the allocation size limit to 256 kB.
>

That limit will have to be changed two places.  Where you did and also
where we init the instruction_block_pool in anv_device.c


> Signed-off-by: Samuel Iglesias Gonsálvez 
> ---
>
> OpenGL driver compares the code size against the allocated cache buffer
> object size and allocates more if needed. I don't know how plausible
> is to have something similar in ANV instead of hardcoding the maximum
> size.
>
> Anyway, if setting it to 256 kB is too much for some reason, please discard
> this patch.
>
>  src/intel/vulkan/anv_private.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_
> private.h
> index 2342fcbfeb4..cd3f17648dd 100644
> --- a/src/intel/vulkan/anv_private.h
> +++ b/src/intel/vulkan/anv_private.h
> @@ -393,7 +393,7 @@ struct anv_fixed_size_state_pool {
>  };
>
>  #define ANV_MIN_STATE_SIZE_LOG2 6
> -#define ANV_MAX_STATE_SIZE_LOG2 17
> +#define ANV_MAX_STATE_SIZE_LOG2 18
>

Let's make it 1 MB while we're at it.  I'm tired of bumping this.


>
>  #define ANV_STATE_BUCKETS (ANV_MAX_STATE_SIZE_LOG2 -
> ANV_MIN_STATE_SIZE_LOG2 + 1)
>
> --
> 2.11.0
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] anv: increase ANV_MAX_STATE_SIZE_LOG2 limit to 256 kB

2017-01-13 Thread Samuel Iglesias Gonsálvez
Fixes crash in dEQP-VK.ubo.random.all_shared_buffer.48 due to a
fragment shader code bigger than 128 kB.

This patch increases the allocation size limit to 256 kB.

Signed-off-by: Samuel Iglesias Gonsálvez 
---

OpenGL driver compares the code size against the allocated cache buffer
object size and allocates more if needed. I don't know how plausible
is to have something similar in ANV instead of hardcoding the maximum
size.

Anyway, if setting it to 256 kB is too much for some reason, please discard
this patch.

 src/intel/vulkan/anv_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 2342fcbfeb4..cd3f17648dd 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -393,7 +393,7 @@ struct anv_fixed_size_state_pool {
 };
 
 #define ANV_MIN_STATE_SIZE_LOG2 6
-#define ANV_MAX_STATE_SIZE_LOG2 17
+#define ANV_MAX_STATE_SIZE_LOG2 18
 
 #define ANV_STATE_BUCKETS (ANV_MAX_STATE_SIZE_LOG2 - ANV_MIN_STATE_SIZE_LOG2 + 
1)
 
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev