6#include <PhosphorShaders/phosphorshaders_export.h>
171PHOSPHORSHADERS_EXPORT QString
kwinDefineBlock(
const QString& eol = QStringLiteral(
"\n"));
253 const QString& extraDefines = {},
254 bool* synthesizedVersion =
nullptr);
274PHOSPHORSHADERS_EXPORT QString
lineDirective(
int line,
int sourceString,
const QString& eol = QStringLiteral(
"\n"));
Definition ShaderProfile.h:21
constexpr int kMaxImageSlots
Image-pool budget: overlay/zone image params bind to uTexture0..3.
Definition ShaderParamPreamble.h:18
PHOSPHORSHADERS_EXPORT int versionDirectiveEnd(const QString &source)
Locate the first REAL #version directive of source: the first line whose first non-whitespace token i...
PHOSPHORSHADERS_EXPORT QString buildParamPreamble(const QList< PreambleParam > ¶ms)
Build the generated #define p_<id> <glsl-accessor> preamble for a shader's declared parameters.
PHOSPHORSHADERS_EXPORT QString kwinTopDownTexcoordsDefine(const QString &eol=QStringLiteral("\n"))
The #define KWin 6.8's per-window animation path and the decoration present shader splice beside kwin...
PHOSPHORSHADERS_EXPORT QString lineDirective(int line, int sourceString, const QString &eol=QStringLiteral("\n"))
A #line re-anchor that numbers the NEXT line line of source string sourceString under every GLSL dial...
PHOSPHORSHADERS_EXPORT QString kwinDefineBlock(const QString &eol=QStringLiteral("\n"))
The preprocessor block that selects the COMPOSITOR branch of a pack's source, newline-terminated with...
PHOSPHORSHADERS_EXPORT QString stripVaryingLocations(const QString &source, ShaderStage stage)
Remove the layout(location = N) qualifier from every varying of source: the out declarations of a ver...
PHOSPHORSHADERS_EXPORT QString kwinGlesDialect(const QString &source)
source as KWin 6.8 hands it to the driver: every line that starts with #version blanked (its newline ...
ShaderStage
The pipeline stage a source is compiled for, as stripVaryingLocations needs to tell a varying from a ...
Definition ShaderParamPreamble.h:175
@ Fragment
Definition ShaderParamPreamble.h:177
@ Vertex
Definition ShaderParamPreamble.h:176
PHOSPHORSHADERS_EXPORT QString kwinCompositorSource(const QString &source, ShaderStage stage, const QString &extraDefines={}, bool *synthesizedVersion=nullptr)
The compositor branch of source exactly as the effect hands it to KWin: kwinDefineBlock and extraDefi...
PHOSPHORSHADERS_EXPORT QString spliceAfterVersion(const QString &source, const QString &block)
Splice block into source immediately after its #version line, then emit a lineDirective re-anchoring ...
PHOSPHORSHADERS_EXPORT bool isValidParamId(const QString &id)
True if id is a valid GLSL identifier body ([A-Za-z0-9_], non-empty) — the p_ prefix supplies the lea...
PHOSPHORSHADERS_EXPORT bool isReservedAnimationParamId(const QString &id)
True if p_<id> would COLLIDE with a #define p_... a shared family header already owns.
PHOSPHORSHADERS_EXPORT QString kwinDesktopDialect(const QString &source)
source as KWin 6.7 hands it to the driver on a desktop GL context: every line that starts with #versi...
One declared shader parameter, in metadata declaration order, as fed to buildParamPreamble.
Definition ShaderParamPreamble.h:26
Pool
Which UBO region the parameter occupies.
Definition ShaderParamPreamble.h:34
@ Image
Definition ShaderParamPreamble.h:37
@ Color
Definition ShaderParamPreamble.h:36
@ Scalar
Definition ShaderParamPreamble.h:35
int explicitSlot
Explicit slot from metadata, or -1 to auto-assign by declaration order within the parameter's pool.
Definition ShaderParamPreamble.h:48
QString id
Definition ShaderParamPreamble.h:40
Pool pool
Definition ShaderParamPreamble.h:41