summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-11-18 16:15:33 -0700
committerBrian Paul <brianp@vmware.com>2010-11-18 16:15:38 -0700
commit83e93b6008213ad86607027e8434ecaccc8b1a2c (patch)
tree5817bc1a52086eea884e93b1eaf2cb60e90f66f7 /src/mesa/drivers/dri/nouveau
parent3dcc3153b087a2ec42e6177d965dd8b2c95779c2 (diff)
mesa: pass gl_format to _mesa_init_teximage_fields()
This should prevent the field going unset in the future. See bug http://bugs.freedesktop.org/show_bug.cgi?id=31544 for background. Also remove unneeded calls to clear_teximage_fields(). Finally, call _mesa_set_fetch_functions() from the _mesa_init_teximage_fields() function so callers have one less thing to worry about.
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 060c2c5bcc..2480b1ea50 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -603,11 +603,12 @@ nouveau_set_texbuffer(__DRIcontext *dri_ctx,
nouveau_update_renderbuffers(dri_ctx, draw);
nouveau_surface_ref(&to_nouveau_renderbuffer(rb)->surface, s);
+ s->format = get_texbuffer_format(rb, format);
+
/* Update the image fields. */
_mesa_init_teximage_fields(ctx, target, ti, s->width, s->height,
- 1, 0, s->cpp);
+ 1, 0, s->cpp, s->format);
ti->RowStride = s->pitch / s->cpp;
- ti->TexFormat = s->format = get_texbuffer_format(rb, format);
/* Try to validate it. */
if (!validate_teximage(ctx, t, 0, 0, 0, 0, s->width, s->height, 1))