radv: allow DGC+multiview by default
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

It's now allowed in Vulkan.

Fixes: e47d584fed ("radv: re-introduce DGC+multiview support and enable it for vkd3d-proton only")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41395>
This commit is contained in:
Samuel Pitoiset 2026-05-06 16:34:44 +02:00 committed by Marge Bot
parent ce4e54f7a0
commit 470897f946
5 changed files with 1 additions and 18 deletions

View file

@ -13811,8 +13811,6 @@ radv_CmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPr
VK_FROM_HANDLE(radv_indirect_execution_set, ies, pGeneratedCommandsInfo->indirectExecutionSet);
VK_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
const struct radv_device *device = radv_cmd_buffer_device(cmd_buffer);
const struct radv_physical_device *pdev = radv_device_physical(device);
const struct radv_instance *instance = radv_physical_device_instance(pdev);
const bool use_predication = radv_use_dgc_predication(cmd_buffer, pGeneratedCommandsInfo);
const bool compute = !!(layout->vk.dgc_info & BITFIELD_BIT(MESA_VK_DGC_DISPATCH));
const bool rt = !!(layout->vk.dgc_info & BITFIELD_BIT(MESA_VK_DGC_RT));
@ -13912,14 +13910,7 @@ radv_CmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPr
ac_emit_cp_pfp_sync_me(cs->b, cmd_buffer->state.cond_render.enabled);
}
/* The Vulkan spec 1.4.349 says:
*
* "VUID-vkCmdExecuteGeneratedCommandsEXT-None-11062
* If a rendering pass is currently active, the view mask must be 0."
*
* But it's a valid behavior with DX12, so it can be enabled via drirc.
*/
const uint32_t view_mask = instance->drirc.features.allow_dgc_multiview ? cmd_buffer->state.render.view_mask : 0;
const uint32_t view_mask = cmd_buffer->state.render.view_mask;
if (rt || compute || !view_mask) {
radv_dgc_execute_ib(cmd_buffer, pGeneratedCommandsInfo);
} else {

View file

@ -231,7 +231,6 @@ static const driOptionDescription radv_dri_options[] = {
DRI_CONF_RADV_EMULATE_RT(false)
DRI_CONF_RADV_ENABLE_FLOAT16_GFX8(false)
DRI_CONF_RADV_COOPERATIVE_MATRIX2_NV(false)
DRI_CONF_RADV_ALLOW_DGC_MULTIVIEW(false)
DRI_CONF_RADV_WAIT_FOR_VM_MAP_UPDATES(false)
DRI_CONF_RADV_NO_IMPLICIT_VARYING_SUBGROUP_SIZE(false)
DRI_CONF_RADV_HIDE_REBAR_ON_DGPU(false)
@ -303,7 +302,6 @@ radv_init_dri_features_options(struct radv_instance *instance)
struct radv_drirc *drirc = &instance->drirc;
drirc->features.cooperative_matrix2_nv = driQueryOptionb(&drirc->options, "radv_cooperative_matrix2_nv");
drirc->features.allow_dgc_multiview = driQueryOptionb(&drirc->options, "radv_allow_dgc_multiview");
drirc->features.emulate_rt = driQueryOptionb(&drirc->options, "radv_emulate_rt");
drirc->features.expose_float16_gfx8 = driQueryOptionb(&drirc->options, "radv_enable_float16_gfx8");
drirc->features.vk_require_etc2 = driQueryOptionb(&drirc->options, "vk_require_etc2");

View file

@ -75,7 +75,6 @@ struct radv_drirc {
struct {
bool cooperative_matrix2_nv;
bool allow_dgc_multiview;
bool emulate_rt;
bool expose_float16_gfx8;
bool vk_require_astc;

View file

@ -43,7 +43,6 @@ Application bugs worked around in this file:
<option name="radv_disable_aniso_single_level" value="true" />
<option name="radv_disable_trunc_coord" value="true" />
<option name="radv_cooperative_matrix2_nv" value="true" />
<option name="radv_allow_dgc_multiview" value="true" />
</engine>
<engine engine_name_match="DXVK">

View file

@ -841,10 +841,6 @@
DRI_CONF_OPT_B(radv_cooperative_matrix2_nv, def, \
"Expose VK_NV_cooperative_matrix2 on supported hardware.")
#define DRI_CONF_RADV_ALLOW_DGC_MULTIVIEW(def) \
DRI_CONF_OPT_B(radv_allow_dgc_multiview, def, \
"Allow to use DGC with multiview for DX12 emulation.")
#define DRI_CONF_RADV_GFX12_HIZ_WA() \
DRI_CONF_OPT_S_NODEF(radv_gfx12_hiz_wa, \
"Choose the specific HiZ workaround to apply on GFX12 (RDNA4). " \