radv: add a helper to report if cooperative matrix is enabled
To avoid duplicating checks. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33120>
This commit is contained in:
committed by
Marge Bot
parent
bfa6b9b655
commit
de9d8a23d2
@@ -108,6 +108,12 @@ radv_filter_minmax_enabled(const struct radv_physical_device *pdev)
|
||||
return !(pdev->info.family == CHIP_TAHITI || pdev->info.family == CHIP_VERDE);
|
||||
}
|
||||
|
||||
static bool
|
||||
radv_cooperative_matrix_enabled(const struct radv_physical_device *pdev)
|
||||
{
|
||||
return pdev->info.gfx_level >= GFX11 && !pdev->use_llvm;
|
||||
}
|
||||
|
||||
bool
|
||||
radv_enable_rt(const struct radv_physical_device *pdev)
|
||||
{
|
||||
@@ -536,7 +542,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
|
||||
.KHR_acceleration_structure = radv_enable_rt(pdev),
|
||||
.KHR_calibrated_timestamps = radv_calibrated_timestamps_enabled(pdev),
|
||||
.KHR_compute_shader_derivatives = true,
|
||||
.KHR_cooperative_matrix = pdev->info.gfx_level >= GFX11 && !pdev->use_llvm,
|
||||
.KHR_cooperative_matrix = radv_cooperative_matrix_enabled(pdev),
|
||||
.KHR_bind_memory2 = true,
|
||||
.KHR_buffer_device_address = true,
|
||||
.KHR_copy_commands2 = true,
|
||||
@@ -1242,8 +1248,8 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc
|
||||
.maintenance5 = true,
|
||||
|
||||
/* VK_KHR_cooperative_matrix */
|
||||
.cooperativeMatrix = pdev->info.gfx_level >= GFX11 && !pdev->use_llvm,
|
||||
.cooperativeMatrixRobustBufferAccess = pdev->info.gfx_level >= GFX11 && !pdev->use_llvm,
|
||||
.cooperativeMatrix = radv_cooperative_matrix_enabled(pdev),
|
||||
.cooperativeMatrixRobustBufferAccess = radv_cooperative_matrix_enabled(pdev),
|
||||
|
||||
/* VK_EXT_image_compression_control */
|
||||
.imageCompressionControl = true,
|
||||
|
||||
Reference in New Issue
Block a user