aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/shader/slang/slang_builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/shader/slang/slang_builtin.c')
-rw-r--r--mesalib/src/mesa/shader/slang/slang_builtin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesalib/src/mesa/shader/slang/slang_builtin.c b/mesalib/src/mesa/shader/slang/slang_builtin.c
index e5809509c..791e75152 100644
--- a/mesalib/src/mesa/shader/slang/slang_builtin.c
+++ b/mesalib/src/mesa/shader/slang/slang_builtin.c
@@ -36,7 +36,6 @@
#include "shader/prog_parameter.h"
#include "shader/prog_statevars.h"
#include "shader/slang/slang_ir.h"
-#include "shader/slang/slang_emit.h"
#include "shader/slang/slang_builtin.h"
@@ -122,6 +121,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field,
}
else if (strcmp(var, "gl_DepthRange") == 0) {
tokens[0] = STATE_DEPTH_RANGE;
+ assert(field);
if (strcmp(field, "near") == 0) {
*swizzleOut = SWIZZLE_XXXX;
}
@@ -142,6 +142,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field,
tokens[1] = index1;
}
else if (strcmp(var, "gl_Point") == 0) {
+ assert(field);
if (strcmp(field, "size") == 0) {
tokens[0] = STATE_POINT_SIZE;
*swizzleOut = SWIZZLE_XXXX;
@@ -181,6 +182,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field,
tokens[1] = 0;
else
tokens[1] = 1;
+ assert(field);
if (strcmp(field, "emission") == 0) {
tokens[2] = STATE_EMISSION;
}