radv: Enable EXT_mesh_shader on RDNA2 with RADV_PERFTEST=ext_ms
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Martin Roukala <martin.roukala@mupuf.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18367>
This commit is contained in:
@@ -132,7 +132,7 @@ radv_stoney_vkcts:amd64:
|
||||
- .deqp-test-valve
|
||||
variables:
|
||||
DEQP_VER: vk
|
||||
RADV_PERFTEST: nv_ms
|
||||
RADV_PERFTEST: nv_ms,ext_ms
|
||||
|
||||
# VKCTS never finishes on gfx7 due to all the GPU resets and hangs.
|
||||
# Hence, disable it for now.
|
||||
|
@@ -58,4 +58,6 @@ dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.uniform_32struct_to_16
|
||||
# These tests create an ACE cmdbuf which waits for GFX, thus can cause
|
||||
# a deadlock when executed in parallel without gang submit.
|
||||
dEQP-VK.mesh_shader.nv.synchronization.*
|
||||
dEQP-VK.mesh_shader.ext.synchronization.*
|
||||
dEQP-VK.mesh_shader.nv.misc.many_task*
|
||||
dEQP-VK.mesh_shader.ext.misc.many_task*
|
||||
|
@@ -84,6 +84,7 @@ enum {
|
||||
RADV_PERFTEST_NV_MS = 1u << 11,
|
||||
RADV_PERFTEST_RT_WAVE_64 = 1u << 12,
|
||||
RADV_PERFTEST_GPL = 1u << 13,
|
||||
RADV_PERFTEST_EXT_MS = 1u << 14,
|
||||
};
|
||||
|
||||
bool radv_init_trace(struct radv_device *device);
|
||||
|
@@ -548,6 +548,8 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
|
||||
.EXT_line_rasterization = true,
|
||||
.EXT_memory_budget = true,
|
||||
.EXT_memory_priority = true,
|
||||
.EXT_mesh_shader =
|
||||
radv_taskmesh_enabled(device) && device->instance->perftest_flags & RADV_PERFTEST_EXT_MS,
|
||||
.EXT_multi_draw = true,
|
||||
.EXT_non_seamless_cube_map = true,
|
||||
.EXT_pci_bus_info = true,
|
||||
@@ -1025,6 +1027,7 @@ static const struct debug_control radv_perftest_options[] = {{"localbos", RADV_P
|
||||
{"nv_ms", RADV_PERFTEST_NV_MS},
|
||||
{"rtwave64", RADV_PERFTEST_RT_WAVE_64},
|
||||
{"gpl", RADV_PERFTEST_GPL},
|
||||
{"ext_ms", RADV_PERFTEST_EXT_MS},
|
||||
{NULL, 0}};
|
||||
|
||||
const char *
|
||||
@@ -1738,6 +1741,17 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
||||
features->taskShader = features->meshShader = radv_taskmesh_enabled(pdevice);
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT: {
|
||||
VkPhysicalDeviceMeshShaderFeaturesEXT *features =
|
||||
(VkPhysicalDeviceMeshShaderFeaturesEXT *)ext;
|
||||
bool taskmesh_en = radv_taskmesh_enabled(pdevice);
|
||||
features->meshShader = taskmesh_en;
|
||||
features->taskShader = taskmesh_en;
|
||||
features->multiviewMeshShader = taskmesh_en;
|
||||
features->primitiveFragmentShadingRateMeshShader = taskmesh_en;
|
||||
features->meshShaderQueries = false;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: {
|
||||
VkPhysicalDeviceTextureCompressionASTCHDRFeatures *features =
|
||||
(VkPhysicalDeviceTextureCompressionASTCHDRFeatures *)ext;
|
||||
@@ -2548,6 +2562,55 @@ radv_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
|
||||
props->graphicsPipelineLibraryIndependentInterpolationDecoration = false;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT: {
|
||||
VkPhysicalDeviceMeshShaderPropertiesEXT *properties =
|
||||
(VkPhysicalDeviceMeshShaderPropertiesEXT *)ext;
|
||||
|
||||
properties->maxTaskWorkGroupTotalCount = 4194304; /* 2^22 min required */
|
||||
properties->maxTaskWorkGroupCount[0] = 65535;
|
||||
properties->maxTaskWorkGroupCount[1] = 65535;
|
||||
properties->maxTaskWorkGroupCount[2] = 65535;
|
||||
properties->maxTaskWorkGroupInvocations = 1024;
|
||||
properties->maxTaskWorkGroupSize[0] = 1024;
|
||||
properties->maxTaskWorkGroupSize[1] = 1024;
|
||||
properties->maxTaskWorkGroupSize[2] = 1024;
|
||||
properties->maxTaskPayloadSize = 16384; /* 16K min required */
|
||||
properties->maxTaskSharedMemorySize = 65536;
|
||||
properties->maxTaskPayloadAndSharedMemorySize = 65536;
|
||||
|
||||
properties->maxMeshWorkGroupTotalCount = 4194304; /* 2^22 min required */
|
||||
properties->maxMeshWorkGroupCount[0] = 65535;
|
||||
properties->maxMeshWorkGroupCount[1] = 65535;
|
||||
properties->maxMeshWorkGroupCount[2] = 65535;
|
||||
properties->maxMeshWorkGroupInvocations = 256; /* Max NGG HW limit */
|
||||
properties->maxMeshWorkGroupSize[0] = 256;
|
||||
properties->maxMeshWorkGroupSize[1] = 256;
|
||||
properties->maxMeshWorkGroupSize[2] = 256;
|
||||
properties->maxMeshOutputMemorySize = 32 * 1024; /* 32K min required */
|
||||
properties->maxMeshSharedMemorySize = 28672; /* 28K min required */
|
||||
properties->maxMeshPayloadAndSharedMemorySize =
|
||||
properties->maxTaskPayloadSize +
|
||||
properties->maxMeshSharedMemorySize; /* 28K min required */
|
||||
properties->maxMeshPayloadAndOutputMemorySize =
|
||||
properties->maxTaskPayloadSize +
|
||||
properties->maxMeshOutputMemorySize; /* 47K min required */
|
||||
properties->maxMeshOutputComponents = 128; /* 32x vec4 min required */
|
||||
properties->maxMeshOutputVertices = 256;
|
||||
properties->maxMeshOutputPrimitives = 256;
|
||||
properties->maxMeshOutputLayers = 8;
|
||||
properties->maxMeshMultiviewViewCount = MAX_VIEWS;
|
||||
properties->meshOutputPerVertexGranularity = 1;
|
||||
properties->meshOutputPerPrimitiveGranularity = 1;
|
||||
|
||||
properties->maxPreferredTaskWorkGroupInvocations = 1024;
|
||||
properties->maxPreferredMeshWorkGroupInvocations = 128;
|
||||
properties->prefersLocalInvocationVertexOutput = true;
|
||||
properties->prefersLocalInvocationPrimitiveOutput = true;
|
||||
properties->prefersCompactVertexOutput = true;
|
||||
properties->prefersCompactPrimitiveOutput = false;
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -740,6 +740,7 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_pipeline_
|
||||
.int64 = true,
|
||||
.int64_atomics = true,
|
||||
.integer_functions2 = true,
|
||||
.mesh_shading = true,
|
||||
.mesh_shading_nv = true,
|
||||
.min_lod = true,
|
||||
.multiview = true,
|
||||
|
Reference in New Issue
Block a user