Merge remote branch 'vdpau/pipe-video' into pipe-video
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vs_surface_state.c
index 0250a68d292d66aefd0cd800ba752d53c1c2ecc3..b0b05445eb980292fb263391cdb0d5ed41fa7fb7 100644 (file)
@@ -45,7 +45,7 @@
 static void
 prepare_vs_constants(struct brw_context *brw)
 {
-   GLcontext *ctx = &brw->intel.ctx;
+   struct gl_context *ctx = &brw->intel.ctx;
    struct intel_context *intel = &brw->intel;
    struct brw_vertex_program *vp =
       (struct brw_vertex_program *) brw->vertex_program;
@@ -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;
 }
@@ -101,7 +110,7 @@ const struct brw_tracked_state brw_vs_constants = {
  * Sets brw->vs.surf_bo[surf] and brw->vp->const_buffer.
  */
 static void
-brw_update_vs_constant_surface( GLcontext *ctx,
+brw_update_vs_constant_surface( struct gl_context *ctx,
                                 GLuint surf)
 {
    struct brw_context *brw = brw_context(ctx);
@@ -151,7 +160,7 @@ prepare_vs_surfaces(struct brw_context *brw)
  */
 static void upload_vs_surfaces(struct brw_context *brw)
 {
-   GLcontext *ctx = &brw->intel.ctx;
+   struct gl_context *ctx = &brw->intel.ctx;
    uint32_t *bind;
    int i;