Skip to content

Conversation

@bghgary
Copy link
Contributor

@bghgary bghgary commented Nov 11, 2025

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.

  • 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
  • Remove unused struct

TODO

  • Add tests

- 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
@bghgary bghgary requested review from CedricGuillemet, SergioRZMasson, Copilot and ryantrem and removed request for SergioRZMasson and Copilot November 11, 2025 01:08
Copilot finished reviewing on behalf of bghgary November 11, 2025 01:11
Copy link

Copilot AI left a 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.

@bghgary bghgary changed the title Graphics device updates Graphics device and external texture updates Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants