CNA-GAP-026: SDL_RENDERER cannot honour TextureAddressMode.Wrap or Mirror for SpriteBatch; a Wrap draw silently shows clamped pixels
Evidence basis: source-verified at the pinned commit; recorded by CNA's own run (not repeated here); tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
SDL_RenderTexture's source-rectangle sampling has one fixed edge-clamping behaviour, SetSamplerAddressMode is not overridden, and CNA records the Wrap/Mirror decision (Tasks 686/687) as blocked.
- Identifier
CNA-GAP-026- Category
- Functional gap
- Subsystem
- Graphics & renderers
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Evidence basis
- Recorded by CNA: CNA's own recorded run, not repeated here
- Tests touching this area
- Yes: see Current tests
- Affected contract
- SamplerState.AddressU/AddressV = Wrap or Mirror with SpriteBatch source rectangles beyond the texture on SDL_RENDERER
Expected behaviour
XNA SpriteBatch with SamplerState.LinearWrap/PointWrap tiles a texture when the source rectangle exceeds its bounds (a common tiling trick).
Actual behaviour at TARGET
The header of sdlrenderer_texture_address_mode_clamp_test.cpp records that SetSamplerAddressMode is a no-op for this renderer, that SDL's texture address mode applies only to SDL_RenderGeometry, and that the fixed behaviour matches Clamp by accident. sdl-renderer-2d-completeness.md marks Wrap/Mirror as BLOCKED (Tasks 686/687). No error is raised.
Source locations
modules/renderers/sdl-renderer/examples/sdlrenderer_texture_address_mode_clamp_test.cpp— header analysis of address modesdocs/sdl-renderer-2d-completeness.md— TextureAddressMode Wrap/Mirror BLOCKED entrymodules/renderers/sdl-renderer/include/CNA/Internal/Renderers/SdlRenderer/SdlRenderer.hpp— no SetSamplerAddressMode override
Evidence
Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
The clamp test pins Clamp; nothing asserts Wrap or Mirror.
Regression test
Either render wrapped sprites through SDL_RenderGeometry with the texture address mode, or refuse Wrap/Mirror explicitly and test the refusal.
Blast radius
Tiled backgrounds and scrolling textures drawn with a Wrap sampler on SDL_RENDERER.
Workaround
Tile with several Draw calls.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Deep dives
- SDL_RENDERER: address modes
- Known issues
- Functional gap index