[Mesa-dev] [PATCH] i965: Increase BRW_MAX_UBO to 15.

Kenneth Graunke kenneth at whitecape.org
Mon Nov 30 17:34:02 PST 2015


On Monday, November 30, 2015 04:51:51 PM Matt Turner wrote:
> On Mon, Nov 30, 2015 at 4:49 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> > I believe that DirectX offers 16 UBOs, with one reserved for special
> > purposes.  This means that the practical lower bound is 15, even if
> > OpenGL only mandates 12.
> >
> > Without this, Shadow of Mordor shaders fail to work because of limit
> > checking around GL_MAX_UNIFORM_BUFFER_BINDINGS.
> >
> > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> 
> Acked-by: Matt Turner <mattst88 at gmail.com>
> 
> > ---
> >  src/mesa/drivers/dri/i965/brw_context.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Shadow of Mordor also needs tessellation, so backporting this wouldn't
> > help the game any.
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
> > index e45df46..e20082f 100644
> > --- a/src/mesa/drivers/dri/i965/brw_context.h
> > +++ b/src/mesa/drivers/dri/i965/brw_context.h
> > @@ -414,7 +414,7 @@ struct brw_ff_gs_prog_data {
> >  #define BRW_MAX_DRAW_BUFFERS 8
> >
> >  /** Max number of UBOs in a shader */
> > -#define BRW_MAX_UBO 12
> > +#define BRW_MAX_UBO 15
> >
> >  /** Max number of SSBOs in a shader */
> >  #define BRW_MAX_SSBO 12
> 
> Should we increase this as well?

We could.  I don't currently have a reason to.  Intel and AMD seem to
do 16 for that, so maybe we should follow suit...

--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: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151130/53b972d6/attachment.sig>


More information about the mesa-dev mailing list