i965/meta: Expose fast clear value setup
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Mon, 4 Apr 2016 18:05:58 +0000 (21:05 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 21 Apr 2016 07:20:03 +0000 (10:20 +0300)
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
src/mesa/drivers/dri/i965/brw_meta_util.h

index 409e0216e4a606e0968d0c7c4fec0c9c82dd2500..eb9fd3798c63b1ea1538087a4690265191405fad 100644 (file)
@@ -395,10 +395,10 @@ is_color_fast_clear_compatible(struct brw_context *brw,
  * Convert the given color to a bitfield suitable for ORing into DWORD 7 of
  * SURFACE_STATE (DWORD 12-15 on SKL+).
  */
-static void
-set_fast_clear_color(struct brw_context *brw,
-                     struct intel_mipmap_tree *mt,
-                     const union gl_color_union *color)
+void
+brw_meta_set_fast_clear_color(struct brw_context *brw,
+                              struct intel_mipmap_tree *mt,
+                              const union gl_color_union *color)
 {
    union gl_color_union override_color = *color;
 
@@ -668,7 +668,7 @@ brw_meta_fast_clear(struct brw_context *brw, struct gl_framebuffer *fb,
 
       switch (clear_type) {
       case FAST_CLEAR:
-         set_fast_clear_color(brw, irb->mt, &ctx->Color.ClearColor);
+         brw_meta_set_fast_clear_color(brw, irb->mt, &ctx->Color.ClearColor);
          irb->need_downsample = true;
 
          /* If the buffer is already in INTEL_FAST_CLEAR_STATE_CLEAR, the
index c43810871c1133aa220b19b6d70590143884b7de..c6a0674c429243ad01bb2ef1b5fdfcb29e87311d 100644 (file)
@@ -60,6 +60,11 @@ brw_meta_get_buffer_rect(const struct gl_framebuffer *fb,
                          unsigned *x0, unsigned *y0,
                          unsigned *x1, unsigned *y1);
 
+void
+brw_meta_set_fast_clear_color(struct brw_context *brw,
+                              struct intel_mipmap_tree *mt,
+                              const union gl_color_union *color);
+
 #ifdef __cplusplus
 }
 #endif