[Mesa-dev] [PATCH 1/2] i915: Only allow 8 vertex texture units

Ian Romanick idr at freedesktop.org
Wed Feb 26 13:49:05 PST 2014


From: Ian Romanick <ian.d.romanick at intel.com>

There's no reason to have more vertex texture units than fragment
texture units on this hardware.  Since increasing the default maximum
number of texture units from 16 to 32, this has triggered some segfault
in i915 driver.  There's probably some array or bitfield that isn't
properly sized now.  This really papers over the bug, but I don't think
I'll lose any sleep over that.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74071
Cc: "10.1" <mesa-stable at lists.freedesktop.org>
---
 src/mesa/drivers/dri/i915/i915_context.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 7378fc3..ebcab94 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -193,6 +193,7 @@ i915CreateContext(int api,
 
    ctx->Const.MaxTextureUnits = I915_TEX_UNITS;
    ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits = I915_TEX_UNITS;
+   ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = I915_TEX_UNITS;
    ctx->Const.MaxTextureCoordUnits = I915_TEX_UNITS;
    ctx->Const.MaxVarying = I915_TEX_UNITS;
    ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents =
-- 
1.8.1.4



More information about the mesa-dev mailing list