19 void init(
RenderList& renderer, QRhiResourceUpdateBatch& res)
override;
20 void update(
RenderList& renderer, QRhiResourceUpdateBatch& res,
Edge* edge)
override;
23 void runInitialPasses(
24 RenderList&, QRhiCommandBuffer& commands, QRhiResourceUpdateBatch*& res,
27 void runRenderPass(
RenderList&, QRhiCommandBuffer& commands,
Edge& edge)
override;
31 void createComputePipeline(
RenderList& renderer);
34 std::vector<Sampler> allSamplers()
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(std::span<const isf::storage_input::layout_field> layout,
int arrayCount)
const;
43 RenderList& renderer,
const QString& name,
const QString& access,
int size);
44 void updateStorageBuffers(
RenderList& renderer, QRhiResourceUpdateBatch& res);
45 void recreateShaderResourceBindings(
RenderList& renderer, QRhiResourceUpdateBatch& res);
46 int getArraySizeFromUI(
const QString& bufferName)
const;
47 QString updateShaderWithImageFormats(QString current);
51 ossia::small_flat_map<const Port*, TextureRenderTarget, 2> m_rts;
55 QRhiComputePipeline* pipeline{};
56 QRhiShaderResourceBindings* srb{};
57 QRhiBuffer* processUBO{};
63 QRhiSampler* outputSampler{};
67 ossia::small_vector<std::pair<Edge*, ComputePass>, 2> m_computePasses;
68 ossia::small_vector<std::pair<Edge*, GraphicsPass>, 2> m_graphicsPasses;
72 std::vector<Sampler> m_inputSamplers;
79 int64_t lastKnownSize{};
82 std::vector<isf::storage_input::layout_field> layout;
84 std::vector<StorageBuffer> m_storageBuffers;
87 std::vector<std::pair<const score::gfx::Port*, int>> m_outStorageBuffers;
92 QRhiTexture* texture{};
95 QRhiTexture::Format format{QRhiTexture::RGBA8};
97 std::vector<StorageImage> m_storageImages;
99 QRhiBuffer* m_materialUBO{};
100 int m_materialSize{};
103 QRhiTexture* m_outputTexture{};
104 QRhiTexture::Format m_outputFormat{QRhiTexture::RGBA8};
107 QRhiComputePipeline* m_computePipeline{};
108 QShader m_computeShader;
109 bool m_pipelinesDirty{
true};
Useful abstraction for storing all the data related to a render target.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:119