diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index cd6b466815c..38d4ccfea07 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -1750,6 +1750,12 @@ st_choose_matching_format(struct pipe_screen *screen, unsigned bind, if (_mesa_get_format_color_encoding(mesa_format) == GL_SRGB) { continue; } + if (_mesa_get_format_bits(mesa_format, GL_TEXTURE_INTENSITY_SIZE) > 0) { + /* If `format` is GL_RED/GL_RED_INTEGER, then we might match some + * intensity formats, which we don't want. + */ + continue; + } if (_mesa_format_matches_format_and_type(mesa_format, format, type, swapBytes)) { |