rhi: Rework the way we handle RenderTargets
Instead of creating a RenderTarget when we create a pipeline, we now
create RenderTargets any time a frontend defines one.
This allows to align with the other type of resources that we create
before pipelines.
Add a dirty flag on QRenderTarget so that backend can easily check if a
frontend RenderTarget has changed.
Also remove the handling of QRenderTargetSelector::outputs which allows
to specify a subset of draw buffers for a given FBO. This cannot be
handled with RHI and in a more general way, removing that altogether
might simplify the API. If you share the attachments, nothing stops
you from creating several FBO to handle that case.
Fix coding style and update the unit tests.
Change-Id: I9f3623e9d7ab9d508db207f2c43cc6c1eedb4f01
Reviewed-by: Mike Krus <mike.krus@kdab.com>
| commit | 59ecf791fad243959d59ed8f5cb461c328cd474a |
| parent | a90c52c9ba1a5a7a9ef5bd4d1da4f7e08787c372 |
| author | Paul Lemire <paul.lemire@kdab.com> |
| committer | Paul Lemire <paul.lemire@kdab.com> |
| commit time | Thu, 13 Aug 2020 08:10:26 +0200 |
- M src/plugins/renderers/rhi/managers/rhiresourcemanagers_p.h
- M src/plugins/renderers/rhi/renderer/renderer.cpp
- M src/plugins/renderers/rhi/renderer/renderer_p.h
- M src/plugins/renderers/rhi/renderer/renderview.cpp
- M src/plugins/renderers/rhi/renderer/renderview_p.h
- M src/plugins/renderers/rhi/renderer/renderviewbuilder.cpp
- M src/plugins/renderers/rhi/renderer/renderviewbuilder_p.h
- M src/plugins/renderers/rhi/renderer/rhirendertarget_p.h
- M src/render/backend/attachmentpack.cpp
- M src/render/backend/rendertarget.cpp
- M src/render/backend/rendertarget_p.h
- M tests/auto/render/rendertarget/tst_rendertarget.cpp