Fix Vulkan >16 sampler test false-pass and add Linux Vulkan CI - #1859
Fix Vulkan >16 sampler test false-pass and add Linux Vulkan CI#1859bkaradzic-microsoft wants to merge 9 commits into
Conversation
|
Addresses @bghgary’s comment on #1857:
|
There was a problem hiding this comment.
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.VulkanRejectsMoreThanSixteenSamplersto distinguish expected rejection from unexpected success. - Add
Ubuntu_Clang_VulkanCI job and extend Linux workflow to supportGRAPHICS_API=Vulkanwith 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.
There was a problem hiding this comment.
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.
- 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
6346fe8 to
bdeb5c1
Compare
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
Summary
Follow-up to #1857 addressing @bghgary:
ShaderCompilation.VulkanRejectsMoreThanSixteenSamplersno longer treats unexpected success as the expected rejection.Ubuntu_Clang_VulkanconfiguresGRAPHICS_API=Vulkanand 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.RendererType/Vulkan,DeviceImpl_Vulkan,ExternalTexture_Vulkan(throws / not implemented),Helpers.Vulkan. ExternalTexture tests skipped viaSKIP_EXTERNAL_TEXTURE_TESTS.using namespace, ExternalTexture Shared.h stub pattern.Test plan
Ubuntu_Clang_Vulkangreen (configure + ninja only)Tests.ShaderCompilation.cpp