diff options
author | Brian <[email protected]> | 2006-12-14 13:58:57 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2006-12-14 13:58:57 -0700 |
commit | ef264c2971b43717c8f565f1d39f4149be3aaa85 (patch) | |
tree | 8fab74bbebbaea7c597dadac0fd45d77ce861eb5 /src/mesa/shader/slang/slang_emit.c | |
parent | d4f7e4cc01a99811565dc8f488cdad972e926b6c (diff) |
Assorted fix-ups for the new linker.
Disable some of the excessive debug output.
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 0b4ef6dba10..29d9544ebe2 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -555,12 +555,20 @@ slang_alloc_varying(struct gl_program *prog, const char *name) { GLint i = _mesa_add_varying(prog->Varying, name, 4); /* XXX fix size */ if (prog->Target == GL_VERTEX_PROGRAM_ARB) { +#ifdef OLD_LINK i += VERT_RESULT_VAR0; prog->OutputsWritten |= (1 << i); +#else + prog->OutputsWritten |= (1 << (i + VERT_RESULT_VAR0)); +#endif } else { +#ifdef OLD_LINK i += FRAG_ATTRIB_VAR0; prog->InputsRead |= (1 << i); +#else + prog->InputsRead |= (1 << (i + FRAG_ATTRIB_VAR0)); +#endif } return i; } @@ -697,10 +705,14 @@ slang_resolve_storage(slang_gen_context *gc, slang_ir_node *n, else if (n->Var->type.qualifier == slang_qual_varying) { i = slang_alloc_varying(prog, (char *) n->Var->a_name); if (i >= 0) { +#ifdef OLD_LINK if (prog->Target == GL_VERTEX_PROGRAM_ARB) n->Store->File = PROGRAM_OUTPUT; else n->Store->File = PROGRAM_INPUT; +#else + n->Store->File = PROGRAM_VARYING; +#endif n->Store->Size = sizeof_type(&n->Var->type); n->Store->Index = i; return; |