mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
Assorted fix-ups for the new linker.
Disable some of the excessive debug output.
This commit is contained in:
parent
d4f7e4cc01
commit
ef264c2971
2 changed files with 18 additions and 3 deletions
|
|
@ -405,7 +405,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper,
|
|||
/* OK, replace this slang_oper_identifier with a new expr */
|
||||
assert(substNew[i]->type == slang_oper_identifier ||
|
||||
substNew[i]->type == slang_oper_literal_float);
|
||||
#if 1 /* DEBUG only */
|
||||
#if 0 /* DEBUG only */
|
||||
if (substNew[i]->type == slang_oper_identifier) {
|
||||
assert(substNew[i]->var);
|
||||
assert(substNew[i]->var->a_name);
|
||||
|
|
@ -730,7 +730,7 @@ slang_assemble_function_call(slang_assemble_ctx *A, slang_function *fun,
|
|||
#endif
|
||||
|
||||
|
||||
#if 1
|
||||
#if 0
|
||||
assert(inlined->locals);
|
||||
printf("*** Inlined code for call to %s:\n",
|
||||
(char*) fun->header.a_name);
|
||||
|
|
@ -1231,8 +1231,9 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun)
|
|||
return 0;
|
||||
|
||||
printf("\n*********** Assemble function2(%s)\n", (char*)fun->header.a_name);
|
||||
|
||||
#if 0
|
||||
slang_print_function(fun, 1);
|
||||
#endif
|
||||
|
||||
A->program->Parameters = _mesa_new_parameter_list();
|
||||
A->program->Varying = _mesa_new_parameter_list();
|
||||
|
|
@ -1254,11 +1255,13 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun)
|
|||
CurFunction = NULL;
|
||||
|
||||
|
||||
#if 0
|
||||
printf("************* New body for %s *****\n", (char*)fun->header.a_name);
|
||||
slang_print_function(fun, 1);
|
||||
|
||||
printf("************* IR for %s *******\n", (char*)fun->header.a_name);
|
||||
slang_print_ir(n, 0);
|
||||
#endif
|
||||
|
||||
if (_mesa_strcmp((char*) fun->header.a_name, "main") == 0) {
|
||||
_slang_emit_code(n, A->program);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue