Examples: GLFW/SDL2/SDL3+WebGPU: fixed running with wgpu-native missing wgpuInstanceWaitAny(). (#9377)
This commit is contained in:
parent
35a13e9948
commit
7e0de0e411
@ -74,7 +74,8 @@ Other Changes:
|
|||||||
when when `FramebufferScale` is >1.0f. (#9515, #8628) [@WayU]
|
when when `FramebufferScale` is >1.0f. (#9515, #8628) [@WayU]
|
||||||
- WebGPU: update to build with wgpu-native 29.0+. (#9377, #9532, #9530) [@lucascompython, @ivan-enzhaev]
|
- WebGPU: update to build with wgpu-native 29.0+. (#9377, #9532, #9530) [@lucascompython, @ivan-enzhaev]
|
||||||
- Examples:
|
- Examples:
|
||||||
- SDL2+Metal: create Metal context without using a SDL_Renderer.
|
- GLFW/SDL2/SDL3+WebGPU: fixed running with wgpu-native missing `wgpuInstanceWaitAny()`. (#9377)
|
||||||
|
- SDL2+Metal: create Metal context without using a `SDL_Renderer`.
|
||||||
- QNX+OpenGL3, QNX+Vulkan: added QNX Screen examples. (#9492) [@mgorchak-blackberry]
|
- QNX+OpenGL3, QNX+Vulkan: added QNX Screen examples. (#9492) [@mgorchak-blackberry]
|
||||||
- OSX+OpenGL3: added example_apple_opengl3/ (OSX/Cocoa + OpenGL 3.2 Core profile).
|
- OSX+OpenGL3: added example_apple_opengl3/ (OSX/Cocoa + OpenGL 3.2 Core profile).
|
||||||
|
|
||||||
|
|||||||
@ -376,8 +376,10 @@ static WGPUAdapter RequestAdapter(WGPUInstance& instance)
|
|||||||
adapterCallbackInfo.userdata1 = &local_adapter;
|
adapterCallbackInfo.userdata1 = &local_adapter;
|
||||||
|
|
||||||
WGPUFuture future = wgpuInstanceRequestAdapter(instance, &adapter_options, adapterCallbackInfo);
|
WGPUFuture future = wgpuInstanceRequestAdapter(instance, &adapter_options, adapterCallbackInfo);
|
||||||
|
#if !defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
|
||||||
WGPUFutureWaitInfo waitInfo = { future, false };
|
WGPUFutureWaitInfo waitInfo = { future, false };
|
||||||
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
||||||
|
#endif
|
||||||
IM_ASSERT(local_adapter && "Error on Adapter request");
|
IM_ASSERT(local_adapter && "Error on Adapter request");
|
||||||
return local_adapter;
|
return local_adapter;
|
||||||
}
|
}
|
||||||
@ -391,8 +393,12 @@ static WGPUDevice RequestDevice(WGPUInstance& instance, WGPUAdapter& adapter)
|
|||||||
deviceCallbackInfo.userdata1 = &local_device;
|
deviceCallbackInfo.userdata1 = &local_device;
|
||||||
|
|
||||||
WGPUFuture future = wgpuAdapterRequestDevice(adapter, nullptr, deviceCallbackInfo);
|
WGPUFuture future = wgpuAdapterRequestDevice(adapter, nullptr, deviceCallbackInfo);
|
||||||
|
#if !defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
|
||||||
WGPUFutureWaitInfo waitInfo = { future, false };
|
WGPUFutureWaitInfo waitInfo = { future, false };
|
||||||
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
||||||
|
#else
|
||||||
|
IM_UNUSED(instance);
|
||||||
|
#endif
|
||||||
IM_ASSERT(local_device && "Error on Device request");
|
IM_ASSERT(local_device && "Error on Device request");
|
||||||
return local_device;
|
return local_device;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -362,8 +362,10 @@ static WGPUAdapter RequestAdapter(WGPUInstance& instance)
|
|||||||
adapterCallbackInfo.userdata1 = &local_adapter;
|
adapterCallbackInfo.userdata1 = &local_adapter;
|
||||||
|
|
||||||
WGPUFuture future = wgpuInstanceRequestAdapter(instance, &adapter_options, adapterCallbackInfo);
|
WGPUFuture future = wgpuInstanceRequestAdapter(instance, &adapter_options, adapterCallbackInfo);
|
||||||
|
#if !defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
|
||||||
WGPUFutureWaitInfo waitInfo = { future, false };
|
WGPUFutureWaitInfo waitInfo = { future, false };
|
||||||
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
||||||
|
#endif
|
||||||
IM_ASSERT(local_adapter && "Error on Adapter request");
|
IM_ASSERT(local_adapter && "Error on Adapter request");
|
||||||
return local_adapter;
|
return local_adapter;
|
||||||
}
|
}
|
||||||
@ -377,8 +379,12 @@ static WGPUDevice RequestDevice(WGPUInstance& instance, WGPUAdapter& adapter)
|
|||||||
deviceCallbackInfo.userdata1 = &local_device;
|
deviceCallbackInfo.userdata1 = &local_device;
|
||||||
|
|
||||||
WGPUFuture future = wgpuAdapterRequestDevice(adapter, nullptr, deviceCallbackInfo);
|
WGPUFuture future = wgpuAdapterRequestDevice(adapter, nullptr, deviceCallbackInfo);
|
||||||
|
#if !defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
|
||||||
WGPUFutureWaitInfo waitInfo = { future, false };
|
WGPUFutureWaitInfo waitInfo = { future, false };
|
||||||
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
||||||
|
#else
|
||||||
|
IM_UNUSED(instance);
|
||||||
|
#endif
|
||||||
IM_ASSERT(local_device && "Error on Device request");
|
IM_ASSERT(local_device && "Error on Device request");
|
||||||
return local_device;
|
return local_device;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -373,8 +373,10 @@ static WGPUAdapter RequestAdapter(WGPUInstance& instance)
|
|||||||
adapterCallbackInfo.userdata1 = &local_adapter;
|
adapterCallbackInfo.userdata1 = &local_adapter;
|
||||||
|
|
||||||
WGPUFuture future = wgpuInstanceRequestAdapter(instance, &adapter_options, adapterCallbackInfo);
|
WGPUFuture future = wgpuInstanceRequestAdapter(instance, &adapter_options, adapterCallbackInfo);
|
||||||
|
#if !defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
|
||||||
WGPUFutureWaitInfo waitInfo = { future, false };
|
WGPUFutureWaitInfo waitInfo = { future, false };
|
||||||
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
||||||
|
#endif
|
||||||
IM_ASSERT(local_adapter && "Error on Adapter request");
|
IM_ASSERT(local_adapter && "Error on Adapter request");
|
||||||
return local_adapter;
|
return local_adapter;
|
||||||
}
|
}
|
||||||
@ -388,8 +390,12 @@ static WGPUDevice RequestDevice(WGPUInstance& instance, WGPUAdapter& adapter)
|
|||||||
deviceCallbackInfo.userdata1 = &local_device;
|
deviceCallbackInfo.userdata1 = &local_device;
|
||||||
|
|
||||||
WGPUFuture future = wgpuAdapterRequestDevice(adapter, nullptr, deviceCallbackInfo);
|
WGPUFuture future = wgpuAdapterRequestDevice(adapter, nullptr, deviceCallbackInfo);
|
||||||
|
#if !defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
|
||||||
WGPUFutureWaitInfo waitInfo = { future, false };
|
WGPUFutureWaitInfo waitInfo = { future, false };
|
||||||
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
wgpuInstanceWaitAny(instance, 1, &waitInfo, ~0ull);
|
||||||
|
#else
|
||||||
|
IM_UNUSED(instance);
|
||||||
|
#endif
|
||||||
IM_ASSERT(local_device && "Error on Device request");
|
IM_ASSERT(local_device && "Error on Device request");
|
||||||
return local_device;
|
return local_device;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user