It works very well with the modular-xorg-server-mesa653 package. I now can use a compositing window manager and not experience crashes every three seconds.;) Even the x86 assembly routines seem to work OK; they did not with Mesa 6.5.2. Enjoy.
56 lines
2.3 KiB
Text
56 lines
2.3 KiB
Text
$NetBSD: patch-ak,v 1.1 2007/05/25 04:02:04 bsadewitz Exp $
|
|
|
|
--- src/mesa/drivers/dri/i915tex/intel_tex_validate.c.orig 2007-01-15 12:05:18.000000000 -0500
|
|
+++ src/mesa/drivers/dri/i915tex/intel_tex_validate.c
|
|
@@ -105,6 +105,8 @@ intel_finalize_mipmap_tree(struct intel_
|
|
{
|
|
struct gl_texture_object *tObj = intel->ctx.Texture.Unit[unit]._Current;
|
|
struct intel_texture_object *intelObj = intel_texture_object(tObj);
|
|
+ int comp_byte = 0;
|
|
+ int cpp;
|
|
|
|
GLuint face, i;
|
|
GLuint nr_faces = 0;
|
|
@@ -148,6 +150,12 @@ intel_finalize_mipmap_tree(struct intel_
|
|
intel_miptree_reference(&intelObj->mt, firstImage->mt);
|
|
}
|
|
|
|
+ if (firstImage->base.IsCompressed) {
|
|
+ comp_byte = intel_compressed_num_bytes(firstImage->base.TexFormat->MesaFormat);
|
|
+ cpp = comp_byte;
|
|
+ }
|
|
+ else cpp = firstImage->base.TexFormat->TexelBytes;
|
|
+
|
|
/* Check tree can hold all active levels. Check tree matches
|
|
* target, imageFormat, etc.
|
|
*
|
|
@@ -165,7 +173,7 @@ intel_finalize_mipmap_tree(struct intel_
|
|
intelObj->mt->width0 != firstImage->base.Width ||
|
|
intelObj->mt->height0 != firstImage->base.Height ||
|
|
intelObj->mt->depth0 != firstImage->base.Depth ||
|
|
- intelObj->mt->cpp != firstImage->base.TexFormat->TexelBytes ||
|
|
+ intelObj->mt->cpp != cpp ||
|
|
intelObj->mt->compressed != firstImage->base.IsCompressed)) {
|
|
intel_miptree_release(intel, &intelObj->mt);
|
|
}
|
|
@@ -174,10 +182,6 @@ intel_finalize_mipmap_tree(struct intel_
|
|
/* May need to create a new tree:
|
|
*/
|
|
if (!intelObj->mt) {
|
|
- int comp_byte = 0;
|
|
-
|
|
- if (firstImage->base.IsCompressed)
|
|
- comp_byte = intel_compressed_num_bytes(firstImage->base.TexFormat->MesaFormat);
|
|
intelObj->mt = intel_miptree_create(intel,
|
|
intelObj->base.Target,
|
|
firstImage->base.InternalFormat,
|
|
@@ -186,8 +190,7 @@ intel_finalize_mipmap_tree(struct intel_
|
|
firstImage->base.Width,
|
|
firstImage->base.Height,
|
|
firstImage->base.Depth,
|
|
- firstImage->base.TexFormat->
|
|
- TexelBytes,
|
|
+ cpp,
|
|
comp_byte);
|
|
}
|
|
|