From de6810d9be9d1e6426881774458f8a6f3bed17ee Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Tue, 5 Sep 2017 00:17:31 +0200 Subject: llvmpipe, draw: increase shader cache limits We're not particularly concerned with memory usage, if the tradeoff is shader recompiles. And it's common for apps to have a lot of shaders nowadays (and, since our shaders include a LOT of context state of course we may create quite a bit more shaders even). So quadruple the amount of shaders draw will cache (from 128 to 512). For llvmpipe (fs shaders) quadruple the number of instructions, keep the number of variants the same for now (only with very simple, non-texturing shaders the variant limit could really be reached), and simplify the definition, it's probably easier to just have one different definition per branch... Reviewed-by: Jose Fonseca --- src/gallium/auxiliary/draw/draw_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/draw') diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index 030bb2cece6..06ad7372a74 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -103,7 +103,7 @@ struct vertex_header { /* maximum number of shader variants we can cache */ -#define DRAW_MAX_SHADER_VARIANTS 128 +#define DRAW_MAX_SHADER_VARIANTS 512 /** * Private context for the drawing module. -- cgit v1.2.3