summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/evergreen_state.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-08-09 17:21:10 +0200
committerMarek Olšák <[email protected]>2012-08-15 19:20:58 +0200
commit0f86915c5322b096b7154b6c84e21288074b775d (patch)
tree29229641e61829bd03d51c782b17be635823c501 /src/gallium/drivers/r600/evergreen_state.c
parent94b634eca0e2bd32d4b5bd92d06d510eae8a5625 (diff)
r600g: implement MSAA color resolve
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 56b578b89f2..f9c7b52d55d 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -669,8 +669,8 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen,
return retval == usage;
}
-static void *evergreen_create_blend_state(struct pipe_context *ctx,
- const struct pipe_blend_state *state)
+static void *evergreen_create_blend_state_mode(struct pipe_context *ctx,
+ const struct pipe_blend_state *state, int mode)
{
struct r600_context *rctx = (struct r600_context *)ctx;
struct r600_pipe_blend *blend = CALLOC_STRUCT(r600_pipe_blend);
@@ -706,7 +706,7 @@ static void *evergreen_create_blend_state(struct pipe_context *ctx,
blend->cb_target_mask = target_mask;
if (target_mask)
- color_control |= S_028808_MODE(V_028808_CB_NORMAL);
+ color_control |= S_028808_MODE(mode);
else
color_control |= S_028808_MODE(V_028808_CB_DISABLE);
@@ -756,6 +756,13 @@ static void *evergreen_create_blend_state(struct pipe_context *ctx,
return rstate;
}
+static void *evergreen_create_blend_state(struct pipe_context *ctx,
+ const struct pipe_blend_state *state)
+{
+
+ return evergreen_create_blend_state_mode(ctx, state, V_028808_CB_NORMAL);
+}
+
static void *evergreen_create_dsa_state(struct pipe_context *ctx,
const struct pipe_depth_stencil_alpha_state *state)
{
@@ -2989,6 +2996,17 @@ void evergreen_fetch_shader(struct pipe_context *ctx,
ve->fetch_shader, RADEON_USAGE_READ);
}
+void *evergreen_create_resolve_blend(struct r600_context *rctx)
+{
+ struct pipe_blend_state blend;
+ struct r600_pipe_state *rstate;
+
+ memset(&blend, 0, sizeof(blend));
+ blend.rt[0].colormask = 0xf;
+ rstate = evergreen_create_blend_state_mode(&rctx->context, &blend, V_028808_CB_RESOLVE);
+ return rstate;
+}
+
void *evergreen_create_db_flush_dsa(struct r600_context *rctx)
{
struct pipe_depth_stencil_alpha_state dsa = {{0}};