mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
panfrost: Blit with the RUN_FULLSCREEN instruction (v12)
Extend RUN_FULLSCREEN support to architecture v12. Signed-off-by: Loïc Molinari <loic.molinari@collabora.com> Reviewed-by: Ashley Smith <ashley.smith@collabora.com> Acked-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40124>
This commit is contained in:
parent
1e9c175ea0
commit
712f2534b9
3 changed files with 24 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ panfrost_blitter_draw_rectangle(struct blitter_context *blitter,
|
|||
struct panfrost_context *pctx = pan_context(ctx);
|
||||
struct panfrost_screen *scr = pan_screen(ctx->screen);
|
||||
|
||||
if (scr->dev.arch <= 8 || scr->dev.arch >= 11 || depth != 0.0f ||
|
||||
if (scr->dev.arch <= 8 || scr->dev.arch >= 13 || depth != 0.0f ||
|
||||
num_instances > 1)
|
||||
goto fallback;
|
||||
|
||||
|
|
|
|||
|
|
@ -1476,7 +1476,7 @@ GENX(csf_launch_draw_indirect)(struct panfrost_batch *batch,
|
|||
}
|
||||
}
|
||||
|
||||
#if PAN_ARCH == 10
|
||||
#if PAN_ARCH <= 12
|
||||
static struct pan_ptr
|
||||
csf_emit_fullscreen_dcd(struct panfrost_batch *batch,
|
||||
struct pan_ptr vertex_array, uint64_t resources)
|
||||
|
|
@ -1496,22 +1496,36 @@ csf_emit_fullscreen_dcd(struct panfrost_batch *batch,
|
|||
|
||||
/* Vertex descriptor */
|
||||
if (vertex_array.cpu) {
|
||||
#if PAN_ARCH >= 12
|
||||
cfg.vertex_pointer = vertex_array.gpu;
|
||||
#else
|
||||
cfg.vertex_array.packet = true;
|
||||
cfg.vertex_array.pointer = vertex_array.gpu;
|
||||
cfg.vertex_array.vertex_packet_stride =
|
||||
PAN_RUN_FULLSCREEN_PACKET_STRIDE;
|
||||
cfg.vertex_array.vertex_attribute_stride =
|
||||
PAN_RUN_FULLSCREEN_ATTRIB_STRIDE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Depth/stencil and blend descriptor */
|
||||
#if PAN_ARCH == 10
|
||||
cfg.minimum_z = batch->minimum_z;
|
||||
cfg.maximum_z = batch->maximum_z;
|
||||
#endif
|
||||
cfg.depth_stencil = batch->depth_stencil;
|
||||
cfg.blend_count = MAX2(batch->key.nr_cbufs, 1);
|
||||
cfg.blend = batch->blend;
|
||||
|
||||
/* Shader environment */
|
||||
#if PAN_ARCH >= 12
|
||||
cfg.fragment_fau.count = DIV_ROUND_UP(
|
||||
batch->nr_push_uniforms[MESA_SHADER_FRAGMENT], 2);
|
||||
cfg.fragment_resources = resources;
|
||||
cfg.fragment_shader = batch->rsd[MESA_SHADER_FRAGMENT];
|
||||
cfg.thread_storage = batch->tls.gpu;
|
||||
cfg.fragment_fau.pointer = batch->push_uniforms[MESA_SHADER_FRAGMENT];
|
||||
#else
|
||||
cfg.shader.attribute_offset = 0;
|
||||
cfg.shader.fau_count = DIV_ROUND_UP(
|
||||
batch->nr_push_uniforms[MESA_SHADER_FRAGMENT], 2);
|
||||
|
|
@ -1519,6 +1533,7 @@ csf_emit_fullscreen_dcd(struct panfrost_batch *batch,
|
|||
cfg.shader.shader = batch->rsd[MESA_SHADER_FRAGMENT];
|
||||
cfg.shader.thread_storage = batch->tls.gpu;
|
||||
cfg.shader.fau = batch->push_uniforms[MESA_SHADER_FRAGMENT];
|
||||
#endif
|
||||
}
|
||||
|
||||
return dcd;
|
||||
|
|
@ -1530,7 +1545,7 @@ GENX(csf_launch_draw_fullscreen)(struct panfrost_batch *batch,
|
|||
enum blitter_attrib_type type,
|
||||
const struct blitter_attrib *attrib)
|
||||
{
|
||||
#if PAN_ARCH == 10
|
||||
#if PAN_ARCH <= 12
|
||||
PAN_TRACE_FUNC(PAN_TRACE_GL_CSF);
|
||||
|
||||
struct cs_builder *b = batch->csf.cs.builder;
|
||||
|
|
|
|||
|
|
@ -1155,6 +1155,12 @@
|
|||
<value name="OQ" value="64"/>
|
||||
</enum>
|
||||
|
||||
<enum name="FULLSCREEN SR">
|
||||
<value name="TILER_CTX" value="40"/>
|
||||
<value name="SCISSOR_BOX" value="42"/>
|
||||
<value name="TILER_FLAGS" value="56"/>
|
||||
</enum>
|
||||
|
||||
<enum name="FRAGMENT SR">
|
||||
<value name="FBD_POINTER" value="40"/>
|
||||
<value name="BBOX_MIN" value="42"/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue