mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 18:10:11 +01:00
radv: do not report wave32 in gl_SubgroupSize for Doom Dark Ages
The shaders in question use: (memory_load + (gl_SubgroupSize - 1)) & ~(gl_SubgroupSize - 1) My guess is that this is supposed to be the subgroup size of whatever produced the value, not the subgroup size in this shader. And because in the consumer the workgroup size is 32, we use wave32. Fixes:a2d3cbac2a("radv: determine subgroup/wave size early") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14187 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> (cherry picked from commit83e9ae2d5c) Conflicts: src/amd/vulkan/radv_instance.c src/amd/vulkan/radv_instance.h src/util/driconf.h Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38268>
This commit is contained in:
parent
4482281292
commit
7d4557bae8
8 changed files with 17 additions and 2 deletions
|
|
@ -14,7 +14,7 @@
|
||||||
"description": "radv: do not report wave32 in gl_SubgroupSize for Doom Dark Ages",
|
"description": "radv: do not report wave32 in gl_SubgroupSize for Doom Dark Ages",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 2,
|
"nomination_type": 2,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "a2d3cbac2a1b9bae50c80a5b512e8633a65f0d57",
|
"because_sha": "a2d3cbac2a1b9bae50c80a5b512e8633a65f0d57",
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,7 @@ static const driOptionDescription radv_dri_options[] = {
|
||||||
DRI_CONF_RADV_EMULATE_RT(false)
|
DRI_CONF_RADV_EMULATE_RT(false)
|
||||||
DRI_CONF_RADV_ENABLE_FLOAT16_GFX8(false)
|
DRI_CONF_RADV_ENABLE_FLOAT16_GFX8(false)
|
||||||
DRI_CONF_RADV_COOPERATIVE_MATRIX2_NV(false)
|
DRI_CONF_RADV_COOPERATIVE_MATRIX2_NV(false)
|
||||||
|
DRI_CONF_RADV_NO_IMPLICIT_VARYING_SUBGROUP_SIZE(false)
|
||||||
DRI_CONF_SECTION_END
|
DRI_CONF_SECTION_END
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
@ -236,6 +237,8 @@ radv_init_dri_debug_options(struct radv_instance *instance)
|
||||||
drirc->debug.ssbo_non_uniform = driQueryOptionb(&drirc->options, "radv_ssbo_non_uniform");
|
drirc->debug.ssbo_non_uniform = driQueryOptionb(&drirc->options, "radv_ssbo_non_uniform");
|
||||||
drirc->debug.tex_non_uniform = driQueryOptionb(&drirc->options, "radv_tex_non_uniform");
|
drirc->debug.tex_non_uniform = driQueryOptionb(&drirc->options, "radv_tex_non_uniform");
|
||||||
drirc->debug.zero_vram = driQueryOptionb(&drirc->options, "radv_zero_vram");
|
drirc->debug.zero_vram = driQueryOptionb(&drirc->options, "radv_zero_vram");
|
||||||
|
drirc->debug.no_implicit_varying_subgroup_size =
|
||||||
|
driQueryOptionb(&drirc->options, "radv_no_implicit_varying_subgroup_size");
|
||||||
drirc->debug.app_layer = driQueryOptionstr(&drirc->options, "radv_app_layer");
|
drirc->debug.app_layer = driQueryOptionstr(&drirc->options, "radv_app_layer");
|
||||||
|
|
||||||
drirc->debug.override_uniform_offset_alignment =
|
drirc->debug.override_uniform_offset_alignment =
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ struct radv_drirc {
|
||||||
bool ssbo_non_uniform;
|
bool ssbo_non_uniform;
|
||||||
bool tex_non_uniform;
|
bool tex_non_uniform;
|
||||||
bool zero_vram;
|
bool zero_vram;
|
||||||
|
bool no_implicit_varying_subgroup_size;
|
||||||
char *app_layer;
|
char *app_layer;
|
||||||
int override_uniform_offset_alignment;
|
int override_uniform_offset_alignment;
|
||||||
} debug;
|
} debug;
|
||||||
|
|
|
||||||
|
|
@ -252,6 +252,7 @@ radv_physical_device_init_cache_key(struct radv_physical_device *pdev)
|
||||||
key->use_llvm = pdev->use_llvm;
|
key->use_llvm = pdev->use_llvm;
|
||||||
key->use_ngg = pdev->use_ngg;
|
key->use_ngg = pdev->use_ngg;
|
||||||
key->use_ngg_culling = pdev->use_ngg_culling;
|
key->use_ngg_culling = pdev->use_ngg_culling;
|
||||||
|
key->no_implicit_varying_subgroup_size = instance->drirc.debug.no_implicit_varying_subgroup_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,9 @@ struct radv_physical_device_cache_key {
|
||||||
uint32_t use_llvm : 1;
|
uint32_t use_llvm : 1;
|
||||||
uint32_t use_ngg : 1;
|
uint32_t use_ngg : 1;
|
||||||
uint32_t use_ngg_culling : 1;
|
uint32_t use_ngg_culling : 1;
|
||||||
|
uint32_t no_implicit_varying_subgroup_size : 1;
|
||||||
|
|
||||||
uint32_t reserved : 10;
|
uint32_t reserved : 9;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum radv_video_enc_hw_ver {
|
enum radv_video_enc_hw_ver {
|
||||||
|
|
|
||||||
|
|
@ -367,6 +367,10 @@ radv_shader_choose_subgroup_size(struct radv_device *device, nir_shader *nir,
|
||||||
.requiredSubgroupSize = stage_key->subgroup_required_size * 32,
|
.requiredSubgroupSize = stage_key->subgroup_required_size * 32,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Do not allow for the SPIR-V 1.6 varying subgroup size rules. */
|
||||||
|
if (pdev->cache_key.no_implicit_varying_subgroup_size)
|
||||||
|
spirv_version = 0x10000;
|
||||||
|
|
||||||
vk_set_subgroup_size(&device->vk, nir, spirv_version, rss_info.requiredSubgroupSize ? &rss_info : NULL,
|
vk_set_subgroup_size(&device->vk, nir, spirv_version, rss_info.requiredSubgroupSize ? &rss_info : NULL,
|
||||||
stage_key->subgroup_allow_varying, stage_key->subgroup_require_full);
|
stage_key->subgroup_allow_varying, stage_key->subgroup_require_full);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ Application bugs worked around in this file:
|
||||||
<application name="DOOM: The Dark Ages" application_name_match="DOOMTheDarkAges">
|
<application name="DOOM: The Dark Ages" application_name_match="DOOMTheDarkAges">
|
||||||
<option name="radv_zero_vram" value="true" />
|
<option name="radv_zero_vram" value="true" />
|
||||||
<option name="radv_disable_dcc_stores" value="true" />
|
<option name="radv_disable_dcc_stores" value="true" />
|
||||||
|
<option name="radv_no_implicit_varying_subgroup_size" value="true" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
<application name="Wolfenstein II" application_name_match="Wolfenstein II The New Colossus">
|
<application name="Wolfenstein II" application_name_match="Wolfenstein II The New Colossus">
|
||||||
|
|
|
||||||
|
|
@ -759,6 +759,10 @@
|
||||||
DRI_CONF_OPT_B(radv_rt_wave64, def, \
|
DRI_CONF_OPT_B(radv_rt_wave64, def, \
|
||||||
"Force wave64 in RT shaders")
|
"Force wave64 in RT shaders")
|
||||||
|
|
||||||
|
#define DRI_CONF_RADV_NO_IMPLICIT_VARYING_SUBGROUP_SIZE(def) \
|
||||||
|
DRI_CONF_OPT_B(radv_no_implicit_varying_subgroup_size, def, \
|
||||||
|
"Do not assume VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE for SPIR-V 1.6.")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides for forcing re-compilation of pipelines when RADV_BUILD_ID_OVERRIDE is enabled.
|
* Overrides for forcing re-compilation of pipelines when RADV_BUILD_ID_OVERRIDE is enabled.
|
||||||
* These need to be bumped every time a compiler bugfix is backported (up to 8 shader
|
* These need to be bumped every time a compiler bugfix is backported (up to 8 shader
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue