2#include <Process/Dataflow/CableData.hpp>
4#include <Gfx/Graph/Mesh.hpp>
5#include <Gfx/Graph/RenderState.hpp>
6#include <Gfx/Graph/Scale.hpp>
7#include <Gfx/Graph/Uniforms.hpp>
8#include <Gfx/Graph/VertexFallbackPlan.hpp>
10#include <ossia/detail/hash_map.hpp>
11#include <ossia/detail/small_flat_map.hpp>
13#include <score_plugin_gfx_export.h>
15#include <QtCore/QDebug>
30struct RenderTargetSpecs;
31class VertexFallbackPool;
52 QRhiCommandBuffer* cb{};
54 ? QRhi::FrameOpDeviceLost
55 : rhi.beginOffscreenFrame(&cb);
56 if(m_beginResult == QRhi::FrameOpSuccess)
65 thread_local int nested = 0;
66 if((nested++ % 600) == 0)
67 qWarning() <<
"score.gfx: beginOffscreenFrame entered while a frame is "
68 "already recording; skipping this render (occurrence"
81 explicit operator bool()
const noexcept {
return m_commands; }
82 QRhiCommandBuffer& commands()
const noexcept {
return *m_commands; }
84 QRhi::FrameOpResult beginResult()
const noexcept {
return m_beginResult; }
85 QRhi::FrameOpResult endResult()
const noexcept {
return m_endResult; }
86 bool deviceLost()
const noexcept
88 return m_beginResult == QRhi::FrameOpDeviceLost
89 || m_endResult == QRhi::FrameOpDeviceLost;
92 QRhi::FrameOpResult end()
noexcept
98 m_endResult = rhi->endOffscreenFrame();
111 QRhiCommandBuffer* m_commands{};
112 QRhi::FrameOpResult m_beginResult{QRhi::FrameOpSuccess};
113 QRhi::FrameOpResult m_endResult{QRhi::FrameOpSuccess};
127 , swapChain{&swapChain}
133 if(rhi && rhi->isRecordingFrame())
134 rhi->endFrame(swapChain, QRhi::SkipPresent);
142 void release()
noexcept { rhi =
nullptr; }
146 QRhiSwapChain* swapChain{};
165 QRhiSampler* sampler{};
166 QRhiTexture* texture{};
167 QRhiTexture* fallback{};
175 ossia::hash_map<RenderList*, Sampler> samplers;
177 std::vector<float> data;
219struct SCORE_PLUGIN_GFX_EXPORT
Edge
228 generation.fetch_add(1, std::memory_order_relaxed);
229 if(
auto it = std::find(source->edges.begin(), source->edges.end(),
this);
230 it != source->edges.end())
231 source->edges.erase(it);
232 if(
auto it = std::find(sink->
edges.begin(), sink->
edges.end(),
this);
233 it != sink->
edges.end())
234 sink->
edges.erase(it);
239 Process::CableType type{};
243 static inline std::atomic<uint64_t> generation{0};
252 for(
const Edge* e : output.edges)
253 if(e && e->sink && (e->sink->flags & Flag::GrabsFromSource) == Flag::GrabsFromSource)
263 QRhiGraphicsPipeline* pipeline{};
264 QRhiShaderResourceBindings* srb{};
276 pipeline->deleteLater();
295 QRhiTexture* texture{};
296 QRhiRenderBuffer* colorRenderBuffer{};
297 QRhiRenderBuffer* depthRenderBuffer{};
298 QRhiRenderPassDescriptor* renderPass{};
299 QRhiRenderTarget* renderTarget{};
301 std::vector<QRhiTexture*> additionalColorTextures;
302 std::vector<QRhiRenderBuffer*> additionalColorRenderBuffers;
303 QRhiTexture* depthTexture{};
304 QRhiTexture* msDepthTexture{};
308 QRhiTexture* dummyColorTexture{};
314 int multiViewCount{0};
320 operator bool()
const noexcept {
return texture !=
nullptr || dummyColorTexture !=
nullptr || depthTexture !=
nullptr; }
322 int colorAttachmentCount()
const noexcept
325 return 1 + (int)additionalColorTextures.size();
326 if(dummyColorTexture)
352 int sampleCount()
const noexcept
354 if(colorRenderBuffer)
355 return colorRenderBuffer->sampleCount();
357 return texture->sampleCount();
359 return msDepthTexture->sampleCount();
361 return depthTexture->sampleCount();
369 if(texture || dummyColorTexture || depthTexture)
376 texture->deleteLater();
379 if(dummyColorTexture)
380 dummyColorTexture->deleteLater();
381 dummyColorTexture =
nullptr;
383 for(
auto* t : additionalColorTextures)
385 additionalColorTextures.clear();
387 if(colorRenderBuffer)
388 colorRenderBuffer->deleteLater();
389 colorRenderBuffer =
nullptr;
391 for(
auto* rb : additionalColorRenderBuffers)
393 additionalColorRenderBuffers.clear();
395 if(depthRenderBuffer)
396 depthRenderBuffer->deleteLater();
397 depthRenderBuffer =
nullptr;
400 depthTexture->deleteLater();
401 depthTexture =
nullptr;
404 msDepthTexture->deleteLater();
405 msDepthTexture =
nullptr;
408 renderPass->deleteLater();
409 renderPass =
nullptr;
412 renderTarget->deleteLater();
413 renderTarget =
nullptr;
424 std::vector<QImage> frames;
430SCORE_PLUGIN_GFX_EXPORT
439SCORE_PLUGIN_GFX_EXPORT
441 const RenderState& state, QRhiTexture::Format fmt, QSize sz,
int samples,
bool depth,
442 bool samplableDepth =
false, QRhiTexture::Flags flags = {});
450SCORE_PLUGIN_GFX_EXPORT
452 const RenderState& state,
453 std::span<QRhiTexture* const> colorTextures,
454 QRhiTexture* depthTexture,
470SCORE_PLUGIN_GFX_EXPORT
472 const RenderState& state, QSize sz,
int samples,
bool samplableDepth =
true,
473 QRhiTexture::Format depthFmt = QRhiTexture::D32F);
486SCORE_PLUGIN_GFX_EXPORT
488 const RenderState& state, QRhiTexture* externalDepthTexture,
int samples,
489 bool samplableDepth =
true);
500SCORE_PLUGIN_GFX_EXPORT
502 const RenderState& state, QRhiTexture* colorTextureArray,
int renderLayer,
503 QRhiTexture* depthTexture,
int samples);
513SCORE_PLUGIN_GFX_EXPORT
515 const RenderState& state, std::span<QRhiTexture* const> colorTextures,
516 int renderLayer, QRhiTexture* depthTexture,
int samples);
527SCORE_PLUGIN_GFX_EXPORT
529 const RenderState& state, QRhiTexture* colorTextureArray,
int multiViewCount,
530 QRhiTexture* depthTextureArray,
int samples);
539SCORE_PLUGIN_GFX_EXPORT
541 const RenderState& state, std::span<QRhiTexture* const> colorTextures,
542 int multiViewCount, QRhiTexture* depthTextureArray,
int samples);
551SCORE_PLUGIN_GFX_EXPORT
553 const std::string& fmt, QRhiTexture::Format fallback)
noexcept;
555SCORE_PLUGIN_GFX_EXPORT
556void replaceBuffer(QRhiShaderResourceBindings&,
int binding, QRhiBuffer* newBuffer);
557SCORE_PLUGIN_GFX_EXPORT
558void replaceSampler(QRhiShaderResourceBindings&,
int binding, QRhiSampler* newSampler);
559SCORE_PLUGIN_GFX_EXPORT
560void replaceTexture(QRhiShaderResourceBindings&,
int binding, QRhiTexture* newTexture);
562SCORE_PLUGIN_GFX_EXPORT
564 std::vector<QRhiShaderResourceBinding>&,
int binding, QRhiBuffer* newBuffer);
565SCORE_PLUGIN_GFX_EXPORT
567 std::vector<QRhiShaderResourceBinding>&,
int binding, QRhiSampler* newSampler);
568SCORE_PLUGIN_GFX_EXPORT
570 std::vector<QRhiShaderResourceBinding>&,
int binding, QRhiTexture* newTexture);
582SCORE_PLUGIN_GFX_EXPORT
584 std::vector<QRhiShaderResourceBinding>&,
int binding,
int element,
585 QRhiTexture* newTexture);
586SCORE_PLUGIN_GFX_EXPORT
588 QRhiShaderResourceBindings&,
int binding,
int element, QRhiTexture* newTexture);
593SCORE_PLUGIN_GFX_EXPORT
595 QRhiShaderResourceBindings&, QRhiSampler* oldSampler, QRhiSampler* newSampler);
600SCORE_PLUGIN_GFX_EXPORT
602 QRhiShaderResourceBindings&, QRhiSampler* sampler, QRhiTexture* newTexture);
607SCORE_PLUGIN_GFX_EXPORT
609 QRhiShaderResourceBindings&, QRhiSampler* oldSampler, QRhiSampler* newSampler,
610 QRhiTexture* newTexture);
615SCORE_PLUGIN_GFX_EXPORT
617 QRhiShaderResourceBindings& srb, QRhiTexture* old_tex, QRhiTexture* new_tex);
621SCORE_PLUGIN_GFX_EXPORT
623 const RenderList& renderer,
const TextureRenderTarget& rt, QRhiBuffer* processUBO,
624 QRhiBuffer* materialUBO, std::span<const Sampler> samplers,
625 std::span<QRhiShaderResourceBinding> additionalBindings = {},
626 int firstSamplerBinding = 3);
639SCORE_PLUGIN_GFX_EXPORT
641 const ossia::geometry& geom, std::string_view name, std::string_view semantic_key);
658 QRhiBuffer::UsageFlags usage,
659 QRhiBuffer::Type nonDynamic = QRhiBuffer::Immutable)
noexcept
661 return usage.testFlag(QRhiBuffer::UniformBuffer) ? QRhiBuffer::Dynamic
677SCORE_PLUGIN_GFX_EXPORT
679 QRhiGraphicsPipeline& pip,
const QShader& vertexShader,
680 const ossia::geometry& geom, FallbackBindingPlan* outPlan =
nullptr,
681 QRhi* rhi =
nullptr);
708SCORE_PLUGIN_GFX_EXPORT
710 QRhiGraphicsPipeline& pip,
const QShader& vertexShader,
711 const ossia::geometry& geom,
const isf::descriptor& desc,
712 QRhi& rhi, VertexFallbackPool& pool, QRhiResourceUpdateBatch& batch,
713 FallbackBindingPlan& outPlan);
718 QRhiVertexInputLayout& layout)
noexcept;
720SCORE_PLUGIN_GFX_EXPORT
void warnOrphanVertexBindings(
721 const QRhiVertexInputLayout& layout,
const char* where)
noexcept;
726SCORE_PLUGIN_GFX_EXPORT
728 const RenderList& renderer,
const Mesh& mesh,
const QShader& vertexS,
729 const QShader& fragmentS,
const TextureRenderTarget& rt, QRhiBuffer* processUBO,
730 QRhiBuffer* materialUBO, std::span<const Sampler> samplers,
731 std::span<QRhiShaderResourceBinding> additionalBindings = {});
743SCORE_PLUGIN_GFX_EXPORT
745 const RenderList& renderer,
const Mesh& mesh,
const QShader& vertexS,
746 const QShader& fragmentS,
const TextureRenderTarget& rt,
747 QRhiShaderResourceBindings* srb);
749SCORE_PLUGIN_GFX_EXPORT
751 const RenderList& renderer,
const Mesh& mesh,
const QShader& vertexS,
752 const QShader& fragmentS,
const TextureRenderTarget& rt,
753 QRhiShaderResourceBindings* srb,
const QRhiGraphicsPipeline::TargetBlend& blend);
762SCORE_PLUGIN_GFX_EXPORT
764 const RenderList& renderer,
const Mesh& mesh,
const QShader& vertexS,
765 const QShader& fragmentS,
const TextureRenderTarget& rt, QRhiBuffer* processUBO,
766 QRhiBuffer* materialUBO, std::span<const Sampler> samplers,
767 const QRhiGraphicsPipeline::TargetBlend& blend,
768 std::span<QRhiShaderResourceBinding> additionalBindings = {});
775struct sampler_config;
792SCORE_PLUGIN_GFX_EXPORT
793QRhiSampler*
makeSampler(QRhi& rhi,
const isf::sampler_config& cfg);
798SCORE_PLUGIN_GFX_EXPORT
806SCORE_PLUGIN_GFX_EXPORT
812struct pipeline_state;
817struct GraphicsStorageResources;
840SCORE_PLUGIN_GFX_EXPORT
842 const RenderList& renderer,
const Mesh& mesh,
const QShader& vertexS,
843 const QShader& fragmentS,
const TextureRenderTarget& rt, QRhiBuffer* processUBO,
844 QRhiBuffer* materialUBO, std::span<const Sampler> samplers,
845 std::span<QRhiShaderResourceBinding> extraBindings,
846 const isf::pipeline_state& state,
847 int multiViewCount = 0,
848 bool useShadingRate =
false,
849 int firstSamplerBinding = 3,
850 std::span<const QRhiGraphicsPipeline::TargetBlend> seedBlends = {});
857SCORE_PLUGIN_GFX_EXPORT
859 const RenderState& v, QString vert, QString frag,
int multiViewCount = 0);
866SCORE_PLUGIN_GFX_EXPORT
867QShader
makeCompute(
const RenderState& v, QString compt);
877 RenderList& renderer,
const std::vector<Port*>& input,
878 ossia::small_vector<Sampler, 8>& samplers);
880 QRhiBuffer* buffer{};
887SCORE_PLUGIN_GFX_EXPORT
893SCORE_PLUGIN_GFX_EXPORT
894QImage
resizeTexture(
const QImage& img,
int min,
int max)
noexcept;
896inline void copyMatrix(
const QMatrix4x4& mat,
float* ptr)
noexcept
898 memcpy(ptr, mat.constData(),
sizeof(
float) * 16);
900inline void copyMatrix(
const QMatrix3x3& mat,
float* ptr)
noexcept
902 memcpy(ptr, mat.constData(),
sizeof(
float) * 9);
908SCORE_PLUGIN_GFX_EXPORT
914SCORE_PLUGIN_GFX_EXPORT
922 QRhiResourceUpdateBatch* ub
929#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
930 ub->updateDynamicBuffer(buf, offset, QByteArray::fromRawData(data, bytesize));
932 ub->updateDynamicBuffer(buf, offset, bytesize, data);
937 QRhiResourceUpdateBatch* ub
943#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
944 ub->updateDynamicBuffer(buf, offset, std::move(b));
946 ub->updateDynamicBuffer(buf, offset, b.size(), b.data());
954 QRhiResourceUpdateBatch* ub
961#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
962 ub->uploadStaticBuffer(buf, offset, QByteArray::fromRawData(data, bytesize));
964 ub->uploadStaticBuffer(buf, offset, bytesize, data);
969 QRhiResourceUpdateBatch* ub
975#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
976 ub->uploadStaticBuffer(buf, offset, std::move(b));
978 ub->uploadStaticBuffer(buf, offset, b.size(), b.data());
986SCORE_PLUGIN_GFX_EXPORT
994SCORE_PLUGIN_GFX_EXPORT
996 QRhi& rhi, QRhiResourceUpdateBatch& res, std::string_view qualifier,
int dimensions,
997 bool array,
bool cube);
1004SCORE_PLUGIN_GFX_EXPORT
1008SCORE_PLUGIN_GFX_EXPORT
1016SCORE_PLUGIN_GFX_EXPORT
1018 QRhi& rhi,
const char* kind, std::initializer_list<const QString*> sources);
1020SCORE_PLUGIN_GFX_EXPORT
1021std::vector<Sampler> initInputSamplers(
1022 const score::gfx::Node& node, RenderList& renderer,
const std::vector<Port*>& ports,
1023 const isf::descriptor* desc =
nullptr);
1029SCORE_PLUGIN_GFX_EXPORT
1031 std::span<const Sampler> samplers,
const score::gfx::Node& node,
const Port& input,
1032 const RenderTargetSpecs& spec);
Root data model for visual nodes.
Definition score-plugin-gfx/Gfx/Graph/Node.hpp:76
List of nodes to be rendered to an output.
Definition RenderList.hpp:33
TreeNode< DeviceExplorerNode > Node
Definition DeviceNode.hpp:74
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
QSizeF computeScaleForTexcoordSizing(ScaleMode mode, QSizeF renderSize, QSizeF textureSize)
Compute the scale to apply to a texture rendered to a quad the size of viewport.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1656
bool remapPipelineVertexInputs(QRhiGraphicsPipeline &pip, const QShader &vertexShader, const ossia::geometry &geom, FallbackBindingPlan *outPlan, QRhi *rhi)
Remap a pipeline's vertex input layout using semantic matching.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:909
void updateDynamicBufferWithStoredData(QRhiResourceUpdateBatch *ub, QRhiBuffer *buf, int offset, int64_t bytesize, const char *data)
Schedule a Dynamic buffer update when we can guarantee the buffer outlives the frame.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:921
int maxStorageImageBinding(QStringView glsl)
Highest binding of a storage image declared in glsl, -1 if none.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2449
TextureRenderTarget createLayeredRenderTarget(const RenderState &state, QRhiTexture *colorTextureArray, int renderLayer, QRhiTexture *depthTex, int samples)
Create a render target that targets a single layer of a texture array.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2005
QRhiTexture * createStorageImagePlaceholder(QRhi &rhi, QRhiResourceUpdateBatch &res, std::string_view qualifier, int dimensions, bool array, bool cube)
A zero-filled 1x1 texture a storage image binding declared with qualifier can take when nothing is bo...
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2534
const ossia::geometry::attribute * findGeometryAttribute(const ossia::geometry &geom, std::string_view name, std::string_view semantic_key)
Match a (name, semantic) request to an upstream geometry attribute.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:607
QRhiBuffer::Type bufferTypeFor(QRhiBuffer::UsageFlags usage, QRhiBuffer::Type nonDynamic=QRhiBuffer::Immutable) noexcept
The QRhi buffer type a usage flag is allowed to be created with.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:657
void dropTrailingOrphanVertexBindings(QRhiVertexInputLayout &layout) noexcept
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:929
QRhiSampler * makeSampler(QRhi &rhi, const isf::sampler_config &cfg)
Build a QRhiSampler from an isf::sampler_config.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2394
QShader makeCompute(const RenderState &v, QString compute)
Compile a compute shader.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1466
bool outputGrabbedBySink(const Port &output) noexcept
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:250
bool followTextureMips(QRhiSampler &sampler, const QRhiTexture &texture)
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2414
std::pair< QShader, QShader > makeShaders(const RenderState &v, QString vert, QString frag, int multiViewCount)
Get a pair of compiled vertex / fragment shaders from GLSL 4.5 sources.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1367
bool declaresCompare(const isf::sampler_config &cfg) noexcept
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2389
QRhiTexture::Format imageFormatFromQualifier(std::string_view qualifier) noexcept
QRhi format for a GLSL image format qualifier ("rgba8", "r32ui", ...); RGBA8 when unknown.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2508
TextureRenderTarget createRenderTarget(const RenderState &state, QRhiTexture *tex, int samples, bool depth, bool samplableDepth)
Create a render target from a texture.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:68
TextureRenderTarget createDepthOnlyRenderTarget(const RenderState &state, QSize sz, int samples, bool samplableDepth, QRhiTexture::Format depthFmt)
Create a depth-only render target.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1890
Pipeline buildPipeline(const RenderList &renderer, const Mesh &mesh, const QShader &vertexS, const QShader &fragmentS, const TextureRenderTarget &rt, QRhiShaderResourceBindings *srb)
Lower-level buildPipeline variant: bring your own SRB.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1170
int storageImageUnitLimit(QRhi &rhi)
Number of storage image units the backend binds by binding number: GL_MAX_IMAGE_UNITS on OpenGL (8 wh...
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2426
void uploadStaticBufferWithStoredData(QRhiResourceUpdateBatch *ub, QRhiBuffer *buf, int offset, int64_t bytesize, const char *data)
Schedule a Static buffer update when we can guarantee the buffer outlives the frame.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:953
QRhiShaderResourceBindings * createDefaultBindings(const RenderList &renderer, const TextureRenderTarget &rt, QRhiBuffer *processUBO, QRhiBuffer *materialUBO, std::span< const Sampler > samplers, std::span< QRhiShaderResourceBinding > additionalBindings, int firstSamplerBinding)
Create bindings following the score conventions for shaders and materials.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1093
QRhiTexture::Format parseOutputFormat(const std::string &fmt, QRhiTexture::Format fallback) noexcept
Map an ISF/CSF FORMAT string to a QRhiTexture::Format.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2320
QImage resizeTexture(const QImage &img, int min, int max) noexcept
Resize a texture to fit within GPU limits.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1606
QSizeF computeScaleForMeshSizing(ScaleMode mode, QSizeF viewport, QSizeF texture)
Compute the scale to apply to a texture so that it fits in a GL viewport.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1616
TextureRenderTarget createMultiViewRenderTarget(const RenderState &state, QRhiTexture *colorTextureArray, int multiViewCount, QRhiTexture *depthTextureArray, int samples)
Create a multiview render target (single RT drawing N views at once).
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2052
Pipeline buildPipelineWithState(const RenderList &renderer, const Mesh &mesh, const QShader &vertexS, const QShader &fragmentS, const TextureRenderTarget &rt, QRhiBuffer *processUBO, QRhiBuffer *materialUBO, std::span< const Sampler > samplers, std::span< QRhiShaderResourceBinding > extraBindings, const isf::pipeline_state &state, int multiViewCount, bool useShadingRate, int firstSamplerBinding, std::span< const QRhiGraphicsPipeline::TargetBlend > seedBlends)
Create a render pipeline applying pipeline_state from an ISF descriptor.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1211
void replaceSamplerAndTexture(QRhiShaderResourceBindings &srb, QRhiSampler *oldSampler, QRhiSampler *newSampler, QRhiTexture *newTexture)
Replace both sampler and texture in a SRC.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:519
bool warnStorageImageUnits(QRhi &rhi, const char *kind, std::initializer_list< const QString * > sources)
Warn once per shader when a storage image in sources has a binding the OpenGL backend cannot bind (at...
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:2472
ScaleMode
How to resize a texture to adapt it to a viewport.
Definition Scale.hpp:10
void updateInputSamplerFilter(std::span< const Sampler > samplers, const score::gfx::Node &node, const Port &input, const RenderTargetSpecs &spec)
Give the sampler initInputSamplers() created for input, one of node's input ports,...
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1849
void replaceTextureElement(std::vector< QRhiShaderResourceBinding > &tmp, int binding, int element, QRhiTexture *newTexture)
Replace one element of a multi-element texture binding.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:419
QSize resizeTextureSize(QSize sz, int min, int max) noexcept
Resize the size of a texture to fit within GPU limits.
Definition score-plugin-gfx/Gfx/Graph/Utils.cpp:1555
Data model for audio data being sent to the GPU.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:174
Utility to represent a shader material following score conventions.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:875
Connection between two score::gfx::Port.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:220
Definition VertexFallbackPlan.hpp:27
Image data and metadata.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:422
RAII bracket for QRhi::beginOffscreenFrame / endOffscreenFrame.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:49
static std::atomic_bool simulateDeviceLost
Test seam: while set, every new frame fails to begin with FrameOpDeviceLost without touching the QRhi...
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:107
Useful abstraction for storing a graphics pipeline and associated resource bindings.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:262
FallbackBindingPlan plan
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:271
Port of a score::gfx::Node.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:199
void * value
Pointer to the corresponding data.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:204
score::gfx::Node * node
Parent node of the port.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:201
Types type
Type of the value.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:207
std::vector< Edge * > edges
Edges connected to that port.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:213
Flag flags
Optional setting flags.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:210
Global state associated to a rendering context.
Definition RenderState.hpp:37
Stores a sampler and the texture currently associated with it.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:164
Closes a swapchain frame if the scope is left without presenting it.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:124
Useful abstraction for storing all the data related to a render target.
Definition score-plugin-gfx/Gfx/Graph/Utils.hpp:291