test: Add RHI integration tests and update unit tests
- Add CommandQueue unit tests for WaitForIdle and synchronization - Add SwapChain unit tests for Present and buffer operations - Add Texture unit tests for various texture types and mipmaps - Fix RHIIntegrationFixture with proper logging and debug output - Update minimal integration test with RHI abstraction layer - Add GT reference image for minimal test - Update TEST_SPEC.md documentation
This commit is contained in:
@@ -83,40 +83,3 @@ TEST_F(OpenGLTestFixture, Shader_Compile_InvalidSource) {
|
||||
|
||||
shader.Shutdown();
|
||||
}
|
||||
|
||||
TEST_F(OpenGLTestFixture, Shader_SetUniforms) {
|
||||
const char* vs = R"(
|
||||
#version 330 core
|
||||
void main() { gl_Position = vec4(0.0); }
|
||||
)";
|
||||
const char* fs = R"(
|
||||
#version 330 core
|
||||
uniform int uIntValue;
|
||||
uniform float uFloatValue;
|
||||
uniform vec3 uVec3Value;
|
||||
uniform mat4 uMat4Value;
|
||||
out vec4 FragColor;
|
||||
void main() { FragColor = vec4(1.0); }
|
||||
)";
|
||||
|
||||
OpenGLShader shader;
|
||||
shader.Compile(vs, fs);
|
||||
ASSERT_TRUE(shader.IsValid());
|
||||
|
||||
auto cmdList = static_cast<OpenGLCommandList*>(GetDevice()->CreateCommandList(CommandListDesc{}));
|
||||
ASSERT_NE(cmdList, nullptr);
|
||||
|
||||
cmdList->SetShader(&shader);
|
||||
cmdList->SetUniformInt("uIntValue", 42);
|
||||
cmdList->SetUniformFloat("uFloatValue", 3.14f);
|
||||
cmdList->SetUniformVec3("uVec3Value", 1.0f, 2.0f, 3.0f);
|
||||
|
||||
float mat[16] = {};
|
||||
mat[0] = 1.0f; mat[5] = 1.0f; mat[10] = 1.0f; mat[15] = 1.0f;
|
||||
cmdList->SetUniformMat4("uMat4Value", mat);
|
||||
|
||||
GLenum error = glGetError();
|
||||
EXPECT_EQ(error, GL_NO_ERROR);
|
||||
|
||||
shader.Shutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user