summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_device.c
diff options
context:
space:
mode:
authorNicholas Miell <[email protected]>2017-09-18 18:26:23 -0700
committerBas Nieuwenhuizen <[email protected]>2017-09-21 18:10:00 +0200
commit1f254360799376d024357484c662bb29113e27f3 (patch)
treec42ec0b1436dd1033394fc32be36f24b4fd9459b /src/amd/vulkan/radv_device.c
parent5513f01f72d8ec6bce60b7e1dfd514dfb57b19c3 (diff)
radv: Implement VK_AMD_rasterization_order
Tested with AMD's Anvil OutOfOrderRasterization demo on a RX 560. Signed-off-by: Nicholas Miell <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r--src/amd/vulkan/radv_device.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 2067685c5ab..9e654a511f3 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -179,6 +179,14 @@ static const VkExtensionProperties common_device_extensions[] = {
.specVersion = 1,
},
};
+
+static const VkExtensionProperties rasterization_order_extension[] ={
+ {
+ .extensionName = VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME,
+ .specVersion = 1,
+ },
+};
+
static const VkExtensionProperties ext_sema_device_extensions[] = {
{
.extensionName = VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME,
@@ -343,6 +351,15 @@ radv_physical_device_init(struct radv_physical_device *device,
if (result != VK_SUCCESS)
goto fail;
+ if (device->rad_info.chip_class >= VI && device->rad_info.max_se >= 2) {
+ result = radv_extensions_register(instance,
+ &device->extensions,
+ rasterization_order_extension,
+ ARRAY_SIZE(rasterization_order_extension));
+ if (result != VK_SUCCESS)
+ goto fail;
+ }
+
if (device->rad_info.has_syncobj) {
result = radv_extensions_register(instance,
&device->extensions,