18 void init(
RenderList& renderer, QRhiResourceUpdateBatch& res)
override;
19 void update(
RenderList& renderer, QRhiResourceUpdateBatch& res,
Edge* edge)
override;
22 void runInitialPasses(
23 RenderList&, QRhiCommandBuffer& commands, QRhiResourceUpdateBatch*& res,
26 void runRenderPass(
RenderList&, QRhiCommandBuffer& commands,
Edge& edge)
override;
30 void createComputePipeline(
RenderList& renderer);
33 std::vector<Sampler> allSamplers()
const noexcept;
36 std::optional<QSize> getImageSize(
const isf::csf_image_input&)
const noexcept;
37 QSize computeTextureSize(
const isf::csf_image_input& img)
const noexcept;
40 int calculateStorageBufferSize(std::span<const isf::storage_input::layout_field> layout,
int arrayCount)
const;
41 QRhiBuffer* createStorageBuffer(
RenderList& renderer,
const QString& name,
const QString& access,
int size);
42 void updateStorageBuffers(
RenderList& renderer, QRhiResourceUpdateBatch& res);
43 void recreateShaderResourceBindings(
RenderList& renderer, QRhiResourceUpdateBatch& res);
44 int getArraySizeFromUI(
const QString& bufferName)
const;
45 QString updateShaderWithImageFormats(QString current);
49 ossia::small_flat_map<const Port*, TextureRenderTarget, 2> m_rts;
53 QRhiComputePipeline* pipeline{};
54 QRhiShaderResourceBindings* srb{};
55 QRhiBuffer* processUBO{};
61 QRhiSampler* outputSampler{};
65 ossia::small_vector<std::pair<Edge*, ComputePass>, 2> m_computePasses;
66 ossia::small_vector<std::pair<Edge*, GraphicsPass>, 2> m_graphicsPasses;
70 std::vector<Sampler> m_inputSamplers;
80 std::vector<isf::storage_input::layout_field> layout;
82 std::vector<StorageBuffer> m_storageBuffers;
85 std::vector<std::pair<const score::gfx::Port*, int>> m_outStorageBuffers;
90 QRhiTexture* texture{};
93 QRhiTexture::Format format{QRhiTexture::RGBA8};
95 std::vector<StorageImage> m_storageImages;
97 QRhiBuffer* m_materialUBO{};
101 QRhiTexture* m_outputTexture{};
102 QRhiTexture::Format m_outputFormat{QRhiTexture::RGBA8};
105 QRhiComputePipeline* m_computePipeline{};
106 QShader m_computeShader;
107 bool m_pipelinesDirty{
true};
Useful abstraction for storing all the data related to a render target.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:115