Typed current normals — 2026-11-02

The eight MDK2 normal entrypoints glNormal3b/bv/d/dv/i/iv/s/sv were unavailable in the published a6a1248b9 baseline. Float glNormal3f/fv already existed.

The OpenGL 1.1 normal contract maps the full signed integer range linearly to [-1,1]: (2c+1)/(2^bits-1). Integer zero therefore maps to a small positive value. Widening the signed 32-bit value before arithmetic preserves the correctly rounded binary32 result. Double inputs convert once to the implementation's authoritative float current normal without clamping or length normalization. GL_NORMALIZE is a subsequent lighting transform operation.

Each real resolved stdcall entry reads its guest arguments at their declared widths. Scalar byte/short parameters occupy four-byte argument slots; packed vectors use one/two/four/eight-byte elements; scalar doubles occupy eight bytes each. Separate guest-aware reads handle components crossing physically nonadjacent sparse pages. The adapter captures all three values before changing state, then lowers to the existing scalar normal opcode before list interception. List capture owns values and follows compile/compile-and-execute timing. Normal updates remain legal within Begin/End. Context switching, current-attribute restore, queries and vertex lighting use the same current-normal globals.

Primary sources: GL 1.1 specification, Khronos glNormal refpage source, Win32 glNormal3b ABI.

Validation passed on the exact source snapshot in scratch/runs/20261102-gl-typed-normal-resume/: 147 resolved guest ABI checks on each direct and queued route; old-source rejection on both routes; 13 compiled semantic mutations rejected; normal, lighting, context/attribute, list, matrix, accumulation, encoder, availability and adjacent typed dispatch regressions; generated dispatch/GL ABI checks; and flock /tmp/wine-build.lock bash tools/build.sh. All 44 final suite commands passed. Literal green-channel lighting oracles remain 129/128/64, including non-unit normals and inverse-transpose scaling. The availability regression independently verifies the remaining observed mandatory missing set decreases from 175 to 167.

Recovery reused the predecessor's completed exact-revision tests. Its first suite stopped at a stale adjacent color test that expected glNormal3b to remain unavailable; that control now uses glTexParameteriv, matching the corresponding texcoord test. Only the failed and unfinished commands were resumed. Core source was unchanged throughout final validation. Evidence retains the original failure and resumed results, full source hashes, module identity, process exits and recovery instructions. No original-game or browser gameplay coverage is claimed.