summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915simple/i915_texture.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2008-05-29 12:44:53 +0200
committerJakob Bornecrantz <[email protected]>2008-05-29 13:10:12 +0200
commit79b67d8408d1ba5b2232791ae35e731a5953b52d (patch)
treebfbcc2518b51371ccb9a5406312da58d50357801 /src/gallium/drivers/i915simple/i915_texture.c
parent837601af522b9d1e687040015672769392884fa1 (diff)
i915: Remove last usage of surface_alloc_storage
Diffstat (limited to 'src/gallium/drivers/i915simple/i915_texture.c')
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c42
1 files changed, 16 insertions, 26 deletions
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index df11ba0544c..122f88fe3a0 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -104,7 +104,7 @@ i915_miptree_set_image_offset(struct i915_texture *tex,
*/
}
-
+#if 0
/* Hack it up to use the old winsys->surface_alloc_storage()
* method for now:
*/
@@ -145,10 +145,7 @@ i915_displaytarget_layout(struct pipe_screen *screen,
return tex->buffer != NULL;
}
-
-
-
-
+#endif
static void
i945_miptree_layout_2d( struct i915_texture *tex )
@@ -539,32 +536,25 @@ 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;
+ if (i915screen->is_i945) {
+ if (!i945_miptree_layout(tex))
+ goto fail;
+ } else {
+ if (!i915_miptree_layout(tex))
+ goto fail;
}
- else {
- if (i915screen->is_i945) {
- if (!i945_miptree_layout(tex))
- goto fail;
- }
- else {
- if (!i915_miptree_layout(tex))
- goto fail;
- }
-
- tex->buffer = ws->buffer_create(ws, 64,
- PIPE_BUFFER_USAGE_PIXEL,
- tex->pitch * tex->base.cpp *
- tex->total_height);
- if (!tex->buffer)
- goto fail;
- }
+ tex->buffer = ws->buffer_create(ws, 64,
+ PIPE_BUFFER_USAGE_PIXEL,
+ tex->pitch * tex->base.cpp *
+ tex->total_height);
+
+ if (!tex->buffer)
+ goto fail;
return &tex->base;
- fail:
+fail:
FREE(tex);
return NULL;
}