BabylonJS / BabylonJS/BabylonNative

Add CI-portable regression test for ExternalTexture array-layer (layerIndex) selection

Open
#1,743 0 comments 0 reactions 1 assignee Claimed by @bghgary View on GitHub
Dominant language
C++
Stars
919
Forks
162
Avg merge
1d 15h
Merged PRs (30d)
19

Description

[Filed by Copilot on behalf of @bghgary]

#1646 adds `layerIndex` selection for multi-layer `ExternalTexture`s (e.g. NV12 array textures), but ships without an automated regression test.

A synthetic NV12 render test was prototyped (reverted in 8c27c879) but renders inconsistently on the GPU-less CI adapter. The D3D11 WARP software rasterizer appears to sample the R8G8 NV12 chroma-plane single-slice SRV using the luma height instead of the chroma height (`H/2`), zeroing chroma below `H/2` and producing a ~50% pixel mismatch. The same test passes consistently on hardware GPUs, so the path is currently validated on real hardware only.

## Task
Add a CI-portable regression test for `ExternalTexture` array-layer handling that is deterministic on the GPU-less CI adapter. It should cover:
- **Single-slice selection across multiple layers** — selecting `layerIndex` 0, 1, … on a multi-layer source each views the correct slice (distinct per-slice content).
- **Full multi-slice / no-`layerIndex` path** — the default whole-array bind is unregressed.

Approaches to dodge the WARP chroma-height discrepancy: exercise a format/path not subject to it, assert only on the correctly-sampled region, or run on a hardware-GPU runner if one becomes available.

## References
- #1646 (feature)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.