radv: Expose VK_NV_device_generated_commands.
Closes: #6736 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
This commit is contained in:
parent
05bf39238b
commit
2d2591bbb7
|
@ -39,6 +39,7 @@ Application bugs worked around in this file:
|
||||||
<engine engine_name_match="vkd3d">
|
<engine engine_name_match="vkd3d">
|
||||||
<option name="radv_zero_vram" value="true" />
|
<option name="radv_zero_vram" value="true" />
|
||||||
<option name="radv_disable_aniso_single_level" value="true" />
|
<option name="radv_disable_aniso_single_level" value="true" />
|
||||||
|
<option name="radv_dgc" value="true" />
|
||||||
</engine>
|
</engine>
|
||||||
|
|
||||||
<engine engine_name_match="DXVK">
|
<engine engine_name_match="DXVK">
|
||||||
|
|
|
@ -607,6 +607,8 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
|
||||||
.GOOGLE_user_type = true,
|
.GOOGLE_user_type = true,
|
||||||
.INTEL_shader_integer_functions2 = true,
|
.INTEL_shader_integer_functions2 = true,
|
||||||
.NV_compute_shader_derivatives = true,
|
.NV_compute_shader_derivatives = true,
|
||||||
|
.NV_device_generated_commands = device->rad_info.gfx_level >= GFX7 && !(device->instance->debug_flags & RADV_DEBUG_NO_IBS) &&
|
||||||
|
driQueryOptionb(&device->instance->dri_options, "radv_dgc"),
|
||||||
.NV_mesh_shader = device->use_ngg && device->rad_info.gfx_level >= GFX10_3 &&
|
.NV_mesh_shader = device->use_ngg && device->rad_info.gfx_level >= GFX10_3 &&
|
||||||
device->instance->perftest_flags & RADV_PERFTEST_NV_MS && !device->use_llvm,
|
device->instance->perftest_flags & RADV_PERFTEST_NV_MS && !device->use_llvm,
|
||||||
/* Undocumented extension purely for vkd3d-proton. This check is to prevent anyone else from
|
/* Undocumented extension purely for vkd3d-proton. This check is to prevent anyone else from
|
||||||
|
@ -1024,6 +1026,7 @@ static const driOptionDescription radv_dri_options[] = {
|
||||||
DRI_CONF_RADV_REQUIRE_ETC2(false)
|
DRI_CONF_RADV_REQUIRE_ETC2(false)
|
||||||
DRI_CONF_RADV_DISABLE_ANISO_SINGLE_LEVEL(false)
|
DRI_CONF_RADV_DISABLE_ANISO_SINGLE_LEVEL(false)
|
||||||
DRI_CONF_RADV_DISABLE_SINKING_LOAD_INPUT_FS(false)
|
DRI_CONF_RADV_DISABLE_SINKING_LOAD_INPUT_FS(false)
|
||||||
|
DRI_CONF_RADV_DGC(false)
|
||||||
DRI_CONF_SECTION_END
|
DRI_CONF_SECTION_END
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
@ -1832,6 +1835,12 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
||||||
features->performanceCounterMultipleQueryPools = features->performanceCounterQueryPools;
|
features->performanceCounterMultipleQueryPools = features->performanceCounterQueryPools;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV: {
|
||||||
|
VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV *features =
|
||||||
|
(VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV *)ext;
|
||||||
|
features->deviceGeneratedCommands = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2532,6 +2541,24 @@ radv_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
|
||||||
properties->allowCommandBufferQueryCopies = false;
|
properties->allowCommandBufferQueryCopies = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV: {
|
||||||
|
VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV *properties =
|
||||||
|
(VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV *)ext;
|
||||||
|
properties->maxIndirectCommandsStreamCount = 1;
|
||||||
|
properties->maxIndirectCommandsStreamStride = UINT32_MAX;
|
||||||
|
properties->maxIndirectCommandsTokenCount = UINT32_MAX;
|
||||||
|
properties->maxIndirectCommandsTokenOffset = UINT16_MAX;
|
||||||
|
properties->minIndirectCommandsBufferOffsetAlignment = 4;
|
||||||
|
properties->minSequencesCountBufferOffsetAlignment = 4;
|
||||||
|
properties->minSequencesIndexBufferOffsetAlignment = 4;
|
||||||
|
|
||||||
|
/* Don't support even a shader group count = 1 until we support shader
|
||||||
|
* overrides during pipeline creation. */
|
||||||
|
properties->maxGraphicsShaderGroupCount = 0;
|
||||||
|
|
||||||
|
properties->maxIndirectSequenceCount = UINT32_MAX;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -578,6 +578,10 @@
|
||||||
DRI_CONF_OPT_B(radv_disable_sinking_load_input_fs, def, \
|
DRI_CONF_OPT_B(radv_disable_sinking_load_input_fs, def, \
|
||||||
"Disable sinking load inputs for fragment shaders")
|
"Disable sinking load inputs for fragment shaders")
|
||||||
|
|
||||||
|
#define DRI_CONF_RADV_DGC(def) \
|
||||||
|
DRI_CONF_OPT_B(radv_dgc, def, \
|
||||||
|
"Expose an experimental implementation of VK_NV_device_generated_commands")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief ANV specific configuration options
|
* \brief ANV specific configuration options
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue