diff options
author | Corbin Simpson <[email protected]> | 2010-05-25 21:45:38 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2010-06-16 10:54:06 -0700 |
commit | 5c58618406bd5b4ee0bc5121f562560702ebbf98 (patch) | |
tree | 33d0cf493b525db73839a2fb24bf456fe6748bb3 | |
parent | 867478b6f6fe3ad76c3d1d75b2b907f59b9a649c (diff) |
r300g: Old MSAA code from before gallium-msaa.
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state_invariant.c | 8 |
4 files changed, 15 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 90de53e2df3..0d7ff2e061c 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -103,6 +103,8 @@ struct r300_rs_state { struct pipe_rasterizer_state rs_draw; uint32_t vap_control_status; /* R300_VAP_CNTL_STATUS: 0x2140 */ + uint32_t multisample_position_0;/* R300_GB_MSPOS0: 0x4010 */ + uint32_t multisample_position_1;/* R300_GB_MSPOS1: 0x4014 */ uint32_t antialiasing_config; /* R300_GB_AA_CONFIG: 0x4020 */ uint32_t point_size; /* R300_GA_POINT_SIZE: 0x421c */ uint32_t point_minmax; /* R300_GA_POINT_MINMAX: 0x4230 */ diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 64d66e421f2..aae2e49dca8 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -484,6 +484,13 @@ void r300_emit_rs_state(struct r300_context* r300, unsigned size, void* state) OUT_CS_REG(R300_GB_AA_CONFIG, rs->antialiasing_config); + OUT_CS_REG(R300_VAP_CNTL_STATUS, rs->vap_control_status); + if (r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0)) { + OUT_CS_REG_SEQ(R300_GB_MSPOS0, 2); + OUT_CS(rs->multisample_position_0); + OUT_CS(rs->multisample_position_1); + } + OUT_CS_REG(R300_GB_AA_CONFIG, rs->antialiasing_config); OUT_CS_REG(R300_GA_POINT_SIZE, rs->point_size); OUT_CS_REG_SEQ(R300_GA_POINT_MINMAX, 2); OUT_CS(rs->point_minmax); diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 0772c1fa537..815f969e5ec 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -950,6 +950,11 @@ static void* r300_create_rs_state(struct pipe_context* pipe, } } + if (state->gl_rasterization_rules) { + rs->multisample_position_0 = 0x66666666; + rs->multisample_position_1 = 0x6666666; + } + return (void*)rs; } @@ -979,7 +984,7 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state) } UPDATE_STATE(state, r300->rs_state); - r300->rs_state.size = 27 + (r300->polygon_offset_enabled ? 5 : 0); + r300->rs_state.size = 31 + (r300->polygon_offset_enabled ? 5 : 0); if (last_sprite_coord_enable != r300->sprite_coord_enable || last_two_sided_color != r300->two_sided_color) { diff --git a/src/gallium/drivers/r300/r300_state_invariant.c b/src/gallium/drivers/r300/r300_state_invariant.c index b3181a37ea1..e67a0ae2444 100644 --- a/src/gallium/drivers/r300/r300_state_invariant.c +++ b/src/gallium/drivers/r300/r300_state_invariant.c @@ -38,14 +38,6 @@ void r300_emit_invariant_state(struct r300_context* r300, { CS_LOCALS(r300); - if (r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0)) { - /* Subpixel multisampling for AA. */ - BEGIN_CS(4); - OUT_CS_REG(R300_GB_MSPOS0, 0x66666666); - OUT_CS_REG(R300_GB_MSPOS1, 0x6666666); - END_CS; - } - BEGIN_CS(12 + (r300->screen->caps.has_tcl ? 2 : 0)); /*** Graphics Backend (GB) ***/ |