From: Icecream95 Date: Tue, 14 Jul 2020 00:05:47 +0000 (+1200) Subject: panfrost: 8x MRT support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ec252a3b293dc0cbba847bfc72ba50b6c4d3514;p=mesa.git panfrost: 8x MRT support Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/docs/features.txt b/docs/features.txt index 9d5198e62d3..44d0ec26b19 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -64,7 +64,7 @@ GL 3.0, GLSL 1.30 --- all DONE: freedreno, i965, nv50, nvc0, r600, radeonsi, llv Depth format cube textures DONE (panfrost) GLX_ARB_create_context (GLX 1.4 is required) DONE (panfrost, v3d) Multisample anti-aliasing DONE (freedreno/a5xx+, freedreno (*), llvmpipe (*), softpipe (*), swr (*), panfrost) - 8 draw buffers DONE () + 8 draw buffers DONE (panfrost/t760+) (*) freedreno (a2xx-a4xx), llvmpipe, softpipe, and swr have fake Multisample anti-aliasing support diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c index 0ee904e9b5a..d253b897b98 100644 --- a/src/gallium/drivers/panfrost/pan_mfbd.c +++ b/src/gallium/drivers/panfrost/pan_mfbd.c @@ -401,7 +401,7 @@ panfrost_mfbd_upload(struct panfrost_batch *batch, size_t total_sz = sizeof(struct mali_framebuffer) + (has_extra ? sizeof(struct mali_framebuffer_extra) : 0) + - sizeof(struct mali_render_target) * 4; + sizeof(struct mali_render_target) * 8; struct panfrost_transfer m_f_trans = panfrost_pool_alloc(&batch->pool, total_sz); @@ -413,7 +413,7 @@ panfrost_mfbd_upload(struct panfrost_batch *batch, if (has_extra) UPLOAD(m_f_trans, offset, fbx, total_sz); - for (unsigned c = 0; c < 4; ++c) { + for (unsigned c = 0; c < 8; ++c) { UPLOAD(m_f_trans, offset, &rts[c], total_sz); } @@ -541,7 +541,7 @@ panfrost_mfbd_fragment(struct panfrost_batch *batch, bool has_draws) struct mali_framebuffer fb = panfrost_emit_mfbd(batch, has_draws); struct mali_framebuffer_extra fbx = {0}; - struct mali_render_target rts[4] = {0}; + struct mali_render_target rts[8] = {0}; /* We always upload at least one dummy GL_NONE render target */ diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index e776add1f20..a9f7c4e1aa9 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -120,7 +120,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_MAX_RENDER_TARGETS: case PIPE_CAP_FBFETCH: case PIPE_CAP_FBFETCH_COHERENT: - return has_mrt ? 4 : 1; + return has_mrt ? 8 : 1; case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: return 1; @@ -300,7 +300,7 @@ panfrost_get_shader_param(struct pipe_screen *screen, return 16; case PIPE_SHADER_CAP_MAX_OUTPUTS: - return shader == PIPE_SHADER_FRAGMENT ? 4 : 16; + return shader == PIPE_SHADER_FRAGMENT ? 8 : 16; case PIPE_SHADER_CAP_MAX_TEMPS: return 256; /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index c6fd0647ca3..8ac799b81f2 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -1849,8 +1849,8 @@ struct mali_framebuffer { u32 zero3; u16 width2, height2; u32 unk1 : 19; // = 0x01000 - u32 rt_count_1 : 2; // off-by-one (use MALI_POSITIVE) - u32 unk2 : 3; // = 0 + u32 rt_count_1 : 3; // off-by-one (use MALI_POSITIVE) + u32 unk2 : 2; // = 0 u32 rt_count_2 : 3; // no off-by-one u32 zero4 : 5; /* 0x30 */