aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-01-27 21:15:19 +0100
committerMarek Olšák <[email protected]>2014-02-25 16:04:22 +0100
commit7e548d05076c430f9c532add478080bea82515ba (patch)
treed94dad927288bfba0f61b5af041c40a551677d6a /src/mesa/drivers/dri
parentaea4933287d6deff2ef1729febb5bfabdc88c21e (diff)
mesa: add storage flags parameter to Driver.BufferData
It will be used by glBufferStorage. The parameters are chosen according to ARB_buffer_storage. Reviewed-by: Fredrik Höglund <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i915/intel_buffer_objects.c5
-rw-r--r--src/mesa/drivers/dri/i965/intel_buffer_objects.c5
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_buffer_objects.c2
4 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_buffer_objects.c b/src/mesa/drivers/dri/i915/intel_buffer_objects.c
index 345db6dfe0f..f4fb9998cde 100644
--- a/src/mesa/drivers/dri/i915/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i915/intel_buffer_objects.c
@@ -116,13 +116,16 @@ intel_bufferobj_data(struct gl_context * ctx,
GLenum target,
GLsizeiptrARB size,
const GLvoid * data,
- GLenum usage, struct gl_buffer_object *obj)
+ GLenum usage,
+ GLbitfield storageFlags,
+ struct gl_buffer_object *obj)
{
struct intel_context *intel = intel_context(ctx);
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
intel_obj->Base.Size = size;
intel_obj->Base.Usage = usage;
+ intel_obj->Base.StorageFlags = storageFlags;
assert(!obj->Pointer); /* Mesa should have unmapped it */
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index d286a9fef60..c92ca2fcafe 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
@@ -182,7 +182,9 @@ intel_bufferobj_data(struct gl_context * ctx,
GLenum target,
GLsizeiptrARB size,
const GLvoid * data,
- GLenum usage, struct gl_buffer_object *obj)
+ GLenum usage,
+ GLbitfield storageFlags,
+ struct gl_buffer_object *obj)
{
struct brw_context *brw = brw_context(ctx);
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
@@ -193,6 +195,7 @@ intel_bufferobj_data(struct gl_context * ctx,
intel_obj->Base.Size = size;
intel_obj->Base.Usage = usage;
+ intel_obj->Base.StorageFlags = storageFlags;
assert(!obj->Pointer); /* Mesa should have unmapped it */
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
index dc165853759..783a152955f 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
@@ -73,7 +73,7 @@ nouveau_bufferobj_del(struct gl_context *ctx, struct gl_buffer_object *obj)
static GLboolean
nouveau_bufferobj_data(struct gl_context *ctx, GLenum target, GLsizeiptrARB size,
- const GLvoid *data, GLenum usage,
+ const GLvoid *data, GLenum usage, GLbitfield storageFlags,
struct gl_buffer_object *obj)
{
struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj);
@@ -81,6 +81,7 @@ nouveau_bufferobj_data(struct gl_context *ctx, GLenum target, GLsizeiptrARB size
obj->Size = size;
obj->Usage = usage;
+ obj->StorageFlags = storageFlags;
/* Free previous storage */
nouveau_bo_ref(NULL, &nbo->bo);
diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
index ba7ab372790..7663178d63d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
+++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
@@ -86,6 +86,7 @@ radeonBufferData(struct gl_context * ctx,
GLsizeiptrARB size,
const GLvoid * data,
GLenum usage,
+ GLbitfield storageFlags,
struct gl_buffer_object *obj)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
@@ -93,6 +94,7 @@ radeonBufferData(struct gl_context * ctx,
radeon_obj->Base.Size = size;
radeon_obj->Base.Usage = usage;
+ radeon_obj->Base.StorageFlags = storageFlags;
if (radeon_obj->bo != NULL) {
radeon_bo_unref(radeon_obj->bo);