[Mesa-dev] [PATCH] llvmpipe: increase fs shader variant instruction cache limit by factor 4

sroland at vmware.com sroland at vmware.com
Fri Oct 11 15:11:44 CEST 2013

From: Roland Scheidegger <sroland at vmware.com>

The previous limit of of 128*1024 was reported to cause frequent recompiles
in some apps due to shader variant thrashing on IRC in some apps leading
to noticeable lags.
Note that the LP_MAX_SHADER_VARIANTS limit (1024) was more or less impossible
to reach, since even simple fragment shaders without texturing (glxgears) used
more than twice than 128 instructions, hence the instruction limit would have
always been reached first (excluding things like trivial shaders not writing
color). Even with the new limit it is VERY likely the instruction limit is hit
Should help with such lags due to recompiles (though other shader types have
particular the latter seems a bit small (128)).
 src/gallium/drivers/llvmpipe/lp_limits.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_limits.h b/src/gallium/drivers/llvmpipe/lp_limits.h
index af31b35..8cfab5a 100644
--- a/src/gallium/drivers/llvmpipe/lp_limits.h
+++ b/src/gallium/drivers/llvmpipe/lp_limits.h
@@ -79,7 +79,7 @@
  * Max number of instructions (for all fragment shaders combined per context)
  * that will be kept around.
-#define LP_MAX_SHADER_INSTRUCTIONS (128*1024)
  * Max number of setup variants that will be kept around.

More information about the mesa-dev mailing list