diff options
author | marha <marha@users.sourceforge.net> | 2012-12-10 08:55:36 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-12-10 08:55:36 +0100 |
commit | a0124a5e8e70979d2c24ef55285da989fdad766a (patch) | |
tree | 5cea5c9804a8edf67bc7260e0851a20d21324547 /mesalib/src/mesa/state_tracker/st_atom_texture.c | |
parent | 514b4afb64ccbf8e954270105ed5064272a2be68 (diff) | |
parent | 0328076efb5ff6e62152c09e38d0d11f7931d07b (diff) | |
download | vcxsrv-a0124a5e8e70979d2c24ef55285da989fdad766a.tar.gz vcxsrv-a0124a5e8e70979d2c24ef55285da989fdad766a.tar.bz2 vcxsrv-a0124a5e8e70979d2c24ef55285da989fdad766a.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig libX11 mesa pixman git update 10 dec 2012
Conflicts:
fontconfig/src/fcxml.c
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_texture.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c index df05e83c2..dba1d829c 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_texture.c +++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c @@ -215,13 +215,19 @@ update_single_texture(struct st_context *st, /* Determine the format of the texture sampler view */ st_view_format = stObj->pt->format; - { - const struct st_texture_image *firstImage = - st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]); - const gl_format texFormat = firstImage->base.TexFormat; - enum pipe_format firstImageFormat = - st_mesa_format_to_pipe_format(texFormat); + { + gl_format texFormat; + enum pipe_format firstImageFormat; + + if (texObj->Target == GL_TEXTURE_BUFFER) { + texFormat = stObj->base._BufferObjectFormat; + } else { + const struct st_texture_image *firstImage = + st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]); + texFormat = firstImage->base.TexFormat; + } + firstImageFormat = st_mesa_format_to_pipe_format(texFormat); if ((samp->sRGBDecode == GL_SKIP_DECODE_EXT) && (_mesa_get_format_color_encoding(texFormat) == GL_SRGB)) { /* Don't do sRGB->RGB conversion. Interpret the texture data as |