aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-07-01 11:58:08 +0200
committermarha <marha@users.sourceforge.net>2013-07-01 11:58:08 +0200
commit458ea020a211b25c00c1de9e30e4434213b55f47 (patch)
tree86ce7ba4b2cc9a655d270a877202e129dcca6df3 /mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
parent6d46609dfd488f9433d0ed10f49d05e31a6fe51e (diff)
parent28d1f604563d9c738a4c5630364d0e6b4e9b13ff (diff)
downloadvcxsrv-458ea020a211b25c00c1de9e30e4434213b55f47.tar.gz
vcxsrv-458ea020a211b25c00c1de9e30e4434213b55f47.tar.bz2
vcxsrv-458ea020a211b25c00c1de9e30e4434213b55f47.zip
Merge remote-tracking branch 'origin/released'
* origin/released: mesa git update 1 Jul 2013
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index 0200a6270..2ce4728ad 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -1546,6 +1546,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
if (!screen->is_format_supported(screen, srcFormat, st->internal_target, 0,
srcBind)) {
+ /* srcFormat is non-renderable. Find a compatible renderable format. */
if (type == GL_DEPTH) {
srcFormat = st_choose_format(st, GL_DEPTH_COMPONENT, GL_NONE,
GL_NONE, st->internal_target, 0,
@@ -1569,6 +1570,11 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
GL_NONE, st->internal_target, 0,
srcBind, FALSE);
}
+ else if (util_format_is_snorm(srcFormat)) {
+ srcFormat = st_choose_format(st, GL_RGBA16_SNORM, GL_NONE,
+ GL_NONE, st->internal_target, 0,
+ srcBind, FALSE);
+ }
else {
srcFormat = st_choose_format(st, GL_RGBA, GL_NONE,
GL_NONE, st->internal_target, 0,