summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanley Chery <nanley.g.chery@intel.com>2018-04-27 12:27:07 -0700
committerNanley Chery <nanley.g.chery@intel.com>2018-05-17 07:06:41 -0700
commit92a0a87b6f78b316f47132bb8f67c1ba28d3c020 (patch)
tree0c7dc3bf05bb584fe49c38d11b61aa17ae15654d
parentbb18af82c30f702788108e67270b3f473dfaec80 (diff)
Revert "i965: Make the miptree clear color setter take a gl_color_union"
This reverts commit 1d94aa19877fb702ffacacde28ad7253cce72c97. The next patch will make depth miptrees use the clear color setter that was originally being used for color miptrees. Go back to using the isl_color_value parameter because it's the same type as the fast_clear_color field used by color and depth miptrees. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp.c5
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c6
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.h2
3 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 2ea13bb743..04155b7d4c 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -1225,9 +1225,12 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,
if (can_fast_clear) {
const enum isl_aux_state aux_state =
intel_miptree_get_aux_state(irb->mt, irb->mt_level, irb->mt_layer);
+ union isl_color_value clear_color =
+ brw_meta_convert_fast_clear_color(brw, irb->mt,
+ &ctx->Color.ClearColor);
bool same_clear_color =
- !intel_miptree_set_clear_color(brw, irb->mt, &ctx->Color.ClearColor);
+ !intel_miptree_set_clear_color(brw, irb->mt, clear_color);
/* If the buffer is already in INTEL_FAST_CLEAR_STATE_CLEAR, the clear
* is redundant and can be skipped.
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index b5d7d691ec..506cf73e62 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -36,7 +36,6 @@
#include "brw_blorp.h"
#include "brw_context.h"
-#include "brw_meta_util.h"
#include "brw_state.h"
#include "main/enums.h"
@@ -3725,11 +3724,8 @@ get_isl_dim_layout(const struct gen_device_info *devinfo,
bool
intel_miptree_set_clear_color(struct brw_context *brw,
struct intel_mipmap_tree *mt,
- const union gl_color_union *color)
+ union isl_color_value clear_color)
{
- const union isl_color_value clear_color =
- brw_meta_convert_fast_clear_color(brw, mt, color);
-
if (memcmp(&mt->fast_clear_color, &clear_color, sizeof(clear_color)) != 0) {
mt->fast_clear_color = clear_color;
brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE;
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 903d99137f..2d827afa53 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -706,7 +706,7 @@ intel_miptree_sample_with_hiz(struct brw_context *brw,
bool
intel_miptree_set_clear_color(struct brw_context *brw,
struct intel_mipmap_tree *mt,
- const union gl_color_union *color);
+ union isl_color_value clear_color);
/* Get a clear color suitable for filling out an ISL surface state. */
union isl_color_value