i965: Don't assume that WPOS is always provided on gen6 in the new FS.
authorEric Anholt <eric@anholt.net>
Wed, 6 Oct 2010 19:10:31 +0000 (12:10 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 6 Oct 2010 19:13:08 +0000 (12:13 -0700)
We sensibly only provide it if the FS asks for it.  We could actually
skip WPOS unless the FS needed WPOS.zw, but that's something for
later.

Fixes: glsl-texture2d and probably many others.
src/mesa/drivers/dri/i965/brw_fs.cpp

index 1ccf695a597d608b38e11480e7fd329a3924d510..b93c27ec8ff42238d84fe7eac80ba4e0d45229cd 100644 (file)
@@ -2258,8 +2258,7 @@ fs_visitor::calculate_urb_setup()
    /* Figure out where each of the incoming setup attributes lands. */
    if (intel->gen >= 6) {
       for (unsigned int i = 0; i < FRAG_ATTRIB_MAX; i++) {
-        if (i == FRAG_ATTRIB_WPOS ||
-            (brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(i))) {
+        if (brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(i)) {
            urb_setup[i] = urb_next++;
         }
       }