#include "lima_screen.h"
#include "lima_context.h"
+#include "lima_submit.h"
#include "lima_program.h"
#include "lima_bo.h"
#include "ir/lima_ir.h"
fs->shader = NULL;
}
- ctx->pp_max_stack_size = MAX2(ctx->pp_max_stack_size, ctx->fs->stack_size);
+ struct lima_submit *submit = lima_submit_get(ctx);
+ submit->pp_max_stack_size = MAX2(submit->pp_max_stack_size, ctx->fs->stack_size);
return true;
}
/* These are "stack size" and "stack offset" shifted,
* here they are assumed to be always the same. */
- frame->fragment_stack_size = ctx->pp_max_stack_size << 16 | ctx->pp_max_stack_size;
+ frame->fragment_stack_size = submit->pp_max_stack_size << 16 | submit->pp_max_stack_size;
/* related with MSAA and different value when r4p0/r7p0 */
frame->supersampled_height = fb->base.height * 2 - 1;
}
uint32_t pp_stack_va = 0;
- if (ctx->pp_max_stack_size) {
+ if (submit->pp_max_stack_size) {
lima_submit_create_stream_bo(
submit, LIMA_PIPE_PP,
- screen->num_pp * ctx->pp_max_stack_size * pp_stack_pp_size,
+ screen->num_pp * submit->pp_max_stack_size * pp_stack_pp_size,
&pp_stack_va);
}
for (int i = 0; i < screen->num_pp; i++) {
pp_frame.plbu_array_address[i] = ps->va + ps->offset[i];
- if (ctx->pp_max_stack_size)
+ if (submit->pp_max_stack_size)
pp_frame.fragment_stack_address[i] = pp_stack_va +
- ctx->pp_max_stack_size * pp_stack_pp_size * i;
+ submit->pp_max_stack_size * pp_stack_pp_size * i;
}
lima_dump_command_stream_print(
lima_pack_pp_frame_reg(submit, pp_frame.frame, pp_frame.wb);
pp_frame.num_pp = screen->num_pp;
- if (ctx->pp_max_stack_size)
+ if (submit->pp_max_stack_size)
for (int i = 0; i < screen->num_pp; i++)
pp_frame.fragment_stack_address[i] = pp_stack_va +
- ctx->pp_max_stack_size * pp_stack_pp_size * i;
+ submit->pp_max_stack_size * pp_stack_pp_size * i;
if (ps->map) {
for (int i = 0; i < screen->num_pp; i++)
surf->reload = true;
}
- ctx->pp_max_stack_size = 0;
-
ctx->damage_rect.minx = ctx->damage_rect.miny = 0xffff;
ctx->damage_rect.maxx = ctx->damage_rect.maxy = 0;