| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
|
|
|
|
| |
Change-Id: I8901a67d9e2b3343ba3f57775f1849400f6cdf18
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
| |
Change-Id: Icb8151f26bad68795eb2e1f920297267c880b40b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
|
| |
Only supports QImage backing.
As a bonus add some notes to the Context2D docs too.
Change-Id: I18457a1f766d2f136c6864ec06fe596668d5e726
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The D3D12 node implementation is mostly missing. The rest of the enablers
should be in place now however.
Importing QtQuick 2.8 provides new properties for ShaderEffect:
- shaderType can be used to decide which language should be used
- shaderCompilationType tells if compilation is runtime or offline
- shaderSourceType tells if the vertex/fragmentShader properties refer
to source strings or source files or pre-compiled bytecode files
The last two are bitmasks. In practice however we will support only
one approach per backend for now (runtime + source string for OpenGL,
offline + bytecode for D3D12).
In addition to QSGShaderEffectNode, introduce the QSGGuiThreadShaderEffectManager
interface. This provides the gui thread bits for the above and performs shader
reflection. Backends that use the new ShaderEffect system must provide both.
For each ShaderEffect item there will be a manager (on the gui thread) and
a node (on the render thread).
Reflection is expected to be done via standard helper libs (d3d12shader
+ D3DReflect from d3dcompiler for the D3D12 backend), or via manually inspecting
SPIR-V, or parsing the source (like the GL path does now), or by using some
3rd party library (not recommended). In any case we require that reflection is
doable on the gui thread without dependencies to the actual graphics API.
The ShaderEffect documentation is greatly extended, covering HLSL and the new
properties.
The test app uses manually compiled shaders on its HLSL path for now. This
is because there is no story yet for build system integration for public
use (the internal HLSL -> bytecode in C header rule is only suitable for
the d3d12 plugin itself, apps need something different).
Change-Id: Id112104906fbcb26b9902a35f19d8d509b340d1b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recursive and multisample support is left as a future exercise. Mipmapping
is not supported and is not planned for the time being.
Layers cannot currently be rendered on their own, although they have their
own independent render targets. Starting a layer just starts the next frame early,
putting all commands to the normal command list of that frame. Thus this is
not yet fully suitable for implementing grabs.
Buffer handling is revised to support multiple vertex, index or constant
buffers. This is essential since we are going to have multiple renderer
instances (and may also be needed for a more complex batching renderer
in the future)
QSGBasicImageNode::preprocess is changed not to regenerate the geometry on
every dynamic texture change. In most cases only the material needs to be
dirtied. Rebuilding the geometry is only necessary when the normalized
subrect or similar changes.
Change-Id: Id088c15d1b75022b54c1f8bff1656d2cd68fa7cc
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|
|
|
|
|
|
|
| |
Add a test for render thread Animators.
Change-Id: Iddb11f734ccec00d76ca99cd8349cbb65750e784
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enablers for native text rendering. Distance field support is postponed
for the time being.
The main feature here is the revised texture handling where it is now
possible to schedule the update of multiple sub-regions from a list of
QImages. BGRA is now used where appropriate, meaning for example that
RGB32 needs no QImage conversion anymore.
The skeletons of the glyph nodes, the basic text material and the glyph
cache are added as well.
Also fixes cleanup when closing the window by properly reimplementing
invalidate() in the rendercontext.
The default rectangle, image and glyph nodes are refactored a bit once
again: QSGBasicSomethingNode is now the common (albeit optional), abstract
class, living in its own file, whereas QSGDefaultSomethingNode is the
GL-specific one, like before. This prepares the future renaming for
QSGDefault -> QSGOpenGL.
Change-Id: I6dbb4ece10be39fd214bb64082d79607389e3e6e
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For now there is no mipmapping, no atlases, and all image data is
converted to RGBA8888. Regardless, this already makes it possible to use
basic Image elements.
Follow the same pattern as with rectangles: most of the code is shared
via a material-less, abstract QSGDefaultNoMaterialImageNode, with the
material-related bits provided by QSGDefaultImageNode for GL and
QSGD3D12ImageNode for D3D.
Also fixes the harmless but incorrect miscalculation of the VBV size for
indexed draws.
Image data is copied into an intermediate upload buffer when invoking the
render context's createTexture(). The upload is triggered on a separate copy
command queue. The main command queue is synchronized via a fence before
executing the commands for the current frame.
Root signatures are now cached more cleverly and include zero or more SRVs
as parameter 1. This involves the engine having to manage a shader (GPU) visible
CBV-SRV-UAV descriptor heap as well.
Change-Id: I67c35577ff2677e1c7776dd8e5011860e2d78b00
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Now we can do performance tests since there is no debug output unless
requested via QSG_RENDERER_DEBUG.
Change-Id: I15ff213f35816401cc113899211b52a98ec30989
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ie55b9a2fd39d9e11321454a34a21c2a52ff1d23a
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid using .h for generated headers with shader blobs in order not to
confuse syncqt.
All buffer Map and memcpy is now done only at the end of the frame. This
is relevant for the constant buffer which can this way Map once and memcpy
only the data for elements that changed something.
This also marks a change from how simplerenderer works: instead of having
per-program matrix, opacity, etc. values (uniforms), there is a separate
copy of these in a dedicated area of the constant buffer for each element.
This allows reusing the data in the buffer as-is for non-changing elements
at the cost of higher memory usage (256 bytes per element both on CPU &
GPU side at minimum) and is also necessary in order to be able to build
command lists with multiple draw calls without intra-dependencies for the
cbuffer contents.
The somewhat broken dirty tracking of simplerenderer (matrices always
treated as dirty, forgetting the root node for ever in the list of dirty
transform nodes, etc.) is now corrected so that the DirtyMatrix and
DirtyOpacity states reflect reality, meaning the cbuffer update can be
skipped completely for items whose transform or inherited opacity has not
changed at all.
Format mapping is now moved to the engine.
Change-Id: Ia0a0d73e2a954970cb2745deb1a62c09f3d3cb7c
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|
|
Proof of concept. The plan is to proceed slowly with supporting node types
one by one, starting with QSGRectangleNode.
Opaque rectangles work already, but only non-smooth for now. The renderer is
incomplete (no clip/opacity) and is based on simplerenderer on scenegraph playground.
Buffer handling is not necessarily optimal yet.
Use QT_QUICK_BACKEND=d3d12 to request this backend. Set QT_D3D_DEBUG=1 to
enable the D3D debug layer. The render loop handles everything, incl. swap
chain setup, handling resizes, etc. This being D3D, there are no further
enablers needed from the QtGui or platform plugin side.
By default the first hardware adapter is picked. In the absence of that,
WARP is tried. The list of adapters is printed at startup, use
QT_D3D_ADAPTER_INDEX to force a given card in case there are multiple
ones in the system.
The goal is not to productize a fast and great renderer, but to pave the way to
better future backends for D3D12 and similar graphics APIs.
Compiling in the support into Qt Quick is bad since the dependency onto
d3d12.dll is not necessarily acceptable, but it's good enough for now, this
being a wip branch.
Change-Id: Ifbe088e7507223328096b22eec2c73f77bb5680e
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|