From 4c79f088c0ef8d36b0c57d5005743768d8c5f3e9 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 21 Mar 2014 17:02:41 -0700 Subject: [PATCH] Revert "i965: For color clears, only disable writes to components that exist." This reverts commit 2919c3fdb40cf457f2e47f378a46f4cefa9e9f6d. For formats like BGRX, looping through 0..num_components works fine. But for formats like XRGB, we'd check the color mask for X and fail to check it for B. --- src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index 433f63e7462..76f82997fbe 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp @@ -231,7 +231,7 @@ brw_blorp_clear_params::brw_blorp_clear_params(struct brw_context *brw, /* Constant color writes ignore everyting in blend and color calculator * state. This is not documented. */ - for (int i = 0; i < _mesa_format_num_components(irb->mt->format); i++) { + for (int i = 0; i < 4; i++) { if (!color_mask[i]) { color_write_disable[i] = true; wm_prog_key.use_simd16_replicated_data = false; -- 2.30.2