etnaviv: use a more self-explanatory param name
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This commit is contained in:
parent
a949fa9d5d
commit
47c7c4263c
|
@ -126,7 +126,7 @@ etna_update_render_resource(struct pipe_context *pctx, struct etna_resource *bas
|
||||||
|
|
||||||
static void
|
static void
|
||||||
etna_set_framebuffer_state(struct pipe_context *pctx,
|
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 etna_context *ctx = etna_context(pctx);
|
||||||
struct compiled_framebuffer_state *cs = &ctx->framebuffer;
|
struct compiled_framebuffer_state *cs = &ctx->framebuffer;
|
||||||
|
@ -137,8 +137,8 @@ etna_set_framebuffer_state(struct pipe_context *pctx,
|
||||||
uint32_t ts_mem_config = 0;
|
uint32_t ts_mem_config = 0;
|
||||||
uint32_t pe_mem_config = 0;
|
uint32_t pe_mem_config = 0;
|
||||||
|
|
||||||
if (sv->nr_cbufs > 0) { /* at least one color buffer? */
|
if (fb->nr_cbufs > 0) { /* at least one color buffer? */
|
||||||
struct etna_surface *cbuf = etna_surface(sv->cbufs[0]);
|
struct etna_surface *cbuf = etna_surface(fb->cbufs[0]);
|
||||||
struct etna_resource *res = etna_resource(cbuf->base.texture);
|
struct etna_resource *res = etna_resource(cbuf->base.texture);
|
||||||
bool color_supertiled = (res->layout & ETNA_LAYOUT_BIT_SUPER) != 0;
|
bool color_supertiled = (res->layout & ETNA_LAYOUT_BIT_SUPER) != 0;
|
||||||
|
|
||||||
|
@ -216,8 +216,8 @@ etna_set_framebuffer_state(struct pipe_context *pctx,
|
||||||
cs->PE_PIPE_COLOR_ADDR[i] = ctx->dummy_rt_reloc;
|
cs->PE_PIPE_COLOR_ADDR[i] = ctx->dummy_rt_reloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sv->zsbuf != NULL) {
|
if (fb->zsbuf != NULL) {
|
||||||
struct etna_surface *zsbuf = etna_surface(sv->zsbuf);
|
struct etna_surface *zsbuf = etna_surface(fb->zsbuf);
|
||||||
struct etna_resource *res = etna_resource(zsbuf->base.texture);
|
struct etna_resource *res = etna_resource(zsbuf->base.texture);
|
||||||
|
|
||||||
etna_update_render_resource(pctx, etna_resource(zsbuf->prsc));
|
etna_update_render_resource(pctx, etna_resource(zsbuf->prsc));
|
||||||
|
@ -335,10 +335,10 @@ etna_set_framebuffer_state(struct pipe_context *pctx,
|
||||||
/* Scissor setup */
|
/* Scissor setup */
|
||||||
cs->SE_SCISSOR_LEFT = 0; /* affected by rasterizer and scissor state as well */
|
cs->SE_SCISSOR_LEFT = 0; /* affected by rasterizer and scissor state as well */
|
||||||
cs->SE_SCISSOR_TOP = 0;
|
cs->SE_SCISSOR_TOP = 0;
|
||||||
cs->SE_SCISSOR_RIGHT = (sv->width << 16) + ETNA_SE_SCISSOR_MARGIN_RIGHT;
|
cs->SE_SCISSOR_RIGHT = (fb->width << 16) + ETNA_SE_SCISSOR_MARGIN_RIGHT;
|
||||||
cs->SE_SCISSOR_BOTTOM = (sv->height << 16) + ETNA_SE_SCISSOR_MARGIN_BOTTOM;
|
cs->SE_SCISSOR_BOTTOM = (fb->height << 16) + ETNA_SE_SCISSOR_MARGIN_BOTTOM;
|
||||||
cs->SE_CLIP_RIGHT = (sv->width << 16) + ETNA_SE_CLIP_MARGIN_RIGHT;
|
cs->SE_CLIP_RIGHT = (fb->width << 16) + ETNA_SE_CLIP_MARGIN_RIGHT;
|
||||||
cs->SE_CLIP_BOTTOM = (sv->height << 16) + ETNA_SE_CLIP_MARGIN_BOTTOM;
|
cs->SE_CLIP_BOTTOM = (fb->height << 16) + ETNA_SE_CLIP_MARGIN_BOTTOM;
|
||||||
|
|
||||||
cs->TS_MEM_CONFIG = ts_mem_config;
|
cs->TS_MEM_CONFIG = ts_mem_config;
|
||||||
cs->PE_MEM_CONFIG = pe_mem_config;
|
cs->PE_MEM_CONFIG = pe_mem_config;
|
||||||
|
@ -350,7 +350,7 @@ etna_set_framebuffer_state(struct pipe_context *pctx,
|
||||||
cs->PE_LOGIC_OP = VIVS_PE_LOGIC_OP_SINGLE_BUFFER(ctx->specs.single_buffer ? 3 : 0);
|
cs->PE_LOGIC_OP = VIVS_PE_LOGIC_OP_SINGLE_BUFFER(ctx->specs.single_buffer ? 3 : 0);
|
||||||
|
|
||||||
/* keep copy of original structure */
|
/* 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;
|
ctx->dirty |= ETNA_DIRTY_FRAMEBUFFER | ETNA_DIRTY_DERIVE_TS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue