mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
mesa: add delete_samplers() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
c566ba29b6
commit
3339b53755
1 changed files with 17 additions and 11 deletions
|
|
@ -231,22 +231,14 @@ _mesa_CreateSamplers(GLsizei count, GLuint *samplers)
|
|||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_DeleteSamplers(GLsizei count, const GLuint *samplers)
|
||||
static void
|
||||
delete_samplers(struct gl_context *ctx, GLsizei count, const GLuint *samplers)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
GLsizei i;
|
||||
|
||||
FLUSH_VERTICES(ctx, 0);
|
||||
|
||||
if (count < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glDeleteSamplers(count)");
|
||||
return;
|
||||
}
|
||||
|
||||
_mesa_HashLockMutex(ctx->Shared->SamplerObjects);
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
for (GLsizei i = 0; i < count; i++) {
|
||||
if (samplers[i]) {
|
||||
GLuint j;
|
||||
struct gl_sampler_object *sampObj =
|
||||
|
|
@ -273,6 +265,20 @@ _mesa_DeleteSamplers(GLsizei count, const GLuint *samplers)
|
|||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_DeleteSamplers(GLsizei count, const GLuint *samplers)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (count < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glDeleteSamplers(count)");
|
||||
return;
|
||||
}
|
||||
|
||||
delete_samplers(ctx, count, samplers);
|
||||
}
|
||||
|
||||
|
||||
GLboolean GLAPIENTRY
|
||||
_mesa_IsSampler(GLuint sampler)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue