diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-10-09 17:40:24 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-10-11 10:58:44 +0200 |
commit | f26e329c473fb0e9357bdbc4329a36d1204c40c5 (patch) | |
tree | 428adddfea5af43a9d6605af609617969c079fce /tests/manual/rhi/shared | |
parent | 9d804a54aef1a52b652f976b361b2b7e00073349 (diff) |
rhi: Add a many cubes manual test
Draw 25000 cubes while doing a uniform buffer update for each.
Change-Id: I2216641c8bf7c6ea147fe3edd679317b472e1f04
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tests/manual/rhi/shared')
-rw-r--r-- | tests/manual/rhi/shared/examplefw.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/manual/rhi/shared/examplefw.h b/tests/manual/rhi/shared/examplefw.h index 231d8f8b39..92e95313e8 100644 --- a/tests/manual/rhi/shared/examplefw.h +++ b/tests/manual/rhi/shared/examplefw.h @@ -129,6 +129,7 @@ QRhi::BeginFrameFlags beginFrameFlags; QRhi::EndFrameFlags endFrameFlags; int framesUntilTdr = -1; bool transparentBackground = false; +bool debugLayer = true; class Window : public QWindow { @@ -287,7 +288,9 @@ void Window::init() #ifdef Q_OS_WIN if (graphicsApi == D3D11) { QRhiD3D11InitParams params; - params.enableDebugLayer = true; + if (debugLayer) + qDebug("Enabling D3D11 debug layer"); + params.enableDebugLayer = debugLayer; if (framesUntilTdr > 0) { params.framesUntilKillingDeviceViaTdr = framesUntilTdr; params.repeatDeviceKill = true; @@ -531,18 +534,21 @@ int main(int argc, char **argv) #if QT_CONFIG(vulkan) QVulkanInstance inst; if (graphicsApi == Vulkan) { + if (debugLayer) { + qDebug("Enabling Vulkan validation layer (if available)"); #ifndef Q_OS_ANDROID - inst.setLayers(QByteArrayList() << "VK_LAYER_LUNARG_standard_validation"); + inst.setLayers(QByteArrayList() << "VK_LAYER_LUNARG_standard_validation"); #else - inst.setLayers(QByteArrayList() - << "VK_LAYER_GOOGLE_threading" - << "VK_LAYER_LUNARG_parameter_validation" - << "VK_LAYER_LUNARG_object_tracker" - << "VK_LAYER_LUNARG_core_validation" - << "VK_LAYER_LUNARG_image" - << "VK_LAYER_LUNARG_swapchain" - << "VK_LAYER_GOOGLE_unique_objects"); + inst.setLayers(QByteArrayList() + << "VK_LAYER_GOOGLE_threading" + << "VK_LAYER_LUNARG_parameter_validation" + << "VK_LAYER_LUNARG_object_tracker" + << "VK_LAYER_LUNARG_core_validation" + << "VK_LAYER_LUNARG_image" + << "VK_LAYER_LUNARG_swapchain" + << "VK_LAYER_GOOGLE_unique_objects"); #endif + } inst.setExtensions(QByteArrayList() << "VK_KHR_get_physical_device_properties2"); if (!inst.create()) { |