From 04e40dd135867370358dff26dc65bcc83f4ec3cf Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Mon, 20 Jan 2025 19:12:07 -0500 Subject: [PATCH] Update Vulkan SDK (#6955) --- .github/workflows/ci.yml | 18 +++++++++--------- .github/workflows/shaders.yml | 18 ++++++++---------- wgpu-hal/src/vulkan/instance.rs | 8 ++++++++ 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0862b7dee9..72bb297469 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,11 +3,11 @@ name: CI on: push: branches-ignore: [ - # We don't need to run on dependabot PRs. - "dependabot/**", - # This is the branch the merge queue creates. - "gh-readonly-queue/**" - ] + # We don't need to run on dependabot PRs. + "dependabot/**", + # This is the branch the merge queue creates. + "gh-readonly-queue/**", + ] tags: [v0.*] pull_request: merge_group: @@ -20,7 +20,7 @@ env: # Sourced from https://vulkan.lunarg.com/sdk/home#linux # # We don't include the 4th version number, as it's not used in any URL. - VULKAN_SDK_VERSION: "1.3.290" + VULKAN_SDK_VERSION: "1.4.304" # Sourced from https://www.nuget.org/packages/Microsoft.Direct3D.WARP WARP_VERSION: "1.0.13" @@ -161,7 +161,7 @@ jobs: target: wasm32-unknown-emscripten tier: 2 kind: wgpu-only - + # TODO: Uncomment once web-sys updates past 0.3.76 # See https://github.com/rustwasm/wasm-bindgen/pull/4378 for details # - name: WebAssembly Core 1.0 @@ -169,7 +169,7 @@ jobs: # target: wasm32v1-none # tier: 2 # kind: no_std - + # Bare-metal x86-64 # TODO: Remove once web-sys updates past 0.3.76 # Included while wasm32v1-none is failing to ensure `no_std` does not regress @@ -276,7 +276,7 @@ jobs: # Check with all features. cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --all-features cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu --all-features - + # Building for no_std platforms where every feature is enabled except "std". - name: check no_std if: matrix.kind == 'no_std' diff --git a/.github/workflows/shaders.yml b/.github/workflows/shaders.yml index c85bcae290..3e49c1138d 100644 --- a/.github/workflows/shaders.yml +++ b/.github/workflows/shaders.yml @@ -3,11 +3,11 @@ name: Shaders on: push: branches-ignore: [ - # We don't need to run on dependabot PRs. - "dependabot/**", - # This is the branch the merge queue creates. - "gh-readonly-queue/**" - ] + # We don't need to run on dependabot PRs. + "dependabot/**", + # This is the branch the merge queue creates. + "gh-readonly-queue/**", + ] tags: [v0.*] pull_request: merge_group: @@ -16,9 +16,7 @@ env: # Sourced from https://vulkan.lunarg.com/sdk/home#linux # # We don't include the 4th version number, as it's not used in any URL. - # - # Held back from 1.3.290 by https://github.com/gfx-rs/wgpu/issues/6307 - VULKAN_SDK_VERSION: "1.3.283" + VULKAN_SDK_VERSION: "1.4.304" # Sourced from https://github.com/microsoft/DirectXShaderCompiler/releases # @@ -89,7 +87,7 @@ jobs: naga-validate-linux: name: "Validate: SPIR-V/GLSL/DOT/WGSL" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -102,7 +100,7 @@ jobs: # vulkan sdk wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-$VULKAN_SDK_VERSION-jammy.list https://packages.lunarg.com/vulkan/$VULKAN_SDK_VERSION/lunarg-vulkan-$VULKAN_SDK_VERSION-jammy.list + sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-$VULKAN_SDK_VERSION-noble.list https://packages.lunarg.com/vulkan/$VULKAN_SDK_VERSION/lunarg-vulkan-$VULKAN_SDK_VERSION-noble.list sudo apt-get update sudo apt install -y vulkan-sdk diff --git a/wgpu-hal/src/vulkan/instance.rs b/wgpu-hal/src/vulkan/instance.rs index 2c88013b57..d6ca55800d 100644 --- a/wgpu-hal/src/vulkan/instance.rs +++ b/wgpu-hal/src/vulkan/instance.rs @@ -63,6 +63,14 @@ unsafe extern "system" fn debug_utils_messenger_callback( return vk::FALSE; } + // Silence Vulkan Validation error "VUID-vkCmdCopyImageToBuffer-pRegions-00184". + // While we aren't sure yet, we suspect this is probably a VVL issue. + // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/9276 + const VUID_VKCMDCOPYIMAGETOBUFFER_PREGIONS_00184: i32 = 0x45ef177c; + if cd.message_id_number == VUID_VKCMDCOPYIMAGETOBUFFER_PREGIONS_00184 { + return vk::FALSE; + } + let level = match message_severity { vk::DebugUtilsMessageSeverityFlagsEXT::VERBOSE => log::Level::Debug, vk::DebugUtilsMessageSeverityFlagsEXT::INFO => log::Level::Info,