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;
42 RenderList& renderer,
const QString& name,
const QString& access,
int size);
43 void updateStorageBuffers(
RenderList& renderer, QRhiResourceUpdateBatch& res);
44 void recreateShaderResourceBindings(
RenderList& renderer, QRhiResourceUpdateBatch& res);
45 int getArraySizeFromUI(
const QString& bufferName)
const;
46 QString updateShaderWithImageFormats(QString current);
50 ossia::small_flat_map<const Port*, TextureRenderTarget, 2> m_rts;
54 QRhiComputePipeline* pipeline{};
55 QRhiShaderResourceBindings* srb{};
56 QRhiBuffer* processUBO{};
62 QRhiSampler* outputSampler{};
66 ossia::small_vector<std::pair<Edge*, ComputePass>, 2> m_computePasses;
67 ossia::small_vector<std::pair<Edge*, GraphicsPass>, 2> m_graphicsPasses;
71 std::vector<Sampler> m_inputSamplers;
78 int64_t lastKnownSize{};
81 std::vector<isf::storage_input::layout_field> layout;
83 std::vector<StorageBuffer> m_storageBuffers;
86 std::vector<std::pair<const score::gfx::Port*, int>> m_outStorageBuffers;
91 QRhiTexture* texture{};
94 QRhiTexture::Format format{QRhiTexture::RGBA8};
96 std::vector<StorageImage> m_storageImages;
98 QRhiBuffer* m_materialUBO{};
102 QRhiTexture* m_outputTexture{};
103 QRhiTexture::Format m_outputFormat{QRhiTexture::RGBA8};
106 QRhiComputePipeline* m_computePipeline{};
107 QShader m_computeShader;
108 bool m_pipelinesDirty{
true};
Useful abstraction for storing all the data related to a render target.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:116