wgpu-native icon indicating copy to clipboard operation
wgpu-native copied to clipboard

Triangle example does not draw triangle on macOS

Open mkeeter opened this issue 5 years ago • 5 comments

I compiled and ran examples/triangle on macOS 10.13.6, using the 0.6.0 libwgpu_native.dylib (debug build). There are no obvious errors, but the resulting image is completely green, and shows no triangle: Screen Shot 2020-10-14 at 5 48 46 PM

Adding METAL_DEVICE_WRAPPER_TYPE=1 produces a single line of output:

2020-10-14 17:51:08.859 triangle[40323:46181835] Metal API Validation Enabled

mkeeter avatar Oct 14 '20 21:10 mkeeter

It sounds like an issue that we fixed upstream in gfx-backend-metal 0.6.2 (usually caused by constant arrays in the shader on certain Intel cards), but we probably don't have that update in wgpu-native yet.

grovesNL avatar Oct 14 '20 23:10 grovesNL

Good catch – if I switch to WGPUPowerPreference_HighPerformance (using the discrete vs integrated GPU), the triangle appears!

mkeeter avatar Oct 15 '20 13:10 mkeeter

Ok, so this should go away on the next update/release, where the lockfile is updated with the latest backends.

kvark avatar Oct 15 '20 13:10 kvark

Triangle example works now on both discrete and integrated GPUs.

Sineaggi avatar Feb 03 '21 02:02 Sineaggi

Ok great! I think we also need to update most/all versions in the lockfile because we still reference gfx-backend-metal 0.6.0

grovesNL avatar Feb 03 '21 03:02 grovesNL

As library migrated from gfx-rs to wgpu-core a while back. This is probably fixed, if it is still occurring please file a new issue.

rajveermalviya avatar Jun 12 '23 04:06 rajveermalviya