ed90911a5c
refactor(srp): resolve imported render graph textures through multi-view runtime
2026-04-22 01:05:38 +08:00
793027df23
Refactor RHI swapchain present policy
2026-04-21 12:19:15 +08:00
8848cfd958
chore: checkpoint current workspace changes
2026-04-11 22:14:02 +08:00
39632e1a04
Add gaussian splat integration baseline
2026-04-11 05:37:31 +08:00
5191bb1149
Add formal compute pipeline creation API
2026-04-11 02:27:33 +08:00
4728b09ae8
Add RHI buffer SRV and UAV view support
2026-04-08 18:05:00 +08:00
162f1cc12e
engine: sync editor rendering and ui changes
2026-04-08 16:09:15 +08:00
f31fece2ce
rendering: remove builtin authoring register annotations
2026-04-07 10:34:20 +08:00
5f9f3386ab
rendering: unify builtin forward and depth-style shaders
2026-04-07 03:35:06 +08:00
97e986b52c
rendering: add opengl hlsl shader translation
2026-04-06 18:07:13 +08:00
f014ae6e6f
Formalize cubemap skybox pipeline across backends
2026-04-06 01:37:04 +08:00
5ff97b437a
fix: restore backpack material import output
2026-04-02 22:34:25 +08:00
e03f17146a
feat: support rect clears for camera viewport rendering
2026-04-01 15:16:25 +08:00
e5cb79f3ce
chore: sync workspace state
2026-03-29 01:36:53 +08:00
a78593e7e1
Add renderer phase A textured scene path
2026-03-26 20:43:17 +08:00
122495e581
Add backpack RHI integration test
2026-03-26 16:57:54 +08:00
18fa150843
fix(rhi): validate opengl compute uav set bindings
2026-03-26 15:42:44 +08:00
733b573963
fix(rhi): make opengl descriptor binding set-aware
2026-03-26 15:10:03 +08:00
476a56724f
refactor(rhi): let pipeline layouts own set metadata
2026-03-26 12:40:49 +08:00
cb05472205
Add assimp-based mesh import
2026-03-26 02:53:34 +08:00
1ef3048da1
Fix OpenGL sampler and copy semantics
2026-03-26 02:14:21 +08:00
c47e871c5a
Fix OpenGL device initialization and file shaders
2026-03-26 02:07:21 +08:00
2e17c0019c
Fix OpenGL render target binding composition
2026-03-26 01:56:10 +08:00
39edb0b497
Fix RHI constant binding and add sphere test
2026-03-26 01:23:29 +08:00
c5605c2a32
Align OpenGL textured integration baselines
2026-03-26 01:07:36 +08:00
9adac63b4c
Fix RHI texture binding and add pure quad test
2026-03-26 00:47:12 +08:00
76c4c2ace2
Add RHI texture upload and descriptor set fixes
2026-03-26 00:04:51 +08:00
605ef56e16
Add pipeline layout support for graphics PSOs
2026-03-25 23:49:48 +08:00
2470451d96
Honor input layouts in OpenGL vertex bindings
2026-03-25 23:24:06 +08:00
1597181458
Add graphics shader support to RHI pipeline states
2026-03-25 23:19:18 +08:00
aaf9cce418
Add RHI vertex and index buffer views
2026-03-25 23:07:22 +08:00
30b5f93157
Fix RHI swap chain queue binding and restore minimal GT checks
2026-03-25 21:50:57 +08:00
04a80d10e7
refactor: Clean up RHI interface and implement descriptor set pooling
...
- Remove unnecessary inline keywords from RHICommandList
- Add TextureType enum for proper texture type classification
- Update DescriptorSet API to support binding with pipeline layout
- Simplify D3D12CommandList implementation
- Implement descriptor set binding with pipeline layout for both D3D12 and OpenGL
2026-03-25 20:50:40 +08:00
712e975610
refactor: Refactor OpenGL backend to use OpenGLEnums
...
Use centralized OpenGLEnums.h for enum conversion:
- Remove local ToGL* functions from OpenGLCommandList
- Replace with ToOpenGL() and ToOpenGLClearBuffer() from OpenGLEnums
- Simplify OpenGLTexture, OpenGLBuffer, OpenGLSampler, etc.
2026-03-25 19:01:36 +08:00
008fb98dee
refactor(editor): Complete architecture refactoring
...
- SceneManager: remove singleton, use dependency injection via EditorContext
- SelectionManager: already interface-based via ISelectionManager
- Panel: now receives IEditorContext for accessing managers
- HierarchyPanel: migrated to use IEditorContext instead of singletons
- Add ISceneManager interface and SceneManagerImpl
- EditorContextImpl: holds all editor subsystems
Architecture now follows dependency injection pattern:
Application -> EditorContext -> SceneManager/SelectionManager
EditorLayer -> Panels (receive context via SetContext)
All Manager singletons removed: EditorSceneManager::Get(), SelectionManager::Get()
2026-03-25 15:51:27 +08:00
720dd422d5
RHI: Add Compute/Dispatch unit tests (P1-7) and fix shader type bugs
...
Bug fixes:
- D3D12Shader::Compile: Set m_type based on target string (cs_/vs_/ps_/gs_)
- OpenGLShader::Compile: Parse target parameter to determine shader type
- OpenGLShader::CompileCompute: Set m_type = ShaderType::Compute
- D3D12CommandList::SetPipelineState: Use correct PSO handle for Compute
New tests (test_compute.cpp, 8 tests):
- ComputeShader_Compile_ValidShader
- ComputeShader_GetType_ReturnsCompute
- ComputeShader_Shutdown_Invalidates
- PipelineState_SetComputeShader
- PipelineState_HasComputeShader_ReturnsTrue
- PipelineState_GetType_Compute
- PipelineState_EnsureValid_Compute
- CommandList_Dispatch_Basic
Test results: 232/232 passed (D3D12: 116, OpenGL: 116)
2026-03-25 13:52:11 +08:00
41cea4d1a2
RHI: Implement CreateRenderPass/CreateFramebuffer in D3D12 and OpenGL backends
2026-03-25 13:03:02 +08:00
32c04b86b7
RHI: Add embedded shader source support via ShaderCompileDesc
...
- 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.
2026-03-25 12:00:26 +08:00
dc970d215b
RHI: Internalize OpenGL-specific methods in OpenGLDevice
...
- 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
2026-03-25 01:20:38 +08:00
6328ac8d37
RHI: Add Compute Pipeline abstraction with D3D12 and OpenGL support
...
- Add SetComputeShader/GetComputeShader/HasComputeShader to RHIPipelineState
- Add m_computePipelineState for D3D12 compute PSO
- Add m_computeProgram/m_computeShader for OpenGL
- Fix OpenGLCommandList::DispatchCompute bug (was ignoring x,y,z params)
- Fix OpenGLShader::GetID usage in OpenGLPipelineState
- Mark Priority 8 as completed in RHI_Design_Issues.md
2026-03-25 01:05:03 +08:00
da48b808cd
RHI: Remove无效的SetGlobal*方法 - 死代码清理
...
问题:SetGlobal*方法(SetGlobalInt/SetGlobalFloat/SetGlobalVec3/SetGlobalVec4/SetGlobalMat4/SetGlobalTexture)在D3D12和OpenGL中都只是缓存值,从不提交到GPU。
移除内容:
- RHICommandList.h: 移除6个SetGlobal*纯虚方法声明
- D3D12CommandList.h/cpp: 移除6个override声明+6个缓存变量+6个方法实现+Shutdown()中的缓存清理
- OpenGLCommandList.h/cpp: 同上
原因:
- SetGlobal*从未被代码库调用(死代码)
- SetUniform*已正常工作,使用shader reflection+实际GPU绑定
- 移除后无功能损失
测试状态:150个RHI单元测试全部通过,8个集成测试全部通过
2026-03-25 00:52:36 +08:00
a2fc8eca02
RHI: Remove无效的动态状态方法 - SetDepthStencilState/SetBlendState
...
重构原因:
- D3D12 PSO是不可变的,SetDepthStencilState/SetBlendState调用原本就是空实现(TODO)
- 这些方法在D3D12中完全无效,是死代码
移除的方法:
- SetDepthStencilState(const DepthStencilState&) - D3D12空实现,OpenGL直接调用GL函数
- SetBlendState(const BlendState&) - D3D12只设置BlendFactor其他忽略,OpenGL直接调用GL函数
保留的真正动态状态:
- SetViewport/SetViewports
- SetScissorRect/SetScissorRects
- SetStencilRef (D3D12动态状态)
- SetBlendFactor (D3D12动态状态)
注:PrimitiveTopology保留在CommandList,因为D3D12允许动态改变topology type
测试状态:150个RHI单元测试全部通过,8个集成测试全部通过
2026-03-25 00:37:18 +08:00
c6fe9547aa
RHI: Add DescriptorSet abstraction for D3D12 and OpenGL backends
...
- 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
2026-03-25 00:26:16 +08:00
5eb731bc2d
RHI: Add explicit RenderPass abstraction (BeginRenderPass/EndRenderPass)
...
New abstractions:
- RHIFramebuffer: Framebuffer interface with Initialize/Bind/GetHandle
- RHIRenderPass: RenderPass interface with AttachmentDesc for load/store actions
- D3D12Framebuffer/D3D12RenderPass: D3D12 implementation
- OpenGLFramebuffer/OpenGLRenderPass: OpenGL implementation (adapted from existing)
RHICommandList changes:
- Added BeginRenderPass(RHIRenderPass*, RHIFramebuffer*, Rect, clearValues...)
- Added EndRenderPass()
Implementation notes:
- D3D12: Uses OMSetRenderTargets + ClearRenderTargetView (fallback from native RenderPass API)
- OpenGL: Uses glBindFramebuffer + glClearBufferfv for LoadOp handling
- Old SetRenderTargets/ClearRenderTarget retained for backward compatibility
All 845 tests pass.
2026-03-24 23:59:44 +08:00
1e88beacb8
RHI: Fix view type signatures in CommandList abstraction
...
- 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
2026-03-24 23:41:57 +08:00
7a66913f2b
refactor(RHI): 将窗口职责从RHI移到Platform层
...
- RHIDeviceDesc 删除 windowHandle/width/height/appName
- SwapChainDesc 添加 windowHandle 字段
- RHISwapChain 删除 PollEvents/ShouldClose/SetFullscreen 等窗口相关接口
- OpenGLDevice 删除 CreateRenderWindow,改用 InitializeWithExistingWindow
- 更新所有集成测试使用新API
- 273个单元测试 + 8个集成测试全部通过
2026-03-24 23:00:49 +08:00
cab290b17d
RHI: 增强RHIResourceView抽象接口,添加GetViewType/GetDimension/GetFormat虚函数
...
- 在RHIResourceView基类添加3个纯虚函数:GetViewType()、GetDimension()、GetFormat()
- D3D12ResourceView和OpenGLResourceView子类实现这些虚函数
- 在各InitializeAs*方法中正确存储format和dimension信息
- 消除调用者必须向下转型才能获取视图类型的需求
2026-03-24 20:01:54 +08:00
0f5d018c1a
refactor(RHI): 完成 Shader uniform 设置迁移到 CommandList
...
- 删除 RHIShader 的 OpenGL 风格 SetMat4/SetVec3/SetInt 等方法
- 添加 UniformInfo 结构体和 GetUniformInfos/GetUniformInfo 接口
- D3D12Shader 和 OpenGLShader 实现 CacheUniformInfos
- RHICommandList 添加 SetUniform*/SetGlobal* 统一接口
- D3D12 实现 D3D12PipelineLayout 管理 root signature 映射
- 修复 D3D12CommandList::SetPipelineStateInternal 在 Reset 后未重新应用 root signature 的问题
- 更新 OpenGL 集成测试使用新的 SetUniform* API
- 所有单元测试和集成测试通过 (8/8 integration tests)
2026-03-24 19:47:22 +08:00
135fe9145b
refactor(editor): 重构 Editor 使用 Engine 的 Component/Scene 系统
...
- Editor CMakeLists.txt 链接 XCEngine 库
- 删除 editor/src/Core/GameObject.h (简化版)
- SelectionManager 使用 Engine::Components::GameObject*
- SceneManager 使用 Engine::Scene
- HierarchyPanel 使用 Engine GameObject API
- InspectorPanel 使用 Engine TransformComponent
注意: Engine RHI Shader 接口有编译错误需要修复
2026-03-24 18:38:01 +08:00
c66ba2feb3
refactor(RHI): complete PipelineState Unity SRP style refactoring
...
- 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
2026-03-24 18:33:16 +08:00