-
Notifications
You must be signed in to change notification settings - Fork 152
Graphics device and external texture updates #1566
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
base: master
Are you sure you want to change the base?
Conversation
- Add ability to specify the back buffer depth stencil format, including the ability to not use one - Set min values for bgfx configuration to save memory - Add ability to specify layer index to external texture - Update external texture lookup table for Metal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces new graphics capabilities including configurable depth/stencil formats for the back buffer, platform-specific back buffer resource management for D3D11, layer-based external texture support, and memory-optimized bgfx configuration settings.
- Enhanced ExternalTexture API with layer index support for multi-layered textures
- Added configurable depth/stencil format options with ability to disable depth/stencil buffers
- Updated Metal pixel format lookup table to use symbolic constants instead of numeric literals
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Plugins/ExternalTexture/Source/ExternalTexture_Shared.h | Added layerIndex parameter to Update and AddToContextAsync methods; changed from unique_ptr to shared_ptr for thread-safe handle management |
| Plugins/ExternalTexture/Source/ExternalTexture_Metal.mm | Added Metal pixel format lookup table with symbolic constants; updated Update signature |
| Plugins/ExternalTexture/Source/ExternalTexture_D3D11.cpp | Added NumLayers support and layerIndex parameter to Update method |
| Plugins/ExternalTexture/Source/ExternalTexture_D3D12.cpp | Added NumLayers support and renamed methods (Ptr→Get, Assign→Set) |
| Plugins/ExternalTexture/Source/ExternalTexture_OpenGL.cpp | Updated method signatures to match platform-agnostic interface |
| Plugins/ExternalTexture/Source/ExternalTexture_Base.h | Added NumLayers property and UpdateHandles support for layerIndex |
| Plugins/ExternalTexture/Include/Babylon/Plugins/ExternalTexture.h | Added Get method and layerIndex parameter; removed texture attribute matching requirement |
| Dependencies/CMakeLists.txt | Added memory-optimized bgfx configuration settings |
| Core/Graphics/Source/DeviceImpl.h | Reorganized method declarations |
| Core/Graphics/Source/DeviceImpl.cpp | Added back buffer depth/stencil format configuration support |
| Core/Graphics/Include/Shared/Babylon/Graphics/Device.h | Added DepthStencilFormat enum and back buffer configuration options |
| Core/Graphics/Include/RendererType/D3D11/Babylon/Graphics/RendererType.h | Added GRAPHICS_BACK_BUFFER_SUPPORT and back buffer type aliases; removed unused DeviceConfiguration |
| Core/Graphics/Include/RendererType/OpenGL/Babylon/Graphics/RendererType.h | Removed unused DeviceConfiguration struct |
| Core/Graphics/Include/RendererType/Metal/Babylon/Graphics/RendererType.h | Removed unused DeviceConfiguration struct |
| Core/Graphics/Include/RendererType/D3D12/Babylon/Graphics/RendererType.h | Removed unused DeviceConfiguration struct |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This change includes new support for specifying back buffer resources, enhanced depth/stencil format control, and expanded external texture APIs to better handle multi-layered textures and platform-specific details.
TODO