1. Add ALLOW_RENDER_TARGET flag for color textures in CreateTexture
- This was the root cause of 5 failing RTV-related tests
- Without this flag, creating RTV caused device removal
2. Add FromD3D12() reverse conversion for Format enum
- GetFormat() was incorrectly casting DXGI_FORMAT to Format
- DXGI_FORMAT_R8G8B8A8_UNORM=28 but Format::R8G8B8A8_UNorm=3
- Added FromD3D12() to properly convert back
3. Update RHITestFixture to pre-create CommandQueue and Fence
- Prevents potential timing issues with GPU synchronization
4. Update RHITestFixture tests to pass correct format in ResourceViewDesc
- Previously passed empty desc.format=0 which caused issues
All 234 RHI unit tests now pass (117 D3D12 + 117 OpenGL)
- Fix CreateTexture to use ToD3D12() for format conversion
- Fix CreateRenderTargetView to use ToD3D12() for format conversion
- Fix CreateDepthStencilView to use ToD3D12() for format conversion
- Fix CreateShaderResourceView to use ToD3D12() for format conversion
- Update test to pass correct format in ResourceViewDesc
These fixes resolve CommandList_ClearDepthStencil_WithRealView test.
Other RTV-related tests still fail with DXGI_ERROR_NOT_CURRENTLY_AVAILABLE
from CreateCommandAllocator - further investigation needed.
- Subscribe to SelectionChangedEvent via EventBus in OnAttach
- Unsubscribe in destructor
- Added m_selectionHandlerId and m_needsRefresh members
- HierarchyPanel now properly receives selection change notifications
- Created ISceneManager interface with Editor需要的 SceneManager 方法
- SceneManager now implements ISceneManager
- IEditorContext::GetSceneManager() now returns ISceneManager& instead of void*
- Removed SceneManager::GetSceneManagerConcrete() method
- Updated HierarchyPanel and InspectorPanel to use ISceneManager interface
- Created EditorConsoleSink (implements ILogSink interface)
- EditorConsoleSink stores logs in memory buffer (max 1000 entries)
- Added to Debug::Logger in Application::Initialize()
- ConsolePanel now reads from EditorConsoleSink via static GetInstance()
- Removed separate LogSystem singleton
- Removed editor/src/Core/LogEntry.h (no longer needed)
Now Editor and Engine share the same Debug::Logger, with ConsolePanel
displaying logs via EditorConsoleSink.
- Replace SelectionManager::Get() singleton with m_context->GetSelectionManager()
- Use EventBus for selection change events instead of direct subscription
- Store entity ID (uint64_t) instead of GameObject* pointer
- Resolve entity ID to GameObject* via SceneManager::GetEntity()
- Remove direct includes of SelectionManager.h
Unified PSO validation semantics across D3D12 and OpenGL backends:
- IsValid() returns whether PSO is ready to use
- EnsureValid() ensures PSO is valid (compiles if needed)
Behavior by backend:
- D3D12: IsValid=false after creation, true after EnsureValid() with shaders
- OpenGL: IsValid always=true (immediate model)
Also added test_pipeline_state.cpp with 10 tests for RHIPipelineState.
- Add ShaderLanguage enum (HLSL, GLSL, SPIRV)
- Extend ShaderCompileDesc with source/sourceLanguage fields
- D3D12Device::CompileShader supports both file and embedded source
- OpenGLDevice::CompileShader supports embedded GLSL source
- Refactor test_shader.cpp to use embedded source for both backends
This enables consistent shader compilation across D3D12 and OpenGL
backends while maintaining backend-specific shader language support.
- Remove GetTextureUnitAllocator/GetUniformBufferManager from public interface
- Remove SwapBuffers from public interface (friend OpenGLSwapChain can still access)
- Add MakeContextCurrent() and GetNativeContext() public methods
- Update integration tests to use MakeContextCurrent() instead of wglMakeCurrent
- Update RenderDoc calls to use GetNativeContext() instead of GetGLContext()
- Remove Device_SwapBuffers_NoErrors test (SwapBuffers no longer public)
- Mark Priority 7 as completed in RHI_Design_Issues.md
- Add RHIDescriptorSet base class with Update/UpdateSampler/GetNativeHandle
- Add RHIDescriptorPool with AllocateSet/FreeSet methods
- Add SetGraphicsDescriptorSets/SetComputeDescriptorSets to RHICommandList
- Implement D3D12DescriptorSet using descriptor heap allocation
- Implement OpenGLDescriptorSet using TextureUnitAllocator
- Add CreateDescriptorPool/CreateDescriptorSet factory methods to RHIDevice
- Fix unit test SetVertexBuffer -> SetVertexBuffers API
- Add SetVertexBuffer convenience method for D3D12 backward compatibility
- Update CMakeLists.txt with new source files
- Unified RHICommandList interface to use RHIResourceView* for all view types
- Fixed OpenGLCommandList override signatures (SetVertexBuffers, SetIndexBuffer, etc.)
- Fixed D3D12CommandList by removing duplicate SetVertexBuffer methods
- Updated OpenGLCommandList.cpp to match new signatures
- Build and all 845 tests pass
- Fix Chinese character encoding issues causing MSVC C4819 warnings
- Add m_rootSignature member to D3D12PipelineState for PSO creation
- All integration tests pass: OpenGL 4/4, D3D12 4/4
- All RHI unit tests pass: 158/158
- Remove void* parameters from RHICommandList abstract interface
- TransitionBarrier, SetVertexBuffer, SetIndexBuffer, SetRenderTargets,
ClearRenderTarget, ClearDepthStencil, CopyResource now use RHIResourceView*
- SetPipelineState now uses RHIPipelineState* instead of void*
- Simplified SetVertexBuffer to 3 params, SetIndexBuffer to 2 params
- Add internal D3D12 APIs for native type support (low-level escape hatch)
- Fix OpenGL SetRenderTargets to call glDrawBuffers for MRT support
- Update tests to match new interface signatures
All 289 RHI tests pass (158 unit + 64 OpenGL backend + 58 D3D12 backend + 8 integration + 1 disabled)