summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i830_texstate.c10
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c10
2 files changed, 18 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c
index 476ee193917..39ba0b8ec31 100644
--- a/src/mesa/drivers/dri/i915/i830_texstate.c
+++ b/src/mesa/drivers/dri/i915/i830_texstate.c
@@ -157,7 +157,15 @@ static GLboolean i830SetTexImages( i830ContextPtr i830,
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);
}
t->intel.Pitch = pitch;
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index ec8f1fa2029..60ba0629528 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;
}