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

Matt Turner mattst88 at gmail.com
Mon Nov 30 16:51:51 PST 2015


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?


More information about the mesa-dev mailing list