diff options
author | Timothy Arceri <[email protected]> | 2019-02-01 21:16:54 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-02-01 22:25:30 +1100 |
commit | a53d68d3185f1eee4eccc5ddc8d8519c62df3686 (patch) | |
tree | 2e5d9b27f6b404b2dab910e888ecfb02acbaff0e /src/amd/vulkan | |
parent | 574186f0e8a336da9535131f1abcf3b49b1a6c14 (diff) |
ac/radv/radeonsi: add ac_get_num_physical_sgprs() helper
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 2 | ||||
-rw-r--r-- | src/amd/vulkan/radv_shader.c | 4 | ||||
-rw-r--r-- | src/amd/vulkan/radv_shader.h | 6 |
3 files changed, 3 insertions, 9 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 34d93b262f8..b8ef93d0cd2 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1129,7 +1129,7 @@ void radv_GetPhysicalDeviceProperties2( /* SGPR. */ properties->sgprsPerSimd = - radv_get_num_physical_sgprs(pdevice); + ac_get_num_physical_sgprs(pdevice->rad_info.chip_class); properties->minSgprAllocation = pdevice->rad_info.chip_class >= VI ? 16 : 8; properties->maxSgprAllocation = diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 32cd9ae25e9..2fd287fcd17 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -751,7 +751,7 @@ generate_shader_stats(struct radv_device *device, if (conf->num_sgprs) max_simd_waves = MIN2(max_simd_waves, - radv_get_num_physical_sgprs(device->physical_device) / conf->num_sgprs); + ac_get_num_physical_sgprs(device->physical_device->rad_info.chip_class) / conf->num_sgprs); if (conf->num_vgprs) max_simd_waves = @@ -836,7 +836,7 @@ radv_GetShaderInfoAMD(VkDevice _device, VkShaderStatisticsInfoAMD statistics = {}; statistics.shaderStageMask = shaderStage; statistics.numPhysicalVgprs = RADV_NUM_PHYSICAL_VGPRS; - statistics.numPhysicalSgprs = radv_get_num_physical_sgprs(device->physical_device); + statistics.numPhysicalSgprs = ac_get_num_physical_sgprs(device->physical_device->rad_info.chip_class); statistics.numAvailableSgprs = statistics.numPhysicalSgprs; if (stage == MESA_SHADER_COMPUTE) { diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 3652a811e80..b67cd2b4f15 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -407,10 +407,4 @@ static inline unsigned shader_io_get_unique_index(gl_varying_slot slot) unreachable("illegal slot in get unique index\n"); } -static inline uint32_t -radv_get_num_physical_sgprs(struct radv_physical_device *physical_device) -{ - return physical_device->rad_info.chip_class >= VI ? 800 : 512; -} - #endif |