Share retained mesh dispatch bridge

This commit is contained in:
2026-06-05 14:51:40 +02:00
parent d719a5a5e5
commit 96ff1c41e2
7 changed files with 298 additions and 325 deletions

View File

@@ -465,10 +465,11 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p
validates renderer API primitive-topology to OpenGL draw-mode mapping, Shape
index-type, fill/stroke primitive-mode, buffer target, static upload usage,
and vertex attribute component/normalization mapping used by
the legacy mesh draw path. Legacy `Shape` mesh buffer/VAO creation, zero-byte
dynamic-buffer creation, dynamic vertex/index uploads, fill/stroke draw
calls, and buffer/VAO deletion now consume tested dispatch contracts here,
plus the PanoPainter cube-face to OpenGL
the legacy mesh draw path. Retained `Shape`, `TextMesh`, and
`NodeColorWheel` mesh buffer/VAO creation, zero-byte dynamic-buffer creation,
dynamic vertex/index uploads, fill/stroke/text draw calls, and buffer/VAO
deletion now consume tested dispatch contracts here through
`legacy_gl_mesh_dispatch`, plus the PanoPainter cube-face to OpenGL
texture-target mapping used by `TextureCube`.
It also owns and validates sampler wrap S/T/R, min/mag filter, and desktop
border-color parameter mapping used by legacy `Sampler`, plus renderer API
@@ -511,7 +512,7 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p
texture unit selection also consume the backend mapping. Text mesh
buffer/VAO creation, deferred index/vertex uploads, indexed draw calls, and
draw-time texture-unit activation now consume tested `pp_renderer_gl`
dispatch contracts too. Canvas undo/redo dirty-region texture updates and
dispatch contracts through the shared retained mesh bridge too. Canvas undo/redo dirty-region texture updates and
readbacks also consume the backend-owned 2D texture target, RGBA pixel
format, and unsigned-byte component mapping; canvas stroke commit, thumbnail,
and object-draw history paths now consume tested capability-state query
@@ -523,9 +524,8 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p
`NodeImage` drawing and remote-image texture creation also consume
backend-owned mipmapped sampler filters, blend-state tokens, and RGBA8/RGBA
texture format mapping.
`NodeColorWheel` triangle-buffer setup and draw-state handling also consume
backend-owned array-buffer, static-upload, vertex-attribute, primitive-mode,
and blend-state tokens.
`NodeColorWheel` triangle-buffer setup now shares the retained mesh bridge,
and its draw-state handling also consumes backend-owned blend-state tokens.
Simple UI text, text-input, border, scroll, and animation timeline draw
paths also consume backend-owned blend-state tokens.
Canvas layer cube/equirect generation, clear, restore, and snapshot paths

File diff suppressed because one or more lines are too long

View File

@@ -1176,10 +1176,11 @@ there. `RTT` no longer spells GL enum names directly.
Renderer API primitive-topology to OpenGL draw-mode mapping, mesh index-type
and primitive-mode decisions used by legacy `Shape` drawing, plus Shape buffer
targets, static upload usage, and vertex attribute component/normalization
tokens, also live in `pp_renderer_gl`. Legacy `Shape` mesh buffer/VAO
creation, dynamic vertex/index uploads, fill/stroke draws, and buffer/VAO
deletion now execute through tested `pp_renderer_gl` dispatch contracts,
leaving the retained shape utility with thin GL adapter functions. The
tokens, also live in `pp_renderer_gl`. Retained `Shape`, `TextMesh`, and
`NodeColorWheel` mesh buffer/VAO creation, dynamic vertex/index uploads,
fill/stroke/text draws, and buffer/VAO deletion now execute through tested
`pp_renderer_gl` dispatch contracts via the shared retained
`legacy_gl_mesh_dispatch` raw callback bridge. The
PanoPainter cube-face to
OpenGL texture-target mapping used by `TextureCube` also lives in
`pp_renderer_gl`. The legacy app delegates extension, upload-format,
@@ -1216,8 +1217,8 @@ formats, text mesh buffer targets, attribute component/normalization, draw
primitive/index type, upload usage, and active texture unit selection also
delegate to `pp_renderer_gl`; text mesh buffer/VAO creation, deferred index
and vertex uploads, indexed draw calls, and text draw texture-unit activation
now execute through the same tested dispatch contracts used by `Shape`, leaving
the retained `Font` utility with thin GL adapter functions for mesh operations.
now execute through the same tested dispatch contracts used by `Shape` through
`legacy_gl_mesh_dispatch`.
Canvas undo/redo dirty-region texture updates and readbacks now also execute
through retained `RTT` helpers backed by `pp_renderer_gl`, including 2D texture
target, dirty-region offsets, RGBA pixel format, and unsigned-byte component
@@ -2322,13 +2323,10 @@ Results:
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.
Legacy `Shape` mesh buffer/VAO creation, zero-byte dynamic-buffer creation,
dynamic buffer uploads, indexed and non-indexed draws, and resource deletion
now execute through tested `pp_renderer_gl` dispatch contracts, leaving only
thin GL adapter functions in the retained shape utility.
Legacy `Font` text mesh creation now covers the one-VAO/deferred-upload case,
and its dynamic index/vertex uploads and indexed draw calls execute through
the same tested dispatch contracts.
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
`pp_renderer_gl` dispatch contracts via `legacy_gl_mesh_dispatch`.
- `pp_renderer_gl_command_plan_tests` covers the headless OpenGL command
planner for recorded render-pass clear masks/values, viewport/scissor state,
blend/depth/sampler state, texture format mapping, mesh/draw primitive modes,
@@ -2573,6 +2571,11 @@ Results:
`legacy_gl_pixel_buffer_dispatch`; this removes another pair of raw resource
callback clusters from `src/texture.cpp` and `src/rtt.cpp` while sampler and
pixel-buffer ownership remain retained under DEBT-0036.
- Retained `Shape`, `TextMesh`, and `NodeColorWheel` mesh buffer/VAO creation,
dynamic vertex/index uploads, fill/stroke/text draws, and buffer/VAO deletion
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.
- 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