Skip to content

Commit

Permalink
vkd3d: Add workaround for CP77 RT accessing heap out of bounds.
Browse files Browse the repository at this point in the history
Signed-off-by: Hans-Kristian Arntzen <[email protected]>
  • Loading branch information
HansKristian-Work committed Nov 20, 2023
1 parent a77e8cf commit e787b08
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libs/vkd3d/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,15 @@ static const struct vkd3d_shader_quirk_info witcher3_quirks = {
witcher3_hashes, ARRAY_SIZE(witcher3_hashes), 0,
};

static const struct vkd3d_shader_quirk_hash cp77_hashes[] = {
/* Shader accesses descriptor heap out of bounds spuriously, causing GPU hang on RADV. */
{ 0x55540466536c9e11, VKD3D_SHADER_QUIRK_DESCRIPTOR_HEAP_ROBUSTNESS },
};

static const struct vkd3d_shader_quirk_info cp77_quirks = {
cp77_hashes, ARRAY_SIZE(cp77_hashes), 0,
};

static const struct vkd3d_shader_quirk_meta application_shader_quirks[] = {
/* F1 2020 (1080110) */
{ VKD3D_STRING_COMPARE_EXACT, "F1_2020_dx12.exe", &f1_2019_2020_quirks },
Expand All @@ -658,6 +667,8 @@ static const struct vkd3d_shader_quirk_meta application_shader_quirks[] = {
{ VKD3D_STRING_COMPARE_EXACT, "MonsterHunterRise.exe", &mhr_quirks },
/* Witcher 3 (2023) (292030) */
{ VKD3D_STRING_COMPARE_EXACT, "witcher3.exe", &witcher3_quirks },
/* Cyberpunk 2077 (1091500). */
{ VKD3D_STRING_COMPARE_EXACT, "Cyberpunk2077.exe", &cp77_quirks },
/* Unreal Engine 4 */
{ VKD3D_STRING_COMPARE_ENDS_WITH, "-Shipping.exe", &ue4_quirks },
/* MSVC fails to compile empty array. */
Expand Down

0 comments on commit e787b08

Please sign in to comment.