diff --git a/bindings/bf/bgfx.bf b/bindings/bf/bgfx.bf
index 97b8c860c..06ab157c7 100644
--- a/bindings/bf/bgfx.bf
+++ b/bindings/bf/bgfx.bf
@@ -1020,181 +1020,115 @@ public static class bgfx
[AllowDuplicates]
public enum CapsFlags : uint64
{
- ///
- /// Alpha to coverage is supported.
- ///
- AlphaToCoverage = 0x0000000000000001,
-
///
/// Blend independent is supported.
///
- BlendIndependent = 0x0000000000000002,
+ BlendIndependent = 0x0000000000000001,
///
/// Compute shaders are supported.
///
- Compute = 0x0000000000000004,
+ Compute = 0x0000000000000002,
///
/// Conservative rasterization is supported.
///
- ConservativeRaster = 0x0000000000000008,
+ ConservativeRaster = 0x0000000000000004,
///
/// Draw indirect is supported.
///
- DrawIndirect = 0x0000000000000010,
+ DrawIndirect = 0x0000000000000008,
///
/// Draw indirect with indirect count is supported.
///
- DrawIndirectCount = 0x0000000000000020,
-
- ///
- /// Fragment depth is available in fragment shader.
- ///
- FragmentDepth = 0x0000000000000040,
+ DrawIndirectCount = 0x0000000000000010,
///
/// Fragment ordering is available in fragment shader.
///
- FragmentOrdering = 0x0000000000000080,
+ FragmentOrdering = 0x0000000000000020,
///
/// Graphics debugger is present.
///
- GraphicsDebugger = 0x0000000000000100,
+ GraphicsDebugger = 0x0000000000000040,
///
/// HDR10 rendering is supported.
///
- Hdr10 = 0x0000000000000200,
-
- ///
- /// HiDPI rendering is supported.
- ///
- Hidpi = 0x0000000000000400,
+ Hdr10 = 0x0000000000000080,
///
/// Image Read/Write is supported.
///
- ImageRw = 0x0000000000000800,
+ ImageRw = 0x0000000000000100,
///
/// 32-bit indices are supported.
///
- Index32 = 0x0000000000001000,
-
- ///
- /// Instancing is supported.
- ///
- Instancing = 0x0000000000002000,
-
- ///
- /// Occlusion query is supported.
- ///
- OcclusionQuery = 0x0000000000004000,
+ Index32 = 0x0000000000000200,
///
/// PrimitiveID is available in fragment shader.
///
- PrimitiveId = 0x0000000000008000,
+ PrimitiveId = 0x0000000000000400,
///
/// Renderer is on separate thread.
///
- RendererMultithreaded = 0x0000000000010000,
+ RendererMultithreaded = 0x0000000000000800,
///
/// Multiple windows are supported.
///
- SwapChain = 0x0000000000020000,
-
- ///
- /// Texture blit is supported.
- ///
- TextureBlit = 0x0000000000040000,
-
- ///
- /// Texture compare less equal mode is supported.
- ///
- TextureCompareLequal = 0x0000000000080000,
- TextureCompareReserved = 0x0000000000100000,
+ SwapChain = 0x0000000000001000,
///
/// Cubemap texture array is supported.
///
- TextureCubeArray = 0x0000000000200000,
+ TextureCubeArray = 0x0000000000002000,
///
/// CPU direct access to GPU texture memory.
///
- TextureDirectAccess = 0x0000000000400000,
+ TextureDirectAccess = 0x0000000000004000,
///
/// External texture is supported.
///
- TextureExternal = 0x0000000000800000,
+ TextureExternal = 0x0000000000008000,
///
/// External shared texture is supported.
///
- TextureExternalShared = 0x0000000001000000,
-
- ///
- /// Read-back texture is supported.
- ///
- TextureReadBack = 0x0000000002000000,
-
- ///
- /// 2D texture array is supported.
- ///
- Texture2dArray = 0x0000000004000000,
-
- ///
- /// 3D textures are supported.
- ///
- Texture3d = 0x0000000008000000,
+ TextureExternalShared = 0x0000000000010000,
///
/// Transparent back buffer supported.
///
- TransparentBackbuffer = 0x0000000010000000,
+ TransparentBackbuffer = 0x0000000000020000,
///
/// Variable Rate Shading
///
- VariableRateShading = 0x0000000020000000,
-
- ///
- /// Vertex attribute half-float is supported.
- ///
- VertexAttribHalf = 0x0000000040000000,
+ VariableRateShading = 0x0000000000040000,
///
/// Vertex attribute 10_10_10_2 is supported.
///
- VertexAttribUint10 = 0x0000000080000000,
-
- ///
- /// Rendering with VertexID only is supported.
- ///
- VertexId = 0x0000000100000000,
+ VertexAttribUint10 = 0x0000000000080000,
///
/// Hardware video decode is supported.
///
- VideoDecode = 0x0000000200000000,
+ VideoDecode = 0x0000000000100000,
///
/// Viewport layer is available in vertex shader.
///
- ViewportLayerArray = 0x0000000400000000,
-
- ///
- /// All texture compare modes are supported.
- ///
- TextureCompareAll = 0x0000000000180000,
+ ViewportLayerArray = 0x0000000000200000,
}
[AllowDuplicates]
@@ -1764,7 +1698,7 @@ public static class bgfx
Uint16,
///
- /// Half, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_HALF`.
+ /// Half.
///
Half,
@@ -3905,7 +3839,7 @@ public static class bgfx
/// Width.
/// Height.
/// Indicates that texture contains full mip-map chain.
- /// Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ /// Number of layers in texture array.
/// Texture format. See: `TextureFormat::Enum`.
/// Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.
/// Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than 1, expected memory layout is texture and all mips together for each array element.
@@ -3921,7 +3855,7 @@ public static class bgfx
///
/// Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
/// Indicates that texture contains full mip-map chain.
- /// Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ /// Number of layers in texture array.
/// Texture format. See: `TextureFormat::Enum`.
/// Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.
///
@@ -3950,7 +3884,7 @@ public static class bgfx
///
/// Cube side size.
/// Indicates that texture contains full mip-map chain.
- /// Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ /// Number of layers in texture array.
/// Texture format. See: `TextureFormat::Enum`.
/// Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.
/// Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
@@ -4048,7 +3982,6 @@ public static class bgfx
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
/// It's a texture for CPU readback, and can't be a GPU resource
/// at the same time. See `examples/30-picking`.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
///
///
///
@@ -4845,7 +4778,6 @@ public static class bgfx
/// Set number of vertices for auto generated vertices use in conjunction
/// with gl_VertexID.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
///
///
@@ -4891,7 +4823,6 @@ public static class bgfx
/// Set number of instances for auto generated instances use in conjunction
/// with gl_InstanceID.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
///
///
@@ -5143,7 +5074,6 @@ public static class bgfx
/// draw commands are executed after blit and compute commands.
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
@@ -5195,7 +5125,6 @@ public static class bgfx
///
/// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
@@ -5221,7 +5150,6 @@ public static class bgfx
/// @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flags.
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
@@ -5545,7 +5473,6 @@ public static class bgfx
/// Set number of vertices for auto generated vertices use in conjunction
/// with gl_VertexID.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
///
///
@@ -5591,7 +5518,6 @@ public static class bgfx
/// Set number of instances for auto generated instances use in conjunction
/// with gl_InstanceID.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
///
///
@@ -5841,7 +5767,6 @@ public static class bgfx
/// draw commands are executed after blit and compute commands.
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
@@ -5893,7 +5818,6 @@ public static class bgfx
///
/// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
@@ -5919,7 +5843,6 @@ public static class bgfx
/// @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flags.
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
diff --git a/bindings/c3/bgfx.c3 b/bindings/c3/bgfx.c3
index 78c0189e1..74eed2e31 100644
--- a/bindings/c3/bgfx.c3
+++ b/bindings/c3/bgfx.c3
@@ -650,111 +650,71 @@ constdef SwapChainFlags : inline uint
constdef CapsFlags : inline ulong
{
- // Alpha to coverage is supported.
- ALPHATOCOVERAGE = 0x0000000000000001,
-
// Blend independent is supported.
- BLENDINDEPENDENT = 0x0000000000000002,
+ BLENDINDEPENDENT = 0x0000000000000001,
// Compute shaders are supported.
- COMPUTE = 0x0000000000000004,
+ COMPUTE = 0x0000000000000002,
// Conservative rasterization is supported.
- CONSERVATIVERASTER = 0x0000000000000008,
+ CONSERVATIVERASTER = 0x0000000000000004,
// Draw indirect is supported.
- DRAWINDIRECT = 0x0000000000000010,
+ DRAWINDIRECT = 0x0000000000000008,
// Draw indirect with indirect count is supported.
- DRAWINDIRECTCOUNT = 0x0000000000000020,
-
- // Fragment depth is available in fragment shader.
- FRAGMENTDEPTH = 0x0000000000000040,
+ DRAWINDIRECTCOUNT = 0x0000000000000010,
// Fragment ordering is available in fragment shader.
- FRAGMENTORDERING = 0x0000000000000080,
+ FRAGMENTORDERING = 0x0000000000000020,
// Graphics debugger is present.
- GRAPHICSDEBUGGER = 0x0000000000000100,
+ GRAPHICSDEBUGGER = 0x0000000000000040,
// HDR10 rendering is supported.
- HDR10 = 0x0000000000000200,
-
- // HiDPI rendering is supported.
- HIDPI = 0x0000000000000400,
+ HDR10 = 0x0000000000000080,
// Image Read/Write is supported.
- IMAGERW = 0x0000000000000800,
+ IMAGERW = 0x0000000000000100,
// 32-bit indices are supported.
- INDEX32 = 0x0000000000001000,
-
- // Instancing is supported.
- INSTANCING = 0x0000000000002000,
-
- // Occlusion query is supported.
- OCCLUSIONQUERY = 0x0000000000004000,
+ INDEX32 = 0x0000000000000200,
// PrimitiveID is available in fragment shader.
- PRIMITIVEID = 0x0000000000008000,
+ PRIMITIVEID = 0x0000000000000400,
// Renderer is on separate thread.
- RENDERERMULTITHREADED = 0x0000000000010000,
+ RENDERERMULTITHREADED = 0x0000000000000800,
// Multiple windows are supported.
- SWAPCHAIN = 0x0000000000020000,
-
- // Texture blit is supported.
- TEXTUREBLIT = 0x0000000000040000,
-
- // Texture compare less equal mode is supported.
- TEXTURECOMPARELEQUAL = 0x0000000000080000,
- TEXTURECOMPARERESERVED = 0x0000000000100000,
+ SWAPCHAIN = 0x0000000000001000,
// Cubemap texture array is supported.
- TEXTURECUBEARRAY = 0x0000000000200000,
+ TEXTURECUBEARRAY = 0x0000000000002000,
// CPU direct access to GPU texture memory.
- TEXTUREDIRECTACCESS = 0x0000000000400000,
+ TEXTUREDIRECTACCESS = 0x0000000000004000,
// External texture is supported.
- TEXTUREEXTERNAL = 0x0000000000800000,
+ TEXTUREEXTERNAL = 0x0000000000008000,
// External shared texture is supported.
- TEXTUREEXTERNALSHARED = 0x0000000001000000,
-
- // Read-back texture is supported.
- TEXTUREREADBACK = 0x0000000002000000,
-
- // 2D texture array is supported.
- TEXTURE_2DARRAY = 0x0000000004000000,
-
- // 3D textures are supported.
- TEXTURE_3D = 0x0000000008000000,
+ TEXTUREEXTERNALSHARED = 0x0000000000010000,
// Transparent back buffer supported.
- TRANSPARENTBACKBUFFER = 0x0000000010000000,
+ TRANSPARENTBACKBUFFER = 0x0000000000020000,
// Variable Rate Shading
- VARIABLERATESHADING = 0x0000000020000000,
-
- // Vertex attribute half-float is supported.
- VERTEXATTRIBHALF = 0x0000000040000000,
+ VARIABLERATESHADING = 0x0000000000040000,
// Vertex attribute 10_10_10_2 is supported.
- VERTEXATTRIBUINT10 = 0x0000000080000000,
-
- // Rendering with VertexID only is supported.
- VERTEXID = 0x0000000100000000,
+ VERTEXATTRIBUINT10 = 0x0000000000080000,
// Hardware video decode is supported.
- VIDEODECODE = 0x0000000200000000,
+ VIDEODECODE = 0x0000000000100000,
// Viewport layer is available in vertex shader.
- VIEWPORTLAYERARRAY = 0x0000000400000000,
-
- // All texture compare modes are supported.
- TEXTURECOMPAREALL = 0x0000000000180000,
+ VIEWPORTLAYERARRAY = 0x0000000000200000,
}
constdef CapsFormatFlags : inline uint
@@ -1114,7 +1074,7 @@ enum AttribType : uint
// Uint16
UINT16,
- // Half, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_HALF`.
+ // Half.
HALF,
// Float
@@ -2881,7 +2841,7 @@ extern fn TextureHandle create_texture(Memory* _mem, ulong _flags, char _skip, T
// _width : `Width.`
// _height : `Height.`
// _hasMips : `Indicates that texture contains full mip-map chain.`
-// _numLayers : `Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.`
+// _numLayers : `Number of layers in texture array.`
// _format : `Texture format. See: `TextureFormat::Enum`.`
// _flags : `Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.`
// _mem : `Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than 1, expected memory layout is texture and all mips together for each array element.`
@@ -2892,7 +2852,7 @@ extern fn TextureHandle create_texture_2d(ushort _width, ushort _height, bool _h
// if back buffer resolution changes.
// _ratio : `Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.`
// _hasMips : `Indicates that texture contains full mip-map chain.`
-// _numLayers : `Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.`
+// _numLayers : `Number of layers in texture array.`
// _format : `Texture format. See: `TextureFormat::Enum`.`
// _flags : `Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.`
extern fn TextureHandle create_texture_2d_scaled(BackbufferRatio _ratio, bool _hasMips, ushort _numLayers, TextureFormat _format, ulong _flags) @cname("bgfx_create_texture_2d_scaled");
@@ -2911,7 +2871,7 @@ extern fn TextureHandle create_texture_3d(ushort _width, ushort _height, ushort
// Create Cube texture.
// _size : `Cube side size.`
// _hasMips : `Indicates that texture contains full mip-map chain.`
-// _numLayers : `Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.`
+// _numLayers : `Number of layers in texture array.`
// _format : `Texture format. See: `TextureFormat::Enum`.`
// _flags : `Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.`
// _mem : `Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than`
@@ -2986,7 +2946,6 @@ extern fn void clear_texture(TextureHandle _handle, char _mip, char _numMips, us
// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
// It's a texture for CPU readback, and can't be a GPU resource
// at the same time. See `examples/30-picking`.
-// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
//
// _src : `Source texture region.`
// _data : `Destination buffer.`
@@ -3494,7 +3453,6 @@ extern fn void encoder_set_transient_vertex_buffer_with_layout(Encoder* _this, c
// Set number of vertices for auto generated vertices use in conjunction
// with gl_VertexID.
//
-// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
//
// _numVertices : `Number of vertices.`
extern fn void encoder_set_vertex_count(Encoder* _this, uint _numVertices) @cname("bgfx_encoder_set_vertex_count");
@@ -3520,7 +3478,6 @@ extern fn void encoder_set_instance_data_from_dynamic_vertex_buffer(Encoder* _th
// Set number of instances for auto generated instances use in conjunction
// with gl_InstanceID.
//
-// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
//
// _numInstances : `Number of instances.`
extern fn void encoder_set_instance_count(Encoder* _this, uint _numInstances) @cname("bgfx_encoder_set_instance_count");
@@ -3682,7 +3639,6 @@ extern fn void encoder_discard(Encoder* _this, char _flags) @cname("bgfx_encoder
// draw commands are executed after blit and compute commands.
//
// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
//
// _id : `View id.`
// _dst : `Destination texture region.`
@@ -3724,7 +3680,6 @@ extern fn void encoder_blit_buffer(Encoder* _this, ushort _id, BufferRegion* _ds
//
// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
// `BGFX_BUFFER_DRAW_INDIRECT` flag.
-// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
//
// _id : `View id.`
// _dst : `Destination buffer region.`
@@ -3745,7 +3700,6 @@ extern fn void encoder_blit_to_buffer(Encoder* _this, ushort _id, BufferRegion*
// @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
// `BGFX_BUFFER_DRAW_INDIRECT` flags.
// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
//
// _id : `View id.`
// _dst : `Destination texture region.`
@@ -3955,7 +3909,6 @@ extern fn void set_transient_vertex_buffer_with_layout(char _stream, TransientVe
// Set number of vertices for auto generated vertices use in conjunction
// with gl_VertexID.
//
-// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
//
// _numVertices : `Number of vertices.`
extern fn void set_vertex_count(uint _numVertices) @cname("bgfx_set_vertex_count");
@@ -3981,7 +3934,6 @@ extern fn void set_instance_data_from_dynamic_vertex_buffer(DynamicVertexBufferH
// Set number of instances for auto generated instances use in conjunction
// with gl_InstanceID.
//
-// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
//
// _numInstances : `Number of instances.`
extern fn void set_instance_count(uint _numInstances) @cname("bgfx_set_instance_count");
@@ -4141,7 +4093,6 @@ extern fn void discard(char _flags) @cname("bgfx_discard");
// draw commands are executed after blit and compute commands.
//
// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
//
// _id : `View id.`
// _dst : `Destination texture region.`
@@ -4183,7 +4134,6 @@ extern fn void blit_buffer(ushort _id, BufferRegion* _dst, BufferRegion* _src) @
//
// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
// `BGFX_BUFFER_DRAW_INDIRECT` flag.
-// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
//
// _id : `View id.`
// _dst : `Destination buffer region.`
@@ -4204,7 +4154,6 @@ extern fn void blit_to_buffer(ushort _id, BufferRegion* _dst, TextureRegion* _sr
// @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
// `BGFX_BUFFER_DRAW_INDIRECT` flags.
// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
//
// _id : `View id.`
// _dst : `Destination texture region.`
diff --git a/bindings/cs/bgfx.cs b/bindings/cs/bgfx.cs
index fc85a0ad4..0542035bf 100644
--- a/bindings/cs/bgfx.cs
+++ b/bindings/cs/bgfx.cs
@@ -1019,181 +1019,115 @@ public static partial class bgfx
[Flags]
public enum CapsFlags : ulong
{
- ///
- /// Alpha to coverage is supported.
- ///
- AlphaToCoverage = 0x0000000000000001,
-
///
/// Blend independent is supported.
///
- BlendIndependent = 0x0000000000000002,
+ BlendIndependent = 0x0000000000000001,
///
/// Compute shaders are supported.
///
- Compute = 0x0000000000000004,
+ Compute = 0x0000000000000002,
///
/// Conservative rasterization is supported.
///
- ConservativeRaster = 0x0000000000000008,
+ ConservativeRaster = 0x0000000000000004,
///
/// Draw indirect is supported.
///
- DrawIndirect = 0x0000000000000010,
+ DrawIndirect = 0x0000000000000008,
///
/// Draw indirect with indirect count is supported.
///
- DrawIndirectCount = 0x0000000000000020,
-
- ///
- /// Fragment depth is available in fragment shader.
- ///
- FragmentDepth = 0x0000000000000040,
+ DrawIndirectCount = 0x0000000000000010,
///
/// Fragment ordering is available in fragment shader.
///
- FragmentOrdering = 0x0000000000000080,
+ FragmentOrdering = 0x0000000000000020,
///
/// Graphics debugger is present.
///
- GraphicsDebugger = 0x0000000000000100,
+ GraphicsDebugger = 0x0000000000000040,
///
/// HDR10 rendering is supported.
///
- Hdr10 = 0x0000000000000200,
-
- ///
- /// HiDPI rendering is supported.
- ///
- Hidpi = 0x0000000000000400,
+ Hdr10 = 0x0000000000000080,
///
/// Image Read/Write is supported.
///
- ImageRw = 0x0000000000000800,
+ ImageRw = 0x0000000000000100,
///
/// 32-bit indices are supported.
///
- Index32 = 0x0000000000001000,
-
- ///
- /// Instancing is supported.
- ///
- Instancing = 0x0000000000002000,
-
- ///
- /// Occlusion query is supported.
- ///
- OcclusionQuery = 0x0000000000004000,
+ Index32 = 0x0000000000000200,
///
/// PrimitiveID is available in fragment shader.
///
- PrimitiveId = 0x0000000000008000,
+ PrimitiveId = 0x0000000000000400,
///
/// Renderer is on separate thread.
///
- RendererMultithreaded = 0x0000000000010000,
+ RendererMultithreaded = 0x0000000000000800,
///
/// Multiple windows are supported.
///
- SwapChain = 0x0000000000020000,
-
- ///
- /// Texture blit is supported.
- ///
- TextureBlit = 0x0000000000040000,
-
- ///
- /// Texture compare less equal mode is supported.
- ///
- TextureCompareLequal = 0x0000000000080000,
- TextureCompareReserved = 0x0000000000100000,
+ SwapChain = 0x0000000000001000,
///
/// Cubemap texture array is supported.
///
- TextureCubeArray = 0x0000000000200000,
+ TextureCubeArray = 0x0000000000002000,
///
/// CPU direct access to GPU texture memory.
///
- TextureDirectAccess = 0x0000000000400000,
+ TextureDirectAccess = 0x0000000000004000,
///
/// External texture is supported.
///
- TextureExternal = 0x0000000000800000,
+ TextureExternal = 0x0000000000008000,
///
/// External shared texture is supported.
///
- TextureExternalShared = 0x0000000001000000,
-
- ///
- /// Read-back texture is supported.
- ///
- TextureReadBack = 0x0000000002000000,
-
- ///
- /// 2D texture array is supported.
- ///
- Texture2dArray = 0x0000000004000000,
-
- ///
- /// 3D textures are supported.
- ///
- Texture3d = 0x0000000008000000,
+ TextureExternalShared = 0x0000000000010000,
///
/// Transparent back buffer supported.
///
- TransparentBackbuffer = 0x0000000010000000,
+ TransparentBackbuffer = 0x0000000000020000,
///
/// Variable Rate Shading
///
- VariableRateShading = 0x0000000020000000,
-
- ///
- /// Vertex attribute half-float is supported.
- ///
- VertexAttribHalf = 0x0000000040000000,
+ VariableRateShading = 0x0000000000040000,
///
/// Vertex attribute 10_10_10_2 is supported.
///
- VertexAttribUint10 = 0x0000000080000000,
-
- ///
- /// Rendering with VertexID only is supported.
- ///
- VertexId = 0x0000000100000000,
+ VertexAttribUint10 = 0x0000000000080000,
///
/// Hardware video decode is supported.
///
- VideoDecode = 0x0000000200000000,
+ VideoDecode = 0x0000000000100000,
///
/// Viewport layer is available in vertex shader.
///
- ViewportLayerArray = 0x0000000400000000,
-
- ///
- /// All texture compare modes are supported.
- ///
- TextureCompareAll = 0x0000000000180000,
+ ViewportLayerArray = 0x0000000000200000,
}
[Flags]
@@ -1758,7 +1692,7 @@ public static partial class bgfx
Uint16,
///
- /// Half, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_HALF`.
+ /// Half.
///
Half,
@@ -3852,7 +3786,7 @@ public static partial class bgfx
/// Width.
/// Height.
/// Indicates that texture contains full mip-map chain.
- /// Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ /// Number of layers in texture array.
/// Texture format. See: `TextureFormat::Enum`.
/// Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.
/// Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than 1, expected memory layout is texture and all mips together for each array element.
@@ -3868,7 +3802,7 @@ public static partial class bgfx
///
/// Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
/// Indicates that texture contains full mip-map chain.
- /// Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ /// Number of layers in texture array.
/// Texture format. See: `TextureFormat::Enum`.
/// Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.
///
@@ -3897,7 +3831,7 @@ public static partial class bgfx
///
/// Cube side size.
/// Indicates that texture contains full mip-map chain.
- /// Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ /// Number of layers in texture array.
/// Texture format. See: `TextureFormat::Enum`.
/// Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.
/// Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
@@ -3995,7 +3929,6 @@ public static partial class bgfx
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
/// It's a texture for CPU readback, and can't be a GPU resource
/// at the same time. See `examples/30-picking`.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
///
///
///
@@ -4792,7 +4725,6 @@ public static partial class bgfx
/// Set number of vertices for auto generated vertices use in conjunction
/// with gl_VertexID.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
///
///
@@ -4838,7 +4770,6 @@ public static partial class bgfx
/// Set number of instances for auto generated instances use in conjunction
/// with gl_InstanceID.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
///
///
@@ -5090,7 +5021,6 @@ public static partial class bgfx
/// draw commands are executed after blit and compute commands.
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
@@ -5142,7 +5072,6 @@ public static partial class bgfx
///
/// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
@@ -5168,7 +5097,6 @@ public static partial class bgfx
/// @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flags.
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
@@ -5492,7 +5420,6 @@ public static partial class bgfx
/// Set number of vertices for auto generated vertices use in conjunction
/// with gl_VertexID.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
///
///
@@ -5538,7 +5465,6 @@ public static partial class bgfx
/// Set number of instances for auto generated instances use in conjunction
/// with gl_InstanceID.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
///
///
@@ -5788,7 +5714,6 @@ public static partial class bgfx
/// draw commands are executed after blit and compute commands.
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
@@ -5840,7 +5765,6 @@ public static partial class bgfx
///
/// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
@@ -5866,7 +5790,6 @@ public static partial class bgfx
/// @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flags.
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
///
///
diff --git a/bindings/d/package.d b/bindings/d/package.d
index 04bcc9844..59e1b8bc4 100644
--- a/bindings/d/package.d
+++ b/bindings/d/package.d
@@ -9,7 +9,7 @@ import bindbc.common.types: c_int64, c_uint64, va_list;
import bindbc.bgfx.config;
static import bgfx.impl;
-enum uint apiVersion = 158;
+enum uint apiVersion = 159;
alias ViewID = ushort;
@@ -500,42 +500,28 @@ enum SwapChainFullscreen: SwapChainFullscreen_{
alias CapFlags_ = ulong;
enum CapFlags: CapFlags_{
- alphaToCoverage = 0x0000_0000_0000_0001, ///Alpha to coverage is supported.
- blendIndependent = 0x0000_0000_0000_0002, ///Blend independent is supported.
- compute = 0x0000_0000_0000_0004, ///Compute shaders are supported.
- conservativeRaster = 0x0000_0000_0000_0008, ///Conservative rasterization is supported.
- drawIndirect = 0x0000_0000_0000_0010, ///Draw indirect is supported.
- drawIndirectCount = 0x0000_0000_0000_0020, ///Draw indirect with indirect count is supported.
- fragmentDepth = 0x0000_0000_0000_0040, ///Fragment depth is available in fragment shader.
- fragmentOrdering = 0x0000_0000_0000_0080, ///Fragment ordering is available in fragment shader.
- graphicsDebugger = 0x0000_0000_0000_0100, ///Graphics debugger is present.
- hdr10 = 0x0000_0000_0000_0200, ///HDR10 rendering is supported.
- hiDPI = 0x0000_0000_0000_0400, ///HiDPI rendering is supported.
- imageRW = 0x0000_0000_0000_0800, ///Image Read/Write is supported.
- index32 = 0x0000_0000_0000_1000, ///32-bit indices are supported.
- instancing = 0x0000_0000_0000_2000, ///Instancing is supported.
- occlusionQuery = 0x0000_0000_0000_4000, ///Occlusion query is supported.
- primitiveID = 0x0000_0000_0000_8000, ///PrimitiveID is available in fragment shader.
- rendererMultithreaded = 0x0000_0000_0001_0000, ///Renderer is on separate thread.
- swapChain = 0x0000_0000_0002_0000, ///Multiple windows are supported.
- textureBlit = 0x0000_0000_0004_0000, ///Texture blit is supported.
- textureCompareLEqual = 0x0000_0000_0008_0000, ///Texture compare less equal mode is supported.
- textureCompareReserved = 0x0000_0000_0010_0000,
- textureCubeArray = 0x0000_0000_0020_0000, ///Cubemap texture array is supported.
- textureDirectAccess = 0x0000_0000_0040_0000, ///CPU direct access to GPU texture memory.
- textureExternal = 0x0000_0000_0080_0000, ///External texture is supported.
- textureExternalShared = 0x0000_0000_0100_0000, ///External shared texture is supported.
- textureReadBack = 0x0000_0000_0200_0000, ///Read-back texture is supported.
- texture2DArray = 0x0000_0000_0400_0000, ///2D texture array is supported.
- texture3D = 0x0000_0000_0800_0000, ///3D textures are supported.
- transparentBackbuffer = 0x0000_0000_1000_0000, ///Transparent back buffer supported.
- variableRateShading = 0x0000_0000_2000_0000, ///Variable Rate Shading
- vertexAttribHalf = 0x0000_0000_4000_0000, ///Vertex attribute half-float is supported.
- vertexAttribUint10 = 0x0000_0000_8000_0000, ///Vertex attribute 10_10_10_2 is supported.
- vertexID = 0x0000_0001_0000_0000, ///Rendering with VertexID only is supported.
- videoDecode = 0x0000_0002_0000_0000, ///Hardware video decode is supported.
- viewportLayerArray = 0x0000_0004_0000_0000, ///Viewport layer is available in vertex shader.
- textureCompareAll = 0x0000_0000_0018_0000, ///All texture compare modes are supported.
+ blendIndependent = 0x0000_0000_0000_0001, ///Blend independent is supported.
+ compute = 0x0000_0000_0000_0002, ///Compute shaders are supported.
+ conservativeRaster = 0x0000_0000_0000_0004, ///Conservative rasterization is supported.
+ drawIndirect = 0x0000_0000_0000_0008, ///Draw indirect is supported.
+ drawIndirectCount = 0x0000_0000_0000_0010, ///Draw indirect with indirect count is supported.
+ fragmentOrdering = 0x0000_0000_0000_0020, ///Fragment ordering is available in fragment shader.
+ graphicsDebugger = 0x0000_0000_0000_0040, ///Graphics debugger is present.
+ hdr10 = 0x0000_0000_0000_0080, ///HDR10 rendering is supported.
+ imageRW = 0x0000_0000_0000_0100, ///Image Read/Write is supported.
+ index32 = 0x0000_0000_0000_0200, ///32-bit indices are supported.
+ primitiveID = 0x0000_0000_0000_0400, ///PrimitiveID is available in fragment shader.
+ rendererMultithreaded = 0x0000_0000_0000_0800, ///Renderer is on separate thread.
+ swapChain = 0x0000_0000_0000_1000, ///Multiple windows are supported.
+ textureCubeArray = 0x0000_0000_0000_2000, ///Cubemap texture array is supported.
+ textureDirectAccess = 0x0000_0000_0000_4000, ///CPU direct access to GPU texture memory.
+ textureExternal = 0x0000_0000_0000_8000, ///External texture is supported.
+ textureExternalShared = 0x0000_0000_0001_0000, ///External shared texture is supported.
+ transparentBackbuffer = 0x0000_0000_0002_0000, ///Transparent back buffer supported.
+ variableRateShading = 0x0000_0000_0004_0000, ///Variable Rate Shading
+ vertexAttribUint10 = 0x0000_0000_0008_0000, ///Vertex attribute 10_10_10_2 is supported.
+ videoDecode = 0x0000_0000_0010_0000, ///Hardware video decode is supported.
+ viewportLayerArray = 0x0000_0000_0020_0000, ///Viewport layer is available in vertex shader.
}
alias CapsFormat_ = uint;
@@ -2067,7 +2053,6 @@ extern(C++, "bgfx") struct Encoder{
Set number of vertices for auto generated vertices use in conjunction
with gl_VertexID.
- Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
Params:
numVertices = Number of vertices.
@@ -2112,7 +2097,6 @@ extern(C++, "bgfx") struct Encoder{
Set number of instances for auto generated instances use in conjunction
with gl_InstanceID.
- Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
Params:
numInstances = Number of instances.
@@ -2339,7 +2323,6 @@ extern(C++, "bgfx") struct Encoder{
draw commands are executed after blit and compute commands.
Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
Params:
id = View id.
@@ -2387,7 +2370,6 @@ extern(C++, "bgfx") struct Encoder{
Attention: Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
`BGFX_BUFFER_DRAW_INDIRECT` flag.
- Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
Params:
id = View id.
@@ -2411,7 +2393,6 @@ extern(C++, "bgfx") struct Encoder{
Attention: Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
`BGFX_BUFFER_DRAW_INDIRECT` flags.
Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
Params:
id = View id.
@@ -3137,8 +3118,7 @@ mixin(joinFnBinds((){
width = Width.
height = Height.
hasMIPs = Indicates that texture contains full mip-map chain.
- numLayers = Number of layers in texture array. Must be 1 if caps
- `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ numLayers = Number of layers in texture array.
format = Texture format. See: `TextureFormat::Enum`.
flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
@@ -3159,8 +3139,7 @@ mixin(joinFnBinds((){
Params:
ratio = Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
hasMIPs = Indicates that texture contains full mip-map chain.
- numLayers = Number of layers in texture array. Must be 1 if caps
- `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ numLayers = Number of layers in texture array.
format = Texture format. See: `TextureFormat::Enum`.
flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
@@ -3197,8 +3176,7 @@ mixin(joinFnBinds((){
Params:
size = Cube side size.
hasMIPs = Indicates that texture contains full mip-map chain.
- numLayers = Number of layers in texture array. Must be 1 if caps
- `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ numLayers = Number of layers in texture array.
format = Texture format. See: `TextureFormat::Enum`.
flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
flags. Default texture sampling mode is linear, and wrap mode is repeat.
@@ -3312,7 +3290,6 @@ mixin(joinFnBinds((){
* Attention: Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
* It's a texture for CPU readback, and can't be a GPU resource
* at the same time. See `examples/30-picking`.
- * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
*
Params:
src = Source texture region.
@@ -4126,7 +4103,6 @@ mixin(joinFnBinds((){
* Set number of vertices for auto generated vertices use in conjunction
* with gl_VertexID.
*
- * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
*
Params:
numVertices = Number of vertices.
@@ -4171,7 +4147,6 @@ mixin(joinFnBinds((){
* Set number of instances for auto generated instances use in conjunction
* with gl_InstanceID.
*
- * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
*
Params:
numInstances = Number of instances.
@@ -4396,7 +4371,6 @@ mixin(joinFnBinds((){
* draw commands are executed after blit and compute commands.
*
* Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
*
Params:
id = View id.
@@ -4444,7 +4418,6 @@ mixin(joinFnBinds((){
*
* Attention: Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
* `BGFX_BUFFER_DRAW_INDIRECT` flag.
- * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
*
Params:
id = View id.
@@ -4468,7 +4441,6 @@ mixin(joinFnBinds((){
* Attention: Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
* `BGFX_BUFFER_DRAW_INDIRECT` flags.
* Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
*
Params:
id = View id.
diff --git a/bindings/py/bgfx.py b/bindings/py/bgfx.py
index 58e0148f4..acfee736b 100644
--- a/bindings/py/bgfx.py
+++ b/bindings/py/bgfx.py
@@ -557,42 +557,28 @@ class SwapChainFullscreenFlags(enum.IntFlag):
Mask = 0x1
class CapsFlags(enum.IntFlag):
- AlphaToCoverage = 0x1
- BlendIndependent = 0x2
- Compute = 0x4
- ConservativeRaster = 0x8
- DrawIndirect = 0x10
- DrawIndirectCount = 0x20
- FragmentDepth = 0x40
- FragmentOrdering = 0x80
- GraphicsDebugger = 0x100
- Hdr10 = 0x200
- Hidpi = 0x400
- ImageRw = 0x800
- Index32 = 0x1000
- Instancing = 0x2000
- OcclusionQuery = 0x4000
- PrimitiveId = 0x8000
- RendererMultithreaded = 0x10000
- SwapChain = 0x20000
- TextureBlit = 0x40000
- TextureCompareLequal = 0x80000
- TextureCompareReserved = 0x100000
- TextureCubeArray = 0x200000
- TextureDirectAccess = 0x400000
- TextureExternal = 0x800000
- TextureExternalShared = 0x1000000
- TextureReadBack = 0x2000000
- Texture_2dArray = 0x4000000
- Texture_3d = 0x8000000
- TransparentBackbuffer = 0x10000000
- VariableRateShading = 0x20000000
- VertexAttribHalf = 0x40000000
- VertexAttribUint10 = 0x80000000
- VertexId = 0x100000000
- VideoDecode = 0x200000000
- ViewportLayerArray = 0x400000000
- TextureCompareAll = 0x180000
+ BlendIndependent = 0x1
+ Compute = 0x2
+ ConservativeRaster = 0x4
+ DrawIndirect = 0x8
+ DrawIndirectCount = 0x10
+ FragmentOrdering = 0x20
+ GraphicsDebugger = 0x40
+ Hdr10 = 0x80
+ ImageRw = 0x100
+ Index32 = 0x200
+ PrimitiveId = 0x400
+ RendererMultithreaded = 0x800
+ SwapChain = 0x1000
+ TextureCubeArray = 0x2000
+ TextureDirectAccess = 0x4000
+ TextureExternal = 0x8000
+ TextureExternalShared = 0x10000
+ TransparentBackbuffer = 0x20000
+ VariableRateShading = 0x40000
+ VertexAttribUint10 = 0x80000
+ VideoDecode = 0x100000
+ ViewportLayerArray = 0x200000
class CapsFormatFlags(enum.IntFlag):
TextureNone = 0x0
diff --git a/bindings/py/bgfx.pyi b/bindings/py/bgfx.pyi
index 99cfd909e..67c34cc93 100644
--- a/bindings/py/bgfx.pyi
+++ b/bindings/py/bgfx.pyi
@@ -130,7 +130,7 @@ class AttribType(enum.IntEnum):
Int16 = 3
# Uint16
Uint16 = 4
- # Half, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_HALF`.
+ # Half.
Half = 5
# Float
Float = 6
@@ -1010,77 +1010,50 @@ class SwapChainFullscreenFlags(enum.IntFlag):
Mask = 0x1
class CapsFlags(enum.IntFlag):
- # Alpha to coverage is supported.
- AlphaToCoverage = 0x1
# Blend independent is supported.
- BlendIndependent = 0x2
+ BlendIndependent = 0x1
# Compute shaders are supported.
- Compute = 0x4
+ Compute = 0x2
# Conservative rasterization is supported.
- ConservativeRaster = 0x8
+ ConservativeRaster = 0x4
# Draw indirect is supported.
- DrawIndirect = 0x10
+ DrawIndirect = 0x8
# Draw indirect with indirect count is supported.
- DrawIndirectCount = 0x20
- # Fragment depth is available in fragment shader.
- FragmentDepth = 0x40
+ DrawIndirectCount = 0x10
# Fragment ordering is available in fragment shader.
- FragmentOrdering = 0x80
+ FragmentOrdering = 0x20
# Graphics debugger is present.
- GraphicsDebugger = 0x100
+ GraphicsDebugger = 0x40
# HDR10 rendering is supported.
- Hdr10 = 0x200
- # HiDPI rendering is supported.
- Hidpi = 0x400
+ Hdr10 = 0x80
# Image Read/Write is supported.
- ImageRw = 0x800
+ ImageRw = 0x100
# 32-bit indices are supported.
- Index32 = 0x1000
- # Instancing is supported.
- Instancing = 0x2000
- # Occlusion query is supported.
- OcclusionQuery = 0x4000
+ Index32 = 0x200
# PrimitiveID is available in fragment shader.
- PrimitiveId = 0x8000
+ PrimitiveId = 0x400
# Renderer is on separate thread.
- RendererMultithreaded = 0x10000
+ RendererMultithreaded = 0x800
# Multiple windows are supported.
- SwapChain = 0x20000
- # Texture blit is supported.
- TextureBlit = 0x40000
- # Texture compare less equal mode is supported.
- TextureCompareLequal = 0x80000
- TextureCompareReserved = 0x100000
+ SwapChain = 0x1000
# Cubemap texture array is supported.
- TextureCubeArray = 0x200000
+ TextureCubeArray = 0x2000
# CPU direct access to GPU texture memory.
- TextureDirectAccess = 0x400000
+ TextureDirectAccess = 0x4000
# External texture is supported.
- TextureExternal = 0x800000
+ TextureExternal = 0x8000
# External shared texture is supported.
- TextureExternalShared = 0x1000000
- # Read-back texture is supported.
- TextureReadBack = 0x2000000
- # 2D texture array is supported.
- Texture_2dArray = 0x4000000
- # 3D textures are supported.
- Texture_3d = 0x8000000
+ TextureExternalShared = 0x10000
# Transparent back buffer supported.
- TransparentBackbuffer = 0x10000000
+ TransparentBackbuffer = 0x20000
# Variable Rate Shading
- VariableRateShading = 0x20000000
- # Vertex attribute half-float is supported.
- VertexAttribHalf = 0x40000000
+ VariableRateShading = 0x40000
# Vertex attribute 10_10_10_2 is supported.
- VertexAttribUint10 = 0x80000000
- # Rendering with VertexID only is supported.
- VertexId = 0x100000000
+ VertexAttribUint10 = 0x80000
# Hardware video decode is supported.
- VideoDecode = 0x200000000
+ VideoDecode = 0x100000
# Viewport layer is available in vertex shader.
- ViewportLayerArray = 0x400000000
- # All texture compare modes are supported.
- TextureCompareAll = 0x180000
+ ViewportLayerArray = 0x200000
class CapsFormatFlags(enum.IntFlag):
# Texture format is not supported.
@@ -2421,7 +2394,6 @@ def bgfx_clear_texture(_handle: TextureHandle, _mip: int, _numMips: int, _layer:
# @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
# It's a texture for CPU readback, and can't be a GPU resource
# at the same time. See `examples/30-picking`.
-# @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
#
def bgfx_read_texture(_src: Optional[Union[TextureRegion, _Pointer[TextureRegion], ctypes.Array]], _data: Any, /) -> int: ...
@@ -2803,7 +2775,6 @@ def bgfx_encoder_set_transient_vertex_buffer_with_layout(
# Set number of vertices for auto generated vertices use in conjunction
# with gl_VertexID.
#
-# @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
#
def bgfx_encoder_set_vertex_count(_this: Optional[Union[Encoder, _Pointer[Encoder], ctypes.Array]], _numVertices: int, /) -> None: ...
@@ -2819,7 +2790,6 @@ def bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(_this: Optional[Un
# Set number of instances for auto generated instances use in conjunction
# with gl_InstanceID.
#
-# @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
#
def bgfx_encoder_set_instance_count(_this: Optional[Union[Encoder, _Pointer[Encoder], ctypes.Array]], _numInstances: int, /) -> None: ...
@@ -2979,7 +2949,6 @@ def bgfx_encoder_discard(_this: Optional[Union[Encoder, _Pointer[Encoder], ctype
# draw commands are executed after blit and compute commands.
#
# @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-# @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
#
def bgfx_encoder_blit(_this: Optional[Union[Encoder, _Pointer[Encoder], ctypes.Array]], _id: int, _dst: Optional[Union[TextureRegion, _Pointer[TextureRegion], ctypes.Array]], _src: Optional[Union[TextureRegion, _Pointer[TextureRegion], ctypes.Array]], /) -> None: ...
@@ -3015,7 +2984,6 @@ def bgfx_encoder_blit_buffer(_this: Optional[Union[Encoder, _Pointer[Encoder], c
#
# @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
# `BGFX_BUFFER_DRAW_INDIRECT` flag.
-# @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
#
def bgfx_encoder_blit_to_buffer(_this: Optional[Union[Encoder, _Pointer[Encoder], ctypes.Array]], _id: int, _dst: Optional[Union[BufferRegion, _Pointer[BufferRegion], ctypes.Array]], _src: Optional[Union[TextureRegion, _Pointer[TextureRegion], ctypes.Array]], /) -> None: ...
@@ -3033,7 +3001,6 @@ def bgfx_encoder_blit_to_buffer(_this: Optional[Union[Encoder, _Pointer[Encoder]
# @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
# `BGFX_BUFFER_DRAW_INDIRECT` flags.
# @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-# @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
#
def bgfx_encoder_blit_from_buffer(_this: Optional[Union[Encoder, _Pointer[Encoder], ctypes.Array]], _id: int, _dst: Optional[Union[TextureRegion, _Pointer[TextureRegion], ctypes.Array]], _src: Optional[Union[BufferRegion, _Pointer[BufferRegion], ctypes.Array]], /) -> None: ...
@@ -3179,7 +3146,6 @@ def bgfx_set_transient_vertex_buffer_with_layout(_stream: int, _tvb: Optional[Un
# Set number of vertices for auto generated vertices use in conjunction
# with gl_VertexID.
#
-# @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
#
def bgfx_set_vertex_count(_numVertices: int, /) -> None: ...
@@ -3195,7 +3161,6 @@ def bgfx_set_instance_data_from_dynamic_vertex_buffer(_handle: DynamicVertexBuff
# Set number of instances for auto generated instances use in conjunction
# with gl_InstanceID.
#
-# @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
#
def bgfx_set_instance_count(_numInstances: int, /) -> None: ...
@@ -3331,7 +3296,6 @@ def bgfx_discard(_flags: int, /) -> None: ...
# draw commands are executed after blit and compute commands.
#
# @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-# @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
#
def bgfx_blit(_id: int, _dst: Optional[Union[TextureRegion, _Pointer[TextureRegion], ctypes.Array]], _src: Optional[Union[TextureRegion, _Pointer[TextureRegion], ctypes.Array]], /) -> None: ...
@@ -3367,7 +3331,6 @@ def bgfx_blit_buffer(_id: int, _dst: Optional[Union[BufferRegion, _Pointer[Buffe
#
# @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
# `BGFX_BUFFER_DRAW_INDIRECT` flag.
-# @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
#
def bgfx_blit_to_buffer(_id: int, _dst: Optional[Union[BufferRegion, _Pointer[BufferRegion], ctypes.Array]], _src: Optional[Union[TextureRegion, _Pointer[TextureRegion], ctypes.Array]], /) -> None: ...
@@ -3385,6 +3348,5 @@ def bgfx_blit_to_buffer(_id: int, _dst: Optional[Union[BufferRegion, _Pointer[Bu
# @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
# `BGFX_BUFFER_DRAW_INDIRECT` flags.
# @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-# @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
#
def bgfx_blit_from_buffer(_id: int, _dst: Optional[Union[TextureRegion, _Pointer[TextureRegion], ctypes.Array]], _src: Optional[Union[BufferRegion, _Pointer[BufferRegion], ctypes.Array]], /) -> None: ...
diff --git a/bindings/zig/bgfx.zig b/bindings/zig/bgfx.zig
index 77b475086..4060cd9ae 100644
--- a/bindings/zig/bgfx.zig
+++ b/bindings/zig/bgfx.zig
@@ -630,111 +630,71 @@ pub const SwapChainFlags_FullscreenShift: SwapChainFlags = 0;
pub const SwapChainFlags_FullscreenMask: SwapChainFlags = 0x00000001;
pub const CapsFlags = u64;
-/// Alpha to coverage is supported.
-pub const CapsFlags_AlphaToCoverage: CapsFlags = 0x0000000000000001;
-
/// Blend independent is supported.
-pub const CapsFlags_BlendIndependent: CapsFlags = 0x0000000000000002;
+pub const CapsFlags_BlendIndependent: CapsFlags = 0x0000000000000001;
/// Compute shaders are supported.
-pub const CapsFlags_Compute: CapsFlags = 0x0000000000000004;
+pub const CapsFlags_Compute: CapsFlags = 0x0000000000000002;
/// Conservative rasterization is supported.
-pub const CapsFlags_ConservativeRaster: CapsFlags = 0x0000000000000008;
+pub const CapsFlags_ConservativeRaster: CapsFlags = 0x0000000000000004;
/// Draw indirect is supported.
-pub const CapsFlags_DrawIndirect: CapsFlags = 0x0000000000000010;
+pub const CapsFlags_DrawIndirect: CapsFlags = 0x0000000000000008;
/// Draw indirect with indirect count is supported.
-pub const CapsFlags_DrawIndirectCount: CapsFlags = 0x0000000000000020;
-
-/// Fragment depth is available in fragment shader.
-pub const CapsFlags_FragmentDepth: CapsFlags = 0x0000000000000040;
+pub const CapsFlags_DrawIndirectCount: CapsFlags = 0x0000000000000010;
/// Fragment ordering is available in fragment shader.
-pub const CapsFlags_FragmentOrdering: CapsFlags = 0x0000000000000080;
+pub const CapsFlags_FragmentOrdering: CapsFlags = 0x0000000000000020;
/// Graphics debugger is present.
-pub const CapsFlags_GraphicsDebugger: CapsFlags = 0x0000000000000100;
+pub const CapsFlags_GraphicsDebugger: CapsFlags = 0x0000000000000040;
/// HDR10 rendering is supported.
-pub const CapsFlags_Hdr10: CapsFlags = 0x0000000000000200;
-
-/// HiDPI rendering is supported.
-pub const CapsFlags_Hidpi: CapsFlags = 0x0000000000000400;
+pub const CapsFlags_Hdr10: CapsFlags = 0x0000000000000080;
/// Image Read/Write is supported.
-pub const CapsFlags_ImageRw: CapsFlags = 0x0000000000000800;
+pub const CapsFlags_ImageRw: CapsFlags = 0x0000000000000100;
/// 32-bit indices are supported.
-pub const CapsFlags_Index32: CapsFlags = 0x0000000000001000;
-
-/// Instancing is supported.
-pub const CapsFlags_Instancing: CapsFlags = 0x0000000000002000;
-
-/// Occlusion query is supported.
-pub const CapsFlags_OcclusionQuery: CapsFlags = 0x0000000000004000;
+pub const CapsFlags_Index32: CapsFlags = 0x0000000000000200;
/// PrimitiveID is available in fragment shader.
-pub const CapsFlags_PrimitiveId: CapsFlags = 0x0000000000008000;
+pub const CapsFlags_PrimitiveId: CapsFlags = 0x0000000000000400;
/// Renderer is on separate thread.
-pub const CapsFlags_RendererMultithreaded: CapsFlags = 0x0000000000010000;
+pub const CapsFlags_RendererMultithreaded: CapsFlags = 0x0000000000000800;
/// Multiple windows are supported.
-pub const CapsFlags_SwapChain: CapsFlags = 0x0000000000020000;
-
-/// Texture blit is supported.
-pub const CapsFlags_TextureBlit: CapsFlags = 0x0000000000040000;
-
-/// Texture compare less equal mode is supported.
-pub const CapsFlags_TextureCompareLequal: CapsFlags = 0x0000000000080000;
-pub const CapsFlags_TextureCompareReserved: CapsFlags = 0x0000000000100000;
+pub const CapsFlags_SwapChain: CapsFlags = 0x0000000000001000;
/// Cubemap texture array is supported.
-pub const CapsFlags_TextureCubeArray: CapsFlags = 0x0000000000200000;
+pub const CapsFlags_TextureCubeArray: CapsFlags = 0x0000000000002000;
/// CPU direct access to GPU texture memory.
-pub const CapsFlags_TextureDirectAccess: CapsFlags = 0x0000000000400000;
+pub const CapsFlags_TextureDirectAccess: CapsFlags = 0x0000000000004000;
/// External texture is supported.
-pub const CapsFlags_TextureExternal: CapsFlags = 0x0000000000800000;
+pub const CapsFlags_TextureExternal: CapsFlags = 0x0000000000008000;
/// External shared texture is supported.
-pub const CapsFlags_TextureExternalShared: CapsFlags = 0x0000000001000000;
-
-/// Read-back texture is supported.
-pub const CapsFlags_TextureReadBack: CapsFlags = 0x0000000002000000;
-
-/// 2D texture array is supported.
-pub const CapsFlags_Texture2DArray: CapsFlags = 0x0000000004000000;
-
-/// 3D textures are supported.
-pub const CapsFlags_Texture3D: CapsFlags = 0x0000000008000000;
+pub const CapsFlags_TextureExternalShared: CapsFlags = 0x0000000000010000;
/// Transparent back buffer supported.
-pub const CapsFlags_TransparentBackbuffer: CapsFlags = 0x0000000010000000;
+pub const CapsFlags_TransparentBackbuffer: CapsFlags = 0x0000000000020000;
/// Variable Rate Shading
-pub const CapsFlags_VariableRateShading: CapsFlags = 0x0000000020000000;
-
-/// Vertex attribute half-float is supported.
-pub const CapsFlags_VertexAttribHalf: CapsFlags = 0x0000000040000000;
+pub const CapsFlags_VariableRateShading: CapsFlags = 0x0000000000040000;
/// Vertex attribute 10_10_10_2 is supported.
-pub const CapsFlags_VertexAttribUint10: CapsFlags = 0x0000000080000000;
-
-/// Rendering with VertexID only is supported.
-pub const CapsFlags_VertexId: CapsFlags = 0x0000000100000000;
+pub const CapsFlags_VertexAttribUint10: CapsFlags = 0x0000000000080000;
/// Hardware video decode is supported.
-pub const CapsFlags_VideoDecode: CapsFlags = 0x0000000200000000;
+pub const CapsFlags_VideoDecode: CapsFlags = 0x0000000000100000;
/// Viewport layer is available in vertex shader.
-pub const CapsFlags_ViewportLayerArray: CapsFlags = 0x0000000400000000;
-
-/// All texture compare modes are supported.
-pub const CapsFlags_TextureCompareAll: CapsFlags = 0x0000000000180000;
+pub const CapsFlags_ViewportLayerArray: CapsFlags = 0x0000000000200000;
pub const CapsFormatFlags = u32;
/// Texture format is not supported.
@@ -1072,7 +1032,7 @@ pub const AttribType = enum(c_int) {
/// Uint16
Uint16,
- /// Half, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_HALF`.
+ /// Half.
Half,
/// Float
@@ -2117,7 +2077,6 @@ pub const Init = extern struct {
/// Set number of vertices for auto generated vertices use in conjunction
/// with gl_VertexID.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
/// Number of vertices.
pub inline fn setVertexCount(self: ?*Encoder, _numVertices: u32) void {
@@ -2147,7 +2106,6 @@ pub const Init = extern struct {
/// Set number of instances for auto generated instances use in conjunction
/// with gl_InstanceID.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
/// Number of instances.
pub inline fn setInstanceCount(self: ?*Encoder, _numInstances: u32) void {
@@ -2327,7 +2285,6 @@ pub const Init = extern struct {
/// draw commands are executed after blit and compute commands.
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
/// View id.
/// Destination texture region.
@@ -2371,7 +2328,6 @@ pub const Init = extern struct {
///
/// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
/// View id.
/// Destination buffer region.
@@ -2393,7 +2349,6 @@ pub const Init = extern struct {
/// @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flags.
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
/// View id.
/// Destination texture region.
@@ -3128,7 +3083,7 @@ extern fn bgfx_create_texture(_mem: [*c]const Memory, _flags: u64, _skip: u8, _i
/// Width.
/// Height.
/// Indicates that texture contains full mip-map chain.
-/// Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+/// Number of layers in texture array.
/// Texture format. See: `TextureFormat::Enum`.
/// Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.
/// Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than 1, expected memory layout is texture and all mips together for each array element.
@@ -3142,7 +3097,7 @@ extern fn bgfx_create_texture_2d(_width: u16, _height: u16, _hasMips: bool, _num
/// if back buffer resolution changes.
/// Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
/// Indicates that texture contains full mip-map chain.
-/// Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+/// Number of layers in texture array.
/// Texture format. See: `TextureFormat::Enum`.
/// Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.
pub inline fn createTexture2DScaled(_ratio: BackbufferRatio, _hasMips: bool, _numLayers: u16, _format: TextureFormat, _flags: u64) TextureHandle {
@@ -3167,7 +3122,7 @@ extern fn bgfx_create_texture_3d(_width: u16, _height: u16, _depth: u16, _hasMip
/// Create Cube texture.
/// Cube side size.
/// Indicates that texture contains full mip-map chain.
-/// Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+/// Number of layers in texture array.
/// Texture format. See: `TextureFormat::Enum`.
/// Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.
/// Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
@@ -3257,7 +3212,6 @@ extern fn bgfx_clear_texture(_handle: TextureHandle, _mip: u8, _numMips: u8, _la
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
/// It's a texture for CPU readback, and can't be a GPU resource
/// at the same time. See `examples/30-picking`.
-/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
///
/// Source texture region.
/// Destination buffer.
@@ -3882,7 +3836,6 @@ extern fn bgfx_encoder_set_transient_vertex_buffer_with_layout(self: ?*Encoder,
/// Set number of vertices for auto generated vertices use in conjunction
/// with gl_VertexID.
///
-/// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
/// Number of vertices.
extern fn bgfx_encoder_set_vertex_count(self: ?*Encoder, _numVertices: u32) void;
@@ -3908,7 +3861,6 @@ extern fn bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(self: ?*Enco
/// Set number of instances for auto generated instances use in conjunction
/// with gl_InstanceID.
///
-/// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
/// Number of instances.
extern fn bgfx_encoder_set_instance_count(self: ?*Encoder, _numInstances: u32) void;
@@ -4070,7 +4022,6 @@ extern fn bgfx_encoder_discard(self: ?*Encoder, _flags: u8) void;
/// draw commands are executed after blit and compute commands.
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
/// View id.
/// Destination texture region.
@@ -4112,7 +4063,6 @@ extern fn bgfx_encoder_blit_buffer(self: ?*Encoder, _id: ViewId, _dst: [*c]const
///
/// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flag.
-/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
/// View id.
/// Destination buffer region.
@@ -4133,7 +4083,6 @@ extern fn bgfx_encoder_blit_to_buffer(self: ?*Encoder, _id: ViewId, _dst: [*c]co
/// @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flags.
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
/// View id.
/// Destination texture region.
@@ -4409,7 +4358,6 @@ extern fn bgfx_set_transient_vertex_buffer_with_layout(_stream: u8, _tvb: [*c]co
/// Set number of vertices for auto generated vertices use in conjunction
/// with gl_VertexID.
///
-/// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
/// Number of vertices.
pub inline fn setVertexCount(_numVertices: u32) void {
@@ -4447,7 +4395,6 @@ extern fn bgfx_set_instance_data_from_dynamic_vertex_buffer(_handle: DynamicVert
/// Set number of instances for auto generated instances use in conjunction
/// with gl_InstanceID.
///
-/// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
///
/// Number of instances.
pub inline fn setInstanceCount(_numInstances: u32) void {
@@ -4661,7 +4608,6 @@ extern fn bgfx_discard(_flags: u8) void;
/// draw commands are executed after blit and compute commands.
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
/// View id.
/// Destination texture region.
@@ -4709,7 +4655,6 @@ extern fn bgfx_blit_buffer(_id: ViewId, _dst: [*c]const BufferRegion, _src: [*c]
///
/// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flag.
-/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
/// View id.
/// Destination buffer region.
@@ -4733,7 +4678,6 @@ extern fn bgfx_blit_to_buffer(_id: ViewId, _dst: [*c]const BufferRegion, _src: [
/// @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flags.
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
-/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
///
/// View id.
/// Destination texture region.
diff --git a/docs/bgfx.rst b/docs/bgfx.rst
index 657b6bf82..e75144f71 100644
--- a/docs/bgfx.rst
+++ b/docs/bgfx.rst
@@ -147,42 +147,28 @@ Available Caps
Individual capability flags.
-.. doxygendefine:: BGFX_CAPS_ALPHA_TO_COVERAGE
.. doxygendefine:: BGFX_CAPS_BLEND_INDEPENDENT
.. doxygendefine:: BGFX_CAPS_COMPUTE
.. doxygendefine:: BGFX_CAPS_CONSERVATIVE_RASTER
.. doxygendefine:: BGFX_CAPS_DRAW_INDIRECT
.. doxygendefine:: BGFX_CAPS_DRAW_INDIRECT_COUNT
-.. doxygendefine:: BGFX_CAPS_FRAGMENT_DEPTH
.. doxygendefine:: BGFX_CAPS_FRAGMENT_ORDERING
.. doxygendefine:: BGFX_CAPS_GRAPHICS_DEBUGGER
.. doxygendefine:: BGFX_CAPS_HDR10
-.. doxygendefine:: BGFX_CAPS_HIDPI
.. doxygendefine:: BGFX_CAPS_IMAGE_RW
.. doxygendefine:: BGFX_CAPS_INDEX32
-.. doxygendefine:: BGFX_CAPS_INSTANCING
-.. doxygendefine:: BGFX_CAPS_OCCLUSION_QUERY
.. doxygendefine:: BGFX_CAPS_PRIMITIVE_ID
.. doxygendefine:: BGFX_CAPS_RENDERER_MULTITHREADED
.. doxygendefine:: BGFX_CAPS_SWAP_CHAIN
-.. doxygendefine:: BGFX_CAPS_TEXTURE_BLIT
-.. doxygendefine:: BGFX_CAPS_TEXTURE_COMPARE_LEQUAL
-.. doxygendefine:: BGFX_CAPS_TEXTURE_COMPARE_RESERVED
.. doxygendefine:: BGFX_CAPS_TEXTURE_CUBE_ARRAY
.. doxygendefine:: BGFX_CAPS_TEXTURE_DIRECT_ACCESS
.. doxygendefine:: BGFX_CAPS_TEXTURE_EXTERNAL
.. doxygendefine:: BGFX_CAPS_TEXTURE_EXTERNAL_SHARED
-.. doxygendefine:: BGFX_CAPS_TEXTURE_READ_BACK
-.. doxygendefine:: BGFX_CAPS_TEXTURE_2D_ARRAY
-.. doxygendefine:: BGFX_CAPS_TEXTURE_3D
.. doxygendefine:: BGFX_CAPS_TRANSPARENT_BACKBUFFER
.. doxygendefine:: BGFX_CAPS_VARIABLE_RATE_SHADING
-.. doxygendefine:: BGFX_CAPS_VERTEX_ATTRIB_HALF
.. doxygendefine:: BGFX_CAPS_VERTEX_ATTRIB_UINT10
-.. doxygendefine:: BGFX_CAPS_VERTEX_ID
.. doxygendefine:: BGFX_CAPS_VIDEO_DECODE
.. doxygendefine:: BGFX_CAPS_VIEWPORT_LAYER_ARRAY
-.. doxygendefine:: BGFX_CAPS_TEXTURE_COMPARE_ALL
Statistics
**********
diff --git a/examples/05-instancing/instancing.cpp b/examples/05-instancing/instancing.cpp
index b5b908202..4a845c7a1 100644
--- a/examples/05-instancing/instancing.cpp
+++ b/examples/05-instancing/instancing.cpp
@@ -172,18 +172,9 @@ public:
, 0
);
- // Get renderer capabilities info.
- const bgfx::Caps* caps = bgfx::getCaps();
-
- // Check if instancing is supported.
- const bool instancingSupported = 0 != (BGFX_CAPS_INSTANCING & caps->supported);
- m_useInstancing &= instancingSupported;
-
ImGui::Text("%d draw calls", bgfx::getStats()->numDraw);
- ImGui::BeginDisabled(!instancingSupported);
ImGui::Checkbox("Use Instancing", &m_useInstancing);
- ImGui::EndDisabled();
ImGui::Text("Grid Side Size:");
ImGui::SliderInt("##size", (int*)&m_sideSize, 1, 512);
@@ -209,16 +200,6 @@ public:
// if no other draw calls are submitted to view 0.
bgfx::touch(0);
- if (!instancingSupported)
- {
- // When instancing is not supported by GPU, implement alternative
- // code path that doesn't use instancing.
- bool blink = uint32_t(time*3.0f)&1;
- bgfx::dbgTextPrintf(0, 0, blink ? 0x4f : 0x04, " Instancing is not supported by GPU. ");
-
- m_useInstancing = false;
- }
-
const bx::Vec3 at = { 0.0f, 0.0f, 0.0f };
const bx::Vec3 eye = { 0.0f, 0.0f, -35.0f };
diff --git a/examples/06-bump/bump.cpp b/examples/06-bump/bump.cpp
index f1987f299..7fb2f05c7 100644
--- a/examples/06-bump/bump.cpp
+++ b/examples/06-bump/bump.cpp
@@ -121,9 +121,7 @@ public:
, 0
);
- // Get renderer capabilities info.
- const bgfx::Caps* caps = bgfx::getCaps();
- m_instancingSupported = 0 != (caps->supported & BGFX_CAPS_INSTANCING);
+ m_instancingSupported = true;
// Create vertex stream declaration.
PosNormalTangentTexcoordVertex::init();
diff --git a/examples/08-update/update.cpp b/examples/08-update/update.cpp
index d0b9b9e3b..2159e3601 100644
--- a/examples/08-update/update.cpp
+++ b/examples/08-update/update.cpp
@@ -309,8 +309,8 @@ public:
static_assert(24 == BX_COUNTOF(m_textures));
const bgfx::Caps* caps = bgfx::getCaps();
- m_texture3DSupported = !!(caps->supported & BGFX_CAPS_TEXTURE_3D);
- m_blitSupported = !!(caps->supported & BGFX_CAPS_TEXTURE_BLIT);
+ m_texture3DSupported = true;
+ m_blitSupported = true;
m_computeSupported = !!(caps->supported & BGFX_CAPS_COMPUTE);
m_numTextures3d = 0;
diff --git a/examples/09-hdr/hdr.cpp b/examples/09-hdr/hdr.cpp
index efabafb4e..74d57b988 100644
--- a/examples/09-hdr/hdr.cpp
+++ b/examples/09-hdr/hdr.cpp
@@ -215,15 +215,8 @@ public:
bgfx::setName(m_blur, "Blur");
m_lumBgra8 = 0;
- if ( (BGFX_CAPS_TEXTURE_BLIT|BGFX_CAPS_TEXTURE_READ_BACK) == (bgfx::getCaps()->supported & (BGFX_CAPS_TEXTURE_BLIT|BGFX_CAPS_TEXTURE_READ_BACK) ) )
- {
- m_rb = bgfx::createTexture2D(1, 1, false, 1, bgfx::TextureFormat::BGRA8, BGFX_TEXTURE_BLIT_DST|BGFX_TEXTURE_READ_BACK);
- bgfx::setName(m_rb, "Read Back Texture");
- }
- else
- {
- m_rb.idx = bgfx::kInvalidHandle;
- }
+ m_rb = bgfx::createTexture2D(1, 1, false, 1, bgfx::TextureFormat::BGRA8, BGFX_TEXTURE_BLIT_DST|BGFX_TEXTURE_READ_BACK);
+ bgfx::setName(m_rb, "Read Back Texture");
// Imgui.
imguiCreate();
diff --git a/examples/15-shadowmaps-simple/shadowmaps_simple.cpp b/examples/15-shadowmaps-simple/shadowmaps_simple.cpp
index 5031010ad..aeadf55fc 100644
--- a/examples/15-shadowmaps-simple/shadowmaps_simple.cpp
+++ b/examples/15-shadowmaps-simple/shadowmaps_simple.cpp
@@ -131,9 +131,7 @@ public:
// Render targets.
m_shadowMapSize = 512;
- // Shadow samplers are supported at least partially supported if texture
- // compare less equal feature is supported.
- m_shadowSamplerSupported = 0 != (caps->supported & BGFX_CAPS_TEXTURE_COMPARE_LEQUAL);
+ m_shadowSamplerSupported = true;
m_useShadowSampler = m_shadowSamplerSupported;
m_shadowMapFB = BGFX_INVALID_HANDLE;
diff --git a/examples/21-deferred/deferred.cpp b/examples/21-deferred/deferred.cpp
index 225447d59..31a048c03 100644
--- a/examples/21-deferred/deferred.cpp
+++ b/examples/21-deferred/deferred.cpp
@@ -286,18 +286,9 @@ public:
m_useTArray = false;
m_useUav = false;
- if (0 != (BGFX_CAPS_TEXTURE_2D_ARRAY & bgfx::getCaps()->supported) )
- {
- m_lightTaProgram = loadProgram("vs_deferred_light", "fs_deferred_light_ta");
- m_combineTaProgram = loadProgram("vs_deferred_combine", "fs_deferred_combine_ta");
- m_debugTaProgram = loadProgram("vs_deferred_debug", "fs_deferred_debug_ta");
- }
- else
- {
- m_lightTaProgram = BGFX_INVALID_HANDLE;
- m_combineTaProgram = BGFX_INVALID_HANDLE;
- m_debugTaProgram = BGFX_INVALID_HANDLE;
- }
+ m_lightTaProgram = loadProgram("vs_deferred_light", "fs_deferred_light_ta");
+ m_combineTaProgram = loadProgram("vs_deferred_combine", "fs_deferred_combine_ta");
+ m_debugTaProgram = loadProgram("vs_deferred_debug", "fs_deferred_debug_ta");
if (0 != (BGFX_CAPS_IMAGE_RW & bgfx::getCaps()->supported)
&& 0 != (BGFX_CAPS_FORMAT_TEXTURE_IMAGE_READ & bgfx::getCaps()->formats[bgfx::TextureFormat::RGBA8])
diff --git a/examples/26-occlusion/occlusion.cpp b/examples/26-occlusion/occlusion.cpp
index f3a73bcf9..91095da71 100644
--- a/examples/26-occlusion/occlusion.cpp
+++ b/examples/26-occlusion/occlusion.cpp
@@ -127,8 +127,7 @@ public:
// Create program from shaders.
m_program = loadProgram("vs_cubes", "fs_cubes");
- const bgfx::Caps* caps = bgfx::getCaps();
- m_occlusionQuerySupported = !!(caps->supported & BGFX_CAPS_OCCLUSION_QUERY);
+ m_occlusionQuerySupported = true;
if (m_occlusionQuerySupported)
{
diff --git a/examples/30-picking/picking.cpp b/examples/30-picking/picking.cpp
index 14458c71a..b4262aa2a 100644
--- a/examples/30-picking/picking.cpp
+++ b/examples/30-picking/picking.cpp
@@ -207,16 +207,10 @@ public:
, uint16_t(m_height)
);
+ showExampleDialog(this);
+
const bgfx::Caps* caps = bgfx::getCaps();
- bool blitSupport = 0 != (caps->supported & BGFX_CAPS_TEXTURE_BLIT);
- showExampleDialog(this
- , !blitSupport
- ? "BGFX_CAPS_TEXTURE_BLIT is not supported."
- : NULL
- );
-
- if (blitSupport)
{
ImGui::SetNextWindowPos(
ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f)
diff --git a/examples/37-gpudrivenrendering/gpudrivenrendering.cpp b/examples/37-gpudrivenrendering/gpudrivenrendering.cpp
index 7c3eba917..7573fb203 100644
--- a/examples/37-gpudrivenrendering/gpudrivenrendering.cpp
+++ b/examples/37-gpudrivenrendering/gpudrivenrendering.cpp
@@ -1046,7 +1046,6 @@ public:
// Check if instancing, compute and draw indirect are supported.
const uint64_t requiredCaps = 0
- | BGFX_CAPS_INSTANCING
| BGFX_CAPS_COMPUTE
| BGFX_CAPS_DRAW_INDIRECT
;
diff --git a/examples/40-svt/svt.cpp b/examples/40-svt/svt.cpp
index eff21553e..84efe2023 100644
--- a/examples/40-svt/svt.cpp
+++ b/examples/40-svt/svt.cpp
@@ -204,7 +204,7 @@ public:
showExampleDialog(this);
- if ((BGFX_CAPS_TEXTURE_BLIT | BGFX_CAPS_TEXTURE_READ_BACK) != (bgfx::getCaps()->supported & (BGFX_CAPS_TEXTURE_BLIT | BGFX_CAPS_TEXTURE_READ_BACK)))
+ if (false)
{
// When texture read-back or blit is not supported by GPU blink!
bool blink = uint32_t(time*3.0f) & 1;
diff --git a/examples/48-drawindirect/drawindirect.cpp b/examples/48-drawindirect/drawindirect.cpp
index 216350791..52ac9cbde 100644
--- a/examples/48-drawindirect/drawindirect.cpp
+++ b/examples/48-drawindirect/drawindirect.cpp
@@ -210,7 +210,7 @@ public:
const uint64_t supportedCaps = bgfx::getCaps()->supported;
const bool computeSupported = !!(BGFX_CAPS_COMPUTE & supportedCaps);
const bool indirectSupported = !!(BGFX_CAPS_DRAW_INDIRECT & supportedCaps);
- const bool instancingSupported = !!(BGFX_CAPS_INSTANCING & supportedCaps);
+ const bool instancingSupported = true;
const bool indirectCountSupported = !!(BGFX_CAPS_DRAW_INDIRECT_COUNT & supportedCaps);
if (computeSupported
@@ -332,7 +332,7 @@ public:
const uint64_t supportedCaps = bgfx::getCaps()->supported;
const bool computeSupported = !!(BGFX_CAPS_COMPUTE & supportedCaps);
const bool indirectSupported = !!(BGFX_CAPS_DRAW_INDIRECT & supportedCaps);
- const bool instancingSupported = !!(BGFX_CAPS_INSTANCING & supportedCaps);
+ const bool instancingSupported = true;
const bool indirectCountSupported = !!(BGFX_CAPS_DRAW_INDIRECT_COUNT & supportedCaps);
imguiBeginFrame(m_mouseState.m_mx
diff --git a/include/bgfx/bgfx.h b/include/bgfx/bgfx.h
index 9e4db758e..b7a306139 100644
--- a/include/bgfx/bgfx.h
+++ b/include/bgfx/bgfx.h
@@ -146,7 +146,7 @@ namespace bgfx
Uint10, //!< Uint10, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_UINT10`.
Int16, //!< Int16
Uint16, //!< Uint16
- Half, //!< Half, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_HALF`.
+ Half, //!< Half.
Float, //!< Float
Int32, //!< Int32
Uint32, //!< Uint32
@@ -1613,8 +1613,6 @@ namespace bgfx
///
/// @param[in] _numVertices Number of vertices.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
- ///
/// @attention C99's equivalent binding is `bgfx_encoder_set_vertex_count`.
///
void setVertexCount(uint32_t _numVertices);
@@ -1672,8 +1670,6 @@ namespace bgfx
///
/// @param[in] _numInstances Number of instances.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
- ///
/// @attention C99's equivalent binding is `bgfx_encoder_set_instance_count`.
///
void setInstanceCount(uint32_t _numInstances);
@@ -2007,8 +2003,6 @@ namespace bgfx
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
///
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
- ///
/// @attention C99's equivalent binding is `bgfx_encoder_blit`.
///
void blit(
@@ -2066,8 +2060,6 @@ namespace bgfx
/// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flag.
///
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
- ///
/// @attention C99's equivalent binding is `bgfx_encoder_blit_to_buffer`.
///
void blit(
@@ -2096,8 +2088,6 @@ namespace bgfx
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
///
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
- ///
/// @attention C99's equivalent binding is `bgfx_encoder_blit_from_buffer`.
///
void blit(
@@ -3351,8 +3341,7 @@ namespace bgfx
/// @param[in] _width Width.
/// @param[in] _height Height.
/// @param[in] _hasMips Indicates that texture contains full mip-map chain.
- /// @param[in] _numLayers Number of layers in texture array. Must be 1 if caps
- /// `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ /// @param[in] _numLayers Number of layers in texture array.
/// @param[in] _format Texture format. See: `TextureFormat::Enum`.
/// @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
/// flags. Default texture sampling mode is linear, and wrap mode is repeat.
@@ -3385,8 +3374,7 @@ namespace bgfx
///
/// @param[in] _ratio Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
/// @param[in] _hasMips Indicates that texture contains full mip-map chain.
- /// @param[in] _numLayers Number of layers in texture array. Must be 1 if caps
- /// `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ /// @param[in] _numLayers Number of layers in texture array.
/// @param[in] _format Texture format. See: `TextureFormat::Enum`.
/// @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
/// flags. Default texture sampling mode is linear, and wrap mode is repeat.
@@ -3444,8 +3432,7 @@ namespace bgfx
///
/// @param[in] _size Cube side size.
/// @param[in] _hasMips Indicates that texture contains full mip-map chain.
- /// @param[in] _numLayers Number of layers in texture array. Must be 1 if caps
- /// `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ /// @param[in] _numLayers Number of layers in texture array.
/// @param[in] _format Texture format. See: `TextureFormat::Enum`.
/// @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
/// flags. Default texture sampling mode is linear, and wrap mode is repeat.
@@ -3613,8 +3600,6 @@ namespace bgfx
/// It's a texture for CPU readback, and can't be a GPU resource
/// at the same time. See `examples/30-picking`.
///
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
- ///
/// @attention C99's equivalent binding is `bgfx_read_texture`.
///
uint32_t read(
@@ -4694,8 +4679,6 @@ namespace bgfx
///
/// @param[in] _numVertices Number of vertices.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
- ///
/// @attention C99's equivalent binding is `bgfx_set_vertex_count`.
///
void setVertexCount(uint32_t _numVertices);
@@ -4753,8 +4736,6 @@ namespace bgfx
///
/// @param[in] _numInstances Number of instances.
///
- /// @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
- ///
/// @attention C99's equivalent binding is `bgfx_set_instance_count`.
///
void setInstanceCount(uint32_t _numInstances);
@@ -5086,8 +5067,6 @@ namespace bgfx
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
///
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
- ///
/// @attention C99's equivalent binding is `bgfx_blit`.
///
void blit(
@@ -5145,8 +5124,6 @@ namespace bgfx
/// @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
/// `BGFX_BUFFER_DRAW_INDIRECT` flag.
///
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
- ///
/// @attention C99's equivalent binding is `bgfx_blit_to_buffer`.
///
void blit(
@@ -5175,8 +5152,6 @@ namespace bgfx
///
/// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
///
- /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
- ///
/// @attention C99's equivalent binding is `bgfx_blit_from_buffer`.
///
void blit(
diff --git a/include/bgfx/c99/bgfx.h b/include/bgfx/c99/bgfx.h
index f2150be95..d112545ed 100644
--- a/include/bgfx/c99/bgfx.h
+++ b/include/bgfx/c99/bgfx.h
@@ -158,7 +158,7 @@ typedef enum bgfx_attrib_type
BGFX_ATTRIB_TYPE_UINT10, /** ( 2) Uint10, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_UINT10`. */
BGFX_ATTRIB_TYPE_INT16, /** ( 3) Int16 */
BGFX_ATTRIB_TYPE_UINT16, /** ( 4) Uint16 */
- BGFX_ATTRIB_TYPE_HALF, /** ( 5) Half, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_HALF`. */
+ BGFX_ATTRIB_TYPE_HALF, /** ( 5) Half. */
BGFX_ATTRIB_TYPE_FLOAT, /** ( 6) Float */
BGFX_ATTRIB_TYPE_INT32, /** ( 7) Int32 */
BGFX_ATTRIB_TYPE_UINT32, /** ( 8) Uint32 */
@@ -2318,8 +2318,7 @@ BGFX_C_API bgfx_texture_handle_t bgfx_create_texture(const bgfx_memory_t* _mem,
* @param[in] _width Width.
* @param[in] _height Height.
* @param[in] _hasMips Indicates that texture contains full mip-map chain.
- * @param[in] _numLayers Number of layers in texture array. Must be 1 if caps
- * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ * @param[in] _numLayers Number of layers in texture array.
* @param[in] _format Texture format. See: `TextureFormat::Enum`.
* @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
* flags. Default texture sampling mode is linear, and wrap mode is repeat.
@@ -2343,8 +2342,7 @@ BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_2d(uint16_t _width, uint16_
*
* @param[in] _ratio Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
* @param[in] _hasMips Indicates that texture contains full mip-map chain.
- * @param[in] _numLayers Number of layers in texture array. Must be 1 if caps
- * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ * @param[in] _numLayers Number of layers in texture array.
* @param[in] _format Texture format. See: `TextureFormat::Enum`.
* @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
* flags. Default texture sampling mode is linear, and wrap mode is repeat.
@@ -2387,8 +2385,7 @@ BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_3d(uint16_t _width, uint16_
*
* @param[in] _size Cube side size.
* @param[in] _hasMips Indicates that texture contains full mip-map chain.
- * @param[in] _numLayers Number of layers in texture array. Must be 1 if caps
- * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ * @param[in] _numLayers Number of layers in texture array.
* @param[in] _format Texture format. See: `TextureFormat::Enum`.
* @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
* flags. Default texture sampling mode is linear, and wrap mode is repeat.
@@ -2505,7 +2502,6 @@ BGFX_C_API void bgfx_clear_texture(bgfx_texture_handle_t _handle, uint8_t _mip,
* @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
* It's a texture for CPU readback, and can't be a GPU resource
* at the same time. See `examples/30-picking`.
- * @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
*
* @param[in] _src Source texture region.
* @param[in] _data Destination buffer.
@@ -3308,8 +3304,6 @@ BGFX_C_API void bgfx_encoder_set_transient_vertex_buffer_with_layout(bgfx_encode
* Set number of vertices for auto generated vertices use in conjunction
* with gl_VertexID.
*
- * @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
- *
* @param[in] _numVertices Number of vertices.
*
*/
@@ -3349,8 +3343,6 @@ BGFX_C_API void bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(bgfx_e
* Set number of instances for auto generated instances use in conjunction
* with gl_InstanceID.
*
- * @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
- *
* @param[in] _numInstances Number of instances.
*
*/
@@ -3590,7 +3582,6 @@ BGFX_C_API void bgfx_encoder_discard(bgfx_encoder_t* _this, uint8_t _flags);
* draw commands are executed after blit and compute commands.
*
* @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- * @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
*
* @param[in] _id View id.
* @param[in] _dst Destination texture region.
@@ -3638,7 +3629,6 @@ BGFX_C_API void bgfx_encoder_blit_buffer(bgfx_encoder_t* _this, bgfx_view_id_t _
*
* @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
* `BGFX_BUFFER_DRAW_INDIRECT` flag.
- * @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
*
* @param[in] _id View id.
* @param[in] _dst Destination buffer region.
@@ -3662,7 +3652,6 @@ BGFX_C_API void bgfx_encoder_blit_to_buffer(bgfx_encoder_t* _this, bgfx_view_id_
* @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
* `BGFX_BUFFER_DRAW_INDIRECT` flags.
* @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- * @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
*
* @param[in] _id View id.
* @param[in] _dst Destination texture region.
@@ -3983,8 +3972,6 @@ BGFX_C_API void bgfx_set_transient_vertex_buffer_with_layout(uint8_t _stream, co
* Set number of vertices for auto generated vertices use in conjunction
* with gl_VertexID.
*
- * @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
- *
* @param[in] _numVertices Number of vertices.
*
*/
@@ -4024,8 +4011,6 @@ BGFX_C_API void bgfx_set_instance_data_from_dynamic_vertex_buffer(bgfx_dynamic_v
* Set number of instances for auto generated instances use in conjunction
* with gl_InstanceID.
*
- * @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
- *
* @param[in] _numInstances Number of instances.
*
*/
@@ -4263,7 +4248,6 @@ BGFX_C_API void bgfx_discard(uint8_t _flags);
* draw commands are executed after blit and compute commands.
*
* @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- * @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
*
* @param[in] _id View id.
* @param[in] _dst Destination texture region.
@@ -4311,7 +4295,6 @@ BGFX_C_API void bgfx_blit_buffer(bgfx_view_id_t _id, const bgfx_buffer_region_t
*
* @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
* `BGFX_BUFFER_DRAW_INDIRECT` flag.
- * @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
*
* @param[in] _id View id.
* @param[in] _dst Destination buffer region.
@@ -4335,7 +4318,6 @@ BGFX_C_API void bgfx_blit_to_buffer(bgfx_view_id_t _id, const bgfx_buffer_region
* @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
* `BGFX_BUFFER_DRAW_INDIRECT` flags.
* @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
- * @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
*
* @param[in] _id View id.
* @param[in] _dst Destination texture region.
diff --git a/include/bgfx/defines.h b/include/bgfx/defines.h
index 905944107..10ac314ba 100644
--- a/include/bgfx/defines.h
+++ b/include/bgfx/defines.h
@@ -15,7 +15,7 @@
#ifndef BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_DEFINES_H_HEADER_GUARD
-#define BGFX_API_VERSION UINT32_C(158)
+#define BGFX_API_VERSION UINT32_C(159)
/**
* Color RGB/alpha/depth write. When it's not specified write will be disabled.
@@ -450,47 +450,28 @@
#define BGFX_SWAP_CHAIN_FULLSCREEN_SHIFT 0
#define BGFX_SWAP_CHAIN_FULLSCREEN_MASK UINT32_C(0x00000001)
-#define BGFX_CAPS_ALPHA_TO_COVERAGE UINT64_C(0x0000000000000001) //!< Alpha to coverage is supported.
-#define BGFX_CAPS_BLEND_INDEPENDENT UINT64_C(0x0000000000000002) //!< Blend independent is supported.
-#define BGFX_CAPS_COMPUTE UINT64_C(0x0000000000000004) //!< Compute shaders are supported.
-#define BGFX_CAPS_CONSERVATIVE_RASTER UINT64_C(0x0000000000000008) //!< Conservative rasterization is supported.
-#define BGFX_CAPS_DRAW_INDIRECT UINT64_C(0x0000000000000010) //!< Draw indirect is supported.
-#define BGFX_CAPS_DRAW_INDIRECT_COUNT UINT64_C(0x0000000000000020) //!< Draw indirect with indirect count is supported.
-#define BGFX_CAPS_FRAGMENT_DEPTH UINT64_C(0x0000000000000040) //!< Fragment depth is available in fragment shader.
-#define BGFX_CAPS_FRAGMENT_ORDERING UINT64_C(0x0000000000000080) //!< Fragment ordering is available in fragment shader.
-#define BGFX_CAPS_GRAPHICS_DEBUGGER UINT64_C(0x0000000000000100) //!< Graphics debugger is present.
-#define BGFX_CAPS_HDR10 UINT64_C(0x0000000000000200) //!< HDR10 rendering is supported.
-#define BGFX_CAPS_HIDPI UINT64_C(0x0000000000000400) //!< HiDPI rendering is supported.
-#define BGFX_CAPS_IMAGE_RW UINT64_C(0x0000000000000800) //!< Image Read/Write is supported.
-#define BGFX_CAPS_INDEX32 UINT64_C(0x0000000000001000) //!< 32-bit indices are supported.
-#define BGFX_CAPS_INSTANCING UINT64_C(0x0000000000002000) //!< Instancing is supported.
-#define BGFX_CAPS_OCCLUSION_QUERY UINT64_C(0x0000000000004000) //!< Occlusion query is supported.
-#define BGFX_CAPS_PRIMITIVE_ID UINT64_C(0x0000000000008000) //!< PrimitiveID is available in fragment shader.
-#define BGFX_CAPS_RENDERER_MULTITHREADED UINT64_C(0x0000000000010000) //!< Renderer is on separate thread.
-#define BGFX_CAPS_SWAP_CHAIN UINT64_C(0x0000000000020000) //!< Multiple windows are supported.
-#define BGFX_CAPS_TEXTURE_BLIT UINT64_C(0x0000000000040000) //!< Texture blit is supported.
-#define BGFX_CAPS_TEXTURE_COMPARE_LEQUAL UINT64_C(0x0000000000080000) //!< Texture compare less equal mode is supported.
-#define BGFX_CAPS_TEXTURE_COMPARE_RESERVED UINT64_C(0x0000000000100000)
-#define BGFX_CAPS_TEXTURE_CUBE_ARRAY UINT64_C(0x0000000000200000) //!< Cubemap texture array is supported.
-#define BGFX_CAPS_TEXTURE_DIRECT_ACCESS UINT64_C(0x0000000000400000) //!< CPU direct access to GPU texture memory.
-#define BGFX_CAPS_TEXTURE_EXTERNAL UINT64_C(0x0000000000800000) //!< External texture is supported.
-#define BGFX_CAPS_TEXTURE_EXTERNAL_SHARED UINT64_C(0x0000000001000000) //!< External shared texture is supported.
-#define BGFX_CAPS_TEXTURE_READ_BACK UINT64_C(0x0000000002000000) //!< Read-back texture is supported.
-#define BGFX_CAPS_TEXTURE_2D_ARRAY UINT64_C(0x0000000004000000) //!< 2D texture array is supported.
-#define BGFX_CAPS_TEXTURE_3D UINT64_C(0x0000000008000000) //!< 3D textures are supported.
-#define BGFX_CAPS_TRANSPARENT_BACKBUFFER UINT64_C(0x0000000010000000) //!< Transparent back buffer supported.
-#define BGFX_CAPS_VARIABLE_RATE_SHADING UINT64_C(0x0000000020000000) //!< Variable Rate Shading
-#define BGFX_CAPS_VERTEX_ATTRIB_HALF UINT64_C(0x0000000040000000) //!< Vertex attribute half-float is supported.
-#define BGFX_CAPS_VERTEX_ATTRIB_UINT10 UINT64_C(0x0000000080000000) //!< Vertex attribute 10_10_10_2 is supported.
-#define BGFX_CAPS_VERTEX_ID UINT64_C(0x0000000100000000) //!< Rendering with VertexID only is supported.
-#define BGFX_CAPS_VIDEO_DECODE UINT64_C(0x0000000200000000) //!< Hardware video decode is supported.
-#define BGFX_CAPS_VIEWPORT_LAYER_ARRAY UINT64_C(0x0000000400000000) //!< Viewport layer is available in vertex shader.
-/// All texture compare modes are supported.
-#define BGFX_CAPS_TEXTURE_COMPARE_ALL (0 \
- | BGFX_CAPS_TEXTURE_COMPARE_RESERVED \
- | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL \
- )
-
+#define BGFX_CAPS_BLEND_INDEPENDENT UINT64_C(0x0000000000000001) //!< Blend independent is supported.
+#define BGFX_CAPS_COMPUTE UINT64_C(0x0000000000000002) //!< Compute shaders are supported.
+#define BGFX_CAPS_CONSERVATIVE_RASTER UINT64_C(0x0000000000000004) //!< Conservative rasterization is supported.
+#define BGFX_CAPS_DRAW_INDIRECT UINT64_C(0x0000000000000008) //!< Draw indirect is supported.
+#define BGFX_CAPS_DRAW_INDIRECT_COUNT UINT64_C(0x0000000000000010) //!< Draw indirect with indirect count is supported.
+#define BGFX_CAPS_FRAGMENT_ORDERING UINT64_C(0x0000000000000020) //!< Fragment ordering is available in fragment shader.
+#define BGFX_CAPS_GRAPHICS_DEBUGGER UINT64_C(0x0000000000000040) //!< Graphics debugger is present.
+#define BGFX_CAPS_HDR10 UINT64_C(0x0000000000000080) //!< HDR10 rendering is supported.
+#define BGFX_CAPS_IMAGE_RW UINT64_C(0x0000000000000100) //!< Image Read/Write is supported.
+#define BGFX_CAPS_INDEX32 UINT64_C(0x0000000000000200) //!< 32-bit indices are supported.
+#define BGFX_CAPS_PRIMITIVE_ID UINT64_C(0x0000000000000400) //!< PrimitiveID is available in fragment shader.
+#define BGFX_CAPS_RENDERER_MULTITHREADED UINT64_C(0x0000000000000800) //!< Renderer is on separate thread.
+#define BGFX_CAPS_SWAP_CHAIN UINT64_C(0x0000000000001000) //!< Multiple windows are supported.
+#define BGFX_CAPS_TEXTURE_CUBE_ARRAY UINT64_C(0x0000000000002000) //!< Cubemap texture array is supported.
+#define BGFX_CAPS_TEXTURE_DIRECT_ACCESS UINT64_C(0x0000000000004000) //!< CPU direct access to GPU texture memory.
+#define BGFX_CAPS_TEXTURE_EXTERNAL UINT64_C(0x0000000000008000) //!< External texture is supported.
+#define BGFX_CAPS_TEXTURE_EXTERNAL_SHARED UINT64_C(0x0000000000010000) //!< External shared texture is supported.
+#define BGFX_CAPS_TRANSPARENT_BACKBUFFER UINT64_C(0x0000000000020000) //!< Transparent back buffer supported.
+#define BGFX_CAPS_VARIABLE_RATE_SHADING UINT64_C(0x0000000000040000) //!< Variable Rate Shading
+#define BGFX_CAPS_VERTEX_ATTRIB_UINT10 UINT64_C(0x0000000000080000) //!< Vertex attribute 10_10_10_2 is supported.
+#define BGFX_CAPS_VIDEO_DECODE UINT64_C(0x0000000000100000) //!< Hardware video decode is supported.
+#define BGFX_CAPS_VIEWPORT_LAYER_ARRAY UINT64_C(0x0000000000200000) //!< Viewport layer is available in vertex shader.
#define BGFX_CAPS_FORMAT_TEXTURE_NONE UINT32_C(0x00000000) //!< Texture format is not supported.
#define BGFX_CAPS_FORMAT_TEXTURE_2D UINT32_C(0x00000001) //!< Texture format is supported.
diff --git a/scripts/bgfx.idl b/scripts/bgfx.idl
index 95f81ca68..ae41ce4d0 100644
--- a/scripts/bgfx.idl
+++ b/scripts/bgfx.idl
@@ -1,7 +1,7 @@
-- vim: syntax=lua
-- bgfx interface
-version(158)
+version(159)
typedef "bool"
typedef "char"
@@ -370,44 +370,28 @@ flag.SwapChainFullscreen { bits = 32, shift = 0, range = 1, base = 1 }
()
flag.Caps { bits = 64, base = 1, name = "Caps", section = "Available Caps" }
- .AlphaToCoverage --- Alpha to coverage is supported.
.BlendIndependent --- Blend independent is supported.
.Compute --- Compute shaders are supported.
.ConservativeRaster --- Conservative rasterization is supported.
.DrawIndirect --- Draw indirect is supported.
.DrawIndirectCount --- Draw indirect with indirect count is supported.
- .FragmentDepth --- Fragment depth is available in fragment shader.
.FragmentOrdering --- Fragment ordering is available in fragment shader.
.GraphicsDebugger --- Graphics debugger is present.
.Hdr10 --- HDR10 rendering is supported.
- .Hidpi --- HiDPI rendering is supported.
.ImageRw --- Image Read/Write is supported.
.Index32 --- 32-bit indices are supported.
- .Instancing --- Instancing is supported.
- .OcclusionQuery --- Occlusion query is supported.
.PrimitiveId --- PrimitiveID is available in fragment shader.
.RendererMultithreaded --- Renderer is on separate thread.
.SwapChain --- Multiple windows are supported.
- .TextureBlit --- Texture blit is supported.
- .TextureCompareLequal --- Texture compare less equal mode is supported.
- .TextureCompareReserved
.TextureCubeArray --- Cubemap texture array is supported.
.TextureDirectAccess --- CPU direct access to GPU texture memory.
.TextureExternal --- External texture is supported.
.TextureExternalShared --- External shared texture is supported.
- .TextureReadBack --- Read-back texture is supported.
- .Texture_2dArray --- 2D texture array is supported.
- .Texture_3d --- 3D textures are supported.
.TransparentBackbuffer --- Transparent back buffer supported.
.VariableRateShading --- Variable Rate Shading
- .VertexAttribHalf --- Vertex attribute half-float is supported.
.VertexAttribUint10 --- Vertex attribute 10_10_10_2 is supported.
- .VertexId --- Rendering with VertexID only is supported.
.VideoDecode --- Hardware video decode is supported.
.ViewportLayerArray --- Viewport layer is available in vertex shader.
-
- .TextureCompareAll --- All texture compare modes are supported.
- { "TextureCompareReserved", "TextureCompareLequal" }
()
flag.CapsFormat { bits = 32 }
@@ -568,7 +552,7 @@ enum.AttribType { comment = "Attribute types:", section = "Vertex Buffers" }
.Uint10 --- Uint10, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_UINT10`.
.Int16 --- Int16
.Uint16 --- Uint16
- .Half --- Half, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_HALF`.
+ .Half --- Half.
.Float --- Float
.Int32 --- Int32
.Uint32 --- Uint32
@@ -2039,8 +2023,7 @@ func.createTexture2D { section = "Textures" }
.width "uint16_t" --- Width.
.height "uint16_t" --- Height.
.hasMips "bool" --- Indicates that texture contains full mip-map chain.
- .numLayers "uint16_t" --- Number of layers in texture array. Must be 1 if caps
- --- `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ .numLayers "uint16_t" --- Number of layers in texture array.
.format "TextureFormat::Enum" --- Texture format. See: `TextureFormat::Enum`.
.flags "uint64_t" --- Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
{ default = "BGFX_TEXTURE_NONE|BGFX_SAMPLER_NONE" } --- flags. Default texture sampling mode is linear, and wrap mode is repeat.
@@ -2060,8 +2043,7 @@ func.createTexture2D { cname = "create_texture_2d_scaled", section = "Textures"
"TextureHandle" --- Texture handle.
.ratio "BackbufferRatio::Enum" --- Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
.hasMips "bool" --- Indicates that texture contains full mip-map chain.
- .numLayers "uint16_t" --- Number of layers in texture array. Must be 1 if caps
- --- `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ .numLayers "uint16_t" --- Number of layers in texture array.
.format "TextureFormat::Enum" --- Texture format. See: `TextureFormat::Enum`.
.flags "uint64_t" --- Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
{ default = "BGFX_TEXTURE_NONE|BGFX_SAMPLER_NONE" }
@@ -2097,8 +2079,7 @@ func.createTextureCube { section = "Textures" }
"TextureHandle" --- Texture handle.
.size "uint16_t" --- Cube side size.
.hasMips "bool" --- Indicates that texture contains full mip-map chain.
- .numLayers "uint16_t" --- Number of layers in texture array. Must be 1 if caps
- --- `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
+ .numLayers "uint16_t" --- Number of layers in texture array.
.format "TextureFormat::Enum" --- Texture format. See: `TextureFormat::Enum`.
.flags "uint64_t" --- Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
{ default = "BGFX_TEXTURE_NONE|BGFX_SAMPLER_NONE" }
@@ -2210,7 +2191,6 @@ func.clear { cname = "clear_texture", section = "Textures" }
--- @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
--- It's a texture for CPU readback, and can't be a GPU resource
--- at the same time. See `examples/30-picking`.
---- @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
---
func.read { cname = "read_texture", section = "Textures" }
"uint32_t" --- Frame number when the result will be available. See: `bgfx::frame`.
@@ -2901,7 +2881,6 @@ func.Encoder.setVertexBuffer { cname = "set_transient_vertex_buffer_with_layout"
--- Set number of vertices for auto generated vertices use in conjunction
--- with gl_VertexID.
---
---- @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
---
func.Encoder.setVertexCount { section = "Draw/Buffers" }
"void"
@@ -2936,7 +2915,6 @@ func.Encoder.setInstanceDataBuffer { cname = "set_instance_data_from_dynamic_ver
--- Set number of instances for auto generated instances use in conjunction
--- with gl_InstanceID.
---
---- @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
---
func.Encoder.setInstanceCount { section = "Draw/Buffers" }
"void"
@@ -3149,7 +3127,6 @@ func.Encoder.discard { section = "Miscellaneous" }
--- draw commands are executed after blit and compute commands.
---
--- @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
---- @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
---
func.Encoder.blit { section = "Blit" }
"void"
@@ -3193,7 +3170,6 @@ func.Encoder.blit { cname = "blit_buffer", section = "Blit" }
---
--- @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
--- `BGFX_BUFFER_DRAW_INDIRECT` flag.
---- @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
---
func.Encoder.blit { cname = "blit_to_buffer", section = "Blit" }
"void"
@@ -3215,7 +3191,6 @@ func.Encoder.blit { cname = "blit_to_buffer", section = "Blit" }
--- @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
--- `BGFX_BUFFER_DRAW_INDIRECT` flags.
--- @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
---- @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
---
func.Encoder.blit { cname = "blit_from_buffer", section = "Blit" }
"void"
@@ -3514,7 +3489,6 @@ func.setVertexBuffer { cname = "set_transient_vertex_buffer_with_layout", sectio
--- Set number of vertices for auto generated vertices use in conjunction
--- with gl_VertexID.
---
---- @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
---
func.setVertexCount { section = "Draw/Buffers" }
"void"
@@ -3549,7 +3523,6 @@ func.setInstanceDataBuffer { cname = "set_instance_data_from_dynamic_vertex_buff
--- Set number of instances for auto generated instances use in conjunction
--- with gl_InstanceID.
---
---- @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.
---
func.setInstanceCount { section = "Draw/Buffers" }
"void"
@@ -3760,7 +3733,6 @@ func.discard { section = "Miscellaneous" }
--- draw commands are executed after blit and compute commands.
---
--- @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
---- @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
---
func.blit { section = "Blit" }
"void"
@@ -3804,7 +3776,6 @@ func.blit { cname = "blit_buffer", section = "Blit" }
---
--- @attention Destination buffer must be created with `BGFX_BUFFER_COMPUTE_WRITE`, or
--- `BGFX_BUFFER_DRAW_INDIRECT` flag.
---- @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
---
func.blit { cname = "blit_to_buffer", section = "Blit" }
"void"
@@ -3826,7 +3797,6 @@ func.blit { cname = "blit_to_buffer", section = "Blit" }
--- @attention Source buffer must be created with one of `BGFX_BUFFER_COMPUTE_*`, or
--- `BGFX_BUFFER_DRAW_INDIRECT` flags.
--- @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
---- @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
---
func.blit { cname = "blit_from_buffer", section = "Blit" }
"void"
diff --git a/src/bgfx.cpp b/src/bgfx.cpp
index e1650ca39..1f24ffa03 100644
--- a/src/bgfx.cpp
+++ b/src/bgfx.cpp
@@ -1925,38 +1925,25 @@ namespace bgfx
static const CapsFlags s_capsFlags[] =
{
#define CAPS_FLAGS(_x) { _x, #_x }
- CAPS_FLAGS(BGFX_CAPS_ALPHA_TO_COVERAGE),
CAPS_FLAGS(BGFX_CAPS_BLEND_INDEPENDENT),
CAPS_FLAGS(BGFX_CAPS_COMPUTE),
CAPS_FLAGS(BGFX_CAPS_CONSERVATIVE_RASTER),
CAPS_FLAGS(BGFX_CAPS_DRAW_INDIRECT),
- CAPS_FLAGS(BGFX_CAPS_FRAGMENT_DEPTH),
CAPS_FLAGS(BGFX_CAPS_FRAGMENT_ORDERING),
CAPS_FLAGS(BGFX_CAPS_GRAPHICS_DEBUGGER),
CAPS_FLAGS(BGFX_CAPS_HDR10),
- CAPS_FLAGS(BGFX_CAPS_HIDPI),
CAPS_FLAGS(BGFX_CAPS_IMAGE_RW),
CAPS_FLAGS(BGFX_CAPS_INDEX32),
- CAPS_FLAGS(BGFX_CAPS_INSTANCING),
- CAPS_FLAGS(BGFX_CAPS_OCCLUSION_QUERY),
CAPS_FLAGS(BGFX_CAPS_PRIMITIVE_ID),
CAPS_FLAGS(BGFX_CAPS_RENDERER_MULTITHREADED),
CAPS_FLAGS(BGFX_CAPS_SWAP_CHAIN),
- CAPS_FLAGS(BGFX_CAPS_TEXTURE_2D_ARRAY),
- CAPS_FLAGS(BGFX_CAPS_TEXTURE_3D),
- CAPS_FLAGS(BGFX_CAPS_TEXTURE_BLIT),
- CAPS_FLAGS(BGFX_CAPS_TEXTURE_COMPARE_ALL),
- CAPS_FLAGS(BGFX_CAPS_TEXTURE_COMPARE_LEQUAL),
CAPS_FLAGS(BGFX_CAPS_TEXTURE_CUBE_ARRAY),
CAPS_FLAGS(BGFX_CAPS_TEXTURE_DIRECT_ACCESS),
CAPS_FLAGS(BGFX_CAPS_TEXTURE_EXTERNAL),
CAPS_FLAGS(BGFX_CAPS_TEXTURE_EXTERNAL_SHARED),
- CAPS_FLAGS(BGFX_CAPS_TEXTURE_READ_BACK),
CAPS_FLAGS(BGFX_CAPS_TRANSPARENT_BACKBUFFER),
CAPS_FLAGS(BGFX_CAPS_VARIABLE_RATE_SHADING),
- CAPS_FLAGS(BGFX_CAPS_VERTEX_ATTRIB_HALF),
CAPS_FLAGS(BGFX_CAPS_VERTEX_ATTRIB_UINT10),
- CAPS_FLAGS(BGFX_CAPS_VERTEX_ID),
CAPS_FLAGS(BGFX_CAPS_VIDEO_DECODE),
CAPS_FLAGS(BGFX_CAPS_VIEWPORT_LAYER_ARRAY),
#undef CAPS_FLAGS
@@ -4365,7 +4352,6 @@ namespace bgfx
void Encoder::setCondition(OcclusionQueryHandle _handle, bool _visible)
{
- BGFX_CHECK_CAPS(BGFX_CAPS_OCCLUSION_QUERY, "Occlusion query is not supported!");
BGFX_ENCODER(setCondition(_handle, _visible) );
}
@@ -4515,7 +4501,6 @@ namespace bgfx
void Encoder::setVertexCount(uint32_t _numVertices)
{
- BGFX_CHECK_CAPS(BGFX_CAPS_VERTEX_ID, "Auto generated vertices are not supported!");
BGFX_ENCODER(setVertexCount(_numVertices) );
}
@@ -4550,7 +4535,6 @@ namespace bgfx
void Encoder::setInstanceCount(uint32_t _numInstances)
{
- BGFX_CHECK_CAPS(BGFX_CAPS_VERTEX_ID, "Auto generated instances are not supported!");
BGFX_ENCODER(setInstanceCount(_numInstances) );
}
@@ -4604,11 +4588,6 @@ namespace bgfx
void Encoder::submit(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint32_t _depth, uint8_t _flags)
{
- BX_ASSERT(false
- || !isValid(_occlusionQuery)
- || 0 != (g_caps.supported & BGFX_CAPS_OCCLUSION_QUERY)
- , "Occlusion query is not supported! Use bgfx::getCaps to check BGFX_CAPS_OCCLUSION_QUERY backend renderer capabilities."
- );
BGFX_CHECK_HANDLE_INVALID_OK("submit", s_ctx->m_programHandle, _program);
BGFX_CHECK_HANDLE_INVALID_OK("submit", s_ctx->m_occlusionQueryHandle, _occlusionQuery);
BGFX_ENCODER(submit(_id, _program, _occlusionQuery, _depth, _flags) );
@@ -4870,7 +4849,6 @@ namespace bgfx
void Encoder::blit(ViewId _id, const TextureRegion& _dst, const TextureRegion& _src)
{
- BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_BLIT, "Texture blit is not supported!");
BGFX_CHECK_HANDLE("blit/src TextureHandle", s_ctx->m_textureHandle, _src.handle);
BGFX_CHECK_HANDLE("blit/dst TextureHandle", s_ctx->m_textureHandle, _dst.handle);
@@ -5011,7 +4989,6 @@ namespace bgfx
void Encoder::blit(ViewId _id, const BufferRegion& _dst, const TextureRegion& _src)
{
- BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_BLIT, "Texture blit is not supported!");
BGFX_CHECK_HANDLE("blit/src TextureHandle", s_ctx->m_textureHandle, _src.handle);
const TextureRef& src = s_ctx->m_textureRef[_src.handle.idx];
@@ -5085,7 +5062,6 @@ namespace bgfx
void Encoder::blit(ViewId _id, const TextureRegion& _dst, const BufferRegion& _src)
{
- BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_BLIT, "Texture blit is not supported!");
BGFX_CHECK_HANDLE("blit/dst TextureHandle", s_ctx->m_textureHandle, _dst.handle);
const TextureRef& dst = s_ctx->m_textureRef[_dst.handle.idx];
@@ -5453,7 +5429,6 @@ namespace bgfx
void allocInstanceDataBuffer(InstanceDataBuffer* _idb, uint32_t _num, uint16_t _stride)
{
- BGFX_CHECK_CAPS(BGFX_CAPS_INSTANCING, "Instancing is not supported!");
BX_ASSERT(bx::isAligned(_stride, 16), "Stride must be multiple of 16.");
BX_ASSERT(0 < _num, "Requesting 0 instanced data vertices.");
s_ctx->allocInstanceDataBuffer(_idb, _num, _stride);
@@ -5778,16 +5753,6 @@ namespace bgfx
, ""
);
- BGFX_ERROR_CHECK(false
- || !is3DTexture
- || 0 != (g_caps.supported & BGFX_CAPS_TEXTURE_3D)
- , _err
- , BGFX_ERROR_TEXTURE_VALIDATION
- , "Texture3D is not supported! "
- "Use bgfx::getCaps to check `BGFX_CAPS_TEXTURE_3D` backend renderer capabilities."
- , ""
- );
-
BGFX_ERROR_CHECK(false
|| _width <= g_caps.limits.maxTextureSize
|| _height <= g_caps.limits.maxTextureSize
@@ -5818,16 +5783,6 @@ namespace bgfx
, ""
);
- BGFX_ERROR_CHECK(false
- || 1 >= _numLayers
- || 0 != (g_caps.supported & BGFX_CAPS_TEXTURE_2D_ARRAY)
- , _err
- , BGFX_ERROR_TEXTURE_VALIDATION
- , "Texture array is not supported! "
- "Use bgfx::getCaps to check `BGFX_CAPS_TEXTURE_2D_ARRAY` backend renderer capabilities."
- , ""
- );
-
BGFX_ERROR_CHECK(false
|| _numLayers <= g_caps.limits.maxTextureLayers
, _err
@@ -6361,7 +6316,6 @@ namespace bgfx
void updateTexture3D(TextureHandle _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const Memory* _mem)
{
BX_ASSERT(NULL != _mem, "_mem can't be NULL");
- BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_3D, "Texture3D is not supported!");
if (0 == _width
|| 0 == _height
@@ -6393,7 +6347,6 @@ namespace bgfx
uint32_t read(const TextureRegion& _src, void* _data)
{
BX_ASSERT(NULL != _data, "_data can't be NULL");
- BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_READ_BACK, "Texture read-back is not supported!");
BGFX_CHECK_HANDLE("read TextureHandle", s_ctx->m_textureHandle, _src.handle);
const TextureRef& src = s_ctx->m_textureRef[_src.handle.idx];
@@ -6580,19 +6533,16 @@ namespace bgfx
OcclusionQueryHandle createOcclusionQuery()
{
- BGFX_CHECK_CAPS(BGFX_CAPS_OCCLUSION_QUERY, "Occlusion query is not supported!");
return s_ctx->createOcclusionQuery();
}
OcclusionQueryResult::Enum getResult(OcclusionQueryHandle _handle, int32_t* _result)
{
- BGFX_CHECK_CAPS(BGFX_CAPS_OCCLUSION_QUERY, "Occlusion query is not supported!");
return s_ctx->getResult(_handle, _result);
}
void destroy(OcclusionQueryHandle _handle)
{
- BGFX_CHECK_CAPS(BGFX_CAPS_OCCLUSION_QUERY, "Occlusion query is not supported!");
s_ctx->destroyOcclusionQuery(_handle);
}
@@ -7265,65 +7215,42 @@ static_assert( (0
^ BGFX_STATE_WRITE_MASK
) );
-static_assert(FLAGS_MASK_TEST(BGFX_CAPS_TEXTURE_COMPARE_LEQUAL, BGFX_CAPS_TEXTURE_COMPARE_ALL) );
static_assert( (0
- | BGFX_CAPS_ALPHA_TO_COVERAGE
| BGFX_CAPS_BLEND_INDEPENDENT
| BGFX_CAPS_COMPUTE
| BGFX_CAPS_CONSERVATIVE_RASTER
| BGFX_CAPS_DRAW_INDIRECT
- | BGFX_CAPS_FRAGMENT_DEPTH
| BGFX_CAPS_FRAGMENT_ORDERING
| BGFX_CAPS_GRAPHICS_DEBUGGER
| BGFX_CAPS_HDR10
- | BGFX_CAPS_HIDPI
| BGFX_CAPS_INDEX32
- | BGFX_CAPS_INSTANCING
- | BGFX_CAPS_OCCLUSION_QUERY
| BGFX_CAPS_RENDERER_MULTITHREADED
| BGFX_CAPS_SWAP_CHAIN
- | BGFX_CAPS_TEXTURE_2D_ARRAY
- | BGFX_CAPS_TEXTURE_3D
- | BGFX_CAPS_TEXTURE_BLIT
| BGFX_CAPS_TEXTURE_CUBE_ARRAY
| BGFX_CAPS_TEXTURE_DIRECT_ACCESS
| BGFX_CAPS_TEXTURE_EXTERNAL
| BGFX_CAPS_TEXTURE_EXTERNAL_SHARED
- | BGFX_CAPS_TEXTURE_READ_BACK
- | BGFX_CAPS_VERTEX_ATTRIB_HALF
| BGFX_CAPS_VERTEX_ATTRIB_UINT10
- | BGFX_CAPS_VERTEX_ID
| BGFX_CAPS_PRIMITIVE_ID
| BGFX_CAPS_VIEWPORT_LAYER_ARRAY
| BGFX_CAPS_DRAW_INDIRECT_COUNT
) == (0
- ^ BGFX_CAPS_ALPHA_TO_COVERAGE
^ BGFX_CAPS_BLEND_INDEPENDENT
^ BGFX_CAPS_COMPUTE
^ BGFX_CAPS_CONSERVATIVE_RASTER
^ BGFX_CAPS_DRAW_INDIRECT
- ^ BGFX_CAPS_FRAGMENT_DEPTH
^ BGFX_CAPS_FRAGMENT_ORDERING
^ BGFX_CAPS_GRAPHICS_DEBUGGER
^ BGFX_CAPS_HDR10
- ^ BGFX_CAPS_HIDPI
^ BGFX_CAPS_INDEX32
- ^ BGFX_CAPS_INSTANCING
- ^ BGFX_CAPS_OCCLUSION_QUERY
^ BGFX_CAPS_RENDERER_MULTITHREADED
^ BGFX_CAPS_SWAP_CHAIN
- ^ BGFX_CAPS_TEXTURE_2D_ARRAY
- ^ BGFX_CAPS_TEXTURE_3D
- ^ BGFX_CAPS_TEXTURE_BLIT
^ BGFX_CAPS_TEXTURE_CUBE_ARRAY
^ BGFX_CAPS_TEXTURE_DIRECT_ACCESS
^ BGFX_CAPS_TEXTURE_EXTERNAL
^ BGFX_CAPS_TEXTURE_EXTERNAL_SHARED
- ^ BGFX_CAPS_TEXTURE_READ_BACK
- ^ BGFX_CAPS_VERTEX_ATTRIB_HALF
^ BGFX_CAPS_VERTEX_ATTRIB_UINT10
- ^ BGFX_CAPS_VERTEX_ID
^ BGFX_CAPS_PRIMITIVE_ID
^ BGFX_CAPS_VIEWPORT_LAYER_ARRAY
^ BGFX_CAPS_DRAW_INDIRECT_COUNT
diff --git a/src/bgfx_p.h b/src/bgfx_p.h
index 3bdec31e5..c44ecf082 100644
--- a/src/bgfx_p.h
+++ b/src/bgfx_p.h
@@ -6953,7 +6953,6 @@ namespace bgfx
const uint32_t maskFlags = ~(0
| (0 != (g_caps.supported & BGFX_CAPS_TRANSPARENT_BACKBUFFER) ? 0 : BGFX_SWAP_CHAIN_TRANSPARENT_BACKBUFFER)
| (0 != (g_caps.supported & BGFX_CAPS_HDR10) ? 0 : BGFX_SWAP_CHAIN_HDR10)
- | (0 != (g_caps.supported & BGFX_CAPS_HIDPI) ? 0 : BGFX_SWAP_CHAIN_HIDPI)
);
const uint32_t flags = _flags & maskFlags;
@@ -6965,7 +6964,6 @@ namespace bgfx
)
WARN_SWAP_CHAIN_CAPS_FLAGS(TRANSPARENT_BACKBUFFER);
WARN_SWAP_CHAIN_CAPS_FLAGS(HDR10);
- WARN_SWAP_CHAIN_CAPS_FLAGS(HIDPI);
#undef WARN_SWAP_CHAIN_CAPS_FLAGS
diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp
index 7c8fe4429..fb313eae5 100644
--- a/src/renderer_d3d11.cpp
+++ b/src/renderer_d3d11.cpp
@@ -980,12 +980,6 @@ namespace bgfx { namespace d3d11
D3D_FEATURE_LEVEL_12_0,
D3D_FEATURE_LEVEL_11_1,
D3D_FEATURE_LEVEL_11_0,
- D3D_FEATURE_LEVEL_10_1,
- D3D_FEATURE_LEVEL_10_0,
-#if BX_PLATFORM_WINRT
- D3D_FEATURE_LEVEL_9_3,
- D3D_FEATURE_LEVEL_9_2,
-#endif // BX_PLATFORM_WINRT
};
HRESULT hr = S_OK;
@@ -1259,144 +1253,52 @@ namespace bgfx { namespace d3d11
{
g_caps.supported |= (0
- | BGFX_CAPS_TEXTURE_3D
- | BGFX_CAPS_VERTEX_ATTRIB_HALF
| BGFX_CAPS_VERTEX_ATTRIB_UINT10
- | BGFX_CAPS_VERTEX_ID
- | BGFX_CAPS_FRAGMENT_DEPTH
| (getIntelExtensions(m_device)
? BGFX_CAPS_FRAGMENT_ORDERING
| BGFX_CAPS_TEXTURE_DIRECT_ACCESS
: 0)
| BGFX_CAPS_SWAP_CHAIN
| BGFX_CAPS_DRAW_INDIRECT
- | BGFX_CAPS_TEXTURE_BLIT
- | BGFX_CAPS_TEXTURE_READ_BACK
- | ( (m_featureLevel >= D3D_FEATURE_LEVEL_9_2)
- ? BGFX_CAPS_OCCLUSION_QUERY
- : 0)
- | BGFX_CAPS_ALPHA_TO_COVERAGE
| ( (m_deviceInterfaceVersion >= 3)
? BGFX_CAPS_CONSERVATIVE_RASTER
: 0)
- | BGFX_CAPS_TEXTURE_2D_ARRAY
| BGFX_CAPS_TEXTURE_CUBE_ARRAY
| ((m_featureLevel >= D3D_FEATURE_LEVEL_11_1)
? BGFX_CAPS_IMAGE_RW
: 0)
- | ((m_featureLevel >= D3D_FEATURE_LEVEL_11_0)
- ? BGFX_CAPS_PRIMITIVE_ID
- : 0)
+ | BGFX_CAPS_PRIMITIVE_ID
| BGFX_CAPS_TEXTURE_EXTERNAL
);
- m_timerQuerySupport = m_featureLevel >= D3D_FEATURE_LEVEL_10_0;
+ m_timerQuerySupport = true;
m_directAccessSupport = 0 != (g_caps.supported & BGFX_CAPS_TEXTURE_DIRECT_ACCESS);
- if (m_featureLevel <= D3D_FEATURE_LEVEL_9_2)
- {
- g_caps.limits.maxTextureSize = D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION;
- g_caps.limits.maxFBAttachments = uint8_t(bx::min(
- D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT
- , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS
- ) );
- g_caps.limits.maxVertexStreams = uint8_t(bx::min(
- 16
- , BGFX_CONFIG_MAX_VERTEX_STREAMS
- ) );
- }
- else if (m_featureLevel == D3D_FEATURE_LEVEL_9_3)
- {
- g_caps.limits.maxTextureSize = D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION;
- g_caps.limits.maxFBAttachments = uint8_t(bx::min(
- D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT
- , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS
- ) );
- g_caps.limits.maxVertexStreams = uint8_t(bx::min(
- 16
- , BGFX_CONFIG_MAX_VERTEX_STREAMS
- ) );
- }
- else
- {
- g_caps.limits.maxComputeBindings = bx::min(BGFX_MAX_COMPUTE_BINDINGS
- , D3D_FEATURE_LEVEL_11_1 <= m_featureLevel
- ? D3D11_1_UAV_SLOT_COUNT
- : D3D11_PS_CS_UAV_REGISTER_COUNT
- );
+ g_caps.limits.maxComputeBindings = bx::min(BGFX_MAX_COMPUTE_BINDINGS
+ , D3D_FEATURE_LEVEL_11_1 <= m_featureLevel
+ ? D3D11_1_UAV_SLOT_COUNT
+ : D3D11_PS_CS_UAV_REGISTER_COUNT
+ );
- g_caps.supported |= BGFX_CAPS_TEXTURE_COMPARE_ALL;
- g_caps.limits.maxTextureSize = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;
- g_caps.limits.maxTextureLayers = D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION;
- g_caps.limits.maxFBAttachments = uint8_t(bx::min(
- D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT
- , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS
- ) );
- g_caps.limits.maxVertexStreams = uint8_t(bx::min(
- D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT
- , BGFX_CONFIG_MAX_VERTEX_STREAMS
- ) );
- g_caps.limits.maxVertexAttributes = D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT;
- }
+ g_caps.limits.maxTextureSize = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;
+ g_caps.limits.maxTextureLayers = D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION;
+ g_caps.limits.maxFBAttachments = uint8_t(bx::min(
+ D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT
+ , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS
+ ) );
+ g_caps.limits.maxVertexStreams = uint8_t(bx::min(
+ D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT
+ , BGFX_CONFIG_MAX_VERTEX_STREAMS
+ ) );
+ g_caps.limits.maxVertexAttributes = D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT;
g_caps.limits.maxInstanceData = bx::min(g_caps.limits.maxInstanceData, g_caps.limits.maxVertexAttributes);
- // 32-bit indices only supported on 9_2+.
- if (m_featureLevel >= D3D_FEATURE_LEVEL_9_2)
- {
- g_caps.supported |= BGFX_CAPS_INDEX32;
- }
-
- // Independent blend only supported on 10_1+.
- if (m_featureLevel >= D3D_FEATURE_LEVEL_10_1)
- {
- g_caps.supported |= BGFX_CAPS_BLEND_INDEPENDENT;
- }
-
- // Compute support is optional on 10_0 and 10_1 targets.
- if (m_featureLevel == D3D_FEATURE_LEVEL_10_0
- || m_featureLevel == D3D_FEATURE_LEVEL_10_1)
- {
- D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS data;
- HRESULT hr = m_device->CheckFeatureSupport(D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS, &data, sizeof(data) );
- if (SUCCEEDED(hr)
- && data.ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x)
- {
- g_caps.supported |= BGFX_CAPS_COMPUTE;
- }
- }
- else if (m_featureLevel >= D3D_FEATURE_LEVEL_11_0)
- {
- g_caps.supported |= BGFX_CAPS_COMPUTE;
- }
-
- // Instancing fully supported on 9_3+, optionally partially supported at lower levels.
- if (m_featureLevel >= D3D_FEATURE_LEVEL_9_3)
- {
- g_caps.supported |= BGFX_CAPS_INSTANCING;
- }
- else
- {
- D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT data;
- HRESULT hr = m_device->CheckFeatureSupport(D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT, &data, sizeof(data) );
- if (SUCCEEDED(hr)
- && data.SimpleInstancingSupported)
- {
- g_caps.supported |= BGFX_CAPS_INSTANCING;
- }
- }
-
- // shadow compare is optional on 9_1 through 9_3 targets
- if (m_featureLevel <= D3D_FEATURE_LEVEL_9_3)
- {
- D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT data;
- HRESULT hr = m_device->CheckFeatureSupport(D3D11_FEATURE_D3D9_SHADOW_SUPPORT, &data, sizeof(data) );
- if (SUCCEEDED(hr)
- && data.SupportsDepthAsTextureWithLessEqualComparisonFilter)
- {
- g_caps.supported |= BGFX_CAPS_TEXTURE_COMPARE_LEQUAL;
- }
- }
+ g_caps.supported |= 0
+ | BGFX_CAPS_BLEND_INDEPENDENT
+ | BGFX_CAPS_COMPUTE
+ | BGFX_CAPS_INDEX32
+ ;
// support for SV_ViewportArrayIndex and SV_RenderTargetArrayIndex in the vertex shader is optional
{
@@ -2594,10 +2496,7 @@ namespace bgfx { namespace d3d11
uint32_t maxAnisotropy = 1;
if (!!(_reset & BGFX_RESET_MAXANISOTROPY) )
{
- maxAnisotropy = (m_featureLevel == D3D_FEATURE_LEVEL_9_1)
- ? D3D_FL9_1_DEFAULT_MAX_ANISOTROPY
- : D3D11_REQ_MAXANISOTROPY
- ;
+ maxAnisotropy = D3D11_REQ_MAXANISOTROPY;
}
if (m_maxAnisotropy != maxAnisotropy)
@@ -2606,10 +2505,7 @@ namespace bgfx { namespace d3d11
m_samplerStateCache.invalidate();
}
- bool depthClamp = true
- && !!(_reset & BGFX_RESET_DEPTH_CLAMP)
- && m_featureLevel > D3D_FEATURE_LEVEL_9_3 // disabling depth clamp is only supported on 10_0+
- ;
+ bool depthClamp = !!(_reset & BGFX_RESET_DEPTH_CLAMP);
if (m_depthClamp != depthClamp)
{
@@ -3273,12 +3169,8 @@ namespace bgfx { namespace d3d11
ID3D11DeviceContext* deviceCtx = m_deviceCtx;
- // vertex texture fetch not supported on 9_1 through 9_3
- if (m_featureLevel > D3D_FEATURE_LEVEL_9_3)
- {
- deviceCtx->VSSetShaderResources(0, maxTextureSamplers, s_zero.m_srv);
- deviceCtx->VSSetSamplers(0, maxTextureSamplers, s_zero.m_sampler);
- }
+ deviceCtx->VSSetShaderResources(0, maxTextureSamplers, s_zero.m_srv);
+ deviceCtx->VSSetSamplers(0, maxTextureSamplers, s_zero.m_sampler);
if (m_featureLevel > D3D_FEATURE_LEVEL_11_0)
{
@@ -3308,12 +3200,8 @@ namespace bgfx { namespace d3d11
ID3D11DeviceContext* deviceCtx = m_deviceCtx;
- // vertex texture fetch not supported on 9_1 through 9_3
- if (m_featureLevel > D3D_FEATURE_LEVEL_9_3)
- {
- deviceCtx->VSSetShaderResources(0, maxTextureSamplers, m_textureStage.m_srv);
- deviceCtx->VSSetSamplers(0, maxTextureSamplers, m_textureStage.m_sampler);
- }
+ deviceCtx->VSSetShaderResources(0, maxTextureSamplers, m_textureStage.m_srv);
+ deviceCtx->VSSetSamplers(0, maxTextureSamplers, m_textureStage.m_sampler);
if (m_featureLevel > D3D_FEATURE_LEVEL_11_0)
{
diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp
index 391610cff..e8bb65790 100644
--- a/src/renderer_d3d12.cpp
+++ b/src/renderer_d3d12.cpp
@@ -1722,7 +1722,6 @@ namespace bgfx { namespace d3d12
;
g_caps.supported |= ( 0
- | BGFX_CAPS_ALPHA_TO_COVERAGE
| BGFX_CAPS_BLEND_INDEPENDENT
| BGFX_CAPS_COMPUTE
| ( (D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED != m_options.ConservativeRasterizationTier)
@@ -1730,26 +1729,16 @@ namespace bgfx { namespace d3d12
: 0)
| BGFX_CAPS_DRAW_INDIRECT
| BGFX_CAPS_DRAW_INDIRECT_COUNT
- | BGFX_CAPS_FRAGMENT_DEPTH
| (m_options.ROVsSupported ? BGFX_CAPS_FRAGMENT_ORDERING : 0)
| BGFX_CAPS_IMAGE_RW
| BGFX_CAPS_INDEX32
- | BGFX_CAPS_INSTANCING
- | BGFX_CAPS_OCCLUSION_QUERY
| BGFX_CAPS_PRIMITIVE_ID
| (BX_ENABLED(BX_PLATFORM_WINDOWS) ? BGFX_CAPS_SWAP_CHAIN : 0)
- | BGFX_CAPS_TEXTURE_2D_ARRAY
- | BGFX_CAPS_TEXTURE_3D
- | BGFX_CAPS_TEXTURE_BLIT
- | BGFX_CAPS_TEXTURE_COMPARE_ALL
| BGFX_CAPS_TEXTURE_CUBE_ARRAY
| (m_directAccessSupport ? BGFX_CAPS_TEXTURE_DIRECT_ACCESS : 0)
| BGFX_CAPS_TEXTURE_EXTERNAL
- | BGFX_CAPS_TEXTURE_READ_BACK
| (m_variableRateShadingSupport ? BGFX_CAPS_VARIABLE_RATE_SHADING : 0)
- | BGFX_CAPS_VERTEX_ATTRIB_HALF
| BGFX_CAPS_VERTEX_ATTRIB_UINT10
- | BGFX_CAPS_VERTEX_ID
| BGFX_CAPS_VIEWPORT_LAYER_ARRAY
);
g_caps.limits.maxTextureSize = D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION;
diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp
index 1f84fa79f..dbaac09df 100644
--- a/src/renderer_gl.cpp
+++ b/src/renderer_gl.cpp
@@ -2231,7 +2231,6 @@ namespace bgfx { namespace gl
, m_textureSwizzleSupport(false)
, m_timerQuerySupport(false)
, m_occlusionQuerySupport(false)
- , m_atocSupport(false)
, m_conservativeRasterSupport(false)
, m_flip(false)
, m_hash( (BX_PLATFORM_WINDOWS<<1) | BX_ARCH_64BIT)
@@ -2723,16 +2722,7 @@ namespace bgfx { namespace gl
g_caps.formats[TextureFormat::BGRA8] |= BGFX_CAPS_FORMAT_TEXTURE_BACKBUFFER;
- g_caps.supported |= BGFX_CAPS_TEXTURE_3D;
- g_caps.supported |= BGFX_CAPS_TEXTURE_COMPARE_ALL;
- g_caps.supported |= BGFX_CAPS_VERTEX_ATTRIB_HALF;
- g_caps.supported |= false
- || s_extension[Extension::ARB_vertex_type_2_10_10_10_rev].m_supported
- || s_extension[Extension::OES_vertex_type_10_10_10_2].m_supported
- ? BGFX_CAPS_VERTEX_ATTRIB_UINT10
- : 0
- ;
- g_caps.supported |= BGFX_CAPS_FRAGMENT_DEPTH;
+ g_caps.supported |= BGFX_CAPS_VERTEX_ATTRIB_UINT10;
g_caps.supported |= (false
|| s_extension[Extension::ARB_draw_buffers_blend ].m_supported
|| s_extension[Extension::OES_draw_buffers_indexed].m_supported
@@ -2808,32 +2798,9 @@ namespace bgfx { namespace gl
m_blitFboSupported = !m_blitSupported && BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES);
m_readBackFboSupported = !m_readBackSupported;
- g_caps.supported |= m_blitSupported || m_blitFboSupported
- ? BGFX_CAPS_TEXTURE_BLIT
- : 0
- ;
-
- g_caps.supported |= m_readBackSupported || m_readBackFboSupported
- ? BGFX_CAPS_TEXTURE_READ_BACK
- : 0
- ;
-
g_caps.supported |= BGFX_CAPS_TEXTURE_EXTERNAL;
- g_caps.supported |= false
- || s_extension[Extension::EXT_texture_array].m_supported
- || s_extension[Extension::EXT_gpu_shader4].m_supported
- || (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) && !BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) )
- ? BGFX_CAPS_TEXTURE_2D_ARRAY
- : 0
- ;
- g_caps.supported |= false
- || s_extension[Extension::EXT_gpu_shader4].m_supported
- || (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) && !BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) )
- ? BGFX_CAPS_VERTEX_ID
- : 0
- ;
g_caps.supported |= false
|| BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL)
@@ -2919,15 +2886,7 @@ namespace bgfx { namespace gl
&& NULL != glGetQueryObjectui64v
;
- m_occlusionQuerySupport = false
- || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) // Core since ES 3.0.
- || s_extension[Extension::ARB_occlusion_query ].m_supported
- || s_extension[Extension::ARB_occlusion_query2 ].m_supported
- || s_extension[Extension::EXT_occlusion_query_boolean].m_supported
- || s_extension[Extension::NV_occlusion_query ].m_supported
- ;
-
- m_occlusionQuerySupport &= true
+ m_occlusionQuerySupport = true
&& NULL != glGenQueries
&& NULL != glDeleteQueries
&& NULL != glBeginQuery
@@ -2935,7 +2894,6 @@ namespace bgfx { namespace gl
&& NULL != glGetQueryObjectuiv
;
- m_atocSupport = s_extension[Extension::ARB_multisample].m_supported;
m_conservativeRasterSupport = s_extension[Extension::NV_conservative_raster].m_supported;
// Note: ES 3.1 has image load/store in core, but read-write
@@ -2946,10 +2904,7 @@ namespace bgfx { namespace gl
;
g_caps.supported |= 0
- | (m_atocSupport ? BGFX_CAPS_ALPHA_TO_COVERAGE : 0)
| (m_conservativeRasterSupport ? BGFX_CAPS_CONSERVATIVE_RASTER : 0)
- | (m_occlusionQuerySupport ? BGFX_CAPS_OCCLUSION_QUERY : 0)
- | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL
| (computeSupport ? BGFX_CAPS_COMPUTE : 0)
| (m_imageLoadStoreSupport ? BGFX_CAPS_IMAGE_RW : 0)
;
@@ -2994,37 +2949,19 @@ namespace bgfx { namespace gl
m_readPixelsFmt = GL_RGBA;
}
- if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES))
+ if (NULL == glVertexAttribDivisor
+ || NULL == glDrawArraysInstanced
+ || NULL == glDrawElementsInstanced)
{
- g_caps.supported |= BGFX_CAPS_INSTANCING;
- }
- else
- {
- if (s_extension[Extension::ANGLE_instanced_arrays].m_supported
- || s_extension[Extension:: ARB_instanced_arrays].m_supported
- || s_extension[Extension:: EXT_instanced_arrays].m_supported
- || (s_extension[Extension:: NV_instanced_arrays].m_supported && s_extension[Extension::NV_draw_instanced].m_supported)
- )
+ if (NULL != glVertexAttribDivisorNV
+ && NULL != glDrawArraysInstancedNV
+ && NULL != glDrawElementsInstancedNV)
{
- if (NULL != glVertexAttribDivisor
- && NULL != glDrawArraysInstanced
- && NULL != glDrawElementsInstanced)
- {
- g_caps.supported |= BGFX_CAPS_INSTANCING;
- }
- else if (NULL != glVertexAttribDivisorNV
- && NULL != glDrawArraysInstancedNV
- && NULL != glDrawElementsInstancedNV)
- {
- glVertexAttribDivisor = glVertexAttribDivisorNV;
- glDrawArraysInstanced = glDrawArraysInstancedNV;
- glDrawElementsInstanced = glDrawElementsInstancedNV;
-
- g_caps.supported |= BGFX_CAPS_INSTANCING;
- }
+ glVertexAttribDivisor = glVertexAttribDivisorNV;
+ glDrawArraysInstanced = glDrawArraysInstancedNV;
+ glDrawElementsInstanced = glDrawElementsInstancedNV;
}
-
- if (0 == (g_caps.supported & BGFX_CAPS_INSTANCING) )
+ else
{
glVertexAttribDivisor = stubVertexAttribDivisor;
glDrawArraysInstanced = stubDrawArraysInstanced;
@@ -5178,7 +5115,6 @@ namespace bgfx { namespace gl
bool m_textureSwizzleSupport;
bool m_timerQuerySupport;
bool m_occlusionQuerySupport;
- bool m_atocSupport;
bool m_conservativeRasterSupport;
bool m_imageLoadStoreSupport;
bool m_flip;
@@ -9092,17 +9028,10 @@ namespace bgfx { namespace gl
) & changedFlags)
|| blendFactor != draw.m_rgba)
{
- if (m_atocSupport)
- {
- if (BGFX_STATE_BLEND_ALPHA_TO_COVERAGE & newFlags)
- {
- GL_CHECK(glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE) );
- }
- else
- {
- GL_CHECK(glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE) );
- }
- }
+ GL_CHECK(BGFX_STATE_BLEND_ALPHA_TO_COVERAGE & newFlags
+ ? glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE)
+ : glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE)
+ );
if ( ( (0
| BGFX_STATE_BLEND_EQUATION_MASK
diff --git a/src/renderer_mtl.cpp b/src/renderer_mtl.cpp
index 2ec816f39..8112b5fc4 100644
--- a/src/renderer_mtl.cpp
+++ b/src/renderer_mtl.cpp
@@ -997,22 +997,12 @@ static_assert(BX_COUNTOF(s_accessNames) == Access::Count, "Invalid s_accessNames
g_caps.gpu[0].deviceId = g_caps.deviceId;
g_caps.supported |= (0
- | BGFX_CAPS_ALPHA_TO_COVERAGE
| BGFX_CAPS_BLEND_INDEPENDENT
| BGFX_CAPS_COMPUTE
- | BGFX_CAPS_FRAGMENT_DEPTH
| BGFX_CAPS_INDEX32
- | BGFX_CAPS_INSTANCING
- | BGFX_CAPS_OCCLUSION_QUERY
| BGFX_CAPS_SWAP_CHAIN
- | BGFX_CAPS_TEXTURE_2D_ARRAY
- | BGFX_CAPS_TEXTURE_3D
- | BGFX_CAPS_TEXTURE_BLIT
| BGFX_CAPS_TEXTURE_EXTERNAL
- | BGFX_CAPS_TEXTURE_READ_BACK
- | BGFX_CAPS_VERTEX_ATTRIB_HALF
| BGFX_CAPS_VERTEX_ATTRIB_UINT10
- | BGFX_CAPS_VERTEX_ID
);
g_caps.supported |= (m_device->supportsFamily(MTL::GPUFamilyApple7) || m_device->supportsFamily(MTL::GPUFamilyMac2) )
@@ -1033,7 +1023,6 @@ static_assert(BX_COUNTOF(s_accessNames) == Access::Count, "Invalid s_accessNames
g_caps.supported |= (m_device->supportsFamily(MTL::GPUFamilyApple3) || m_device->supportsFamily(MTL::GPUFamilyMac2) )
? BGFX_CAPS_DRAW_INDIRECT
| BGFX_CAPS_TEXTURE_CUBE_ARRAY
- | BGFX_CAPS_TEXTURE_COMPARE_ALL
: 0
;
@@ -3524,14 +3513,11 @@ static_assert(BX_COUNTOF(s_accessNames) == Access::Count, "Invalid s_accessNames
: 1
);
- if (0 != (g_caps.supported & BGFX_CAPS_TEXTURE_COMPARE_ALL) )
- {
- const uint32_t cmpFunc = (_flags&BGFX_SAMPLER_COMPARE_MASK)>>BGFX_SAMPLER_COMPARE_SHIFT;
- desc->setCompareFunction(0 == cmpFunc
- ? MTL::CompareFunctionNever
- : (MTL::CompareFunction)s_cmpFunc[cmpFunc])
- ;
- }
+ const uint32_t cmpFunc = (_flags&BGFX_SAMPLER_COMPARE_MASK)>>BGFX_SAMPLER_COMPARE_SHIFT;
+ desc->setCompareFunction(0 == cmpFunc
+ ? MTL::CompareFunctionNever
+ : (MTL::CompareFunction)s_cmpFunc[cmpFunc])
+ ;
sampler = m_device->newSamplerState(desc);
m_samplerStateCache.add(_flags, sampler);
diff --git a/src/renderer_noop.cpp b/src/renderer_noop.cpp
index 12e260a19..6d3669082 100644
--- a/src/renderer_noop.cpp
+++ b/src/renderer_noop.cpp
@@ -13,35 +13,22 @@ namespace bgfx { namespace noop
{
// Pretend all features are available.
g_caps.supported = 0
- | BGFX_CAPS_ALPHA_TO_COVERAGE
| BGFX_CAPS_BLEND_INDEPENDENT
| BGFX_CAPS_COMPUTE
| BGFX_CAPS_CONSERVATIVE_RASTER
| BGFX_CAPS_DRAW_INDIRECT
| BGFX_CAPS_DRAW_INDIRECT_COUNT
- | BGFX_CAPS_FRAGMENT_DEPTH
| BGFX_CAPS_FRAGMENT_ORDERING
| BGFX_CAPS_GRAPHICS_DEBUGGER
| BGFX_CAPS_HDR10
- | BGFX_CAPS_HIDPI
| BGFX_CAPS_IMAGE_RW
| BGFX_CAPS_INDEX32
- | BGFX_CAPS_INSTANCING
- | BGFX_CAPS_OCCLUSION_QUERY
| BGFX_CAPS_PRIMITIVE_ID
| BGFX_CAPS_RENDERER_MULTITHREADED
| BGFX_CAPS_SWAP_CHAIN
- | BGFX_CAPS_TEXTURE_2D_ARRAY
- | BGFX_CAPS_TEXTURE_3D
- | BGFX_CAPS_TEXTURE_BLIT
- | BGFX_CAPS_TEXTURE_COMPARE_ALL
- | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL
| BGFX_CAPS_TEXTURE_CUBE_ARRAY
- | BGFX_CAPS_TEXTURE_READ_BACK
| BGFX_CAPS_TRANSPARENT_BACKBUFFER
- | BGFX_CAPS_VERTEX_ATTRIB_HALF
| BGFX_CAPS_VERTEX_ATTRIB_UINT10
- | BGFX_CAPS_VERTEX_ID
| BGFX_CAPS_VIEWPORT_LAYER_ARRAY
;
diff --git a/src/renderer_vk.cpp b/src/renderer_vk.cpp
index 2659898fa..534c4e90a 100644
--- a/src/renderer_vk.cpp
+++ b/src/renderer_vk.cpp
@@ -1858,27 +1858,16 @@ VK_IMPORT_INSTANCE
;
g_caps.supported |= ( 0
- | BGFX_CAPS_ALPHA_TO_COVERAGE
| (m_deviceFeatures.independentBlend ? BGFX_CAPS_BLEND_INDEPENDENT : 0)
| BGFX_CAPS_COMPUTE
| (indirectDrawSupport ? BGFX_CAPS_DRAW_INDIRECT : 0)
- | BGFX_CAPS_FRAGMENT_DEPTH
| BGFX_CAPS_IMAGE_RW
| (m_deviceFeatures.fullDrawIndexUint32 ? BGFX_CAPS_INDEX32 : 0)
- | BGFX_CAPS_INSTANCING
- | BGFX_CAPS_OCCLUSION_QUERY
| ( (!headless || wsiSurfaceSupported() ) ? BGFX_CAPS_SWAP_CHAIN : 0)
- | BGFX_CAPS_TEXTURE_2D_ARRAY
- | BGFX_CAPS_TEXTURE_3D
- | BGFX_CAPS_TEXTURE_BLIT
- | BGFX_CAPS_TEXTURE_COMPARE_ALL
| (m_deviceFeatures.imageCubeArray ? BGFX_CAPS_TEXTURE_CUBE_ARRAY : 0)
| BGFX_CAPS_TEXTURE_EXTERNAL
- | BGFX_CAPS_TEXTURE_READ_BACK
| BGFX_CAPS_TRANSPARENT_BACKBUFFER
- | BGFX_CAPS_VERTEX_ATTRIB_HALF
| BGFX_CAPS_VERTEX_ATTRIB_UINT10
- | BGFX_CAPS_VERTEX_ID
| (m_deviceFeatures.geometryShader ? BGFX_CAPS_PRIMITIVE_ID : 0)
);
diff --git a/src/renderer_webgpu.cpp b/src/renderer_webgpu.cpp
index 930f57057..32e909084 100644
--- a/src/renderer_webgpu.cpp
+++ b/src/renderer_webgpu.cpp
@@ -1468,27 +1468,15 @@ WGPU_IMPORT
g_caps.limits.blitOffsetAlign = 256;
g_caps.supported = 0
- | BGFX_CAPS_ALPHA_TO_COVERAGE
| BGFX_CAPS_BLEND_INDEPENDENT
| BGFX_CAPS_COMPUTE
| BGFX_CAPS_DRAW_INDIRECT
- | BGFX_CAPS_FRAGMENT_DEPTH
| BGFX_CAPS_IMAGE_RW
| BGFX_CAPS_INDEX32
- | BGFX_CAPS_INSTANCING
- | BGFX_CAPS_OCCLUSION_QUERY
| BGFX_CAPS_PRIMITIVE_ID
| BGFX_CAPS_RENDERER_MULTITHREADED
| BGFX_CAPS_SWAP_CHAIN
- | BGFX_CAPS_TEXTURE_2D_ARRAY
- | BGFX_CAPS_TEXTURE_3D
- | BGFX_CAPS_TEXTURE_BLIT
- | BGFX_CAPS_TEXTURE_COMPARE_ALL
- | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL
| BGFX_CAPS_TEXTURE_CUBE_ARRAY
- | BGFX_CAPS_TEXTURE_READ_BACK
- | BGFX_CAPS_VERTEX_ATTRIB_HALF
- | BGFX_CAPS_VERTEX_ID
;
TextureFormatCaps textureFormatCaps;