From: Alyssa Rosenzweig Date: Mon, 24 Aug 2020 17:46:34 +0000 (-0400) Subject: panfrost: Use draw pack for blit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=59b6e3c98ce5279fb9dc19e0754eb4ade248cf43;p=mesa.git panfrost: Use draw pack for blit Something easy to start us off for the series. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/lib/pan_blit.c b/src/panfrost/lib/pan_blit.c index 802ca40ac2b..c1b704bff8f 100644 --- a/src/panfrost/lib/pan_blit.c +++ b/src/panfrost/lib/pan_blit.c @@ -349,19 +349,24 @@ panfrost_load_midg( .unknown_draw = 0x3000, .index_count = MALI_POSITIVE(vertex_count) }, - .postfix = { - .gl_enables = 0x7, - .position_varying = coordinates, - .textures = panfrost_pool_upload(pool, &texture_t.gpu, sizeof(texture_t.gpu)), - .sampler_descriptor = sampler.gpu, - .shader = shader_meta_t.gpu, - .varyings = varying_buffer.gpu, - .varying_meta = varying.gpu, - .viewport = viewport.gpu, - .shared_memory = fbd - } }; + struct mali_draw_packed draw; + + pan_pack(&draw, DRAW, cfg) { + cfg.unknown_1 = 0x7; + cfg.position = coordinates; + cfg.textures = panfrost_pool_upload(pool, &texture_t.gpu, sizeof(texture_t.gpu)); + cfg.samplers = sampler.gpu; + cfg.state = shader_meta_t.gpu; + cfg.varying_buffers = varying_buffer.gpu; + cfg.varyings = varying.gpu; + cfg.viewport = viewport.gpu; + cfg.shared = fbd; + } + + memcpy(&payload.postfix, &draw, MALI_DRAW_LENGTH); + panfrost_pack_work_groups_compute(&payload.prefix, 1, vertex_count, 1, 1, 1, 1, true); payload.prefix.workgroups_x_shift_3 = 6;