summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_device.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-05-09 04:17:30 +0100
committerDave Airlie <[email protected]>2017-06-09 02:15:25 +0100
commitc2464271a04964121d21eb1508d9dc61ec2d8e71 (patch)
tree5a34e6ab428ccd42006d9a5e6a4d89b6ebffa6ca /src/amd/vulkan/radv_device.c
parentd0a26edc25a0125ab85dc5eabdd235792b5ac899 (diff)
radv: introduce perf test env var and allow to enable chaining
We have some features that seem to slow things down or cause other possible undesireable side effects, but it would be nice to test games etc with them easily. I forsee multisample DCC and maybe some shader opt changes using this. For now use it for batch chaining. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r--src/amd/vulkan/radv_device.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 5fdb894146c..1ea69608a14 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -270,7 +270,8 @@ radv_physical_device_init(struct radv_physical_device *device,
assert(strlen(path) < ARRAY_SIZE(device->path));
strncpy(device->path, path, ARRAY_SIZE(device->path));
- device->ws = radv_amdgpu_winsys_create(fd, instance->debug_flags);
+ device->ws = radv_amdgpu_winsys_create(fd, instance->debug_flags,
+ instance->perftest_flags);
if (!device->ws) {
result = VK_ERROR_INCOMPATIBLE_DRIVER;
goto fail;
@@ -367,6 +368,11 @@ static const struct debug_control radv_debug_options[] = {
{NULL, 0}
};
+static const struct debug_control radv_perftest_options[] = {
+ {"batchchain", RADV_PERFTEST_BATCHCHAIN},
+ {NULL, 0}
+};
+
VkResult radv_CreateInstance(
const VkInstanceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
@@ -424,6 +430,9 @@ VkResult radv_CreateInstance(
instance->debug_flags = parse_debug_string(getenv("RADV_DEBUG"),
radv_debug_options);
+ instance->perftest_flags = parse_debug_string(getenv("RADV_PERFTEST"),
+ radv_perftest_options);
+
*pInstance = radv_instance_to_handle(instance);
return VK_SUCCESS;