/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
assert(obj->RefCount == 0);
assert(st_obj->transfer == NULL);
- if (st_obj->buffer)
+ if (st_obj->buffer)
pipe_resource_reference(&st_obj->buffer, NULL);
free(st_obj->Base.Label);
GLenum target,
GLsizeiptrARB size,
const GLvoid * data,
- GLenum usage,
+ GLenum usage,
struct gl_buffer_object *obj)
{
struct st_context *st = st_context(ctx);
st_obj->Base.Size = size;
st_obj->Base.Usage = usage;
-
- switch(target) {
+
+ switch (target) {
case GL_PIXEL_PACK_BUFFER_ARB:
case GL_PIXEL_UNPACK_BUFFER_ARB:
bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
else
flags |= PIPE_TRANSFER_DISCARD_RANGE;
}
-
+
if (access & GL_MAP_UNSYNCHRONIZED_BIT)
flags |= PIPE_TRANSFER_UNSYNCHRONIZED;
assert(length >= 0);
assert(offset + length <= obj->Length);
assert(obj->Pointer);
-
+
if (!length)
return;
- pipe_buffer_flush_mapped_range(pipe, st_obj->transfer,
+ pipe_buffer_flush_mapped_range(pipe, st_obj->transfer,
obj->Offset + offset, length);
}
struct st_buffer_object *dstObj = st_buffer_object(dst);
struct pipe_box box;
- if(!size)
+ if (!size)
return;
/* buffer should not already be mapped */