diff options
author | Samuel Pitoiset <[email protected]> | 2018-11-08 14:00:35 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-11-12 09:35:42 +0100 |
commit | cc4569b733d892998db321cdde4466073a269c33 (patch) | |
tree | 390929656dec15ef7319b87b3a73d816af03f587 /src | |
parent | 8dc2085baf954e7d52159797fe3051a554df3f6d (diff) |
radv: cleanup and document a Hawaii bug with offchip buffers
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 92254bed2e1..145be67c856 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -2046,16 +2046,15 @@ radv_get_hs_offchip_param(struct radv_device *device, uint32_t *max_offchip_buff max_offchip_buffers = max_offchip_buffers_per_se * device->physical_device->rad_info.max_se; - switch (device->tess_offchip_block_dw_size) { - default: - assert(0); - /* fall through */ - case 8192: - offchip_granularity = V_03093C_X_8K_DWORDS; - break; - case 4096: + /* Hawaii has a bug with offchip buffers > 256 that can be worked + * around by setting 4K granularity. + */ + if (device->tess_offchip_block_dw_size == 4096) { + assert(device->physical_device->rad_info.family == CHIP_HAWAII); offchip_granularity = V_03093C_X_4K_DWORDS; - break; + } else { + assert(device->tess_offchip_block_dw_size == 8192); + offchip_granularity = V_03093C_X_8K_DWORDS; } switch (device->physical_device->rad_info.chip_class) { |