panfrost: Use memctx for sysvals
[mesa.git] / src / panfrost / bifrost / bifrost_compile.c
index ed8741ddb5a5eb07d4098942eb5a0f6275229b05..cd1eafcd4c3ac913bab81f7a548766f3bb3914cf 100644 (file)
@@ -169,7 +169,7 @@ bi_emit_frag_out(bi_context *ctx, nir_intrinsic_instr *instr)
                 .vector_channels = 4
         };
 
-        assert(blend.blend_location < BIFROST_MAX_RENDER_TARGET_COUNT);
+        assert(blend.blend_location < 8);
         assert(ctx->blend_types);
         assert(blend.src_types[0]);
         ctx->blend_types[blend.blend_location] = blend.src_types[0];
@@ -1342,7 +1342,7 @@ bifrost_compile_shader_nir(nir_shader *nir, panfrost_program *program, unsigned
                 nir_print_shader(nir, stdout);
         }
 
-        panfrost_nir_assign_sysvals(&ctx->sysvals, nir);
+        panfrost_nir_assign_sysvals(&ctx->sysvals, ctx, nir);
         program->sysval_count = ctx->sysvals.sysval_count;
         memcpy(program->sysvals, ctx->sysvals.sysvals, sizeof(ctx->sysvals.sysvals[0]) * ctx->sysvals.sysval_count);
         ctx->blend_types = program->blend_types;