RHI: Replace IsFinalized/Finalize with IsValid/EnsureValid

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.
This commit is contained in:
2026-03-25 12:28:33 +08:00
parent ca0d73c197
commit f808f8d197
7 changed files with 225 additions and 106 deletions

View File

@@ -13,6 +13,7 @@ set(TEST_SOURCES
test_command_list.cpp
test_command_queue.cpp
test_shader.cpp
test_pipeline_state.cpp
test_fence.cpp
test_sampler.cpp
${CMAKE_SOURCE_DIR}/tests/opengl/package/src/glad.c