diff options
author | Pauli Nieminen <[email protected]> | 2009-08-28 04:12:17 +0300 |
---|---|---|
committer | Pauli Nieminen <[email protected]> | 2009-08-28 04:13:01 +0300 |
commit | e541845959761e9f47d14ade6b58a32db04ef7e4 (patch) | |
tree | 56a01282bd1d5ca72497468cb207e34016e2441c /src | |
parent | a7f8b329aa75f9a34d31d01b5bf6094b764bd8a9 (diff) |
r200: Fix piglit paths test.
Polygon stipple has to go to command buffer because special ioctl is disabled.
Piglit doesn't like HyperZ warning so disable it for kms.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_state.c | 25 |
2 files changed, 17 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index e402b923ee6..e8e7a42099b 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -327,7 +327,8 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual, rmesa->radeon.initialMaxAnisotropy = driQueryOptionf(&rmesa->radeon.optionCache, "def_max_anisotropy"); - if ( driQueryOptionb( &rmesa->radeon.optionCache, "hyperz" ) ) { + if ( sPriv->drm_version.major == 1 + && driQueryOptionb( &rmesa->radeon.optionCache, "hyperz" ) ) { if ( sPriv->drm_version.minor < 13 ) fprintf( stderr, "DRM version 1.%d too old to support HyperZ, " "disabling.\n", sPriv->drm_version.minor ); diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index f56da9082a5..4d052e246e9 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -767,26 +767,31 @@ static void r200PolygonOffset( GLcontext *ctx, static void r200PolygonStipple( GLcontext *ctx, const GLubyte *mask ) { r200ContextPtr rmesa = R200_CONTEXT(ctx); - GLuint i; + GLint i; + BATCH_LOCALS(&rmesa->radeon); drm_radeon_stipple_t stipple; + radeon_firevertices(&rmesa->radeon); + + BEGIN_BATCH_NO_AUTOSTATE(35); + + OUT_BATCH(CP_PACKET0(R200_RE_STIPPLE_ADDR, 0)); + OUT_BATCH(0x00000000); + + OUT_BATCH(CP_PACKET0_ONE(R200_RE_STIPPLE_DATA, 31)); + /* Must flip pattern upside down. */ - for ( i = 0 ; i < 32 ; i++ ) { - rmesa->state.stipple.mask[31 - i] = ((GLuint *) mask)[i]; + for ( i = 31 ; i >= 0; i--) { + OUT_BATCH(((GLuint *) mask)[i]); } - /* TODO: push this into cmd mechanism - */ - radeon_firevertices(&rmesa->radeon); - LOCK_HARDWARE( &rmesa->radeon ); + END_BATCH(); + /* FIXME: Use window x,y offsets into stipple RAM. */ stipple.mask = rmesa->state.stipple.mask; - drmCommandWrite( rmesa->radeon.dri.fd, DRM_RADEON_STIPPLE, - &stipple, sizeof(stipple) ); - UNLOCK_HARDWARE( &rmesa->radeon ); } static void r200PolygonMode( GLcontext *ctx, GLenum face, GLenum mode ) |