From 15a4b6db2192b0adc05c3dc07cf043316c556f2e Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 14 May 2013 17:58:32 +0200 Subject: mesa: declare UniformBufferBindings as an array with a static size Some Gallium drivers were crashing, because the array was not large enough. v2: clamp the per-shader maximum in st/mesa, then sum them all up NOTE: This is a candidate for the stable branches. --- src/mesa/main/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/main/config.h') diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index ea87b754a40..4a4fdc98c1d 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -168,6 +168,9 @@ /*@{*/ #define MAX_PROGRAM_LOCAL_PARAMS 4096 #define MAX_UNIFORMS 4096 +#define MAX_UNIFORM_BUFFERS 15 /* + 1 default uniform buffer */ +/* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */ +#define MAX_COMBINED_UNIFORM_BUFFERS (MAX_UNIFORM_BUFFERS * 6) /*@}*/ /** -- cgit v1.2.3