mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-20 08:50:25 +01:00
swrast: Don't try to adjust_colors for <8bpc when handling R16, RG1616.
The GL_RED and GL_RG were tricking this code into executing, but it's totally unprepared for a 16-bit channel and just rescaled the values down to 0. We don't have anything with <8bit channels alongside >8bit channels, so disabling it should be safe. Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
f0471d904c
commit
2b624634dd
1 changed files with 3 additions and 3 deletions
|
|
@ -344,9 +344,9 @@ read_rgba_pixels( struct gl_context *ctx,
|
|||
_swrast_read_rgba_span(ctx, rb, width, x, y, GL_FLOAT, rgba);
|
||||
|
||||
/* apply fudge factor for shallow color buffers */
|
||||
if (fb->Visual.redBits < 8 ||
|
||||
fb->Visual.greenBits < 8 ||
|
||||
fb->Visual.blueBits < 8) {
|
||||
if ((fb->Visual.redBits < 8 && fb->Visual.redBits != 0) ||
|
||||
(fb->Visual.greenBits < 8 && fb->Visual.greenBits != 0) ||
|
||||
(fb->Visual.blueBits < 8 && fb->Visual.blueBits != 0)) {
|
||||
adjust_colors(fb, width, rgba);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue