mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
r300g: Old MSAA code from before gallium-msaa.
This commit is contained in:
parent
867478b6f6
commit
5c58618406
4 changed files with 15 additions and 9 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) ***/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue