[Mesa-dev] [PATCH] radv: Add Vega M support.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Thu Apr 19 04:36:47 UTC 2018
---
src/amd/vulkan/radv_device.c | 5 ++++-
src/amd/vulkan/radv_pipeline.c | 3 ++-
src/amd/vulkan/radv_shader.c | 1 +
src/amd/vulkan/si_cmd_buffer.c | 4 ++++
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index fd11cedcbf..aed7b6b67c 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -101,6 +101,7 @@ radv_get_device_name(enum radeon_family family, char *name, size_t name_len)
case CHIP_POLARIS11: chip_string = "AMD RADV POLARIS11"; break;
case CHIP_POLARIS12: chip_string = "AMD RADV POLARIS12"; break;
case CHIP_STONEY: chip_string = "AMD RADV STONEY"; break;
+ case CHIP_VEGAM: chip_string = "AMD RADV VEGA M"; break;
case CHIP_VEGA10: chip_string = "AMD RADV VEGA10"; break;
case CHIP_VEGA12: chip_string = "AMD RADV VEGA12"; break;
case CHIP_RAVEN: chip_string = "AMD RADV RAVEN"; break;
@@ -1012,7 +1013,8 @@ void radv_GetPhysicalDeviceProperties2(
pdevice->rad_info.family == CHIP_ICELAND ||
pdevice->rad_info.family == CHIP_POLARIS10 ||
pdevice->rad_info.family == CHIP_POLARIS11 ||
- pdevice->rad_info.family == CHIP_POLARIS12 ? 8 : 10;
+ pdevice->rad_info.family == CHIP_POLARIS12 ||
+ pdevice->rad_info.family == CHIP_VEGAM ? 8 : 10;
properties->wavefrontSize = 64;
/* SGPR. */
@@ -1353,6 +1355,7 @@ radv_device_init_gs_info(struct radv_device *device)
case CHIP_POLARIS10:
case CHIP_POLARIS11:
case CHIP_POLARIS12:
+ case CHIP_VEGAM:
case CHIP_VEGA10:
case CHIP_VEGA12:
case CHIP_RAVEN:
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index fce3201c19..feee547d1b 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -3254,7 +3254,8 @@ radv_compute_ia_multi_vgt_param_helpers(struct radv_pipeline *pipeline,
device->physical_device->rad_info.family == CHIP_FIJI ||
device->physical_device->rad_info.family == CHIP_POLARIS10 ||
device->physical_device->rad_info.family == CHIP_POLARIS11 ||
- device->physical_device->rad_info.family == CHIP_POLARIS12)
+ device->physical_device->rad_info.family == CHIP_POLARIS12 ||
+ device->physical_device->rad_info.family == CHIP_VEGAM)
ia_multi_vgt_param.partial_vs_wave = true;
} else {
ia_multi_vgt_param.partial_vs_wave = true;
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index ac36cecb67..8e8a32f025 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -620,6 +620,7 @@ generate_shader_stats(struct radv_device *device,
case CHIP_POLARIS10:
case CHIP_POLARIS11:
case CHIP_POLARIS12:
+ case CHIP_VEGAM:
max_simd_waves = 8;
break;
default:
diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
index 15edaa4b2b..80c819af49 100644
--- a/src/amd/vulkan/si_cmd_buffer.c
+++ b/src/amd/vulkan/si_cmd_buffer.c
@@ -279,6 +279,10 @@ si_set_raster_config(struct radv_physical_device *physical_device,
raster_config = 0x16000012;
raster_config_1 = 0x00000000;
break;
+ case CHIP_VEGAM:
+ raster_config = 0x3a00161a;
+ raster_config_1 = 0x0000002e;
+ break;
case CHIP_TONGA:
raster_config = 0x16000012;
raster_config_1 = 0x0000002a;
--
2.17.0
More information about the mesa-dev
mailing list