mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
r300g: fix sRGB->sRGB blits
Cc: 10.5 10.4 <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
9953586af2
commit
c939231e72
1 changed files with 9 additions and 0 deletions
|
|
@ -803,6 +803,15 @@ static void r300_blit(struct pipe_context *pipe,
|
|||
(struct pipe_framebuffer_state*)r300->fb_state.state;
|
||||
struct pipe_blit_info info = *blit;
|
||||
|
||||
/* The driver supports sRGB textures but not framebuffers. Blitting
|
||||
* from sRGB to sRGB should be the same as blitting from linear
|
||||
* to linear, so use that, This avoids incorrect linearization.
|
||||
*/
|
||||
if (util_format_is_srgb(info.src.format)) {
|
||||
info.src.format = util_format_linear(info.src.format);
|
||||
info.dst.format = util_format_linear(info.dst.format);
|
||||
}
|
||||
|
||||
/* MSAA resolve. */
|
||||
if (info.src.resource->nr_samples > 1 &&
|
||||
!util_format_is_depth_or_stencil(info.src.resource->format)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue