diff options
Diffstat (limited to 'src/gallium/drivers/r300/r300_blit.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_blit.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index a43e83c0d3..e195128d26 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -411,14 +411,16 @@ static void r300_resource_copy_region(struct pipe_context *pipe, { enum pipe_format old_format = dst->format; enum pipe_format new_format = old_format; + const struct util_format_description *desc = util_format_description(old_format); boolean is_depth; - if (!pipe->screen->is_format_supported(pipe->screen, - old_format, src->target, - src->nr_samples, - PIPE_BIND_RENDER_TARGET | - PIPE_BIND_SAMPLER_VIEW, 0) && - util_format_is_plain(old_format)) { + if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB || + (!pipe->screen->is_format_supported(pipe->screen, + old_format, src->target, + src->nr_samples, + PIPE_BIND_RENDER_TARGET | + PIPE_BIND_SAMPLER_VIEW, 0) && + desc->layout == UTIL_FORMAT_LAYOUT_PLAIN)) { switch (util_format_get_blocksize(old_format)) { case 1: new_format = PIPE_FORMAT_I8_UNORM; |