diff options
author | Dave Airlie <airliedfreedesktop.org> | 2004-07-15 10:47:13 +0000 |
---|---|---|
committer | Dave Airlie <airliedfreedesktop.org> | 2004-07-15 10:47:13 +0000 |
commit | c058917343e51610ddc4f1ad32e3f02d7c131129 (patch) | |
tree | 16bcf30f2e110205b694fe2b74bcff5df484638d /src/mesa/drivers/dri/i915/i915_texstate.c | |
parent | 78e19b5f9891705e845f2d21a4f7370504fd0d31 (diff) |
fix up heights for i830/i915 texture compression
Diffstat (limited to 'src/mesa/drivers/dri/i915/i915_texstate.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_texstate.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c index ec8f1fa202..60ba062952 100644 --- a/src/mesa/drivers/dri/i915/i915_texstate.c +++ b/src/mesa/drivers/dri/i915/i915_texstate.c @@ -238,7 +238,15 @@ static void i915SetTexImages( i915ContextPtr i915, t->intel.image[0][i].offset = total_height * pitch; t->intel.image[0][i].internalFormat = baseImage->Format; - total_height += MAX2(2, t->intel.image[0][i].image->Height); + if (t->intel.image[0][i].image->IsCompressed) + { + if (t->intel.image[0][i].image->Height > 4) + total_height += t->intel.image[0][i].image->Height/4; + else + total_height += 1; + } + else + total_height += MAX2(2, t->intel.image[0][i].image->Height); } break; } |