FAILURE MAP
← Case archive

FA-10766 / Raster memory layout / Open access

Texture repeat negative coordinate · case 01

A repeat sampler clamps out-of-range coordinates to edge texels.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

A repeat sampler clamps out-of-range coordinates to edge texels.

VERIFIED REPAIR

Use the stage contract: Resolve an integer texture coordinate under repeat wrapping for a strictly positive texture size.

Unsuccessful approach: Taking magnitude reverses negative texture coordinates instead of wrapping them.

Case contract

Resolve an integer texture coordinate under repeat wrapping for a strictly positive texture size.

Why this case matters

A deterministic software graphics stage with explicit channel and coordinate conventions; no hardware, device profile or API behavior is inferred.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(coordinate, size):
    return min(size-1,max(0,coordinate))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(-1, 4)), 3)
check('fixture 2', solve(*(4, 4)), 0)
check('fixture 3', solve(*(2, 4)), 2)
check('fixture 4', solve(*(-5, 4)), 3)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 103Failed
fixture 230Failed
fixture 322Passed
fixture 403Failed

SHA-256 / 7f3d2e53bb3856911f0c18c734f495a37fa68922b4caab5586b1a2570b68ac4f

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(coordinate, size):
    return abs(coordinate)%size
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(-1, 4)), 3)
check('fixture 2', solve(*(4, 4)), 0)
check('fixture 3', solve(*(2, 4)), 2)
check('fixture 4', solve(*(-5, 4)), 3)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 113Failed
fixture 200Passed
fixture 322Passed
fixture 413Failed

SHA-256 / d1c113b6c903c9f0a0b522bfbfe2e7e43f4944c746cc4ddc4d80c00a96b4fdc8

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(coordinate, size):
    return coordinate%size
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(-1, 4)), 3)
check('fixture 2', solve(*(4, 4)), 0)
check('fixture 3', solve(*(2, 4)), 2)
check('fixture 4', solve(*(-5, 4)), 3)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 133Passed
fixture 200Passed
fixture 322Passed
fixture 433Passed

SHA-256 / 2418a37cd612cb50b4fe4f23b9f9453759147410a150a1210616cc3d1528711a

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:41.970007+00:00.

Case digest / 6030a23985ff44511f3b41b0b43c42532b8418f607a00d4a053ca1c1127ba605