summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-10-12 03:09:19 +0200
committerRoland Scheidegger <[email protected]>2013-10-12 04:05:57 +0200
commit75f1fea14f524ef05e980d825fda3ae226ae2ffe (patch)
tree3c52aa16362cc02b46aa145179918686a6fb8931 /src/gallium
parenta9a78640d974820edd0c4a4325e04664471c4e06 (diff)
llvmpipe: increase fs shader variant instruction cache limit by factor 4
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 first. Should help with such lags due to recompiles (though other shader types have their own limits, LP_MAX_SETUP_VARIANTS and DRAW_MAX_SHADER_VARIANTS, in particular the latter seems a bit small (128)). Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_limits.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_limits.h b/src/gallium/drivers/llvmpipe/lp_limits.h
index af31b3580e0..5ea0c83723a 100644
--- a/src/gallium/drivers/llvmpipe/lp_limits.h
+++ b/src/gallium/drivers/llvmpipe/lp_limits.h
@@ -77,9 +77,9 @@
/**
* Max number of instructions (for all fragment shaders combined per context)
- * that will be kept around.
+ * that will be kept around (counted in terms of llvm ir).
*/
-#define LP_MAX_SHADER_INSTRUCTIONS (128*1024)
+#define LP_MAX_SHADER_INSTRUCTIONS (512*LP_MAX_SHADER_VARIANTS)
/**
* Max number of setup variants that will be kept around.