mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 04:19:52 +00:00
* gpu: bind a texture and sampler to guest draws through descriptor tables (#303) A guest command list had no way to bind a texture: GraphicsCommand stopped at vertex and index buffers. This adds the smallest D3D12-shaped binding the translated image_sample_lz pixel stage needs: shader-visible CBV_SRV_UAV and sampler heaps, CreateShaderResourceView for one-level RGBA8 and BC1 2D textures, a point/clamp CreateSampler, a root signature with one pixel-stage SRV table and one sampler table, and SetDescriptorHeaps and SetGraphicsRootDescriptorTable. Everything else fails explicitly before any draw. The native path hands the bound level to a textured backend. NativeCompute::render_rgba8_sampled_bc1 binds a BC1 level natively to fragment texture 0 and sampler 0. The software reference point-samples with clamp addressing. BC1 fixtures use only endpoint colours. Apple's hardware decoder gives 171/84 for the interpolated palette entries where the spec-exact decoder gives 170/85. Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com> * gpu: tighten guest texture binding after independent review (#303) The independent review found binding rules that diverged from D3D12: changing descriptor heaps kept tables bound in the old heaps, setting the same root signature again cleared its tables, and unsupported draw shapes were drawn as one triangle. Now heap changes and a different root signature invalidate tables, while redundant sets keep them. Table bases are checked against the bound heap of their type when bound. Textured draws other than one instance of three vertices fail, and zero vertices or instances draw nothing. Descriptor handle offsets can no longer carry into another heap's ID. SRVs of array or multi-level textures are rejected. A texture whose state excludes pixel-shader reads is not sampled. Vertex buffer offsets are overflow-checked. The tests now cover swapped root parameters, a second sampler slot, off-centre and out-of-range coordinates, state transitions, draw shapes and resource bounds. Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com> * loader: format the guest texture test (#303) Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com> * gpu: close the review's remaining texture-binding gaps (#303) The re-review found three partial fixes. The public software reference could overflow on a huge viewport. A texture in a combined write and read state could be sampled. The sampler-slot test used two identical filled slots. The viewport is now bounded to 4096 pixels. A sampled texture must be COMMON or a read-only state that includes PIXEL_SHADER_RESOURCE. The sampler heap now leaves its middle slot empty. The docs now state the start-instance rule and when table bases are checked. Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com> --------- Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
Xenora documentation
Getting started
Start with the project README for scope and build commands, then read the interface contracts. Reproduce an original guest test program or run the independent validation suite before changing either path. The changelog records notable changes.
Architecture and technical design
- Interface contracts — Translated shader stages, guest services, native command submission, and synthetic textures.
- Fixture memory model and CPU boundary — Buffer bindings, guest address translation, and dependency direction.
Native Metal graphics
- Translated offscreen stages — Translated vertex and pixel stages for the bounded gfx1030 subset.
- Blend and depth passes — Native blend and depth graphics passes with per-draw state.
- Apple GPU evidence and host lab record — Observed behavior and historical floating-point results.
RDNA 2 decoding and shader translation
- Instruction coverage — Desktop gfx1030 instruction forms, operand limits, and CPU and GPU results.
- Semantic coverage — Generated per-family counts of identified, declared, decoded, lowered and verified gfx1030 forms.
- SOP2 scalar ALU — Supported scalar add, subtract and bitwise forms, their SCC rules and sources.
- Semantic registry — How to add an instruction form: registry fields, validation, generation and the independence rule.
- VOP1 vector unary and swap — Wave32 integer bit operations, register exchange, and operand limits.
- VOP2 select and carry — Wave32 lane selection, carry and borrow through the vector condition code.
- VOPC integer compares — Wave32 compare forms, the VCC/EXEC contract, runtime
s_cbranch_vcczand the Metal mapping. - Metal Shading Language generation and independent CPU reference — Translation rules and separate CPU execution models.
Guest CPU and runtime experiments
- Guest experiment guide — Bounded x86-64 execution, executable loading, experimental services, native compute, and offscreen rendering.
- x86-64 instruction registry — Shared decoder, generated tables, semantics, native lowering and how to add a verified instruction form.
- Runtime service registry and generated coverage — Import resolution, typed Win64 adapters and how to add a tested service.
- Guest CPU research — Public specifications and unresolved console requirements.
- Synthetic import fixtures — Reproducible PE32+ builds and expected service behavior.
Testing, validation, and benchmarks
- Engineering progress — Verification commands, metric definitions, and open release gates.
- Test inventory comparison — Detect missing or newly ignored Cargo tests across commits.
- Persistent resource and translated rendering acceptance — Pinned upstream tests, native ARM64 results and unsupported cases.
- Baseline acceptance, Phase 01 assurance, and independent reviews — Candidate-specific results and release findings.
- Mutation testing and benchmark protocol — Test sensitivity, benchmark inputs, and timing requirements.
Research and engineering decisions
- Public sources, RDNA 2 notes, and Xbox GPU evidence — Specifications, evidence scope, and unknown console behavior.
- Shader inputs and risk register — Input provenance and unresolved engineering risks.
- Synthetic integration and upstream evidence — Audited source snapshots and remaining commercial startup prerequisites.
Security, licensing, and contributions
- Threat model and security reporting — Execution limits and disclosure instructions.
- Legal scope, dependency licensing, and third-party notices — Input policy, attribution, and redistribution findings.
- Contribution guidelines — Original authorship, Developer Certificate of Origin sign-off, and evidence requirements.
- Agent task queue — Areas, claiming, leases, upstream sync, verification and the security model for parallel contributors and coding agents.
- CPU/runtime expansion campaign ledger — Progress ledger for the Xenora native CPU and runtime compatibility campaign: starting/current commits, completed batches, new forms, verification evidence and the next implementation target.
- Infrastructure QA ownership — Non-overlapping paths for infrastructure and QA tooling.
- Agent queue smoke evidence — Live Actions results from the disposable smoke repository.
- Infrastructure QA tooling — Advisory orchestration, PR validation, benchmark analysis and release checks.