[Mesa-dev] [PATCH] i965: fix MAX_COMPUTE_SHARED_SIZE constant value

Jordan Justen jordan.l.justen at intel.com
Sat Feb 13 22:18:46 UTC 2016


On 2016-02-13 13:57:17, Samuel Pitoiset wrote:
> 
> On 02/13/2016 10:55 PM, Jordan Justen wrote:
> > On 2016-02-13 13:49:37, Samuel Pitoiset wrote:
> >> MAX_COMPUTE_SHARED_SIZE should be set to 32768. This fixes a regression
> >> introduced in be27f77 (mesa: do not use a constant for
> >> MAX_COMPUTE_SHARED_SIZE).
> >>
> >> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> >> Cc: Mark Janes <mark.a.janes at intel.com>
> >> ---
> >>
> >> This patch is untested because I don't have any Intel GPUs.
> >>
> >>   src/mesa/drivers/dri/i965/brw_context.c | 1 +
> >>   1 file changed, 1 insertion(+)
> >>
> >> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
> >> index a5f7a2e..972b62e 100644
> >> --- a/src/mesa/drivers/dri/i965/brw_context.c
> >> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> >> @@ -710,6 +710,7 @@ brw_initialize_cs_context_constants(struct brw_context *brw, unsigned max_thread
> >>      ctx->Const.MaxComputeWorkGroupSize[1] = max_invocations;
> >>      ctx->Const.MaxComputeWorkGroupSize[2] = max_invocations;
> >>      ctx->Const.MaxComputeWorkGroupInvocations = max_invocations;
> >> +   ctx->Const.MaxComputeSharedMemorySize = 32768;
> >
> > Can you set it to 64 * 1024?
> 
> According to the patch sent by Kenneth five minutes after this one, I 
> assume that 32768 is just fine?
> 

For gen7+ it is 64k. We only support CS on gen7+. 32k was used
previously from the spec requirement.

Feel free to leave it at 32k if you prefer to not change it.

On Ivy Bridge, I tested 64 * 1024, but 32k should fix the regression
as well:

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


More information about the mesa-dev mailing list