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

Samuel Iglesias Gonsálvez siglesias at igalia.com
Mon Jan 16 07:13:34 UTC 2017


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 <siglesias at 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
 

OK

> > Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
> > 
> > ---
> > 
> > 
> > 
> > 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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170116/fdd42260/attachment-0001.html>


More information about the mesa-dev mailing list