mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 04:30:10 +01:00
freedreno/ir3: don't ignore local vars
With glsl_to_nir we end up with local variables, instead of global, for arrays. Note that we'll eventually have to do something more clever, I think, when we support multiple functions, but that will probably take some work in a few places. Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
8039a2a6b3
commit
f20cf22b54
1 changed files with 7 additions and 1 deletions
|
|
@ -2163,11 +2163,17 @@ emit_instructions(struct ir3_compile *ctx)
|
|||
setup_output(ctx, var);
|
||||
}
|
||||
|
||||
/* Setup variables (which should only be arrays): */
|
||||
/* Setup global variables (which should only be arrays): */
|
||||
nir_foreach_variable(var, &ctx->s->globals) {
|
||||
declare_var(ctx, var);
|
||||
}
|
||||
|
||||
/* Setup local variables (which should only be arrays): */
|
||||
/* NOTE: need to do something more clever when we support >1 fxn */
|
||||
nir_foreach_variable(var, &fxn->locals) {
|
||||
declare_var(ctx, var);
|
||||
}
|
||||
|
||||
/* And emit the body: */
|
||||
ctx->impl = fxn;
|
||||
emit_function(ctx, fxn);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue