ssdfasd
34c04af6cb
D3D12: Fix texture ownership semantics and remove GetSwapChain() exposure
This commit fixes the D3D12 texture architecture issues:
1. D3D12Texture ownership semantics:
- Add m_ownsResource member to track resource ownership
- InitializeFromExisting() now takes ownsResource parameter (default false)
- Shutdown() only releases resource if ownsResource is true
- Initialize() sets m_ownsResource = true for created resources
2. D3D12SwapChain changes:
- Remove GetSwapChain() method (was exposing native D3D12 API)
- Change GetBackBuffer() to return reference instead of pointer
- Back buffers initialized with ownsResource = false
3. minimal/main.cpp updates:
- Remove gColorRTs[2] array (was duplicating back buffer wrapping)
- Direct use of gSwapChain.GetBackBuffer(i) instead
- All references updated to use encapsulated API
4. Documentation:
- Update TEST_SPEC.md v1.3
- Remove known limitation 7.2 (minimal GetBuffer issue fixed)
- Add D3D12_Texture_Architecture_Fix_Plan.md design document
2026-03-20 17:58:27 +08:00
..
2026-03-20 17:58:27 +08:00
2026-03-20 17:36:51 +08:00
2026-03-20 02:58:33 +08:00
2026-03-20 17:58:27 +08:00