Skip to content

Fix Vulkan >16 sampler test false-pass and add Linux Vulkan CI - #1859

Open
bkaradzic-microsoft wants to merge 9 commits into
BabylonJS:masterfrom
bkaradzic-microsoft:fix/vulkan-16-sampler-test-ci
Open

Fix Vulkan >16 sampler test false-pass and add Linux Vulkan CI#1859
bkaradzic-microsoft wants to merge 9 commits into
BabylonJS:masterfrom
bkaradzic-microsoft:fix/vulkan-16-sampler-test-ci

Conversation

@bkaradzic-microsoft

@bkaradzic-microsoft bkaradzic-microsoft commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #1857 addressing @bghgary:

  1. False pass on unexpected successShaderCompilation.VulkanRejectsMoreThanSixteenSamplers no longer treats unexpected success as the expected rejection.
  2. Vulkan CI (build-only)Ubuntu_Clang_Vulkan configures GRAPHICS_API=Vulkan and builds UnitTests/Playground so the Vulkan TU path is compiled on every PR. Runtime under lavapipe is not run: GH runners have no GPU, and bgfx Xlib surface init SEGV'd when we tried the gtest.
  3. Minimal Vulkan stubs so the tree links: RendererType/Vulkan, DeviceImpl_Vulkan, ExternalTexture_Vulkan (throws / not implemented), Helpers.Vulkan. ExternalTexture tests skipped via SKIP_EXTERNAL_TEXTURE_TESTS.
  4. Compile fixes surfaced by the new job: SPIRV-Cross GLSL for Vulkan, glslang IR using namespace, ExternalTexture Shared.h stub pattern.

Test plan

  • Ubuntu_Clang_Vulkan green (configure + ninja only)
  • Existing Linux OpenGL / Win32 jobs unaffected
  • False-pass fix still in Tests.ShaderCompilation.cpp

Copilot AI lite review requested due to automatic review settings September 1, 2026 22:06
@bkaradzic-microsoft

Copy link
Copy Markdown
Member Author

Addresses @bghgary’s comment on #1857:

  • False pass: VulkanRejectsMoreThanSixteenSamplers uses explicit status values (unexpected_success / threw / not_ready); unexpected success fails outside the catch path.
  • CI: Ubuntu_Clang_Vulkan with GRAPHICS_API=Vulkan + lavapipe runs that test.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Updates Vulkan coverage by fixing a gtest that could falsely pass on unexpected shader compile success, and by introducing a Linux Vulkan CI lane (lavapipe) plus minimal Vulkan stubs to allow configure/link.

Changes:

  • Fix ShaderCompilation.VulkanRejectsMoreThanSixteenSamplers to distinguish expected rejection from unexpected success.
  • Add Ubuntu_Clang_Vulkan CI job and extend Linux workflow to support GRAPHICS_API=Vulkan with Mesa lavapipe.
  • Add minimal Vulkan backend stubs (renderer types, device impl, and unimplemented helpers/external texture) and skip incompatible tests.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
Plugins/ExternalTexture/Source/ExternalTexture_Vulkan.cpp Adds Vulkan stub implementation that throws (not supported yet) to allow linking.
Core/Graphics/Source/DeviceImpl_Vulkan.cpp Adds Vulkan DeviceImpl renderer type + platform info plumbing.
Core/Graphics/Include/RendererType/Vulkan/Babylon/Graphics/RendererType.h Introduces Vulkan renderer-type typedefs for build plumbing.
Apps/UnitTests/Source/Tests.ShaderCompilation.cpp Fixes false-pass logic in Vulkan “>16 samplers” shader compilation test.
Apps/UnitTests/Source/Helpers.Vulkan.cpp Adds Vulkan stubs for unit test helpers (throws for unimplemented paths).
Apps/UnitTests/CMakeLists.txt Defines Vulkan build flags and skips ExternalTexture tests for Vulkan.
.github/workflows/ci.yml Adds a Linux Vulkan CI job entry.
.github/workflows/build-linux.yml Adds graphics-api input and Vulkan/lavapipe setup + conditional test execution.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/build-linux.yml Outdated
Comment thread .github/workflows/build-linux.yml
Comment thread .github/workflows/build-linux.yml
Comment thread .github/workflows/build-linux.yml Outdated
Comment thread .github/workflows/build-linux.yml Outdated
Comment thread .github/workflows/build-linux.yml Outdated
Comment thread .github/workflows/build-linux.yml
Comment thread .github/workflows/build-linux.yml
Comment thread .github/workflows/build-linux.yml
Comment thread Apps/UnitTests/Source/Helpers.Vulkan.cpp Outdated
@bkaradzic-microsoft
bkaradzic-microsoft requested a balanced review from Copilot September 1, 2026 22:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread Plugins/ExternalTexture/Source/ExternalTexture_Vulkan.cpp
Comment thread Apps/UnitTests/Source/Helpers.Vulkan.cpp Outdated
bkaradzic-microsoft and others added 5 commits September 2, 2026 07:39
- Unexpected success is no longer thrown inside the try/catch that treats any "16" message as the expected rejection.
- Add Ubuntu_Clang_Vulkan job (GRAPHICS_API=Vulkan + lavapipe) that builds UnitTests and runs ShaderCompilation.VulkanRejectsMoreThanSixteenSamplers.
- Minimal Vulkan Graphics/ExternalTexture/UnitTest helpers so GRAPHICS_API=Vulkan can configure and link (ExternalTexture skipped).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47cbab2-d751-4cf9-984f-4412dd9ec601
…ture.

The workflow YAML from the cherry-pick had broken nesting under inputs/steps
(parse failure). Rewrite with correct alignment matching the prior layout.
Also throw from Helpers::DestroyTexture on non-null Vulkan handles.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47cbab2-d751-4cf9-984f-4412dd9ec601
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47cbab2-d751-4cf9-984f-4412dd9ec601
Nested under Ubuntu_Clang_QuickJS, which made the workflow file invalid
and aborted the whole CI run before any jobs started.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47cbab2-d751-4cf9-984f-4412dd9ec601
ShaderCompilerVulkan.cpp includes spirv_glsl.hpp and ShaderCompilerCommon.h
includes spirv_cross.hpp; both need spirv-cross-glsl. Disabling GLSL for every
non-OpenGL API left the Linux Vulkan CI job without those headers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47cbab2-d751-4cf9-984f-4412dd9ec601
@bkaradzic-microsoft
bkaradzic-microsoft force-pushed the fix/vulkan-16-sampler-test-ci branch from 6346fe8 to bdeb5c1 Compare September 2, 2026 14:39
bkaradzic-microsoft and others added 4 commits September 2, 2026 08:56
TIntermNode/TIntermSymbol are not nested in namespace glslang; qualify them
like ShaderCompilerTraversers so the Linux Vulkan job compiles.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47cbab2-d751-4cf9-984f-4412dd9ec601
Bare TIntermSymbol/TIntermNode need namespace glslang in scope (same pattern as
ShaderCompilerTraversers). Include localintermediate.h and using namespace glslang
so the Ubuntu Vulkan job can compile CollectStageUniforms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47cbab2-d751-4cf9-984f-4412dd9ec601
Declare Impl/Update like other backends; Shared.h owns the out-of-line
bodies. Keep GetInfo throwing so Vulkan remains unsupported without
duplicate definitions that break Ubuntu_Clang_Vulkan.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47cbab2-d751-4cf9-984f-4412dd9ec601
GH runners have no GPU; lavapipe+bgfx Xlib surface init SEGV'd on the
>16-sampler gtest. Keep GRAPHICS_API=Vulkan configure+link coverage so
Vulkan packaging breaks cannot land unbuilt again; drop runtime steps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47cbab2-d751-4cf9-984f-4412dd9ec601
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants