Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI fails on master: VUID-StandaloneSpirv-Flat-04744 #2993

Closed
jimblandy opened this issue Aug 27, 2022 · 7 comments
Closed

CI fails on master: VUID-StandaloneSpirv-Flat-04744 #2993

jimblandy opened this issue Aug 27, 2022 · 7 comments
Labels
api: vulkan Issues with Vulkan external: upstream Issues happening in lower level APIs or platforms type: bug Something isn't working

Comments

@jimblandy
Copy link
Member

jimblandy commented Aug 27, 2022

Current CI runs on master fail on Linux x86_64:

--- STDERR:                               wgpu::wgpu-tests shader_primitive_index::draw_indexed ---
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
[2022-08-27T18:09:16Z ERROR wgpu_hal::vulkan::instance] VALIDATION [UNASSIGNED-CoreValidation-Shader-InconsistentSpirv (0x6bbb14)]
    Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x7f0b2483c960, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: [VUID-StandaloneSpirv-Flat-04744] Fragment OpEntryPoint operand 12 with Input interfaces with integer or float type must have a Flat decoration for Entry Point id 17.
      %index = OpVariable %_ptr_Input_uint Input
    
[2022-08-27T18:09:16Z ERROR wgpu_hal::vulkan::instance] objects: (type: DEVICE, hndl: 0x7f0b2483c960, name: ?)
thread 'shader_primitive_index::draw_indexed' panicked at 'UNEXPECTED TEST FAILURE DUE TO VALIDATION ERROR', wgpu/tests/common/mod.rs:307:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
   2: wgpu_tests::common::initialize_test
             at ./tests/common/mod.rs:307:9
   3: wgpu_tests::shader_primitive_index::draw_indexed
             at ./tests/shader_primitive_index/mod.rs:82:5
...
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

The Vulkan spec says:

  • VUID-StandaloneSpirv-Flat-04744
    Any variable with integer or double-precision floating-point type and with Input storage class in a fragment shader, must be decorated Flat

This is a recent change. This run passed on 8-20, while This run on the same sources failed on 8-27.

@jimblandy
Copy link
Member Author

I didn't see anything really impressive in a comparison of the logs between the two runs, although these packages are no longer being installed:

libdrm-amdgpu1
libdrm-common
libdrm2
libgbm-dev
libgbm1
libglapi-mesa
libglx-mesa0
libllvm14

@jimblandy jimblandy changed the title CI fails on master: VUID-StandaloneSpirv-Flat-06202 CI fails on master: VUID-StandaloneSpirv-Flat-04744 Aug 27, 2022
@jimblandy
Copy link
Member Author

Original title and description reflected problems in the water example, which also fails now. Updated to match the problems in the error transcript actually shown.

@jimblandy
Copy link
Member Author

Indeed, with a recent spirv-val:

$ cd wgpu/wgpu/tests/shader_primitive_index
$ naga primitive_index.wgsl primitive_index.spv
$ spirv-val --target-env vulkan1.3 primitive_index.spv
error: line 29: [VUID-StandaloneSpirv-Flat-04744] Fragment OpEntryPoint operand 27 with Input interfaces with integer or float type must have a Flat decoration for Entry Point id 31.
  %gl_PrimitiveID = OpVariable %_ptr_Input_uint Input

$ spirv-val --version
SPIRV-Tools v2022.4-dev v2022.2-85-ga98f05d0
Targets:
  SPIR-V 1.0
  SPIR-V 1.1
  SPIR-V 1.2
  SPIR-V 1.3
  SPIR-V 1.4
  SPIR-V 1.5
  SPIR-V 1.6
  SPIR-V 1.2 (under OpenCL 2.2 Full Profile semantics)
  SPIR-V 1.0 (under Vulkan 1.0 semantics)
  SPIR-V 1.3 (under Vulkan 1.1 semantics)
 SPIR-V 1.4 (under Vulkan 1.1 semantics)
 SPIR-V 1.5 (under Vulkan 1.2 semantics)
 SPIR-V 1.6 (under Vulkan 1.3 semantics)
$ 

@jimblandy
Copy link
Member Author

This is caused by gfx-rs/naga#2032.

@cwfitzgerald cwfitzgerald added type: bug Something isn't working external: upstream Issues happening in lower level APIs or platforms api: vulkan Issues with Vulkan labels Aug 29, 2022
@nical
Copy link
Contributor

nical commented Sep 1, 2022

Fixes in gfx-rs/naga#2038 and gfx-rs/naga#2035

@jimblandy
Copy link
Member Author

Those Naga changes are now merged. #3008 brings them into wgpu.

@jimblandy
Copy link
Member Author

This was fixed in 58bc205.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vulkan Issues with Vulkan external: upstream Issues happening in lower level APIs or platforms type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants