Mesa (master): st/mesa: fix texture buffer objects

Marek Olšák mareko at kemper.freedesktop.org
Wed Feb 13 15:38:41 UTC 2013


Module: Mesa
Branch: master
Commit: 60aa5f360a01ff56ba9566ac86c4e68543d829a5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=60aa5f360a01ff56ba9566ac86c4e68543d829a5

Author: Marek Olšák <maraeo at gmail.com>
Date:   Tue Feb 12 21:00:43 2013 +0100

st/mesa: fix texture buffer objects

Broken by 624528834f53f54c7a934f929769b7e6b230a0b1.

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/state_tracker/st_atom_texture.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index 28327bc..fc2d690 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -234,11 +234,17 @@ update_single_texture(struct st_context *st,
    }
 
    /* Determine the format of the texture sampler view */
-   view_format = stObj->pt->format;
+   if (texObj->Target == GL_TEXTURE_BUFFER) {
+      view_format =
+         st_mesa_format_to_pipe_format(stObj->base._BufferObjectFormat);
+   }
+   else {
+      view_format = stObj->pt->format;
 
-   /* If sRGB decoding is off, use the linear format */
-   if (samp->sRGBDecode == GL_SKIP_DECODE_EXT) {
-      view_format = util_format_linear(view_format);
+      /* If sRGB decoding is off, use the linear format */
+      if (samp->sRGBDecode == GL_SKIP_DECODE_EXT) {
+         view_format = util_format_linear(view_format);
+      }
    }
 
    /* if sampler view has changed dereference it */




More information about the mesa-commit mailing list