Added a new capability to check for PrimitiveID support (#3154)

This commit is contained in:
Jamil Halabi
2023-08-04 17:42:33 +03:00
committed by GitHub
parent 3101a0d93f
commit f059531885
12 changed files with 53 additions and 14 deletions

View File

@@ -1147,15 +1147,20 @@ public static class bgfx
/// </summary>
VertexId = 0x0000000008000000,
/// <summary>
/// PrimitiveID is available in fragment shader.
/// </summary>
PrimitiveId = 0x0000000010000000,
/// <summary>
/// Viewport layer is available in vertex shader.
/// </summary>
ViewportLayerArray = 0x0000000010000000,
ViewportLayerArray = 0x0000000020000000,
/// <summary>
/// Draw indirect with indirect count is supported.
/// </summary>
DrawIndirectCount = 0x0000000020000000,
DrawIndirectCount = 0x0000000040000000,
/// <summary>
/// All texture compare modes are supported.

View File

@@ -1146,15 +1146,20 @@ public static partial class bgfx
/// </summary>
VertexId = 0x0000000008000000,
/// <summary>
/// PrimitiveID is available in fragment shader.
/// </summary>
PrimitiveId = 0x0000000010000000,
/// <summary>
/// Viewport layer is available in vertex shader.
/// </summary>
ViewportLayerArray = 0x0000000010000000,
ViewportLayerArray = 0x0000000020000000,
/// <summary>
/// Draw indirect with indirect count is supported.
/// </summary>
DrawIndirectCount = 0x0000000020000000,
DrawIndirectCount = 0x0000000040000000,
/// <summary>
/// All texture compare modes are supported.

View File

@@ -10,7 +10,7 @@ import bindbc.bgfx.config;
import bindbc.common.types: va_list;
static import bgfx.fakeenum;
enum uint apiVersion = 121;
enum uint apiVersion = 122;
alias ViewID = ushort;
deprecated("Please use `ViewID` instead.") alias ViewId = ushort;
@@ -521,8 +521,9 @@ enum CapFlags: CapFlags_{
vertexAttribHalf = 0x0000_0000_0200_0000, ///Vertex attribute half-float is supported.
vertexAttribUint10 = 0x0000_0000_0400_0000, ///Vertex attribute 10_10_10_2 is supported.
vertexID = 0x0000_0000_0800_0000, ///Rendering with VertexID only is supported.
viewportLayerArray = 0x0000_0000_1000_0000, ///Viewport layer is available in vertex shader.
drawIndirectCount = 0x0000_0000_2000_0000, ///Draw indirect with indirect count is supported.
primitiveID = 0x0000_0000_1000_0000, ///PrimitiveID is available in fragment shader.
viewportLayerArray = 0x0000_0000_2000_0000, ///Viewport layer is available in vertex shader.
drawIndirectCount = 0x0000_0000_4000_0000, ///Draw indirect with indirect count is supported.
textureCompareAll = 0x0000_0000_0030_0000, ///All texture compare modes are supported.
}

View File

@@ -708,11 +708,14 @@ pub const CapsFlags_VertexAttribUint10: CapsFlags = 0x0000000004000000;
/// Rendering with VertexID only is supported.
pub const CapsFlags_VertexId: CapsFlags = 0x0000000008000000;
/// PrimitiveID is available in fragment shader.
pub const CapsFlags_PrimitiveId: CapsFlags = 0x0000000010000000;
/// Viewport layer is available in vertex shader.
pub const CapsFlags_ViewportLayerArray: CapsFlags = 0x0000000010000000;
pub const CapsFlags_ViewportLayerArray: CapsFlags = 0x0000000020000000;
/// Draw indirect with indirect count is supported.
pub const CapsFlags_DrawIndirectCount: CapsFlags = 0x0000000020000000;
pub const CapsFlags_DrawIndirectCount: CapsFlags = 0x0000000040000000;
/// All texture compare modes are supported.
pub const CapsFlags_TextureCompareAll: CapsFlags = 0x0000000000300000;