Add renderer texture usage contract

This commit is contained in:
2026-06-02 16:42:53 +02:00
parent 75dd5cfdc9
commit 901aff1051
7 changed files with 345 additions and 68 deletions

View File

@@ -285,12 +285,12 @@ Known local toolchain state:
source code reintroduces raw `GL_*`/`WGL_*` constants outside the allowed
legacy OpenGL implementation files.
- `pp_renderer_api` exposes a headless `RecordingRenderDevice` that validates
backend-owned resource creation, command order, render-pass color/depth/
stencil clear intent, scissor state, depth state, blend state, texture-slot
binding, sampler-state binding, texture-upload byte counts,
shader-uniform writes, explicit draw descriptor ranges, texture-copy regions,
readback bounds, frame-capture sources, destination buffer sizes, and
render-target blit regions, records
backend-owned resource creation, explicit texture usage flags, command order,
render-pass color/depth/stencil clear intent, scissor state, depth state,
blend state, texture-slot binding, sampler-state binding, texture-upload byte
counts, shader-uniform writes, explicit draw descriptor ranges,
texture-copy regions, readback bounds, frame-capture sources, destination
buffer sizes, and render-target blit regions, records
render-pass-clear/scissor/depth/blend/shader-uniform/texture-bind/
sampler-bind/draw/upload/texture-copy/readback/frame-capture/blit commands,
draw mesh inputs, explicit draw ranges, and records trace markers without a

View File

@@ -414,14 +414,15 @@ Goal: make OpenGL an implementation detail and establish parity tests before
adding new backends.
Status: started. `pp_renderer_api` exists as a headless renderer-neutral target
with texture descriptor, byte-size, viewport, mesh, readback bounds, command
context, render device, shader program descriptor, mesh, render target,
readback byte-size helpers, texture-upload/readback command validation,
frame-capture byte-size helpers, frame-capture command validation,
render-target blit validation, texture-slot binding validation, blend-state
validation, scissor-state validation, depth-state validation, trace interface
validation, sampler-state validation, and the canonical PanoPainter shader
catalog now consumed by the legacy OpenGL app initialization path.
with explicit texture usage flags, texture descriptor, byte-size, viewport,
mesh, readback bounds, command context, render device, shader program
descriptor, mesh, render target, readback byte-size helpers,
texture-upload/readback command validation, frame-capture byte-size helpers,
frame-capture command validation, render-target blit validation, texture-slot
binding validation, blend-state validation, scissor-state validation,
depth-state validation, trace interface validation, sampler-state validation,
and the canonical PanoPainter shader catalog now consumed by the legacy
OpenGL app initialization path.
`pp_renderer_gl` now exists as the first OpenGL backend library and owns pure
OpenGL capability detection for framebuffer fetch, map-buffer alignment, and
float texture support. It also owns the OpenGL texture upload-type mapping used
@@ -720,13 +721,14 @@ Results:
per-layer frame duration, and PNG-encoded face-payload export to PPI bytes,
plus malformed payload rejection at the export boundary.
- `pp_renderer_api_tests` passed, including shader descriptor validation,
PanoPainter shader catalog validation, readback byte-size and command-order
validation, texture-upload byte-count validation, frame-capture byte-size and
command-order validation, render-target blit validation, texture-slot binding
validation, blend-state validation, scissor-state validation,
render-pass color/depth/stencil clear validation, shader-uniform write
validation, draw descriptor/range validation, backend-neutral resource
factory validation, texture-copy validation, recording
PanoPainter shader catalog validation, explicit texture usage validation,
readback byte-size and command-order validation, texture-upload byte-count
validation, frame-capture byte-size and command-order validation,
render-target blit validation, texture-slot binding validation, blend-state
validation, scissor-state validation, render-pass color/depth/stencil clear
validation, shader-uniform write validation, draw descriptor/range
validation, backend-neutral resource factory validation, texture-copy
validation, recording
render-pass clear/scissor/depth/blend/shader-uniform/texture/sampler-bind/
upload/texture-copy/readback/frame-capture/blit command capture, draw
mesh-input capture, explicit draw-range capture, and invalid catalog
@@ -826,10 +828,11 @@ Results:
- `pp_renderer_api` now includes a headless `RecordingRenderDevice` with strict
renderer-owned resource factory and
command-order/render-pass-clear/scissor-state/depth-state/blend-state/
texture-bind/sampler-bind/shader-uniform/texture-upload/readback/
frame-capture/blit validation plus explicit draw descriptor and texture-copy
validation; it creates validated textures, render targets, shaders, meshes,
and readback buffers, then records commands, trace markers, render-pass
texture-usage/texture-bind/sampler-bind/shader-uniform/texture-upload/
readback/frame-capture/blit validation plus explicit draw descriptor and
texture-copy validation; it creates validated textures, render targets,
shaders, meshes, and readback buffers, then records commands, trace markers,
render-pass
color/depth/stencil clear intent, scissor state, depth state, blend state,
shader uniform writes, texture/sampler binds, draw mesh inputs, explicit draw
ranges, texture uploads/copies/readbacks, frame captures, and render-target