[Mesa-dev] [PATCH 07/25] radv: add support for some device specific tess information.

Dave Airlie airlied at gmail.com
Thu Mar 30 08:00:57 UTC 2017


From: Dave Airlie <airlied at redhat.com>

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/amd/vulkan/radv_device.c  | 6 ++++++
 src/amd/vulkan/radv_private.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 64970bd..fe531e1 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -962,6 +962,12 @@ VkResult radv_CreateDevice(
 
 	radv_device_init_gs_info(device);
 
+	device->tess_offchip_block_dw_size =
+		device->physical_device->rad_info.family == CHIP_HAWAII ? 4096 : 8192;
+	device->has_distributed_tess =
+		device->physical_device->rad_info.chip_class >= VI &&
+		device->physical_device->rad_info.max_se >= 2;
+
 	result = radv_device_init_meta(device);
 	if (result != VK_SUCCESS)
 		goto fail;
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index c5c872f..35ff1c7 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -487,6 +487,8 @@ struct radv_device {
 	uint64_t debug_flags;
 
 	bool llvm_supports_spill;
+	bool has_distributed_tess;
+	uint32_t tess_offchip_block_dw_size;
 	uint32_t scratch_waves;
 
 	uint32_t gs_table_depth;
-- 
2.9.3



More information about the mesa-dev mailing list