radv: advertise VK_EXT_shader_object on GFX6-8
This extension can be enabled with RADV_PERFTEST=shader_object. GFX9+ support and improvements will happen shortly. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26930>
This commit is contained in:

committed by
Marge Bot

parent
f0e7714d0d
commit
2972590a53
@@ -1351,6 +1351,8 @@ RADV driver environment variables
|
||||
enable NGG culling on GPUs where it's not enabled by default (GFX10.1 only).
|
||||
``sam``
|
||||
enable optimizations to move more driver internal objects to VRAM.
|
||||
``shader_object``
|
||||
enable experimental implementation of VK_EXT_shader_object (GFX6-8)
|
||||
``rtwave64``
|
||||
enable wave64 for ray tracing shaders (GFX10+)
|
||||
``transfer_queue``
|
||||
|
@@ -90,6 +90,7 @@ enum {
|
||||
RADV_PERFTEST_DMA_SHADERS = 1u << 12,
|
||||
RADV_PERFTEST_GS_FAST_LAUNCH_2 = 1u << 13,
|
||||
RADV_PERFTEST_TRANSFER_QUEUE = 1u << 14,
|
||||
RADV_PERFTEST_SHADER_OBJECT = 1u << 15,
|
||||
};
|
||||
|
||||
bool radv_init_trace(struct radv_device *device);
|
||||
|
@@ -101,6 +101,7 @@ static const struct debug_control radv_perftest_options[] = {{"localbos", RADV_P
|
||||
{"dmashaders", RADV_PERFTEST_DMA_SHADERS},
|
||||
{"gsfastlaunch2", RADV_PERFTEST_GS_FAST_LAUNCH_2},
|
||||
{"transfer_queue", RADV_PERFTEST_TRANSFER_QUEUE},
|
||||
{"shader_object", RADV_PERFTEST_SHADER_OBJECT},
|
||||
{NULL, 0}};
|
||||
|
||||
const char *
|
||||
|
@@ -95,6 +95,12 @@ radv_calibrated_timestamps_enabled(const struct radv_physical_device *pdevice)
|
||||
!(pdevice->rad_info.family == CHIP_RAVEN || pdevice->rad_info.family == CHIP_RAVEN2);
|
||||
}
|
||||
|
||||
static bool
|
||||
radv_shader_object_enabled(const struct radv_physical_device *pdevice)
|
||||
{
|
||||
return pdevice->rad_info.gfx_level < GFX9 && pdevice->instance->perftest_flags & RADV_PERFTEST_SHADER_OBJECT;
|
||||
}
|
||||
|
||||
bool
|
||||
radv_enable_rt(const struct radv_physical_device *pdevice, bool rt_pipelines)
|
||||
{
|
||||
@@ -592,6 +598,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
|
||||
.EXT_shader_demote_to_helper_invocation = true,
|
||||
.EXT_shader_image_atomic_int64 = true,
|
||||
.EXT_shader_module_identifier = true,
|
||||
.EXT_shader_object = radv_shader_object_enabled(device),
|
||||
.EXT_shader_stencil_export = true,
|
||||
.EXT_shader_subgroup_ballot = true,
|
||||
.EXT_shader_subgroup_vote = true,
|
||||
@@ -1116,6 +1123,9 @@ radv_physical_device_get_features(const struct radv_physical_device *pdevice, st
|
||||
/* VK_KHR_shader_subgroup_rotate */
|
||||
.shaderSubgroupRotate = true,
|
||||
.shaderSubgroupRotateClustered = true,
|
||||
|
||||
/* VK_EXT_shader_object */
|
||||
.shaderObject = true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1796,6 +1806,10 @@ radv_get_physical_device_properties(struct radv_physical_device *pdevice)
|
||||
p->blockTexelViewCompatibleMultipleLayers = true;
|
||||
p->maxCombinedImageSamplerDescriptorCount = 1;
|
||||
p->fragmentShadingRateClampCombinerInputs = true;
|
||||
|
||||
/* VK_EXT_shader_object */
|
||||
radv_device_get_cache_uuid(pdevice, p->shaderBinaryUUID);
|
||||
p->shaderBinaryVersion = 1;
|
||||
}
|
||||
|
||||
static VkResult
|
||||
|
Reference in New Issue
Block a user