Mesa (master): i965/vs: Fix regression on pre-gen6 with no VS uniforms in use.

Eric Anholt anholt at kemper.freedesktop.org
Fri Aug 30 18:31:28 UTC 2013


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Aug 30 10:45:00 2013 -0700

i965/vs: Fix regression on pre-gen6 with no VS uniforms in use.

df06745c5adb524e15d157f976c08f1718f08efa made it so that we didn't
allocate extra uniform space for unused clip planes, which also
incidentally made us not allocate any space at all, which we were relying
on for this no-uniforms case.  Instead of putting the knowledge of this
special HW exception into the thing that normally preallocates prog_data
for us, just allocate it here.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68766
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_vec4.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index ae836d3..ab472b0 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1271,6 +1271,7 @@ vec4_visitor::setup_uniforms(int reg)
    if (brw->gen < 6 && this->uniforms == 0) {
       this->uniform_vector_size[this->uniforms] = 1;
 
+      prog_data->param = reralloc(NULL, prog_data->param, const float *, 4);
       for (unsigned int i = 0; i < 4; i++) {
 	 unsigned int slot = this->uniforms * 4 + i;
 	 static float zero = 0.0;




More information about the mesa-commit mailing list