mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
i965: For fast color clears, only check the color of live channels.
When deciding if a clear color is suitable for fast clear, take into account if a color channel is active in the buffer format. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
ee4484be3d
commit
fe635d51ff
1 changed files with 2 additions and 1 deletions
|
|
@ -153,7 +153,8 @@ is_color_fast_clear_compatible(struct brw_context *brw,
|
|||
return false;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (color->f[i] != 0.0 && color->f[i] != 1.0) {
|
||||
if (color->f[i] != 0.0 && color->f[i] != 1.0 &&
|
||||
_mesa_format_has_color_component(format, i)) {
|
||||
perf_debug("Clear color unsupported by fast color clear. "
|
||||
"Falling back to slow clear.\n");
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue