diff options
author | Kevin Rogovin <[email protected]> | 2014-03-25 08:37:16 +0200 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-03-25 15:34:28 -0700 |
commit | fe635d51ff95def49f5941ebf6ca5f1dbbef3d30 (patch) | |
tree | 58a08daae65d8e7299e2a23d9f3c4e56a9cf2d73 /src | |
parent | ee4484be3dc827cf15bcf109f5e680dbf1dfbf34 (diff) |
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index fd18b45202f..d16da97c3c0 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp @@ -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; |