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

Kenneth Graunke kenneth at whitecape.org
Mon Nov 30 16:49:23 PST 2015


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>
---
 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
-- 
2.6.2



More information about the mesa-dev mailing list