IUboProfile implementation for the overlay/animation runtime — the legacy 672-byte BaseUniforms layout. More...
#include <phosphor-shaders/include/PhosphorShaders/BaseUniformProfile.h>
Public Member Functions | |
| BaseUniformProfile () | |
| ~BaseUniformProfile () override=default | |
| int | baseSize () const override |
| Byte size of the base UBO region (sizeof the concrete struct). | |
| const void * | data () const override |
| Read-only view of the filled UBO bytes (for updateDynamicBuffer). | |
| void * | mutableData () override |
| Mutable view — used by the node's multipass qt_Matrix pin/restore, which writes the leading mat4 directly at offset 0. | |
| void | fill (const UboFrameState &state) override |
| Populate the UBO from a per-frame node snapshot. | |
| UboUploadRegionList | dirtyRegions (const UboDirtyFlags &flags) const override |
| Region(s) to upload for the given dirty flags, reproducing the legacy broader-subsumes-narrower dispatch. | |
| bool | hasAppFields () const override |
| Whether this profile exposes the two consumer escape-hatch int slots. | |
| void | setAppField0 (int value) override |
| Write the consumer's escape-hatch int slots. No-op by default. | |
| void | setAppField1 (int value) override |
Public Member Functions inherited from PhosphorShaders::IUboProfile | |
| virtual | ~IUboProfile ()=default |
| virtual UboUploadRegionList | fullUploadRegions () const |
| Region(s) covering the whole base struct, for the first (full) upload. | |
IUboProfile implementation for the overlay/animation runtime — the legacy 672-byte BaseUniforms layout.
fill() is a faithful transcription of the historical ShaderNodeRhi::syncBaseUniforms() body (plus the iFlipBufferY=1 and the qt_Matrix Y-flip that previously lived in uploadDirtyTextures(), folded in here because they have no QRhi dependency once yUpInNDC is carried in the frame state). The one intentional departure: the iMouse normalized components divide in float (the frame state carries floats) rather than the historical double, a last-ULP difference the golden test pins to the float path. dirtyRegions() reproduces the exact legacy UboRegions dispatch.
| PhosphorShaders::BaseUniformProfile::BaseUniformProfile | ( | ) |
|
overridedefault |
|
inlineoverridevirtual |
Byte size of the base UBO region (sizeof the concrete struct).
Drives the node's UBO allocation and the IUniformExtension offset.
Implements PhosphorShaders::IUboProfile.
|
inlineoverridevirtual |
Read-only view of the filled UBO bytes (for updateDynamicBuffer).
Implements PhosphorShaders::IUboProfile.
|
overridevirtual |
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.
Implements PhosphorShaders::IUboProfile.
|
overridevirtual |
Populate the UBO from a per-frame node snapshot.
Implementations read only the subset of state they need.
Implements PhosphorShaders::IUboProfile.
|
inlineoverridevirtual |
Whether this profile exposes the two consumer escape-hatch int slots.
Reimplemented from PhosphorShaders::IUboProfile.
|
inlineoverridevirtual |
Mutable view — used by the node's multipass qt_Matrix pin/restore, which writes the leading mat4 directly at offset 0.
Implements PhosphorShaders::IUboProfile.
|
inlineoverridevirtual |
Write the consumer's escape-hatch int slots. No-op by default.
Reimplemented from PhosphorShaders::IUboProfile.
|
inlineoverridevirtual |
Reimplemented from PhosphorShaders::IUboProfile.