summaryrefslogtreecommitdiff
path: root/src/mesa/main/samplerobj.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2015-09-27 21:28:22 +0200
committerMarek Olšák <marek.olsak@amd.com>2015-10-03 22:06:09 +0200
commit92709dcb9b7a09f9e5870a832c22197cde557fd4 (patch)
treeefb7000464a15c14aa854568d4422c1d9a67ced7 /src/mesa/main/samplerobj.c
parent00f6beed02d644189b935b3cc9d70a6f993c034e (diff)
mesa: remove Driver.DeleteSamplerObject
Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/main/samplerobj.c')
-rw-r--r--src/mesa/main/samplerobj.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index c7b96664c21..9bcba60fd6f 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -72,6 +72,14 @@ lookup_samplerobj_locked(struct gl_context *ctx, GLuint name)
_mesa_HashLookupLocked(ctx->Shared->SamplerObjects, name);
}
+static void
+delete_sampler_object(struct gl_context *ctx,
+ struct gl_sampler_object *sampObj)
+{
+ mtx_destroy(&sampObj->Mutex);
+ free(sampObj->Label);
+ free(sampObj);
+}
/**
* Handle reference counting.
@@ -94,10 +102,8 @@ _mesa_reference_sampler_object_(struct gl_context *ctx,
deleteFlag = (oldSamp->RefCount == 0);
mtx_unlock(&oldSamp->Mutex);
- if (deleteFlag) {
- assert(ctx->Driver.DeleteSamplerObject);
- ctx->Driver.DeleteSamplerObject(ctx, oldSamp);
- }
+ if (deleteFlag)
+ delete_sampler_object(ctx, oldSamp);
*ptr = NULL;
}
@@ -162,19 +168,6 @@ _mesa_new_sampler_object(struct gl_context *ctx, GLuint name)
return sampObj;
}
-
-/**
- * Fallback for ctx->Driver.DeleteSamplerObject();
- */
-static void
-_mesa_delete_sampler_object(struct gl_context *ctx,
- struct gl_sampler_object *sampObj)
-{
- mtx_destroy(&sampObj->Mutex);
- free(sampObj->Label);
- free(sampObj);
-}
-
static void
create_samplers(struct gl_context *ctx, GLsizei count, GLuint *samplers,
const char *caller)
@@ -1626,5 +1619,4 @@ void
_mesa_init_sampler_object_functions(struct dd_function_table *driver)
{
driver->NewSamplerObject = _mesa_new_sampler_object;
- driver->DeleteSamplerObject = _mesa_delete_sampler_object;
}