aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-08-11 21:22:25 +0200
committermarha <marha@users.sourceforge.net>2014-08-11 21:22:25 +0200
commit8e27619ab489dece35cc4bec86950ee7729cd309 (patch)
treeab59dbc661e00c12ed4777cf9d0d37393c4163aa /mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
parentffc99ce2402fe5c9a6eb8fcf193e8e9472fd993b (diff)
parentfdbedba4d50e1b28b0249c83ba11c029f096e400 (diff)
downloadvcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.gz
vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.bz2
vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.zip
Merge remote-tracking branch 'origin/released'
Conflicts: libxcb/src/c_client.py mesalib/include/GL/glext.h mesalib/include/GL/glxext.h mesalib/src/glsl/.gitignore mesalib/src/mesa/drivers/dri/common/xmlconfig.h mesalib/src/mesa/main/.gitignore xorg-server/Xext/xvmain.c xorg-server/dix/dispatch.c xorg-server/hw/xfree86/common/compiler.h
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index 6119cc275..d13a17f50 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -494,22 +494,19 @@ make_texture(struct st_context *st,
pipeFormat = st_choose_matching_format(pipe->screen, PIPE_BIND_SAMPLER_VIEW,
format, type, unpack->SwapBytes);
- if (pipeFormat != PIPE_FORMAT_NONE) {
- mformat = st_pipe_format_to_mesa_format(pipeFormat);
- baseInternalFormat = _mesa_get_format_base_format(mformat);
- }
- else {
+ if (pipeFormat == PIPE_FORMAT_NONE) {
/* Use the generic approach. */
GLenum intFormat = internal_format(ctx, format, type);
- baseInternalFormat = _mesa_base_tex_format(ctx, intFormat);
pipeFormat = st_choose_format(st, intFormat, format, type,
PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW,
FALSE);
assert(pipeFormat != PIPE_FORMAT_NONE);
- mformat = st_pipe_format_to_mesa_format(pipeFormat);
}
+ mformat = st_pipe_format_to_mesa_format(pipeFormat);
+ baseInternalFormat = _mesa_get_format_base_format(mformat);
+
pixels = _mesa_map_pbo_source(ctx, unpack, pixels);
if (!pixels)
return NULL;