i965: Keep around a copy of the VS constant surface dumping code.
authorEric Anholt <eric@anholt.net>
Thu, 23 Dec 2010 06:48:24 +0000 (22:48 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 23 Dec 2010 09:32:44 +0000 (01:32 -0800)
Just like everywhere else, I never trust my constant uploads to
correctly put constants in the right places, even though that's so
rarely where the issue is.

src/mesa/drivers/dri/i965/brw_vs_surface_state.c

index eabac511602f98d4e206d4932c827b174a8b0e85..b0b05445eb980292fb263391cdb0d5ed41fa7fb7 100644 (file)
@@ -82,6 +82,15 @@ prepare_vs_constants(struct brw_context *brw)
             params->ParameterValues[i],
             4 * sizeof(float));
    }
+
+   if (0) {
+      for (i = 0; i < params->NumParameters; i++) {
+        float *row = (float *)brw->vs.const_bo->virtual + i * 4;
+        printf("vs const surface %3d: %4.3f %4.3f %4.3f %4.3f\n",
+               i, row[0], row[1], row[2], row[3]);
+      }
+   }
+
    drm_intel_gem_bo_unmap_gtt(brw->vs.const_bo);
    brw->state.dirty.brw |= BRW_NEW_VS_CONSTBUF;
 }