mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 13:10:25 +01:00
panvk/csf: Stop calling blend_emit_descs() with no FS
This is what the JM code is doing and it lets us assume we always have a
fragment shader. Right now, we're already making that assumption, we
just haven't been bitten by it yet because no one has tried to use a
shader-requiring blend configuration with no FS yet.
Cc: mesa-stable
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
(cherry picked from commit 9cab0c4bf0)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39462>
This commit is contained in:
parent
aac49e31f1
commit
cdc1a74977
3 changed files with 14 additions and 3 deletions
|
|
@ -554,7 +554,7 @@
|
|||
"description": "panvk/csf: Stop calling blend_emit_descs() with no FS",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -655,6 +655,8 @@ prepare_blend(struct panvk_cmd_buffer *cmdbuf)
|
|||
if (!dirty)
|
||||
return VK_SUCCESS;
|
||||
|
||||
const struct panvk_shader_variant *fs =
|
||||
panvk_shader_only_variant(get_fs(cmdbuf));
|
||||
uint32_t bd_count = MAX2(cmdbuf->state.gfx.render.fb.info.rt_count, 1);
|
||||
struct cs_builder *b =
|
||||
panvk_get_cs_builder(cmdbuf, PANVK_SUBQUEUE_VERTEX_TILER);
|
||||
|
|
@ -664,7 +666,16 @@ prepare_blend(struct panvk_cmd_buffer *cmdbuf)
|
|||
if (bd_count && !ptr.gpu)
|
||||
return VK_ERROR_OUT_OF_DEVICE_MEMORY;
|
||||
|
||||
panvk_per_arch(blend_emit_descs)(cmdbuf, bds);
|
||||
if (fs) {
|
||||
panvk_per_arch(blend_emit_descs)(cmdbuf, bds);
|
||||
} else {
|
||||
for (unsigned i = 0; i < bd_count; i++) {
|
||||
pan_pack(&bds[i], BLEND, cfg) {
|
||||
cfg.enable = false;
|
||||
cfg.internal.mode = MALI_BLEND_MODE_OFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cs_update_vt_ctx(b)
|
||||
cs_move64_to(b, cs_sr_reg64(b, IDVS, BLEND_DESC), ptr.gpu | bd_count);
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ panvk_per_arch(blend_emit_descs)(struct panvk_cmd_buffer *cmdbuf,
|
|||
const struct vk_color_attachment_location_state *cal = &dyns->cal;
|
||||
const struct panvk_shader_variant *fs =
|
||||
panvk_shader_only_variant(cmdbuf->state.gfx.fs.shader);
|
||||
const struct pan_shader_info *fs_info = fs ? &fs->info : NULL;
|
||||
const struct pan_shader_info *fs_info = &fs->info;
|
||||
uint64_t fs_code = panvk_shader_variant_get_dev_addr(fs);
|
||||
const struct panvk_rendering_state *render = &cmdbuf->state.gfx.render;
|
||||
const VkFormat *color_attachment_formats = render->color_attachments.fmts;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue