6#include <PhosphorShaders/phosphorshaders_export.h>
41 m_regions[
static_cast<size_t>(m_count++)] = region;
57 Q_ASSERT(i >= 0 && i < m_count);
58 return m_regions[
static_cast<size_t>(i)];
62 return m_regions.data();
66 return m_regions.data() + m_count;
70 std::array<UboUploadRegion, kCapacity> m_regions{};
205 virtual const void*
data()
const = 0;
Pluggable UBO concern for the shared shader render engine.
Definition IUboProfile.h:196
virtual bool hasAppFields() const
Whether this profile exposes the two consumer escape-hatch int slots.
Definition IUboProfile.h:228
virtual void setAppField1(int)
Definition IUboProfile.h:236
virtual void fill(const UboFrameState &state)=0
Populate the UBO from a per-frame node snapshot.
virtual const void * data() const =0
Read-only view of the filled UBO bytes (for updateDynamicBuffer).
virtual UboUploadRegionList fullUploadRegions() const
Region(s) covering the whole base struct, for the first (full) upload.
Definition IUboProfile.h:215
virtual UboUploadRegionList dirtyRegions(const UboDirtyFlags &flags) const =0
Region(s) to upload for the given dirty flags, reproducing the legacy broader-subsumes-narrower dispa...
virtual int baseSize() const =0
Byte size of the base UBO region (sizeof the concrete struct).
virtual ~IUboProfile()=default
virtual void setAppField0(int)
Write the consumer's escape-hatch int slots. No-op by default.
Definition IUboProfile.h:233
virtual void * mutableData()=0
Mutable view — used by the node's multipass qt_Matrix pin/restore, which writes the leading mat4 dire...
Fixed-capacity list of upload regions.
Definition IUboProfile.h:29
static constexpr int kCapacity
Definition IUboProfile.h:31
const UboUploadRegion * begin() const
Definition IUboProfile.h:60
const UboUploadRegion & operator[](int i) const
Definition IUboProfile.h:52
void push(const UboUploadRegion ®ion)
Definition IUboProfile.h:33
bool empty() const
Definition IUboProfile.h:48
const UboUploadRegion * end() const
Definition IUboProfile.h:64
int size() const
Definition IUboProfile.h:44
Definition ShaderEffect.h:33
Which conceptual blocks of the UBO changed since the last upload.
Definition IUboProfile.h:84
bool timeHi
Definition IUboProfile.h:86
bool appFields
Definition IUboProfile.h:88
bool sceneData
Definition IUboProfile.h:87
bool time
Definition IUboProfile.h:85
Snapshot of every node-side value a UBO profile's fill() may read for a single frame.
Definition IUboProfile.h:98
bool isReversed
Definition IUboProfile.h:120
int frame
Definition IUboProfile.h:105
float customColors[16][4]
Definition IUboProfile.h:130
float mouseY
Definition IUboProfile.h:117
float width
Definition IUboProfile.h:112
float surfaceScale
Logical→device pixel scale for the decorated surface.
Definition IUboProfile.h:154
float surfaceFrameTopLeft[2]
Frame top-left in device px.
Definition IUboProfile.h:169
float surfaceFocused
1.0 when the surface is focused, 0.0 otherwise.
Definition IUboProfile.h:156
float channelResolution[4][2]
iChannelResolution[i].xy — multipass buffer-channel output sizes.
Definition IUboProfile.h:134
float customParams[8][4]
Definition IUboProfile.h:129
float hasBackdrop
1.0 when a backdrop texture (the scene / wallpaper BEHIND the surface) is actually bound for this dra...
Definition IUboProfile.h:165
float timeDelta
Definition IUboProfile.h:104
float surfaceFrameSize[2]
Frame size in device px.
Definition IUboProfile.h:171
bool bufferFeedback
Definition IUboProfile.h:108
bool bufferFeedbackCleared
Definition IUboProfile.h:109
bool sceneDataDirty
Definition IUboProfile.h:126
bool yUpInNDC
True when this draw should carry the NDC Y-flip: a Y-up-in-NDC backend (OpenGL, rhi->isYUpInNDC()) AN...
Definition IUboProfile.h:148
float backdropRect[4]
The slice of the bound backdrop this surface samples, in normalized texture coords (xy = min,...
Definition IUboProfile.h:180
float textureResolution[4][2]
iTextureResolution[i].xy — user-texture slot sizes.
Definition IUboProfile.h:136
float mouseX
Definition IUboProfile.h:116
float timeHi
Wrap-offset high part.
Definition IUboProfile.h:103
float surfaceSize[2]
Decorated surface size in device px.
Definition IUboProfile.h:167
float qtOpacity
Per-surface opacity from the Qt scene graph.
Definition IUboProfile.h:152
bool didFullUploadOnce
Whether the first full upload has happened.
Definition IUboProfile.h:125
float time
Wrapped low part of elapsed seconds (m_time - m_timeHi).
Definition IUboProfile.h:101
int audioSpectrumSize
Definition IUboProfile.h:139
float height
Definition IUboProfile.h:113
A contiguous byte range inside the UBO to (re)upload via QRhiResourceUpdateBatch::updateDynamicBuffer...
Definition IUboProfile.h:19
int offset
Definition IUboProfile.h:20
int size
Definition IUboProfile.h:21