diff options
author | Alex Deucher <[email protected]> | 2009-07-30 03:30:46 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2009-07-30 03:31:37 -0400 |
commit | 0fdac3529c8a7f7ce41420b79e817407d19a12a2 (patch) | |
tree | 829ec30f675870fd4c98d93597d5f59107d87edc /src | |
parent | 246729162ccc7e2672aa6cc957053ce3a8975a2c (diff) |
r600: fix mipmaps
redbook mipmap works
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_texstate.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_render.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c index 6918b3b8a12..4840586858d 100644 --- a/src/mesa/drivers/dri/r600/r600_texstate.c +++ b/src/mesa/drivers/dri/r600/r600_texstate.c @@ -610,6 +610,11 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex SETfield(t->SQ_TEX_RESOURCE1, firstImage->Height - 1, TEX_HEIGHT_shift, TEX_HEIGHT_mask); + if ((t->mt->lastLevel - t->mt->firstLevel) > 0) { + t->SQ_TEX_RESOURCE3 = t->mt->levels[0].size / 256; + SETfield(t->SQ_TEX_RESOURCE4, t->mt->firstLevel, BASE_LEVEL_shift, BASE_LEVEL_mask); + SETfield(t->SQ_TEX_RESOURCE5, t->mt->lastLevel, LAST_LEVEL_shift, LAST_LEVEL_mask); + } } /** diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index 4e0d5391d0a..1810f4be0ee 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -173,7 +173,7 @@ GLboolean r700SendTextureState(context_t *context) RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0, &offset_mod); R600_OUT_BATCH_RELOC(r700->textures[i]->SQ_TEX_RESOURCE3, bo, - 0, + r700->textures[i]->SQ_TEX_RESOURCE3, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0, &offset_mod); R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE4); R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE5); |