Loading...
Searching...
No Matches
RhiClearBuffer.hpp
1#pragma once
2#include <score_plugin_gfx_export.h>
3
4#include <QtCore/qglobal.h>
5
6class QRhi;
7class QRhiBuffer;
8class QRhiCommandBuffer;
9class QRhiResourceUpdateBatch;
10
11namespace score::gfx
12{
13
53namespace RhiClearBuffer
54{
55
62SCORE_PLUGIN_GFX_EXPORT
63void clearBuffer(
64 QRhi& rhi,
65 QRhiCommandBuffer& cb,
66 QRhiBuffer* buf,
67 quint32 offset,
68 quint32 size,
69 quint32 pattern = 0u);
70
77SCORE_PLUGIN_GFX_EXPORT
78void clearBuffer(
79 QRhi& rhi,
80 QRhiResourceUpdateBatch& batch,
81 QRhiBuffer* buf,
82 quint32 offset,
83 quint32 size,
84 quint32 pattern = 0u);
85
87SCORE_PLUGIN_GFX_EXPORT
88std::size_t poolBytes() noexcept;
89
90} // namespace RhiClearBuffer
91
92// Metal-specific implementation hook (lives in RhiClearBufferMetal.mm).
93// On non-Apple platforms a no-op stub is provided in RhiClearBuffer.cpp.
94// Returns true on success, false if the native path is unavailable
95// (caller should fall back to the batch variant).
96bool clearBufferMetal(
97 QRhi& rhi,
98 QRhiCommandBuffer& cb,
99 QRhiBuffer* buf,
100 quint32 offset,
101 quint32 size,
102 quint32 pattern);
103
104} // namespace score::gfx
std::size_t poolBytes() noexcept
For tests: the bytes this thread's zero and pattern pools hold.
Definition RhiClearBuffer.cpp:257
void clearBuffer(QRhi &rhi, QRhiCommandBuffer &cb, QRhiBuffer *buf, quint32 offset, quint32 size, quint32 pattern=0u)
Definition RhiClearBuffer.cpp:214
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11