summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2013-04-29 15:12:26 +0100
committerJosé Fonseca <[email protected]>2013-04-29 15:13:57 +0100
commitc4bea00fb39fb1813d220b95f0bc94e6fce8c84a (patch)
tree100559ebaca9e03e41383e15ba34cbc75457df05 /src
parentc7a13dc5f530783e2ec22af2e1d7206b4754da48 (diff)
Revert "st/mesa: add a simple path to BufferData if it only discards buffer contents"
This reverts commit 5649f886f76023532538b8792605a3578cec1ed1. It causes segfaults when size is zero.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 1b3991c3f6d..8ff32c84291 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -182,20 +182,6 @@ st_bufferobj_data(struct gl_context *ctx,
struct st_buffer_object *st_obj = st_buffer_object(obj);
unsigned bind, pipe_usage;
- if (st_obj->Base.Size == size && st_obj->Base.Usage == usage && data) {
- /* Just discard the old contents and write new data.
- * This should be the same as creating a new buffer, but we avoid
- * a lot of validation in Mesa.
- */
- struct pipe_box box;
-
- u_box_1d(0, size, &box);
- pipe->transfer_inline_write(pipe, st_obj->buffer, 0,
- PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE,
- &box, data, 0, 0);
- return GL_TRUE;
- }
-
st_obj->Base.Size = size;
st_obj->Base.Usage = usage;