summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-02-10 13:40:00 +0000
committerJosé Fonseca <jfonseca@vmware.com>2009-02-10 13:40:00 +0000
commitdc6cc4f9da25725d0b8f6efe571a5430fb399de5 (patch)
tree397657edaa5a6f2b9575c08b28d77addb554ac79 /src
parent67e988a06c8ff5896da9df7ce1c7fc118352c8a3 (diff)
mesa: Compare formats using nominal bytes per pixel.
This is a temporary fix which works for the formats we care so far. The real fix would be abandon the concept "nominal bytes per pixel" entirely in Mesa, and use macropixels instead, as done in gallium interfaces already.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index d08229b57a..9279a768c8 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1417,9 +1417,7 @@ st_finalize_texture(GLcontext *ctx,
stObj->pt->width[0] != firstImage->base.Width2 ||
stObj->pt->height[0] != firstImage->base.Height2 ||
stObj->pt->depth[0] != firstImage->base.Depth2 ||
- stObj->pt->block.size != cpp ||
- stObj->pt->block.width != 1 ||
- stObj->pt->block.height != 1 ||
+ stObj->pt->block.size/stObj->pt->block.width != cpp || /* Nominal bytes per pixel */
stObj->pt->compressed != firstImage->base.IsCompressed) {
pipe_texture_release(&stObj->pt);
ctx->st->dirty.st |= ST_NEW_FRAMEBUFFER;