diff options
author | Michel Dänzer <[email protected]> | 2008-01-25 17:01:01 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2008-01-25 17:01:01 +0100 |
commit | 756d52ec12c41ee90ee9598dc9028cc134806bd2 (patch) | |
tree | a112f0b2a933faccb8e759c3b039f8b492daa8ed /src/mesa/pipe/i915simple/i915_texture.c | |
parent | 7a207682aafc05c62cbc5851cc6c98c43aa3d9bd (diff) |
gallium: Simplify winsys buffer interface.
The properties of a buffer represented by struct pipe_buffer_handle are now
basically constant over its lifetime. The state tracker gets to deal with any
more complex buffer semantics it may need to provide.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_texture.c')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_texture.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mesa/pipe/i915simple/i915_texture.c b/src/mesa/pipe/i915simple/i915_texture.c index 6b0a4a96f3c..bf80e18233f 100644 --- a/src/mesa/pipe/i915simple/i915_texture.c +++ b/src/mesa/pipe/i915simple/i915_texture.c @@ -490,15 +490,11 @@ i915_texture_create(struct pipe_context *pipe, struct pipe_texture **pt) sizeof(struct i915_texture) - sizeof(struct pipe_texture)); if (i915->flags.is_i945 ? i945_miptree_layout(pipe, tex) : - i915_miptree_layout(pipe, tex)) { - tex->buffer = pipe->winsys->buffer_create(pipe->winsys, 64, 0, 0); - - if (tex->buffer) - pipe->winsys->buffer_data(pipe->winsys, tex->buffer, - tex->pitch * tex->base.cpp * - tex->total_height, NULL, - PIPE_BUFFER_USAGE_PIXEL); - } + i915_miptree_layout(pipe, tex)) + tex->buffer = pipe->winsys->buffer_create(pipe->winsys, 64, + PIPE_BUFFER_USAGE_PIXEL, + tex->pitch * tex->base.cpp * + tex->total_height); if (!tex->buffer) { FREE(tex); |