Pluggable UBO concern for the shared shader render engine. More...
#include <phosphor-shaders/include/PhosphorShaders/IUboProfile.h>
Public Member Functions | |
| virtual | ~IUboProfile ()=default |
| virtual int | baseSize () const =0 |
| Byte size of the base UBO region (sizeof the concrete struct). | |
| virtual const void * | data () const =0 |
| Read-only view of the filled UBO bytes (for updateDynamicBuffer). | |
| virtual void * | mutableData ()=0 |
| Mutable view — used by the node's multipass qt_Matrix pin/restore, which writes the leading mat4 directly at offset 0. | |
| virtual void | fill (const UboFrameState &state)=0 |
| Populate the UBO from a per-frame node snapshot. | |
| virtual UboUploadRegionList | fullUploadRegions () const |
| Region(s) covering the whole base struct, for the first (full) upload. | |
| virtual UboUploadRegionList | dirtyRegions (const UboDirtyFlags &flags) const =0 |
| Region(s) to upload for the given dirty flags, reproducing the legacy broader-subsumes-narrower dispatch. | |
| virtual bool | hasAppFields () const |
| Whether this profile exposes the two consumer escape-hatch int slots. | |
| virtual void | setAppField0 (int) |
| Write the consumer's escape-hatch int slots. No-op by default. | |
| virtual void | setAppField1 (int) |
Pluggable UBO concern for the shared shader render engine.
ShaderNodeRhi owns the SRB/pipeline/multipass/binding machinery; the ONLY part that varies between the overlay/animation runtime and a future surface-decoration runtime is the uniform buffer: its struct, byte size, per-frame fill, and dirty-upload region dispatch. This interface abstracts exactly that seam — bindings stay unabstracted because the surface binding map (UBO@0, iChannel0-3@2-5, uTexture0@7) is a strict subset of the overlay map.
Implementations hold their concrete UBO POD struct and expose its bytes via data()/mutableData() so the node can drive updateDynamicBuffer directly.
|
virtualdefault |
|
pure virtual |
Byte size of the base UBO region (sizeof the concrete struct).
Drives the node's UBO allocation and the IUniformExtension offset.
Implemented in PhosphorShaders::BaseUniformProfile.
|
pure virtual |
Read-only view of the filled UBO bytes (for updateDynamicBuffer).
Implemented in PhosphorShaders::BaseUniformProfile.
|
pure virtual |
Region(s) to upload for the given dirty flags, reproducing the legacy broader-subsumes-narrower dispatch.
Returns a fixed-capacity list — this runs per dirty frame and must not allocate.
Implemented in PhosphorShaders::BaseUniformProfile.
|
pure virtual |
Populate the UBO from a per-frame node snapshot.
Implementations read only the subset of state they need.
Implemented in PhosphorShaders::BaseUniformProfile.
|
inlinevirtual |
Region(s) covering the whole base struct, for the first (full) upload.
|
inlinevirtual |
Whether this profile exposes the two consumer escape-hatch int slots.
Reimplemented in PhosphorShaders::BaseUniformProfile.
|
pure virtual |
Mutable view — used by the node's multipass qt_Matrix pin/restore, which writes the leading mat4 directly at offset 0.
Implemented in PhosphorShaders::BaseUniformProfile.
|
inlinevirtual |
Write the consumer's escape-hatch int slots. No-op by default.
Reimplemented in PhosphorShaders::BaseUniformProfile.
|
inlinevirtual |
Reimplemented in PhosphorShaders::BaseUniformProfile.