Intermediate Graphics Library (IGL) is a cross-platform library that commands the GPU. It provides a single low-level cross-platform interface on top of various graphics APIs (e.g. OpenGL, Metal and Vulkan).
by facebookC++
Last 12 weeks · 897 commits
5 of 6 standards met
What calls and then dereferences the result without checking it. The factory only implements OpenGL, Metal and Vulkan. On any other backend (D3D12 on Windows, or Invalid/Custom) it hits the branch and returns . then calls on the null pointer. In release builds this is a null-pointer dereference / crash; in debug builds the in the factory fires first. Why is advertised as a generic cross-backend helper. On a Windows D3D12 device (a first-class IGL backend) it is a guaranteed crash. The codebase's own error-handling convention (see IGL Error Handling rule #24 referenced in OpenGLTextureAccessor.cpp) requires guarding resource/accessor creation. How Guard the accessor immediately after creation and return early when it is null: This matches the null check already present in the same function. Test plan No new behavior change for OpenGL/Metal/Vulkan: the accessor is never null there, so the guard is a no-op. For D3D12 (and any future backend without an accessor), writeBitmap now returns cleanly instead of dereferencing null. Verified by reading the real code paths: (no D3D12 case, returns nullptr) and (unchecked dereference).
Normalize renderPassIndex so that format-compatible render passes(same formats/samples, different load/store/layout) share one PSO. Per Vulkan spec:https://docs.vulkan.org/spec/latest/chapters/renderpass.html#renderpass-compatibility Render pass compatibility only depends on format, samples,and flags -- NOT on loadOp/storeOp/initialLayout/finalLayout. This is safe because desc_.targetDesc already pins the format expectations for this RenderPipelineState, so all render passes it encounters are compatible.
Step 1: Introduce the extension on Vulkan to decouple depth-stencil state from the Vulkan PSO. (Vulkan only). (PRs: P1–P5) Step 2: Introduce new API to decouple cull mode from the PSO. (Effective on OpenGL, Metal, and Vulkan) .(PRs: C1–C3) Step 3: Introduce new API to decouple front-facing winding order from the PSO. (Effective on OpenGL, Metal, and Vulkan) . I will land the PRs for Step 3 following the merge of Step 2. Step 4 : Vulkan : VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE Metal : MTLBufferLayoutStrideDynamic All changes are forward-compatible.
Repository: facebook/igl. Description: Intermediate Graphics Library (IGL) is a cross-platform library that commands the GPU. It provides a single low-level cross-platform interface on top of various graphics APIs (e.g. OpenGL, Metal and Vulkan). Stars: 3228, Forks: 221. Primary language: C++. Languages: C++ (86%), Objective-C++ (7.1%), C (4%), CMake (1.2%), Objective-C (0.9%). Latest release: v1.1.1 (1y ago). Open PRs: 1, open issues: 0. Last activity: 6h ago. Community health: 87%. Top contributors: corporateshark, rudybear, EricGriffith, francoiscoulombe, vinsentli, nlutsenko, trviv, syeh1, AmesingFlank, ChristianK275 and others.