diff options
author | Marek Olšák <[email protected]> | 2013-06-06 13:45:24 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-06-30 22:14:37 +0200 |
commit | f83e220d360776dae0fbb61df3741501c2dd4d96 (patch) | |
tree | d3ebef3308990f71d0ef7b449073611a8d1d5b6d /src/mesa | |
parent | adf8afa168fe9fe2e4a2b35afc3003040d05273f (diff) |
st/mesa: handle SNORM formats in generic CopyPixels path
v2: check desc->is_mixed in util_format_is_snorm
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 0200a627025..2ce4728ad8d 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/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, |