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 QRhiTexture::Format getTextureFormat(
const QString& format)
const noexcept;
37 std::optional<QSize> getImageSize(
const isf::csf_image_input&)
const noexcept;
38 QSize computeTextureSize(
const isf::csf_image_input& img)
const noexcept;
41 int calculateStorageBufferSize(
const std::vector<isf::storage_input::layout_field>& layout,
int arrayCount)
const;
42 QRhiBuffer* createStorageBuffer(
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;
47 ossia::small_flat_map<const Port*, TextureRenderTarget, 2> m_rts;
51 QRhiComputePipeline* pipeline{};
52 QRhiShaderResourceBindings* srb{};
53 QRhiBuffer* processUBO{};
59 QRhiSampler* outputSampler{};
63 ossia::small_vector<std::pair<Edge*, ComputePass>, 2> m_computePasses;
64 ossia::small_vector<std::pair<Edge*, GraphicsPass>, 2> m_graphicsPasses;
68 std::vector<Sampler> m_inputSamplers;
78 std::vector<isf::storage_input::layout_field> layout;
80 std::vector<StorageBuffer> m_storageBuffers;
85 QRhiTexture* texture{};
88 QRhiTexture::Format format{QRhiTexture::RGBA8};
90 std::vector<StorageImage> m_storageImages;
92 QRhiBuffer* m_materialUBO{};
96 QRhiTexture* m_outputTexture{};
97 QRhiTexture::Format m_outputFormat{QRhiTexture::RGBA8};
100 QRhiComputePipeline* m_computePipeline{};
101 QShader m_computeShader;
102 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