From d677baccd0f746ddf1296d194bd3eb42e60459d5 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sun, 10 Nov 2013 16:10:06 +0000 Subject: rs: rework etna_submit_rs_state for gc2000 --- src/etnaviv/etna_rs.c | 66 ++++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/src/etnaviv/etna_rs.c b/src/etnaviv/etna_rs.c index 873bd59..a03662a 100644 --- a/src/etnaviv/etna_rs.c +++ b/src/etnaviv/etna_rs.c @@ -126,39 +126,41 @@ void etna_submit_rs_state(struct etna_ctx *restrict ctx, const struct compiled_r } else if (ctx->conn->chip.pixel_pipes == 2) { - etna_reserve(ctx, 32); - /*0 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_CONFIG>>2, 5, 0); + etna_reserve(ctx, 34); + /*0 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_CONFIG>>2, 1, 0); /*1 */ ETNA_EMIT(ctx, cs->RS_CONFIG); - /*2 */ ETNA_EMIT(ctx, cs->RS_SOURCE_STRIDE); - /*3 */ ETNA_EMIT(ctx, cs->RS_DEST_ADDR); - /*4 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_PIPE_SOURCE_ADDR(0)>>2, 2, 0); - /*5 */ ETNA_EMIT(ctx, cs->RS_PIPE_SOURCE_ADDR[0]); - /*6 */ ETNA_EMIT(ctx, cs->RS_PIPE_SOURCE_ADDR[1]); - /*7 */ ETNA_EMIT(ctx, 0x00000000); /* pad */ - /*8 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_PIPE_DEST_ADDR(0)>>2, 2, 0); - /*9 */ ETNA_EMIT(ctx, cs->RS_PIPE_DEST_ADDR[0]); - /*10*/ ETNA_EMIT(ctx, cs->RS_PIPE_DEST_ADDR[1]); - /*11*/ ETNA_EMIT(ctx, 0x00000000); /* pad */ - /*12*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_PIPE_OFFSET(0)>>2, 2, 0); - /*13*/ ETNA_EMIT(ctx, cs->RS_PIPE_OFFSET[0]); - /*14*/ ETNA_EMIT(ctx, cs->RS_PIPE_OFFSET[1]); - /*15*/ ETNA_EMIT(ctx, 0x00000000); /* pad */ - /*16*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_WINDOW_SIZE>>2, 1, 0); - /*17*/ ETNA_EMIT(ctx, cs->RS_WINDOW_SIZE); - /*18*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_DITHER(0)>>2, 2, 0); - /*19*/ ETNA_EMIT(ctx, cs->RS_DITHER[0]); - /*20*/ ETNA_EMIT(ctx, cs->RS_DITHER[1]); - /*21*/ ETNA_EMIT(ctx, 0xbabb1e); /* pad */ - /*22*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_CLEAR_CONTROL>>2, 5, 0); - /*23*/ ETNA_EMIT(ctx, cs->RS_CLEAR_CONTROL); - /*24*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[0]); - /*25*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[1]); - /*26*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[2]); - /*27*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[3]); - /*28*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_EXTRA_CONFIG>>2, 1, 0); - /*29*/ ETNA_EMIT(ctx, cs->RS_EXTRA_CONFIG); - /*30*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_KICKER>>2, 1, 0); - /*31*/ ETNA_EMIT(ctx, 0xbeebbeeb); + /*2 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_SOURCE_STRIDE>>2, 1, 0); + /*3 */ ETNA_EMIT(ctx, cs->RS_SOURCE_STRIDE); + /*4 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_DEST_STRIDE>>2, 1, 0); + /*5 */ ETNA_EMIT(ctx, cs->RS_DEST_STRIDE); + /*6 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_PIPE_SOURCE_ADDR(0)>>2, 2, 0); + /*7 */ ETNA_EMIT(ctx, cs->RS_PIPE_SOURCE_ADDR[0]); + /*8 */ ETNA_EMIT(ctx, cs->RS_PIPE_SOURCE_ADDR[1]); + /*9 */ ETNA_EMIT(ctx, 0x00000000); /* pad */ + /*10*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_PIPE_DEST_ADDR(0)>>2, 2, 0); + /*11*/ ETNA_EMIT(ctx, cs->RS_PIPE_DEST_ADDR[0]); + /*12*/ ETNA_EMIT(ctx, cs->RS_PIPE_DEST_ADDR[1]); + /*13*/ ETNA_EMIT(ctx, 0x00000000); /* pad */ + /*14*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_PIPE_OFFSET(0)>>2, 2, 0); + /*15*/ ETNA_EMIT(ctx, cs->RS_PIPE_OFFSET[0]); + /*16*/ ETNA_EMIT(ctx, cs->RS_PIPE_OFFSET[1]); + /*17*/ ETNA_EMIT(ctx, 0x00000000); /* pad */ + /*18*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_WINDOW_SIZE>>2, 1, 0); + /*19*/ ETNA_EMIT(ctx, cs->RS_WINDOW_SIZE); + /*20*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_DITHER(0)>>2, 2, 0); + /*21*/ ETNA_EMIT(ctx, cs->RS_DITHER[0]); + /*22*/ ETNA_EMIT(ctx, cs->RS_DITHER[1]); + /*23*/ ETNA_EMIT(ctx, 0xbabb1e); /* pad */ + /*24*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_CLEAR_CONTROL>>2, 5, 0); + /*25*/ ETNA_EMIT(ctx, cs->RS_CLEAR_CONTROL); + /*26*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[0]); + /*27*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[1]); + /*28*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[2]); + /*29*/ ETNA_EMIT(ctx, cs->RS_FILL_VALUE[3]); + /*30*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_EXTRA_CONFIG>>2, 1, 0); + /*31*/ ETNA_EMIT(ctx, cs->RS_EXTRA_CONFIG); + /*32*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_KICKER>>2, 1, 0); + /*33*/ ETNA_EMIT(ctx, 0xbeebbeeb); } } -- cgit From 1d81454ea351dbbf7d9475918e2833424efa2b85 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 12 Nov 2013 20:36:40 +0000 Subject: fb demos: do not use rt_resource->last_ctx as it never gets set Signed-off-by: Christian Gmeiner --- src/fb/alpha_blend.c | 2 +- src/fb/cube_companion.c | 2 +- src/fb/cubemap_sphere.c | 2 +- src/fb/displacement.c | 2 +- src/fb/etna_gears.c | 2 +- src/fb/mip_cube.c | 2 +- src/fb/particle_system.c | 2 +- src/fb/ps_sandbox.c | 2 +- src/fb/rotate_cube.c | 2 +- src/fb/stencil_test.c | 2 +- src/fb_rawshader/alpha_blend.c | 2 +- src/fb_rawshader/cube_companion.c | 2 +- src/fb_rawshader/cubemap_sphere.c | 2 +- src/fb_rawshader/displacement.c | 2 +- src/fb_rawshader/etna_gears.c | 2 +- src/fb_rawshader/mip_cube.c | 2 +- src/fb_rawshader/particle_system.c | 2 +- src/fb_rawshader/rotate_cube.c | 2 +- src/fb_rawshader/stencil_test.c | 2 +- src/lib/fbdemos.c | 6 +++--- src/lib/fbdemos.h | 2 +- 21 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/fb/alpha_blend.c b/src/fb/alpha_blend.c index 3d0a553..ba5449c 100644 --- a/src/fb/alpha_blend.c +++ b/src/fb/alpha_blend.c @@ -112,7 +112,7 @@ int main(int argc, char **argv) struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* interleave vertex data */ struct pipe_transfer *transfer = 0; diff --git a/src/fb/cube_companion.c b/src/fb/cube_companion.c index 8e565ed..144ac92 100644 --- a/src/fb/cube_companion.c +++ b/src/fb/cube_companion.c @@ -134,7 +134,7 @@ int main(int argc, char **argv) struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* geometry */ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); diff --git a/src/fb/cubemap_sphere.c b/src/fb/cubemap_sphere.c index d6895fc..1970dd6 100644 --- a/src/fb/cubemap_sphere.c +++ b/src/fb/cubemap_sphere.c @@ -130,7 +130,7 @@ int main(int argc, char **argv) struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* Phew, now we got all the memory we need. * Write interleaved attribute vertex stream. diff --git a/src/fb/displacement.c b/src/fb/displacement.c index b01888e..189bab2 100644 --- a/src/fb/displacement.c +++ b/src/fb/displacement.c @@ -147,7 +147,7 @@ int main(int argc, char **argv) struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* Phew, now we got all the memory we need. * Write interleaved attribute vertex stream. diff --git a/src/fb/etna_gears.c b/src/fb/etna_gears.c index bc36215..9c38dd7 100644 --- a/src/fb/etna_gears.c +++ b/src/fb/etna_gears.c @@ -521,7 +521,7 @@ main(int argc, char *argv[]) }); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* compile gallium3d states */ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) { diff --git a/src/fb/mip_cube.c b/src/fb/mip_cube.c index 5f262e1..befe33a 100644 --- a/src/fb/mip_cube.c +++ b/src/fb/mip_cube.c @@ -273,7 +273,7 @@ int main(int argc, char **argv) struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* Phew, now we got all the memory we need. * Write interleaved attribute vertex stream. diff --git a/src/fb/particle_system.c b/src/fb/particle_system.c index 18bc4b2..e866709 100644 --- a/src/fb/particle_system.c +++ b/src/fb/particle_system.c @@ -133,7 +133,7 @@ int main(int argc, char **argv) struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* surfaces */ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){ diff --git a/src/fb/ps_sandbox.c b/src/fb/ps_sandbox.c index f0d7739..0fcc315 100644 --- a/src/fb/ps_sandbox.c +++ b/src/fb/ps_sandbox.c @@ -147,7 +147,7 @@ int main(int argc, char **argv) struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, sizeof(vVertices)); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* vertex / index buffer setup */ struct pipe_transfer *vtx_transfer = 0; diff --git a/src/fb/rotate_cube.c b/src/fb/rotate_cube.c index d61e70f..3c7336e 100644 --- a/src/fb/rotate_cube.c +++ b/src/fb/rotate_cube.c @@ -202,7 +202,7 @@ int main(int argc, char **argv) struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* geometry */ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); diff --git a/src/fb/stencil_test.c b/src/fb/stencil_test.c index eea8463..149bdf4 100644 --- a/src/fb/stencil_test.c +++ b/src/fb/stencil_test.c @@ -127,7 +127,7 @@ int main(int argc, char **argv) struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* vertex / index buffer setup */ struct pipe_transfer *vtx_transfer = 0; diff --git a/src/fb_rawshader/alpha_blend.c b/src/fb_rawshader/alpha_blend.c index 87f763f..45012dc 100644 --- a/src/fb_rawshader/alpha_blend.c +++ b/src/fb_rawshader/alpha_blend.c @@ -134,7 +134,7 @@ int main(int argc, char **argv) struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* interleave vertex data */ struct pipe_transfer *transfer = 0; diff --git a/src/fb_rawshader/cube_companion.c b/src/fb_rawshader/cube_companion.c index dbb3f3e..922e60f 100644 --- a/src/fb_rawshader/cube_companion.c +++ b/src/fb_rawshader/cube_companion.c @@ -146,7 +146,7 @@ int main(int argc, char **argv) struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* geometry */ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); diff --git a/src/fb_rawshader/cubemap_sphere.c b/src/fb_rawshader/cubemap_sphere.c index 9a199c5..792f750 100644 --- a/src/fb_rawshader/cubemap_sphere.c +++ b/src/fb_rawshader/cubemap_sphere.c @@ -146,7 +146,7 @@ int main(int argc, char **argv) struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* Phew, now we got all the memory we need. * Write interleaved attribute vertex stream. diff --git a/src/fb_rawshader/displacement.c b/src/fb_rawshader/displacement.c index 64d3c6f..66761bd 100644 --- a/src/fb_rawshader/displacement.c +++ b/src/fb_rawshader/displacement.c @@ -165,7 +165,7 @@ int main(int argc, char **argv) struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* Phew, now we got all the memory we need. * Write interleaved attribute vertex stream. diff --git a/src/fb_rawshader/etna_gears.c b/src/fb_rawshader/etna_gears.c index dfc0fe0..58505cb 100644 --- a/src/fb_rawshader/etna_gears.c +++ b/src/fb_rawshader/etna_gears.c @@ -528,7 +528,7 @@ main(int argc, char *argv[]) }); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* compile gallium3d states */ void *blend = pipe->create_blend_state(pipe, &(struct pipe_blend_state) { diff --git a/src/fb_rawshader/mip_cube.c b/src/fb_rawshader/mip_cube.c index 2334de8..7e9c456 100644 --- a/src/fb_rawshader/mip_cube.c +++ b/src/fb_rawshader/mip_cube.c @@ -263,7 +263,7 @@ int main(int argc, char **argv) struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* Phew, now we got all the memory we need. * Write interleaved attribute vertex stream. diff --git a/src/fb_rawshader/particle_system.c b/src/fb_rawshader/particle_system.c index 2f4f9ee..050bf06 100644 --- a/src/fb_rawshader/particle_system.c +++ b/src/fb_rawshader/particle_system.c @@ -148,7 +148,7 @@ int main(int argc, char **argv) struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* surfaces */ struct pipe_surface *cbuf = pipe->create_surface(pipe, rt_resource, &(struct pipe_surface){ diff --git a/src/fb_rawshader/rotate_cube.c b/src/fb_rawshader/rotate_cube.c index 0c6a7c3..bc8a43e 100644 --- a/src/fb_rawshader/rotate_cube.c +++ b/src/fb_rawshader/rotate_cube.c @@ -220,7 +220,7 @@ int main(int argc, char **argv) struct pipe_resource *z_resource = fbdemo_create_2d(fbs->screen, PIPE_BIND_RENDER_TARGET, PIPE_FORMAT_Z16_UNORM, width, height, 0); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* geometry */ struct pipe_resource *vtx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); diff --git a/src/fb_rawshader/stencil_test.c b/src/fb_rawshader/stencil_test.c index 1d9280f..e82fa80 100644 --- a/src/fb_rawshader/stencil_test.c +++ b/src/fb_rawshader/stencil_test.c @@ -152,7 +152,7 @@ int main(int argc, char **argv) struct pipe_resource *idx_resource = pipe_buffer_create(fbs->screen, PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_IMMUTABLE, VERTEX_BUFFER_SIZE); /* bind render target to framebuffer */ - etna_fb_bind_resource(&fbs->fb, rt_resource); + etna_fb_bind_resource(fbs, rt_resource); /* vertex / index buffer setup */ struct pipe_transfer *vtx_transfer = 0; diff --git a/src/lib/fbdemos.c b/src/lib/fbdemos.c index 2b72d07..cc1dff5 100644 --- a/src/lib/fbdemos.c +++ b/src/lib/fbdemos.c @@ -279,10 +279,10 @@ int fb_close(struct fb_info *fb) } -int etna_fb_bind_resource(struct fb_info *fb, struct pipe_resource *rt_resource_) +int etna_fb_bind_resource(struct fbdemos_scaffold *fbs, struct pipe_resource *rt_resource_) { + struct fb_info *fb = &fbs->fb; struct etna_resource *rt_resource = etna_resource(rt_resource_); - struct etna_pipe_context *ectx = rt_resource->last_ctx; fb->resource = rt_resource; assert(rt_resource->base.width0 <= fb->fb_var.xres && rt_resource->base.height0 <= fb->fb_var.yres); int msaa_xscale=1, msaa_yscale=1; @@ -291,7 +291,7 @@ int etna_fb_bind_resource(struct fb_info *fb, struct pipe_resource *rt_resource_ for(int bi=0; bictx, &fb->copy_to_screen[bi], &(struct rs_state){ + etna_compile_rs_state(fbs->ctx, &fb->copy_to_screen[bi], &(struct rs_state){ .source_format = translate_rt_format(rt_resource->base.format, false), .source_tiling = rt_resource->layout, .source_addr = etna_bo_gpu_address(rt_resource->bo) + rt_resource->levels[0].offset, diff --git a/src/lib/fbdemos.h b/src/lib/fbdemos.h index 9079fea..a0d7612 100644 --- a/src/lib/fbdemos.h +++ b/src/lib/fbdemos.h @@ -88,7 +88,7 @@ int fb_set_buffer(struct fb_info *fb, int buffer); int fb_close(struct fb_info *fb); /* Bind framebuffer to render target resource */ -int etna_fb_bind_resource(struct fb_info *fb, struct pipe_resource *rt_resource); +int etna_fb_bind_resource(struct fbdemos_scaffold *fbs, struct pipe_resource *rt_resource); /* Copy framebuffer from bound render target resource */ int etna_fb_copy_buffer(struct fb_info *fb, struct etna_ctx *ctx, int buffer); -- cgit