From 2579fe4044012a552c8be222ffae76b48de13592 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 26 Apr 2010 06:29:10 +0200 Subject: r300g: emit MSPOS regs --- src/gallium/drivers/r300/r300_state_invariant.c | 14 ++++++++------ src/gallium/drivers/r300/r300_texture.c | 4 ++-- src/gallium/drivers/r300/r300_winsys.h | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src/gallium/drivers/r300') diff --git a/src/gallium/drivers/r300/r300_state_invariant.c b/src/gallium/drivers/r300/r300_state_invariant.c index 64d1d18b45..cd9443fa26 100644 --- a/src/gallium/drivers/r300/r300_state_invariant.c +++ b/src/gallium/drivers/r300/r300_state_invariant.c @@ -43,15 +43,17 @@ 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) ***/ - /* Subpixel multisampling for AA - * These are commented out because glisse's CS checker doesn't like them. - * I presume these will be re-enabled later. - * OUT_CS_REG(R300_GB_MSPOS0, 0x66666666); - * OUT_CS_REG(R300_GB_MSPOS1, 0x6666666); - */ /* Source of fog depth */ OUT_CS_REG(R300_GB_SELECT, R300_GB_FOG_SELECT_1_1_W); diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index 8bebeacf86..cfa61b0b3f 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -762,12 +762,12 @@ static unsigned r300_texture_get_nblocksy(struct r300_texture* tex, static void r300_texture_3d_fix_mipmapping(struct r300_screen *screen, struct r300_texture *tex) { - /* The kernels <= 2.6.34-rc3 compute the size of mipmapped 3D textures + /* The kernels <= 2.6.34-rc4 compute the size of mipmapped 3D textures * incorrectly. This is a workaround to prevent CS from being rejected. */ unsigned i, size; - if (screen->rws->get_value(screen->rws, R300_VID_TEX3D_MIP_BUG) && + if (screen->rws->get_value(screen->rws, R300_VID_DRM_2_3_0) && tex->b.b.target == PIPE_TEXTURE_3D && tex->b.b.last_level > 0) { size = 0; diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h index 2bd40176d1..fa00a0cba9 100644 --- a/src/gallium/drivers/r300/r300_winsys.h +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -39,7 +39,7 @@ enum r300_value_id { R300_VID_GB_PIPES, R300_VID_Z_PIPES, R300_VID_SQUARE_TILING_SUPPORT, - R300_VID_TEX3D_MIP_BUG, + R300_VID_DRM_2_3_0, }; enum r300_reference_domain { /* bitfield */ -- cgit v1.2.3