Merge commit 'origin/master' into gallium-sampler-view
[mesa.git] / src / gallium / drivers / svga / svga_state_constants.c
index a5777d4fbdcf4f3510795fb352cbc43873450025..493f78a99089e1c87e0c30fa12edd3c115d4cced 100644 (file)
@@ -23,7 +23,7 @@
  *
  **********************************************************/
 
-#include "pipe/p_inlines.h"
+#include "util/u_inlines.h"
 #include "pipe/p_defines.h"
 
 #include "svga_context.h"
@@ -137,11 +137,11 @@ static int emit_fs_consts( struct svga_context *svga,
 
       for (i = 0; i < key->num_textures; i++) {
          if (key->tex[i].unnormalized) {
-            struct pipe_texture *tex = svga->curr.texture[i];
+            struct pipe_texture *tex = svga->curr.sampler_views[i]->texture;
             float data[4];
 
-            data[0] = 1.0 / (float)tex->width[0];
-            data[1] = 1.0 / (float)tex->height[0];
+            data[0] = 1.0 / (float)tex->width0;
+            data[1] = 1.0 / (float)tex->height0;
             data[2] = 1.0;
             data[3] = 1.0;