Share retained shader dispatch bridge

This commit is contained in:
2026-06-05 14:58:20 +02:00
parent 96ff1c41e2
commit ad9b91eeda
5 changed files with 352 additions and 307 deletions

View File

@@ -1193,7 +1193,11 @@ mapping, including mirrored-repeat, and aggregate renderer API sampler-state to
OpenGL min/mag/wrap mapping are also tested there. The PanoPainter shader attribute
binding catalog, shader stage tokens, compile/link status queries, active-uniform
count query, and matrix-uniform transpose token also live in `pp_renderer_gl`
and are consumed by legacy `Shader` creation. Renderer API blend factor/op to
and are consumed by legacy `Shader` creation; retained shader source
compilation/deletion, program attach/link/use/delete, attribute rebinding and
location lookup, active-uniform enumeration, uniform-location discovery, and
uniform writes now share the retained `legacy_gl_shader_dispatch` raw callback
bridge. Renderer API blend factor/op to
OpenGL token mapping also lives in `pp_renderer_gl`, with explicit support flags
so `GL_ZERO` remains distinguishable from unsupported enum values. Aggregate
renderer API blend-state to OpenGL enable/factor/equation/color-mask mapping,
@@ -2317,12 +2321,11 @@ Results:
uniform catalog validation covers the 43 legacy uniform
names used by `Shader`, preserves the legacy hash ids, and rejects empty,
unnamed, null-name, mismatched-hash, and duplicate-name catalogs.
Legacy `Shader` program use/delete, uniform writes, and attribute-location
lookups now execute through tested `pp_renderer_gl` dispatch contracts.
Legacy shader source compilation, shader deletion, program attach/link,
Legacy `Shader` program use/delete, uniform writes, attribute-location
lookups, shader source compilation, shader deletion, program attach/link,
attribute rebinding, active-uniform count/enumeration, and uniform-location
discovery also execute through tested `pp_renderer_gl` dispatch contracts,
leaving only thin GL adapter functions in the retained `Shader` utility.
discovery now execute through tested `pp_renderer_gl` dispatch contracts via
`legacy_gl_shader_dispatch`.
Retained `Shape`, `TextMesh`, and `NodeColorWheel` mesh buffer/VAO creation,
zero-byte dynamic-buffer creation, dynamic buffer uploads, indexed and
non-indexed draws, and resource deletion now execute through tested
@@ -2576,6 +2579,12 @@ Results:
now share `legacy_gl_mesh_dispatch`, removing duplicated raw mesh callback
clusters from `src/shape.cpp`, `src/font.cpp`, and `src/node_colorwheel.cpp`
while mesh resource ownership remains retained under DEBT-0036.
- Retained shader source compilation/deletion, program attach/link/use/delete,
attribute rebinding and location lookup, active-uniform enumeration,
uniform-location discovery, and vec/mat/scalar uniform writes now share
`legacy_gl_shader_dispatch`, removing duplicated raw shader/program/uniform
callback ownership from `src/shader.cpp` while shader-program ownership
remains retained under DEBT-0036.
- Canvas draw-merge shader-blend selection now consumes the extracted
`pp_paint_renderer` stroke composite planner for current layer and primary
brush blend modes, while preserving legacy OpenGL compositing execution under