mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
Revert "etnaviv: completely turn off MSAA"
This reverts commit 044b238507 and extends it with
- putting the comments directly in front of the if's
- do not support 2x MSAA on SMALL_MSAA hardware
- checking if blt/rs supports the format
MSAA should work as expected now. Tested with kmscube and qt5.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19013>
This commit is contained in:
parent
22920d5691
commit
c2387e6b3c
1 changed files with 21 additions and 2 deletions
|
|
@ -495,10 +495,29 @@ gpu_supports_render_format(struct etna_screen *screen, enum pipe_format format,
|
|||
if (fmt == ETNA_NO_MATCH)
|
||||
return false;
|
||||
|
||||
/* MSAA is broken */
|
||||
if (sample_count > 1)
|
||||
if (sample_count > 1) {
|
||||
/* The hardware supports it. */
|
||||
if (!VIV_FEATURE(screen, chipFeatures, MSAA))
|
||||
return false;
|
||||
|
||||
/* Number of samples must be allowed. */
|
||||
if (!translate_samples_to_xyscale(sample_count, NULL, NULL))
|
||||
return false;
|
||||
|
||||
/* On SMALL_MSAA hardware 2x MSAA does not work. */
|
||||
if (sample_count == 2 && VIV_FEATURE(screen, chipMinorFeatures4, SMALL_MSAA))
|
||||
return false;
|
||||
|
||||
/* BLT/RS supports the format. */
|
||||
if (screen->specs.use_blt) {
|
||||
if (translate_blt_format(format) == ETNA_NO_MATCH)
|
||||
return false;
|
||||
} else {
|
||||
if (translate_rs_format(format) == ETNA_NO_MATCH)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (format == PIPE_FORMAT_R8_UNORM)
|
||||
return VIV_FEATURE(screen, chipMinorFeatures5, HALTI5);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue