Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorRendering Namespace Reference

Namespaces

namespace  ZoneShaderUboRegions
 UBO region offsets for partial updates (reduces GPU bandwidth).
 

Classes

class  ShaderCompiler
 Static utility for GLSL → SPIR-V compilation with include resolution and caching. More...
 
class  ShaderEffect
 QQuickItem that renders a fullscreen fragment shader via Qt RHI. More...
 
class  ShaderNodeRhi
 QSGRenderNode for fullscreen-quad shader rendering via Qt RHI (Vulkan / OpenGL) More...
 
struct  WarmShaderBakeResult
 Result of warmShaderBakeCacheForPaths for reporting to UI. More...
 
struct  ZoneColor
 Parsed zone color data for shader rendering. More...
 
struct  ZoneData
 Per-zone payload pushed into the UBO each frame. More...
 
struct  ZoneDataSnapshot
 Thread-safe zone data snapshot for the render thread. More...
 
struct  ZoneRect
 Parsed zone rectangle data for shader rendering. More...
 
class  ZoneShaderNodeRhi
 QSGRenderNode for zone overlay rendering, delegating to ShaderNodeRhi. More...
 
struct  ZoneShaderUniforms
 GPU uniform buffer layout — BaseUniforms + zone extension. More...
 
class  ZoneUniformExtension
 IUniformExtension implementation for zone data. More...
 

Functions

constexpr bool isConsumerBinding (int binding) noexcept
 
PHOSPHORRENDERING_EXPORT WarmShaderBakeResult warmShaderBakeCacheForPaths (const QString &vertexPath, const QString &fragmentPath, const QStringList &includePaths={})
 Pre-load cache warming: load, bake, and insert shaders for the given paths into the shared bake cache.
 

Variables

constexpr int kMaxUserTextureSlots = 4
 Public mirror of ShaderNodeRhi::kMaxUserTextures (4 user-texture slots at SRB bindings 7..10).
 
constexpr int kMaxBufferPasses = 4
 
constexpr int kMaxUserTextures = 4
 
constexpr int kMaxCustomParams = 8
 
constexpr int kMaxCustomColors = 16
 
constexpr int kFirstFreeConsumerBinding = 1
 First slot usable via setExtraBinding()
 
constexpr int kMaxConsumerBinding = 31
 Highest portable SRB binding.
 
constexpr int kReservedBindingRangeStart = 2
 First library-managed binding above 0.
 
constexpr int kReservedBindingRangeEnd = 12
 Last library-managed binding.
 
constexpr int kUserTextureBaseBinding = 7
 First SRB binding for the user-texture slots (slot 0 → binding 7).
 
constexpr int MaxZones = 64
 Maximum number of zones the zone-aware UBO supports.
 

Function Documentation

◆ isConsumerBinding()

constexpr bool PhosphorRendering::isConsumerBinding ( int  binding)
constexprnoexcept
Returns
true if binding is usable by consumers via setExtraBinding().

◆ warmShaderBakeCacheForPaths()

PHOSPHORRENDERING_EXPORT WarmShaderBakeResult PhosphorRendering::warmShaderBakeCacheForPaths ( const QString &  vertexPath,
const QString &  fragmentPath,
const QStringList &  includePaths = {} 
)

Pre-load cache warming: load, bake, and insert shaders for the given paths into the shared bake cache.

Safe to call from any thread.

Parameters
vertexPathPath to the vertex shader file
fragmentPathPath to the fragment shader file
includePathsDirectories to search for #include directives
Returns
success and error message for UI reporting

Variable Documentation

◆ kFirstFreeConsumerBinding

constexpr int PhosphorRendering::kFirstFreeConsumerBinding = 1
constexpr

First slot usable via setExtraBinding()

◆ kMaxBufferPasses

constexpr int PhosphorRendering::kMaxBufferPasses = 4
constexpr

◆ kMaxConsumerBinding

constexpr int PhosphorRendering::kMaxConsumerBinding = 31
constexpr

Highest portable SRB binding.

31 matches Qt RHI's minimum guarantee (minMaxShaderResourceBindingCount) across all backends — Vulkan/D3D11/ Metal/OpenGL all advertise at least 32 bindings. Going higher risks pipeline-creation failure on conservative drivers.

◆ kMaxCustomColors

constexpr int PhosphorRendering::kMaxCustomColors = 16
constexpr

◆ kMaxCustomParams

constexpr int PhosphorRendering::kMaxCustomParams = 8
constexpr

◆ kMaxUserTextures

constexpr int PhosphorRendering::kMaxUserTextures = 4
constexpr

◆ kMaxUserTextureSlots

constexpr int PhosphorRendering::kMaxUserTextureSlots = 4
inlineconstexpr

Public mirror of ShaderNodeRhi::kMaxUserTextures (4 user-texture slots at SRB bindings 7..10).

Re-declared here so member-array sizes can use the named constant without pulling in the heavy rhi/qrhi.h transitive chain that ShaderNodeRhi.h carries. Kept in sync via a static_assert in shadereffect.cpp.

◆ kReservedBindingRangeEnd

constexpr int PhosphorRendering::kReservedBindingRangeEnd = 12
constexpr

Last library-managed binding.

◆ kReservedBindingRangeStart

constexpr int PhosphorRendering::kReservedBindingRangeStart = 2
constexpr

First library-managed binding above 0.

◆ kUserTextureBaseBinding

constexpr int PhosphorRendering::kUserTextureBaseBinding = 7
constexpr

First SRB binding for the user-texture slots (slot 0 → binding 7).

Both setSourceTextureProvider's slot-0 override and the QImage-uploaded user textures key off this base.

◆ MaxZones

constexpr int PhosphorRendering::MaxZones = 64
constexpr

Maximum number of zones the zone-aware UBO supports.