mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 22:50:44 +00:00
Indexed draws had no contract: the loader had no index buffer command and the Metal backend only drew non-indexed triangles. Add a bounded one: - NativeCompute::render_indexed issues real drawIndexedPrimitives calls on a 16- or 32-bit index buffer with a start index and signed base vertex, optionally sampling a natively uploaded BC1 texture. - The loader gains SetIndexBuffer (DXGI R16_UINT/R32_UINT only) and DrawIndexedInstanced, which fetches one triangle through the index buffer and base vertex and feeds the existing one-triangle backend. - Both reject bad formats, offsets and counts, indices past the buffer and any index + base vertex outside the vertex buffer before drawing. - xenora-ref gains an index-fetch reference over the depth rasteriser. Expected images and fetch lists were derived independently (clean room) from public D3D12, Metal and BC1 documentation. Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>