summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-04-01 22:15:16 -0600
committerBrian Paul <brianp@vmware.com>2010-04-01 22:17:13 -0600
commit038aba1f082d696a49db7c818766c5886f4efa83 (patch)
tree50586d1f23d9b286bebe03b5f924d62dcac7521c
parentee91c1e367b9e3bcbb156ed80ab94694f0d4b4ca (diff)
glsl: pass datatype to _mesa_add_varying()
Will be needed later for transform feedback support.
-rw-r--r--src/mesa/shader/prog_parameter.c5
-rw-r--r--src/mesa/shader/prog_parameter.h3
-rw-r--r--src/mesa/shader/slang/slang_codegen.c2
-rw-r--r--src/mesa/shader/slang/slang_link.c2
4 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c
index 25bb4f3d44..aac488c79a 100644
--- a/src/mesa/shader/prog_parameter.c
+++ b/src/mesa/shader/prog_parameter.c
@@ -376,7 +376,8 @@ _mesa_add_sampler(struct gl_program_parameter_list *paramList,
*/
GLint
_mesa_add_varying(struct gl_program_parameter_list *paramList,
- const char *name, GLuint size, GLbitfield flags)
+ const char *name, GLuint size, GLenum datatype,
+ GLbitfield flags)
{
GLint i = _mesa_lookup_parameter_index(paramList, -1, name);
if (i >= 0 && paramList->Parameters[i].Type == PROGRAM_VARYING) {
@@ -386,7 +387,7 @@ _mesa_add_varying(struct gl_program_parameter_list *paramList,
else {
/*assert(size == 4);*/
i = _mesa_add_parameter(paramList, PROGRAM_VARYING, name,
- size, GL_NONE, NULL, NULL, flags);
+ size, datatype, NULL, NULL, flags);
return i;
}
}
diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h
index 1111c85976..cc3378ae20 100644
--- a/src/mesa/shader/prog_parameter.h
+++ b/src/mesa/shader/prog_parameter.h
@@ -146,7 +146,8 @@ _mesa_add_sampler(struct gl_program_parameter_list *paramList,
extern GLint
_mesa_add_varying(struct gl_program_parameter_list *paramList,
- const char *name, GLuint size, GLbitfield flags);
+ const char *name, GLuint size, GLenum datatype,
+ GLbitfield flags);
extern GLint
_mesa_add_attribute(struct gl_program_parameter_list *paramList,
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index ecb2f6d5c1..fa79632c18 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -5130,7 +5130,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
flags |= PROG_PARAM_BIT_INVARIANT;
varyingLoc = _mesa_add_varying(prog->Varying, varName,
- totalSize, flags);
+ totalSize, GL_NONE, flags);
swizzle = _slang_var_swizzle(size, 0);
store = _slang_new_ir_storage_swz(PROGRAM_VARYING, varyingLoc,
totalSize, swizzle);
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index 7c7bfbdbc5..f79af0508f 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -157,7 +157,7 @@ link_varying_vars(GLcontext *ctx,
else {
/* not already in linked list */
j = _mesa_add_varying(shProg->Varying, var->Name, var->Size,
- var->Flags);
+ var->DataType, var->Flags);
}
if (shProg->Varying->NumParameters > ctx->Const.MaxVarying) {