static void
etna_set_framebuffer_state(struct pipe_context *pctx,
- const struct pipe_framebuffer_state *sv)
+ const struct pipe_framebuffer_state *fb)
{
struct etna_context *ctx = etna_context(pctx);
struct compiled_framebuffer_state *cs = &ctx->framebuffer;
uint32_t ts_mem_config = 0;
uint32_t pe_mem_config = 0;
- if (sv->nr_cbufs > 0) { /* at least one color buffer? */
- struct etna_surface *cbuf = etna_surface(sv->cbufs[0]);
+ if (fb->nr_cbufs > 0) { /* at least one color buffer? */
+ struct etna_surface *cbuf = etna_surface(fb->cbufs[0]);
struct etna_resource *res = etna_resource(cbuf->base.texture);
bool color_supertiled = (res->layout & ETNA_LAYOUT_BIT_SUPER) != 0;
cs->PE_PIPE_COLOR_ADDR[i] = ctx->dummy_rt_reloc;
}
- if (sv->zsbuf != NULL) {
- struct etna_surface *zsbuf = etna_surface(sv->zsbuf);
+ if (fb->zsbuf != NULL) {
+ struct etna_surface *zsbuf = etna_surface(fb->zsbuf);
struct etna_resource *res = etna_resource(zsbuf->base.texture);
etna_update_render_resource(pctx, etna_resource(zsbuf->prsc));
/* Scissor setup */
cs->SE_SCISSOR_LEFT = 0; /* affected by rasterizer and scissor state as well */
cs->SE_SCISSOR_TOP = 0;
- cs->SE_SCISSOR_RIGHT = (sv->width << 16) + ETNA_SE_SCISSOR_MARGIN_RIGHT;
- cs->SE_SCISSOR_BOTTOM = (sv->height << 16) + ETNA_SE_SCISSOR_MARGIN_BOTTOM;
- cs->SE_CLIP_RIGHT = (sv->width << 16) + ETNA_SE_CLIP_MARGIN_RIGHT;
- cs->SE_CLIP_BOTTOM = (sv->height << 16) + ETNA_SE_CLIP_MARGIN_BOTTOM;
+ cs->SE_SCISSOR_RIGHT = (fb->width << 16) + ETNA_SE_SCISSOR_MARGIN_RIGHT;
+ cs->SE_SCISSOR_BOTTOM = (fb->height << 16) + ETNA_SE_SCISSOR_MARGIN_BOTTOM;
+ cs->SE_CLIP_RIGHT = (fb->width << 16) + ETNA_SE_CLIP_MARGIN_RIGHT;
+ cs->SE_CLIP_BOTTOM = (fb->height << 16) + ETNA_SE_CLIP_MARGIN_BOTTOM;
cs->TS_MEM_CONFIG = ts_mem_config;
cs->PE_MEM_CONFIG = pe_mem_config;
cs->PE_LOGIC_OP = VIVS_PE_LOGIC_OP_SINGLE_BUFFER(ctx->specs.single_buffer ? 3 : 0);
/* keep copy of original structure */
- util_copy_framebuffer_state(&ctx->framebuffer_s, sv);
+ util_copy_framebuffer_state(&ctx->framebuffer_s, fb);
ctx->dirty |= ETNA_DIRTY_FRAMEBUFFER | ETNA_DIRTY_DERIVE_TS;
}