Skip to content

Commit

Permalink
Fixed Testbed for CIS builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Aug 2, 2023
1 parent 06f5505 commit f06961f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ jobs:
sudo apt-get install libx11-dev libxrandr-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev vulkan-sdk vulkan-tools
- name: Configure CMake
run: cmake -S . -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLLGL_BUILD_RENDERER_OPENGL=ON -DLLGL_BUILD_RENDERER_VULKAN=OFF -DLLGL_BUILD_EXAMPLES=ON -DLLGL_BUILD_TESTS=ON -DLLGL_BUILD_WRAPPER_C99=OFF -DGaussLib_INCLUDE_DIR:STRING="GaussianLib/include"
run: cmake -S . -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLLGL_BUILD_RENDERER_OPENGL=ON -DLLGL_BUILD_RENDERER_VULKAN=ON -DLLGL_BUILD_EXAMPLES=ON -DLLGL_BUILD_TESTS=ON -DLLGL_BUILD_WRAPPER_C99=ON -DGaussLib_INCLUDE_DIR:STRING="GaussianLib/include"

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Testbed
continue-on-error: true
working-directory: tests/Testbed
run: xvfb-run ${{github.workspace}}/build/build/TestbedD gl -v -f
run: |
mkdir Output
mkdir Output/OpenGL
xvfb-run ${{github.workspace}}/build/build/TestbedD gl -v -f -t
2 changes: 1 addition & 1 deletion sources/Renderer/OpenGL/Texture/GLRenderTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void GLRenderTarget::SetDrawBuffers()

static void GLThrowIfFramebufferStatusFailed(const char* info)
{
auto status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
const GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
GLThrowIfFailed(status, GL_FRAMEBUFFER_COMPLETE, info);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Testbed/TestRenderTarget1Attachment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ DEF_TEST( RenderTarget1Attachment )
{
targetMS1Desc.resolution = Extent2D{ 512, 512 };
targetMS1Desc.depthStencilAttachment = Format::D24UNormS8UInt;
targetMS1Desc.samples = 8;
targetMS1Desc.samples = 4;//8;
}
CREATE_RENDER_TARGET(targetMS1, targetMS1Desc, "targetMS1{d24s8,8msaa}");

// Create render target with 1 attachemnt and multi-sampling
RenderTargetDescriptor targetMS2Desc;
{
targetMS2Desc.resolution = Extent2D{ 512, 512 };
targetMS2Desc.samples = 8;
targetMS2Desc.samples = 4;//8;
}
CREATE_RENDER_TARGET(targetMS2, targetMS2Desc, "targetMS2{512x512x8msaa[1]}");

Expand Down
4 changes: 2 additions & 2 deletions tests/Testbed/TestRenderTargetNoAttachments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DEF_TEST( RenderTargetNoAttachments )
RenderTargetDescriptor target2Desc;
{
target2Desc.resolution = Extent2D{ 512, 512 };
target2Desc.samples = 8;
target2Desc.samples = 4;//8;
}
CREATE_RENDER_TARGET(target2, target2Desc, "target2{512x512x8msaa}");

Expand All @@ -40,7 +40,7 @@ DEF_TEST( RenderTargetNoAttachments )
// Create target using a render pass with no attachments
RenderPassDescriptor pass4Desc;
{
pass4Desc.samples = 8;
pass4Desc.samples = 4;//8;
}
RenderPass* pass4 = renderer->CreateRenderPass(pass4Desc);
pass4->SetName("pass4{8msaa}");
Expand Down
13 changes: 13 additions & 0 deletions tests/Testbed/TestbedContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ TestbedContext::TestbedContext(const char* moduleName, int argc, char* argv[]) :
}
cmdBuffer = renderer->CreateCommandBuffer(cmdBufferDesc);

// Print renderer information
if (verbose)
{
const RendererInfo& info = renderer->GetRendererInfo();
Log::Printf("Renderer: %s (%s)\n", info.rendererName.c_str(), info.deviceName.c_str());
}

// Query rendering capabilities
caps = renderer->GetRenderingCaps();

Expand Down Expand Up @@ -409,6 +416,12 @@ TestResult TestbedContext::CreateRenderTarget(
const char* name,
LLGL::RenderTarget** output)
{
if (verbose)
{
Log::Printf("Creating render target: %s\n", name);
fflush(stdout);
}

// Create render target
RenderTarget* target = renderer->CreateRenderTarget(desc);

Expand Down

0 comments on commit f06961f

Please sign in to comment.