summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@tungstengraphics.com>2008-05-30 13:31:42 +0200
committerJakob Bornecrantz <jakob@tungstengraphics.com>2008-05-30 13:42:21 +0200
commit2ade5268dca67a73d3f5f8cc41ea86d1e48de9f0 (patch)
tree59a2f2fb9ed521fe1fb26e6b16cee438165c3097
parent9760ab234951d18c9606e962c6e3ac1f56fc6385 (diff)
i915: Remade texture allocation code again
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index b216e3bfb9..4c0c7ce3f3 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -128,7 +128,7 @@ i915_displaytarget_layout(struct pipe_screen *screen,
{
struct pipe_texture *pt = &tex->base;
- if (pt->last_level > 1 || pt->cpp != 4)
+ if (pt->last_level > 0 || pt->cpp != 4)
return 0;
i915_miptree_set_level_info( tex, 0, 1, 0, 0,
@@ -177,7 +177,7 @@ i945_miptree_layout_2d( struct i915_texture *tex )
/* Pitch must be a whole number of dwords, even though we
* express it in texels.
*/
- tex->pitch = align_int(tex->pitch * pt->cpp, 4) / pt->cpp;
+ tex->pitch = align_int(tex->pitch * pt->cpp, 64) / pt->cpp;
tex->total_height = 0;
for (level = 0; level <= pt->last_level; level++) {
@@ -537,10 +537,7 @@ i915_texture_create(struct pipe_screen *screen,
tex->base.refcount = 1;
tex->base.screen = screen;
- if (tex->base.tex_usage & PIPE_TEXTURE_USAGE_DISPLAY_TARGET) {
- if (!i915_displaytarget_layout(screen, tex))
- goto fail;
- } else if (i915screen->is_i945) {
+ if (i915screen->is_i945) {
if (!i945_miptree_layout(tex))
goto fail;
} else {