summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_meta_fast_clear.c8
-rw-r--r--src/mesa/drivers/dri/i965/gen8_surface_state.c8
2 files changed, 6 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
index f3c256d11db..499daba3b00 100644
--- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
@@ -359,8 +359,12 @@ is_color_fast_clear_compatible(struct brw_context *brw,
}
for (int i = 0; i < 4; i++) {
- if (color->f[i] != 0.0f && color->f[i] != 1.0f &&
- _mesa_format_has_color_component(format, i)) {
+ if (!_mesa_format_has_color_component(format, i)) {
+ continue;
+ }
+
+ if (brw->gen < 9 &&
+ color->f[i] != 0.0f && color->f[i] != 1.0f) {
return false;
}
}
diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index e81b64629f8..9cdd1c71b4d 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -188,14 +188,6 @@ gen8_emit_fast_clear_color(struct brw_context *brw,
uint32_t *surf)
{
if (brw->gen >= 9) {
-#define check_fast_clear_val(x) \
- assert(mt->gen9_fast_clear_color.f[x] == 0.0 || \
- mt->gen9_fast_clear_color.f[x] == 1.0)
- check_fast_clear_val(0);
- check_fast_clear_val(1);
- check_fast_clear_val(2);
- check_fast_clear_val(3);
-#undef check_fast_clear_val
surf[12] = mt->gen9_fast_clear_color.ui[0];
surf[13] = mt->gen9_fast_clear_color.ui[1];
surf[14] = mt->gen9_fast_clear_color.ui[2];