glsl: move variables in to ir_variable::data, part II
[mesa.git] / src / mesa / state_tracker / st_atom_texture.c
index 8d1250fdc9167f6370569e30fa1daeca13612f8e..d79e04cf49c859e5caea7ceac5fec87fb9c1cd37 100644 (file)
@@ -239,7 +239,8 @@ update_single_texture(struct st_context *st,
          st_mesa_format_to_pipe_format(stObj->base._BufferObjectFormat);
    }
    else {
-      view_format = stObj->pt->format;
+      view_format =
+         stObj->surface_based ? stObj->surface_format : stObj->pt->format;
 
       /* If sRGB decoding is off, use the linear format */
       if (samp->sRGBDecode == GL_SKIP_DECODE_EXT) {