diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-06-10 17:56:05 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-06-10 17:56:05 -0400 |
commit | 51507b0e94ffb375a040ef751a435c2e196ee748 (patch) | |
tree | 9d6a861c578964028a4ed07c7f02833a545d0151 /src/mesa | |
parent | 530e3e389dfb3957b872d08906dcea830407b0c2 (diff) |
Use correct scratch reg offset for r6xx/r7xx
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_screen.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 054ffb4c32..8309903e78 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -1024,8 +1024,12 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv ) __driUtilMessage("%s: drmMap (2) failed\n", __FUNCTION__ ); return NULL; } - screen->scratch = (__volatile__ uint32_t *) - ((GLubyte *)screen->status.map + RADEON_SCRATCH_REG_OFFSET); + if (screen->chip_family < CHIP_FAMILY_R600) + screen->scratch = (__volatile__ uint32_t *) + ((GLubyte *)screen->status.map + RADEON_SCRATCH_REG_OFFSET); + else + screen->scratch = (__volatile__ uint32_t *) + ((GLubyte *)screen->status.map + R600_SCRATCH_REG_OFFSET); screen->buffers = drmMapBufs( sPriv->fd ); if ( !screen->buffers ) { |