Fix D3D12 compute pipeline unit coverage

This commit is contained in:
2026-03-27 21:48:23 +08:00
parent 126860e79d
commit 1ea00a1879
5 changed files with 113 additions and 118 deletions

View File

@@ -2,6 +2,8 @@
#include "XCEngine/RHI/OpenGL/OpenGLShader.h"
#include "XCEngine/RHI/OpenGL/OpenGLCommandList.h"
#include <string>
using namespace XCEngine::RHI;
TEST_F(OpenGLTestFixture, Shader_Compile_VertexFragment) {
@@ -74,12 +76,15 @@ TEST_F(OpenGLTestFixture, Shader_Compile_InvalidSource) {
undefined_symbol;
}
)";
OpenGLShader shader;
testing::internal::CaptureStdout();
bool result = shader.Compile(invalidSource, "void main() { }");
const std::string output = testing::internal::GetCapturedStdout();
EXPECT_FALSE(result);
EXPECT_FALSE(shader.IsValid());
EXPECT_NE(output.find("ERROR::SHADER_COMPILATION_ERROR"), std::string::npos);
shader.Shutdown();
}