diff options
author | Brian <[email protected]> | 2007-04-18 16:27:35 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-04-18 17:14:13 -0600 |
commit | c93e883b205a679aa80f6228459890f9118ad909 (patch) | |
tree | f9e8290d6c013e7e3086a8c53bf436fe33c57824 /src/mesa/shader/slang/slang_codegen.c | |
parent | 274ac7a801766a0ae766219ec6a40ed52e479d07 (diff) |
Start fixing some issues with uniform variables and their types.
Diffstat (limited to 'src/mesa/shader/slang/slang_codegen.c')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 06bceea7d0f..d8c06f064d9 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2829,7 +2829,8 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, * store->Index = sampler uniform location * store->Size = texture type index (1D, 2D, 3D, cube, etc) */ - GLint samplerUniform = _mesa_add_sampler(prog->Parameters, varName); + GLenum datatype = GL_SAMPLER_2D; + GLint samplerUniform = _mesa_add_sampler(prog->Parameters, varName, datatype); store = _slang_new_ir_storage(PROGRAM_SAMPLER, samplerUniform, texIndex); if (dbg) printf("SAMPLER "); } @@ -2839,7 +2840,9 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, * MAX2(var->array_len, 1); if (prog) { /* user-defined uniform */ - GLint uniformLoc = _mesa_add_uniform(prog->Parameters, varName, size); + GLenum datatype = GL_FLOAT_VEC4; /* XXX */ + GLint uniformLoc = _mesa_add_uniform(prog->Parameters, varName, + size, datatype); store = _slang_new_ir_storage(PROGRAM_UNIFORM, uniformLoc, size); } else { |