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

Automated tests fail on Mac OS 10.13 #4632

Open
mcclure opened this issue Nov 5, 2023 · 5 comments
Open

Automated tests fail on Mac OS 10.13 #4632

mcclure opened this issue Nov 5, 2023 · 5 comments
Labels
api: metal Issues with Metal platform: macos Issues with integration with macos type: bug Something isn't working

Comments

@mcclure
Copy link

mcclure commented Nov 5, 2023

Last time I checked (early Summer) wgpu was informally supported on MacOS back to 10.13. This made me happy as I am trying to maintain one machine on 10.13. I asked today in the wgpu Matrix what would have to happen for wgpu to formally ("documented in README") support MacOS back to 10.13. cwfitzgerald said at minimum we would need to successfully run cargo xtask test on 10.13. I volunteered to try this.

I installed nextest, checked out the 0.18.0 tag and ran the test command. Nearly all tests failed, including basic tests like test_api. This was a surprise to me, to the extent I suspect something is wrong with the test runner, because on the same machine (MacBookPro12,1 with integrated Intel Iris Graphics 6100, macOS 10.13.6 17G14042) I can successfully run any wgpu examples I like (for example, hello-triangle).

Expected behavior: Unless you have made a conscious decision to stop supporting 10.13, the tests should work on 10.13

0.18.TEST.TXT

@cwfitzgerald
Copy link
Member

There are two issues here:

  • We unconditionally use MTLComputePassDescriptor but that was introduced in 11.0
  • VERTEX_WRITABLE_STORAGE is apparently not unconditionally supported on mac, as this machine doesn't support it.

@mcclure
Copy link
Author

mcclure commented Nov 5, 2023

For comparison here's the same test run on trunk (last commit Nov 04)

trunk.dfa7e2f8fbc0.TEST.TXT

@teoxoy teoxoy added type: bug Something isn't working api: metal Issues with Metal platform: macos Issues with integration with macos labels Nov 6, 2023
@teoxoy
Copy link
Member

teoxoy commented Nov 6, 2023

Looking at the logs we get the following errors:

Class with name MTLComputePassDescriptor could not be found

TRY 3 FAIL [   0.249s] player::test test_api
TRY 3 FAIL [   0.298s] wgpu-boids-example::bin/boids [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] boids
TRY 3 FAIL [   0.226s] wgpu-hello-compute-example::bin/hello-compute [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] hello_compute::tests::compute_1
TRY 3 FAIL [   0.282s] wgpu-hello-compute-example::bin/hello-compute [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] hello_compute::tests::compute_2
TRY 3 FAIL [   0.238s] wgpu-hello-compute-example::bin/hello-compute [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] hello_compute::tests::compute_overflow
TRY 3 FAIL [  10.277s] wgpu-hello-compute-example::bin/hello-compute [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] hello_compute::tests::multithreaded_compute
TRY 3 FAIL [   0.223s] wgpu-hello-synchronization-example::bin/hello-synchronization [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] hello_synchronization::tests::sync
TRY 3 FAIL [   0.205s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::bgra8unorm_storage::bgra8_unorm_storage
TRY 3 FAIL [   0.268s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::poll::double_wait
TRY 3 FAIL [   0.267s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::poll::double_wait_on_submission
TRY 3 FAIL [   0.195s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::poll::wait
TRY 3 FAIL [   0.205s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::poll::wait_on_submission
TRY 3 FAIL [   0.242s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::poll::wait_out_of_order
TRY 3 FAIL [   0.182s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::shader::numeric_builtins::numeric_builtins
TRY 3 FAIL [   0.212s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::shader::struct_layout::push_constant_input
TRY 3 FAIL [   0.201s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::shader::struct_layout::storage_input
TRY 3 FAIL [   0.194s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::shader::struct_layout::uniform_input
TRY 3 FAIL [   0.269s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::shader::zero_init_workgroup_mem::zero_init_workgroup_memory
TRY 3 FAIL [   0.236s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::zero_init_texture_after_discard::discarding_depth_target_resets_texture_init_state_check_visible_on_copy_in_same_encoder
TRY 3 FAIL [   0.245s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::zero_init_texture_after_discard::discarding_either_depth_or_stencil_aspect_test

illegal write to device memory for non-void vertex function 'vs_main'

TRY 3 FAIL [   0.292s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::vertex_indices::draw
TRY 3 FAIL [   0.226s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::vertex_indices::draw_instanced
TRY 3 FAIL [   0.286s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::vertex_indices::draw_instanced_offset
TRY 3 FAIL [   0.262s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::vertex_indices::draw_vertex

Expected Mean (0.559973) to be under expected maximum (0.02)

TRY 3 FAIL [   2.703s] wgpu-shadow-example::bin/shadow [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] shadow

texture with format X was not fully cleared

TRY 3 FAIL [   0.239s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::clear_texture::clear_texture_depth
TRY 3 FAIL [   0.312s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::clear_texture::clear_texture_depth32_stencil8

assertion failed: readback_buffer.check_buffer_contents(&ctx.device, &expected_data)

TRY 3 FAIL [   0.203s] wgpu-test::gpu-tests [Executed] [Metal/Intel(R) Iris(TM) Graphics 6100/0] gpu_tests::scissor_tests::scissor_test_empty_rect

@teoxoy
Copy link
Member

teoxoy commented Nov 6, 2023

illegal write to device memory for non-void vertex function 'vs_main'

Seems to be:

image
image

from https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf

But it's unclear if this limitation has been lifted in some of the newer Metal versions since we haven't gotten any other reports of this.

https://developer.apple.com/forums/thread/665272 is asking the same thing.

@mcclure
Copy link
Author

mcclure commented Nov 6, 2023

Upgraded to 1d4fa81 to get PR #4643 and reran tests
Reduced from
"28 failed" to "8 failed"
trunk.1d4fa812ef4d.TEST.2.TXT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: metal Issues with Metal platform: macos Issues with integration with macos type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants