Mesa (master): llvmpipe: change LP_MAX_SHADER_INSTRUCTIONS limit definition.

Roland Scheidegger sroland at kemper.freedesktop.org
Thu May 8 14:27:26 UTC 2014


Module: Mesa
Branch: master
Commit: cf93f8695770ef1c4274857f02739d2a338a4237
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf93f8695770ef1c4274857f02739d2a338a4237

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Thu May  8 16:25:47 2014 +0200

llvmpipe: change LP_MAX_SHADER_INSTRUCTIONS limit definition.

When the limit was changed to be defined in terms of LP_MAX_SHADER_VARIANTS
(75f1fea14f524ef05e980d825fda3ae226ae2ffe) when it was increased, this
inadvertently lowered the limit in some branches (that have a lower
LP_MAX_SHADER_VARIANTS number) when merged. So, make sure the limit is always
at least the number it once was.

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

---

 src/gallium/drivers/llvmpipe/lp_limits.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_limits.h b/src/gallium/drivers/llvmpipe/lp_limits.h
index 5ea0c83..131c02e 100644
--- a/src/gallium/drivers/llvmpipe/lp_limits.h
+++ b/src/gallium/drivers/llvmpipe/lp_limits.h
@@ -78,8 +78,10 @@
 /**
  * Max number of instructions (for all fragment shaders combined per context)
  * that will be kept around (counted in terms of llvm ir).
+ * Note: the definition looks odd, but there's branches which use a different
+ * number of max shader variants.
  */
-#define LP_MAX_SHADER_INSTRUCTIONS (512*LP_MAX_SHADER_VARIANTS)
+#define LP_MAX_SHADER_INSTRUCTIONS MAX2(128*1024, 512*LP_MAX_SHADER_VARIANTS)
 
 /**
  * Max number of setup variants that will be kept around.




More information about the mesa-commit mailing list