igl | github | Fix
WebGPUDawnCI by bumpingDawnto 42d0e90f (#451)Summary: Fix
WebGPUDawnCI by bumpingDawnto 42d0e90fPull Request resolved: https://github.com/facebook/igl/pull/451
Reviewed By: rameshviswanathan
Differential Revision: D127382270
Pulled By: corporateshark
fbshipit-source-id: 46b540e6d7809d1ed5af36142f1916e049acb929
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Intermediate Graphics Library (IGL) is a cross-platform library that commands the GPU. It encapsulates common GPU functionality with a low-level cross-platform interface. IGL is designed to support multiple backends implemented on top of various graphics APIs (e.g. OpenGL, Metal and Vulkan) with a common interface.
There are a lot of good options for abstracting GPU API’s; each making different trade-offs. We designed IGL around the following priorities:
Supported rendering backends
OpenGL ES, DirectX 12, WebGPU and WebGL are opt-in:
IGL_WITH_OPENGLES,IGL_WITH_D3D12,IGL_WITH_WEBGPUandIGL_WITH_WEBGLdefault toOFF.Supported platforms
API Support
WebGPU is not in the table because it is not tied to one native platform:
igl::webgpuruns on Dawn natively (Metal on macOS and iOS, Vulkan on Linux) and in the browser through Emscripten’semdawnwebgpu. Win32 and Android surfaces are not covered yet. Shaders are WGSL. See src/igl/webgpu/ROADMAP.md for the current state.Shading languages
Shaders can be written in GLSL, MSL, HLSL or SparkSL, and in Slang. A Slang shader is written once and compiled ahead of time to SPIR-V, MSL, HLSL, WGSL and GLSL, so the same source runs on every backend. The generated C++ headers are checked in, so building IGL never runs
slangc.See tools/slang/README.md for how programs are declared and regenerated, and shell/renderSessions/slang/README.md for the two render sessions written entirely in Slang.
Build
Before building, run the deployment scripts:
These scripts download external third-party dependencies. Please check Dependencies for the full list.
The Gradle project is located within the build/android folder.
Please install Emscripten and Ninja.
Samples
Three desktop samples and over thirty render sessions ship with IGL, covering bind groups, bindless buffers, texture views, specialization constants, mesh shaders, indirect draws, subpasses, YUV sampling, GPU timers and the two Slang sessions. They are listed in getting-started.md and built by default (
IGL_WITH_SAMPLES).Screenshots
License
IGL is released under the MIT license, see LICENSE.md for the full text as well as third-party library acknowledgements. SparkSL Compiler is released under the SparkSL Compiler License, see LICENSE for full text.