diff options
author | Jakob Bornecrantz <[email protected]> | 2009-11-06 18:34:23 +0000 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2009-11-06 18:34:23 +0000 |
commit | 833f5bbfafee00ad44085e121eea0a2579eb3459 (patch) | |
tree | c4fd6cafef3fb0f11b6df4ecf2c7c2b460ee6658 | |
parent | 4fbe6c4e4e754e0e850165d5a303990515ceaba6 (diff) |
i965g: First clear!
-rw-r--r-- | src/gallium/drivers/i965/brw_screen_texture.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gallium/drivers/i965/brw_screen_texture.c b/src/gallium/drivers/i965/brw_screen_texture.c index adc0aaa8a98..842c70a39ad 100644 --- a/src/gallium/drivers/i965/brw_screen_texture.c +++ b/src/gallium/drivers/i965/brw_screen_texture.c @@ -384,8 +384,6 @@ brw_texture_blanket_winsys_buffer(struct pipe_screen *screen, { struct brw_screen *bscreen = brw_screen(screen); struct brw_texture *tex; - enum brw_buffer_type buffer_type; - enum pipe_error ret; if (templ->target != PIPE_TEXTURE_2D || templ->last_level != 0 || @@ -419,17 +417,13 @@ brw_texture_blanket_winsys_buffer(struct pipe_screen *screen, if (!brw_texture_layout(bscreen, tex)) goto fail; - - if (templ->tex_usage & (PIPE_TEXTURE_USAGE_DISPLAY_TARGET | - PIPE_TEXTURE_USAGE_PRIMARY)) { - buffer_type = BRW_BUFFER_TYPE_SCANOUT; - } else { - buffer_type = BRW_BUFFER_TYPE_TEXTURE; - } + /* XXX Maybe some more checks? */ + if ((pitch / tex->cpp) < tex->pitch) + goto fail; - tex->bo = buffer; + tex->pitch = pitch / tex->cpp; - tex->pitch = pitch; + tex->bo = buffer; /* fix this warning */ #if 0 |