aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2016-04-04 21:05:58 +0300
committerTopi Pohjolainen <[email protected]>2016-04-21 10:20:03 +0300
commita848ad68063a12eba40a555c8e990b16501ed0ca (patch)
treebc8134e717324242a8b5db8dd6239309a2b6194d /src/mesa
parentfb14a2fc782e040c2d09706b277b783b4f26697f (diff)
i965/meta: Expose fast clear value setup
Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_meta_fast_clear.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_meta_util.h5
2 files changed, 10 insertions, 5 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 409e0216e4a..eb9fd3798c6 100644
--- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
@@ -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
diff --git a/src/mesa/drivers/dri/i965/brw_meta_util.h b/src/mesa/drivers/dri/i965/brw_meta_util.h
index c43810871c1..c6a0674c429 100644
--- a/src/mesa/drivers/dri/i965/brw_meta_util.h
+++ b/src/mesa/drivers/dri/i965/brw_meta_util.h
@@ -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