From c359a99e0a56616198554e9e74ddc14973db11a2 Mon Sep 17 00:00:00 2001 From: "Ward Nakchbandi (Cosmic Fusion)" <83735213+CosmicFusion@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:46:05 +0300 Subject: [PATCH] --- debian/changelog | 2 +- ...nnecessary_assertions_from_chaining..patch | 42 ----- ...GFX6_when_using_draw_indirect_multi..patch | 33 ---- ...B_BOs_(chaining)_by_default_on_GFX6..patch | 36 ----- ...mmand_buffers_on_GFX6_in_radv_queue..patch | 46 ------ ..._BUFFER_CIK_to_just_INDIRECT_BUFFER..patch | 153 ------------------ .../0006_radv:_Simplify_IB2_workaround..patch | 69 -------- ...2_workaround_from_mesh_shader_draws..patch | 34 ---- ...B2_workaround_on_all_indirect_draws..patch | 67 -------- ...override_vendorID_for_Cyberpunk_2077.patch | 94 ----------- ...mageCount_to_three_for_Path_of_Exile.patch | 39 ----- debian/patches/series | 15 -- ...llium-fix-build-failure-on-powerpcspe.diff | 0 {debian/patches => patches}/path_max.diff | 0 patches/revert-af1ee8e01044.diff | 153 ++++++++++++++++++ .../src_glx_dri_common.h.diff | 0 16 files changed, 154 insertions(+), 629 deletions(-) delete mode 100644 debian/patches/0001_radv_amdgpu:_Remove_unnecessary_assertions_from_chaining..patch delete mode 100644 debian/patches/0002_radv:_Disallow_IB2_on_GFX6_when_using_draw_indirect_multi..patch delete mode 100644 debian/patches/0003_radv:_Use_IB_BOs_(chaining)_by_default_on_GFX6..patch delete mode 100644 debian/patches/0004_radv:_Chain_command_buffers_on_GFX6_in_radv_queue..patch delete mode 100644 debian/patches/0005_amd:_Rename_INDIRECT_BUFFER_CIK_to_just_INDIRECT_BUFFER..patch delete mode 100644 debian/patches/0006_radv:_Simplify_IB2_workaround..patch delete mode 100644 debian/patches/0007_radv:_Remove_IB2_workaround_from_mesh_shader_draws..patch delete mode 100644 debian/patches/0008_radv:_Enable_IB2_workaround_on_all_indirect_draws..patch delete mode 100644 debian/patches/0009_anv:_override_vendorID_for_Cyberpunk_2077.patch delete mode 100644 debian/patches/0010_util_driconf:_pin_minImageCount_to_three_for_Path_of_Exile.patch delete mode 100644 debian/patches/series rename {debian/patches => patches}/07_gallium-fix-build-failure-on-powerpcspe.diff (100%) rename {debian/patches => patches}/path_max.diff (100%) create mode 100644 patches/revert-af1ee8e01044.diff rename {debian/patches => patches}/src_glx_dri_common.h.diff (100%) diff --git a/debian/changelog b/debian/changelog index 9d60cee..e316dfc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -mesa (23.1.9-100pika2) pikauwu; urgency=medium +mesa (23.2.1-100pika2) pikauwu; urgency=medium * Initial Release diff --git a/debian/patches/0001_radv_amdgpu:_Remove_unnecessary_assertions_from_chaining..patch b/debian/patches/0001_radv_amdgpu:_Remove_unnecessary_assertions_from_chaining..patch deleted file mode 100644 index 126ca45..0000000 --- a/debian/patches/0001_radv_amdgpu:_Remove_unnecessary_assertions_from_chaining..patch +++ /dev/null @@ -1,42 +0,0 @@ -From add3b34c171821804049084cf9d252a72cc54e2b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timur=20Krist=C3=B3f?= -Date: Tue, 11 Apr 2023 13:59:49 +0200 -Subject: radv/amdgpu: Remove unnecessary assertions from chaining. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -These used to guard against chaining on GFX6 and on HW IP types -that don't support chaining, but these things are now guarded -elsewhere and these assertions are no longer necessary. - -Signed-off-by: Timur Kristóf -Reviewed-by: Bas Nieuwenhuizen -Part-of: ---- - src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -index 7107fc0b896..1b8f9b86c34 100644 ---- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -@@ -482,7 +482,6 @@ radv_amdgpu_cs_unchain(struct radeon_cmdbuf *cs) - return; - - assert(cs->cdw <= cs->max_dw + 4); -- assert(get_nop_packet(acs) == PKT3_NOP_PAD); /* Other shouldn't chain. */ - - acs->chained_to = NULL; - cs->buf[cs->cdw - 4] = PKT3_NOP_PAD; -@@ -511,7 +510,6 @@ radv_amdgpu_cs_chain(struct radeon_cmdbuf *cs, struct radeon_cmdbuf *next_cs, bo - return false; - - assert(cs->cdw <= cs->max_dw + 4); -- assert(get_nop_packet(acs) == PKT3_NOP_PAD); /* Other shouldn't chain. */ - - acs->chained_to = next_acs; - --- -cgit v1.2.1 - diff --git a/debian/patches/0002_radv:_Disallow_IB2_on_GFX6_when_using_draw_indirect_multi..patch b/debian/patches/0002_radv:_Disallow_IB2_on_GFX6_when_using_draw_indirect_multi..patch deleted file mode 100644 index ffb06ef..0000000 --- a/debian/patches/0002_radv:_Disallow_IB2_on_GFX6_when_using_draw_indirect_multi..patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0e7244ce1848978022cb6f24683eb2cfdfd7fbbb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timur=20Krist=C3=B3f?= -Date: Tue, 11 Apr 2023 02:29:38 +0200 -Subject: radv: Disallow IB2 on GFX6 when using draw_indirect_multi. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -GFX6 has the same problem as GFX7 here. - -Signed-off-by: Timur Kristóf -Reviewed-by: Bas Nieuwenhuizen -Part-of: ---- - src/amd/vulkan/radv_cmd_buffer.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c -index 8eae45769ab..cb031b95173 100644 ---- a/src/amd/vulkan/radv_cmd_buffer.c -+++ b/src/amd/vulkan/radv_cmd_buffer.c -@@ -7498,7 +7498,7 @@ radv_CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCou - RADV_FROM_HANDLE(radv_cmd_buffer, secondary, pCmdBuffers[i]); - bool allow_ib2 = true; - -- if (secondary->device->physical_device->rad_info.gfx_level == GFX7 && -+ if (secondary->device->physical_device->rad_info.gfx_level <= GFX7 && - secondary->state.uses_draw_indirect_multi) { - /* Do not launch an IB2 for secondary command buffers that contain - * DRAW_{INDEX}_INDIRECT_MULTI on GFX7 because it's illegal and hang the GPU. --- -cgit v1.2.1 - diff --git a/debian/patches/0003_radv:_Use_IB_BOs_(chaining)_by_default_on_GFX6..patch b/debian/patches/0003_radv:_Use_IB_BOs_(chaining)_by_default_on_GFX6..patch deleted file mode 100644 index c08369d..0000000 --- a/debian/patches/0003_radv:_Use_IB_BOs_(chaining)_by_default_on_GFX6..patch +++ /dev/null @@ -1,36 +0,0 @@ -From d6518fd3571e315a7a7e62af5e1abbfdb3a3b97b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timur=20Krist=C3=B3f?= -Date: Tue, 11 Apr 2023 02:30:10 +0200 -Subject: radv: Use IB BOs (chaining) by default on GFX6. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -GFX6 supports IB chaining since the PFP firmware version 20. -Note that the very first amdgpu firmware for GFX6 already had -version 29, so we can assume that all GPUs supported by RADV -have this feature. - -Signed-off-by: Timur Kristóf -Reviewed-by: Bas Nieuwenhuizen -Part-of: ---- - src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c -index ec85e7249c4..c944d2d422e 100644 ---- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c -+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c -@@ -62,7 +62,7 @@ do_winsys_init(struct radv_amdgpu_winsys *ws, int fd) - ws->info.ip[AMD_IP_SDMA].num_queues = MIN2(ws->info.ip[AMD_IP_SDMA].num_queues, MAX_RINGS_PER_TYPE); - ws->info.ip[AMD_IP_COMPUTE].num_queues = MIN2(ws->info.ip[AMD_IP_COMPUTE].num_queues, MAX_RINGS_PER_TYPE); - -- ws->use_ib_bos = ws->info.gfx_level >= GFX7; -+ ws->use_ib_bos = true; - return true; - } - --- -cgit v1.2.1 - diff --git a/debian/patches/0004_radv:_Chain_command_buffers_on_GFX6_in_radv_queue..patch b/debian/patches/0004_radv:_Chain_command_buffers_on_GFX6_in_radv_queue..patch deleted file mode 100644 index ad64730..0000000 --- a/debian/patches/0004_radv:_Chain_command_buffers_on_GFX6_in_radv_queue..patch +++ /dev/null @@ -1,46 +0,0 @@ -From 7ddac41f3f5919be748143d8a570cc3b1f4ed27c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timur=20Krist=C3=B3f?= -Date: Tue, 11 Apr 2023 02:31:28 +0200 -Subject: radv: Chain command buffers on GFX6 in radv_queue. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Also don't check whether chaining is enabled in radv_queue, the -winsys will take care of that anyway. - -Signed-off-by: Timur Kristóf -Reviewed-by: Bas Nieuwenhuizen -Part-of: ---- - src/amd/vulkan/radv_queue.c | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/src/amd/vulkan/radv_queue.c b/src/amd/vulkan/radv_queue.c -index 0823e545a19..e00d448ed18 100644 ---- a/src/amd/vulkan/radv_queue.c -+++ b/src/amd/vulkan/radv_queue.c -@@ -1693,9 +1693,6 @@ radv_queue_submit_normal(struct radv_queue *queue, struct vk_queue_submit *submi - .uses_shadow_regs = queue->state.uses_shadow_regs, - }; - -- const bool chaining_en = !(queue->device->instance->debug_flags & RADV_DEBUG_NO_IBS) && -- queue->device->physical_device->rad_info.gfx_level >= GFX7; -- - for (uint32_t j = 0, advance; j < cmd_buffer_count; j += advance) { - advance = MIN2(max_cs_submission, cmd_buffer_count - j); - const bool last_submit = j + advance == cmd_buffer_count; -@@ -1714,8 +1711,8 @@ radv_queue_submit_normal(struct radv_queue *queue, struct vk_queue_submit *submi - struct radv_cmd_buffer *cmd_buffer = - (struct radv_cmd_buffer *)submission->command_buffers[j + c]; - assert(cmd_buffer->vk.level == VK_COMMAND_BUFFER_LEVEL_PRIMARY); -- const bool can_chain_next = chaining_en && !(cmd_buffer->usage_flags & -- VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT); -+ const bool can_chain_next = -+ !(cmd_buffer->usage_flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT); - - /* ACE needs to be first because the last CS must match the queue's IP type. */ - if (radv_cmd_buffer_needs_ace(cmd_buffer)) { --- -cgit v1.2.1 - diff --git a/debian/patches/0005_amd:_Rename_INDIRECT_BUFFER_CIK_to_just_INDIRECT_BUFFER..patch b/debian/patches/0005_amd:_Rename_INDIRECT_BUFFER_CIK_to_just_INDIRECT_BUFFER..patch deleted file mode 100644 index 0019983..0000000 --- a/debian/patches/0005_amd:_Rename_INDIRECT_BUFFER_CIK_to_just_INDIRECT_BUFFER..patch +++ /dev/null @@ -1,153 +0,0 @@ -From 948a122f300b3df036fea1a8e14301295062e360 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timur=20Krist=C3=B3f?= -Date: Thu, 13 Apr 2023 17:23:40 +0200 -Subject: amd: Rename INDIRECT_BUFFER_CIK to just INDIRECT_BUFFER. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This packet is supported on GFX6 too, its name should relect that. - -Signed-off-by: Timur Kristóf -Reviewed-by: Bas Nieuwenhuizen -Part-of: ---- - src/amd/common/ac_debug.c | 2 +- - src/amd/common/sid.h | 2 +- - src/amd/vulkan/radv_cmd_buffer.c | 6 +++--- - src/amd/vulkan/radv_cp_reg_shadowing.c | 2 +- - src/amd/vulkan/radv_queue.c | 2 +- - src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 6 +++--- - src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 2 +- - 7 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/src/amd/common/ac_debug.c b/src/amd/common/ac_debug.c -index 9c0d9436f48..3503ff23f5c 100644 ---- a/src/amd/common/ac_debug.c -+++ b/src/amd/common/ac_debug.c -@@ -449,7 +449,7 @@ static void ac_parse_packet3(FILE *f, uint32_t header, struct ac_ib_parser *ib, - break; - case PKT3_INDIRECT_BUFFER_SI: - case PKT3_INDIRECT_BUFFER_CONST: -- case PKT3_INDIRECT_BUFFER_CIK: { -+ case PKT3_INDIRECT_BUFFER: { - uint32_t base_lo_dw = ac_ib_get(ib); - ac_dump_reg(f, ib->gfx_level, ib->family, R_3F0_IB_BASE_LO, base_lo_dw, ~0); - uint32_t base_hi_dw = ac_ib_get(ib); -diff --git a/src/amd/common/sid.h b/src/amd/common/sid.h -index 5bc60316c82..0c860c1acbd 100644 ---- a/src/amd/common/sid.h -+++ b/src/amd/common/sid.h -@@ -132,7 +132,7 @@ - #define WAIT_REG_MEM_MEM_SPACE(x) (((unsigned)(x)&0x3) << 4) - #define WAIT_REG_MEM_PFP (1 << 8) - #define PKT3_MEM_WRITE 0x3D /* GFX6 only */ --#define PKT3_INDIRECT_BUFFER_CIK 0x3F /* GFX7+ */ -+#define PKT3_INDIRECT_BUFFER 0x3F /* GFX6+ */ - #define PKT3_COPY_DATA 0x40 - #define COPY_DATA_SRC_SEL(x) ((x)&0xf) - #define COPY_DATA_REG 0 -diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c -index cb031b95173..343cd6ca9f8 100644 ---- a/src/amd/vulkan/radv_cmd_buffer.c -+++ b/src/amd/vulkan/radv_cmd_buffer.c -@@ -9509,7 +9509,7 @@ radv_CmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPre - return; - - /* Secondary command buffers are needed for the full extension but can't use -- * PKT3_INDIRECT_BUFFER_CIK. -+ * PKT3_INDIRECT_BUFFER. - */ - assert(cmd_buffer->vk.level == VK_COMMAND_BUFFER_LEVEL_PRIMARY); - -@@ -9539,7 +9539,7 @@ radv_CmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPre - radeon_emit(cmd_buffer->cs, 0); - - if (!view_mask) { -- radeon_emit(cmd_buffer->cs, PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0)); -+ radeon_emit(cmd_buffer->cs, PKT3(PKT3_INDIRECT_BUFFER, 2, 0)); - radeon_emit(cmd_buffer->cs, va); - radeon_emit(cmd_buffer->cs, va >> 32); - radeon_emit(cmd_buffer->cs, cmdbuf_size >> 2); -@@ -9547,7 +9547,7 @@ radv_CmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPre - u_foreach_bit (view, view_mask) { - radv_emit_view_index(cmd_buffer, view); - -- radeon_emit(cmd_buffer->cs, PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0)); -+ radeon_emit(cmd_buffer->cs, PKT3(PKT3_INDIRECT_BUFFER, 2, 0)); - radeon_emit(cmd_buffer->cs, va); - radeon_emit(cmd_buffer->cs, va >> 32); - radeon_emit(cmd_buffer->cs, cmdbuf_size >> 2); -diff --git a/src/amd/vulkan/radv_cp_reg_shadowing.c b/src/amd/vulkan/radv_cp_reg_shadowing.c -index 3f46b7c1619..dac9411c03b 100644 ---- a/src/amd/vulkan/radv_cp_reg_shadowing.c -+++ b/src/amd/vulkan/radv_cp_reg_shadowing.c -@@ -112,7 +112,7 @@ radv_emit_shadow_regs_preamble(struct radeon_cmdbuf *cs, const struct radv_devic - struct radv_queue_state *queue_state) - { - uint64_t va = radv_buffer_get_va(queue_state->shadow_regs_ib); -- radeon_emit(cs, PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0)); -+ radeon_emit(cs, PKT3(PKT3_INDIRECT_BUFFER, 2, 0)); - radeon_emit(cs, va); - radeon_emit(cs, va >> 32); - radeon_emit(cs, queue_state->shadow_regs_ib_size_dw & 0xffff); -diff --git a/src/amd/vulkan/radv_queue.c b/src/amd/vulkan/radv_queue.c -index e00d448ed18..b28797547be 100644 ---- a/src/amd/vulkan/radv_queue.c -+++ b/src/amd/vulkan/radv_queue.c -@@ -828,7 +828,7 @@ radv_init_graphics_state(struct radeon_cmdbuf *cs, struct radv_device *device) - if (device->gfx_init) { - uint64_t va = radv_buffer_get_va(device->gfx_init); - -- radeon_emit(cs, PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0)); -+ radeon_emit(cs, PKT3(PKT3_INDIRECT_BUFFER, 2, 0)); - radeon_emit(cs, va); - radeon_emit(cs, va >> 32); - radeon_emit(cs, device->gfx_init_size_dw & 0xffff); -diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -index 1b8f9b86c34..1caa359ebe6 100644 ---- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -@@ -372,7 +372,7 @@ radv_amdgpu_cs_grow(struct radeon_cmdbuf *_cs, size_t min_size) - cs->ws->base.cs_add_buffer(&cs->base, cs->ib_buffer); - - if (cs->use_ib) { -- radeon_emit(&cs->base, PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0)); -+ radeon_emit(&cs->base, PKT3(PKT3_INDIRECT_BUFFER, 2, 0)); - radeon_emit(&cs->base, radv_amdgpu_winsys_bo(cs->ib_buffer)->base.va); - radeon_emit(&cs->base, radv_amdgpu_winsys_bo(cs->ib_buffer)->base.va >> 32); - radeon_emit(&cs->base, S_3F2_CHAIN(1) | S_3F2_VALID(1)); -@@ -513,7 +513,7 @@ radv_amdgpu_cs_chain(struct radeon_cmdbuf *cs, struct radeon_cmdbuf *next_cs, bo - - acs->chained_to = next_acs; - -- cs->buf[cs->cdw - 4] = PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0); -+ cs->buf[cs->cdw - 4] = PKT3(PKT3_INDIRECT_BUFFER, 2, 0); - cs->buf[cs->cdw - 3] = next_acs->ib.ib_mc_address; - cs->buf[cs->cdw - 2] = next_acs->ib.ib_mc_address >> 32; - cs->buf[cs->cdw - 1] = -@@ -667,7 +667,7 @@ radv_amdgpu_cs_execute_secondary(struct radeon_cmdbuf *_parent, struct radeon_cm - radv_amdgpu_cs_grow(&parent->base, 4); - - /* Not setting the CHAIN bit will launch an IB2. */ -- radeon_emit(&parent->base, PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0)); -+ radeon_emit(&parent->base, PKT3(PKT3_INDIRECT_BUFFER, 2, 0)); - radeon_emit(&parent->base, child->ib.ib_mc_address); - radeon_emit(&parent->base, child->ib.ib_mc_address >> 32); - radeon_emit(&parent->base, child->ib.size); -diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c -index 8ecd79df109..8916002cad4 100644 ---- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c -+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c -@@ -1148,7 +1148,7 @@ static bool amdgpu_cs_check_space(struct radeon_cmdbuf *rcs, unsigned dw) - while ((rcs->current.cdw & ib_pad_dw_mask) != ib_pad_dw_mask - 3) - radeon_emit(rcs, PKT3_NOP_PAD); - -- radeon_emit(rcs, PKT3(PKT3_INDIRECT_BUFFER_CIK, 2, 0)); -+ radeon_emit(rcs, PKT3(PKT3_INDIRECT_BUFFER, 2, 0)); - radeon_emit(rcs, va); - radeon_emit(rcs, va >> 32); - uint32_t *new_ptr_ib_size = &rcs->current.buf[rcs->current.cdw++]; --- -cgit v1.2.1 - diff --git a/debian/patches/0006_radv:_Simplify_IB2_workaround..patch b/debian/patches/0006_radv:_Simplify_IB2_workaround..patch deleted file mode 100644 index 5f8462f..0000000 --- a/debian/patches/0006_radv:_Simplify_IB2_workaround..patch +++ /dev/null @@ -1,69 +0,0 @@ -From d16d9ef34550da313bbb45e5782136d6bb3b5964 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timur=20Krist=C3=B3f?= -Date: Mon, 17 Apr 2023 16:13:16 +0200 -Subject: radv: Simplify IB2 workaround. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Move compute IB2 check to the winsys, because IB2 only works on -GFX queues and not any other queue types. - -Then, simplify the workaround condition in the cmd buffer. - -Signed-off-by: Timur Kristóf -Reviewed-by: Tatsuyuki Ishi -Reviewed-by: Samuel Pitoiset -Part-of: ---- - src/amd/vulkan/radv_cmd_buffer.c | 19 ++++++------------- - src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 2 +- - 2 files changed, 7 insertions(+), 14 deletions(-) - -diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c -index 5cc066e7e65..6de52df3ef7 100644 ---- a/src/amd/vulkan/radv_cmd_buffer.c -+++ b/src/amd/vulkan/radv_cmd_buffer.c -@@ -7503,20 +7503,13 @@ radv_CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCou - - for (uint32_t i = 0; i < commandBufferCount; i++) { - RADV_FROM_HANDLE(radv_cmd_buffer, secondary, pCmdBuffers[i]); -- bool allow_ib2 = true; - -- if (secondary->device->physical_device->rad_info.gfx_level <= GFX7 && -- secondary->state.uses_draw_indirect_multi) { -- /* Do not launch an IB2 for secondary command buffers that contain -- * DRAW_{INDEX}_INDIRECT_MULTI on GFX7 because it's illegal and hang the GPU. -- */ -- allow_ib2 = false; -- } -- -- if (secondary->qf == RADV_QUEUE_COMPUTE) { -- /* IB2 packets are not supported on compute queues according to PAL. */ -- allow_ib2 = false; -- } -+ /* Do not launch an IB2 for secondary command buffers that contain -+ * DRAW_{INDEX}_INDIRECT_MULTI on GFX7 because it's illegal and hang the GPU. -+ */ -+ const bool allow_ib2 = -+ !secondary->state.uses_draw_indirect_multi || -+ secondary->device->physical_device->rad_info.gfx_level >= GFX8; - - primary->scratch_size_per_wave_needed = - MAX2(primary->scratch_size_per_wave_needed, secondary->scratch_size_per_wave_needed); -diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -index 1b007557571..ee2108bc4a4 100644 ---- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -@@ -648,7 +648,7 @@ radv_amdgpu_cs_execute_secondary(struct radeon_cmdbuf *_parent, struct radeon_cm - struct radv_amdgpu_cs *parent = radv_amdgpu_cs(_parent); - struct radv_amdgpu_cs *child = radv_amdgpu_cs(_child); - struct radv_amdgpu_winsys *ws = parent->ws; -- bool use_ib2 = parent->use_ib && allow_ib2; -+ const bool use_ib2 = parent->use_ib && allow_ib2 && parent->hw_ip == AMD_IP_GFX; - - if (parent->status != VK_SUCCESS || child->status != VK_SUCCESS) - return; --- -cgit v1.2.1 - diff --git a/debian/patches/0007_radv:_Remove_IB2_workaround_from_mesh_shader_draws..patch b/debian/patches/0007_radv:_Remove_IB2_workaround_from_mesh_shader_draws..patch deleted file mode 100644 index 8934191..0000000 --- a/debian/patches/0007_radv:_Remove_IB2_workaround_from_mesh_shader_draws..patch +++ /dev/null @@ -1,34 +0,0 @@ -From 46a14390d8bcb7e91620f94f9d7bde2dc449190d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timur=20Krist=C3=B3f?= -Date: Tue, 18 Apr 2023 12:56:04 +0200 -Subject: radv: Remove IB2 workaround from mesh shader draws. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The GPUs which need the workaround do not support mesh shaders. - -Signed-off-by: Timur Kristóf -Reviewed-by: Tatsuyuki Ishi -Reviewed-by: Samuel Pitoiset -Part-of: ---- - src/amd/vulkan/radv_cmd_buffer.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c -index 6de52df3ef7..e85e1fd9544 100644 ---- a/src/amd/vulkan/radv_cmd_buffer.c -+++ b/src/amd/vulkan/radv_cmd_buffer.c -@@ -8115,8 +8115,6 @@ radv_cs_emit_indirect_mesh_draw_packet(struct radv_cmd_buffer *cmd_buffer, uint3 - radeon_emit(cs, count_va >> 32); - radeon_emit(cs, stride); - radeon_emit(cs, V_0287F0_DI_SRC_SEL_AUTO_INDEX); -- -- cmd_buffer->state.uses_draw_indirect_multi = true; - } - - ALWAYS_INLINE static void --- -cgit v1.2.1 - diff --git a/debian/patches/0008_radv:_Enable_IB2_workaround_on_all_indirect_draws..patch b/debian/patches/0008_radv:_Enable_IB2_workaround_on_all_indirect_draws..patch deleted file mode 100644 index 362396b..0000000 --- a/debian/patches/0008_radv:_Enable_IB2_workaround_on_all_indirect_draws..patch +++ /dev/null @@ -1,67 +0,0 @@ -From acce5c3fe1fa2930adb6cdc152f3c371b1d24290 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timur=20Krist=C3=B3f?= -Date: Tue, 18 Apr 2023 12:59:33 +0200 -Subject: radv: Enable IB2 workaround on all indirect draws. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -IB2 packets hang GFX6 when they contain any indirect draws, -not just the MULTI versions. - -Signed-off-by: Timur Kristóf -Reviewed-by: Tatsuyuki Ishi -Reviewed-by: Samuel Pitoiset -Part-of: ---- - src/amd/vulkan/radv_cmd_buffer.c | 8 ++++---- - src/amd/vulkan/radv_private.h | 4 ++-- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c -index e85e1fd9544..541454c8f2d 100644 ---- a/src/amd/vulkan/radv_cmd_buffer.c -+++ b/src/amd/vulkan/radv_cmd_buffer.c -@@ -7505,10 +7505,10 @@ radv_CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCou - RADV_FROM_HANDLE(radv_cmd_buffer, secondary, pCmdBuffers[i]); - - /* Do not launch an IB2 for secondary command buffers that contain -- * DRAW_{INDEX}_INDIRECT_MULTI on GFX7 because it's illegal and hang the GPU. -+ * DRAW_{INDEX}_INDIRECT_{MULTI} on GFX6-7 because it's illegal and hangs the GPU. - */ - const bool allow_ib2 = -- !secondary->state.uses_draw_indirect_multi || -+ !secondary->state.uses_draw_indirect || - secondary->device->physical_device->rad_info.gfx_level >= GFX8; - - primary->scratch_size_per_wave_needed = -@@ -8073,9 +8073,9 @@ radv_cs_emit_indirect_draw_packet(struct radv_cmd_buffer *cmd_buffer, bool index - radeon_emit(cs, count_va >> 32); - radeon_emit(cs, stride); /* stride */ - radeon_emit(cs, di_src_sel); -- -- cmd_buffer->state.uses_draw_indirect_multi = true; - } -+ -+ cmd_buffer->state.uses_draw_indirect = true; - } - - ALWAYS_INLINE static void -diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h -index f0fea917c91..981d6694254 100644 ---- a/src/amd/vulkan/radv_private.h -+++ b/src/amd/vulkan/radv_private.h -@@ -1657,8 +1657,8 @@ struct radv_cmd_state { - - uint8_t cb_mip[MAX_RTS]; - -- /* Whether DRAW_{INDEX}_INDIRECT_MULTI is emitted. */ -- bool uses_draw_indirect_multi; -+ /* Whether DRAW_{INDEX}_INDIRECT_{MULTI} is emitted. */ -+ bool uses_draw_indirect; - - uint32_t rt_stack_size; - --- -cgit v1.2.1 - diff --git a/debian/patches/0009_anv:_override_vendorID_for_Cyberpunk_2077.patch b/debian/patches/0009_anv:_override_vendorID_for_Cyberpunk_2077.patch deleted file mode 100644 index ed8159f..0000000 --- a/debian/patches/0009_anv:_override_vendorID_for_Cyberpunk_2077.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 5731ebac404a142fb1c1d1f0755d22beed40528a Mon Sep 17 00:00:00 2001 -From: Felix DeGrood -Date: Mon, 15 May 2023 22:44:45 +0000 -Subject: anv: override vendorID for Cyberpunk 2077 - -A recent update to Cyberpunk 2077 enables XeSS code for Intel GPUs -which is causing the game to crash in the XeSS libraries. As a -temporary work around, stop identifying as Intel for Cyberpunk so -XeSS falls back to the cross-vendor path. - -References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8860 -Reviewed-by: Kenneth Graunke -Reviewed-by: Lionel Landwerlin -Part-of: ---- - src/intel/vulkan/anv_device.c | 5 +++++ - src/intel/vulkan/anv_private.h | 1 + - src/util/00-mesa-defaults.conf | 3 +++ - src/util/driconf.h | 3 +++ - 4 files changed, 12 insertions(+) - -diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c -index 44a591531c0..da9e05b9ced 100644 ---- a/src/intel/vulkan/anv_device.c -+++ b/src/intel/vulkan/anv_device.c -@@ -85,6 +85,7 @@ static const driOptionDescription anv_dri_options[] = { - DRI_CONF_VK_WSI_FORCE_BGRA8_UNORM_FIRST(false) - DRI_CONF_LIMIT_TRIG_INPUT_RANGE(false) - DRI_CONF_ANV_MESH_CONV_PRIM_ATTRS_TO_VERT_ATTRS(-2) -+ DRI_CONF_FORCE_VK_VENDOR(0) - DRI_CONF_SECTION_END - - DRI_CONF_SECTION_QUALITY -@@ -1500,6 +1501,8 @@ anv_init_dri_options(struct anv_instance *instance) - driQueryOptioni(&instance->dri_options, "generated_indirect_threshold"); - instance->query_clear_with_blorp_threshold = - driQueryOptioni(&instance->dri_options, "query_clear_with_blorp_threshold"); -+ instance->force_vk_vendor = -+ driQueryOptioni(&instance->dri_options, "force_vk_vendor"); - } - - VkResult anv_CreateInstance( -@@ -1749,6 +1752,8 @@ void anv_GetPhysicalDeviceProperties( - .sparseProperties = {0}, /* Broadwell doesn't do sparse. */ - }; - -+ if (unlikely(pdevice->instance->force_vk_vendor)) -+ pProperties->vendorID = pdevice->instance->force_vk_vendor; - snprintf(pProperties->deviceName, sizeof(pProperties->deviceName), - "%s", pdevice->info.name); - memcpy(pProperties->pipelineCacheUUID, -diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h -index 8c4099e3b7b..b6401c44782 100644 ---- a/src/intel/vulkan/anv_private.h -+++ b/src/intel/vulkan/anv_private.h -@@ -1037,6 +1037,7 @@ struct anv_instance { - float lower_depth_range_rate; - unsigned generated_indirect_threshold; - unsigned query_clear_with_blorp_threshold; -+ unsigned force_vk_vendor; - - /* HW workarounds */ - bool no_16bit; -diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf -index b5f8b233a7d..a58831bc304 100644 ---- a/src/util/00-mesa-defaults.conf -+++ b/src/util/00-mesa-defaults.conf -@@ -1056,6 +1056,9 @@ TODO: document the other workarounds. - - -+ -+ - -