From 5381b70ca59776643b2cbeaef5fd589a8d66ba73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= <pippin@gimp.org> Date: Mon, 7 Aug 2023 17:22:32 +0200 Subject: [PATCH] st3m/gfx: initialize texture relations between contexts --- components/st3m/st3m_gfx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/st3m/st3m_gfx.c b/components/st3m/st3m_gfx.c index b22da033c6..1a65054460 100644 --- a/components/st3m/st3m_gfx.c +++ b/components/st3m/st3m_gfx.c @@ -424,6 +424,10 @@ void st3m_gfx_init(void) { fb_desc->buffer, FLOW3R_BSP_DISPLAY_WIDTH, FLOW3R_BSP_DISPLAY_HEIGHT, FLOW3R_BSP_DISPLAY_WIDTH * 2, CTX_FORMAT_RGB565_BYTESWAPPED); + if (i) { + ctx_set_texture_source(fb_desc->ctx, framebuffer_descs[0].ctx); + ctx_set_texture_cache(fb_desc->ctx, framebuffer_descs[0].ctx); + } assert(fb_desc->ctx != NULL); // Rotate by 180 deg and translate x and y by 120 px to have (0,0) at // the center of the screen @@ -443,6 +447,7 @@ void st3m_gfx_init(void) { dctx_desc->num = i; dctx_desc->ctx = ctx_new_drawlist(FLOW3R_BSP_DISPLAY_WIDTH, FLOW3R_BSP_DISPLAY_HEIGHT); + ctx_set_texture_cache(dctx_desc->ctx, framebuffer_descs[0].ctx); assert(dctx_desc->ctx != NULL); // Push descriptor to freeq. -- GitLab