aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/shared.c')
-rw-r--r--mesalib/src/mesa/main/shared.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/shared.c b/mesalib/src/mesa/main/shared.c
index 2f73cf3ca..c11c7f9e9 100644
--- a/mesalib/src/mesa/main/shared.c
+++ b/mesalib/src/mesa/main/shared.c
@@ -38,6 +38,7 @@
#include "dlist.h"
#include "samplerobj.h"
#include "set.h"
+#include "shaderapi.h"
#include "shaderobj.h"
#include "syncobj.h"
@@ -218,8 +219,7 @@ delete_shader_cb(GLuint id, void *data, void *userData)
{
struct gl_context *ctx = (struct gl_context *) userData;
struct gl_shader *sh = (struct gl_shader *) data;
- if (sh->Type == GL_FRAGMENT_SHADER || sh->Type == GL_VERTEX_SHADER ||
- sh->Type == GL_GEOMETRY_SHADER) {
+ if (_mesa_validate_shader_target(ctx, sh->Type)) {
ctx->Driver.DeleteShader(ctx, sh);
}
else {