| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
As all QRhi stuff is private, it needs to have a public counterpart in
Qt Quick in order to fully support the case of Vulkan-based
QQuickRenderControl usage.
Change-Id: Iaf9a7aa56022acd31af6ebf16de6b83a04966ff4
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
| |
Change-Id: Iae4a82af31bbefbe34ceef7e68c411e67b41dcd8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both for the swapchain and more importantly, layers. The latter was
never implemented, not in Qt 5 with OpenGL either, and it becomes a
problem for resource-limited use cases because QSG_NO_DEPTH_BUFFER still
creates depth/stencil attachments for layers even though the 2D
rendering has no use for those then.
Clarify the QQuickGraphicsConfiguration docs as well. The story is
fairly convoluted, because the useDepthFor2D flag one can set from C++
is not 100% the same as the env.var. (and it really should not be)
The flag is about relying on depth testing in 2D (and so enabling the
potentially more efficient opaque batches), but it does not prevent adding
a View3D or other stuff that requires a depth buffer. The env.var on
the other hand does both: it (depending on the platform) disables
depth (and often stencil) buffers, thus using fewer resources, and also
triggers the depth-less 2D rendering path (alpha batches only). But that
is not always compatible with 3D then (like an offscren View3D will work,
other modes may not)
Change-Id: I5ac1ce154fe78a3ec8bd1a698c1c0b944ce8077e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
Follow the pattern of QQuickRenderTarget and QQuickGraphicsDevice.
This makes it possible to integrate with real world frameworks, such as
OpenXR, that, especially with Vulkan, expect this level of
configurability. (i.e. one pulls the list of extensions to be enabled on
the device, that then needs to be taken into account by Quick, otherwise
it will end up with a VkDevice that is not usable by OpenXR)
Same goes when integrating native Vulkan rendering into an application:
if certain extensions need to be enabled on the VkDevice, today that can
only be done with an environment variable which is not entirely ideal.
These issues are now solved by a new simple (and extensible) container
QQuickGraphicsConfiguration, which is associated with the QQuickWindow.
When applicable, the scene graph will then pick up the relevant settings.
Expand the related docs everywhere. Also rename the vulkanInstance() to
defaultVulkanInstance() to emphasize that it is the instance that is
used for normal QQuickWindows, and is not provided when redirecting
via QQuickRenderControl.
While we are at it, include another obvious candidate: the use-depth-buffer
flag. It turns out that Quick3D's Overlay render mode can be pretty
problematic if Quick writes to the depth buffer. In order to avoid
relying on environment variables (QSG_NO_DEPTH_BUFFER), we now provide
a proper API for controlling that as well.
Change-Id: Iefdb62c1f53de8bd34e3f0d393b00c5020d6188a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|