diff --git a/bindings/cs/bgfx.cs b/bindings/cs/bgfx.cs index c55545a83..3470aa238 100644 --- a/bindings/cs/bgfx.cs +++ b/bindings/cs/bgfx.cs @@ -565,7 +565,7 @@ public static partial class bgfx /// /// Discard every rendering states /// - All = 0x0000001f, + All = 0x000000ff, } [Flags] diff --git a/bindings/d/types.d b/bindings/d/types.d index 52551f481..022f93ae3 100644 --- a/bindings/d/types.d +++ b/bindings/d/types.d @@ -199,7 +199,7 @@ enum ubyte BGFX_DISCARD_VERTEX_STREAMS = 0x02; /// Discard only Vertex Streams enum ubyte BGFX_DISCARD_TEXTURE_SAMPLERS = 0x04; /// Discard only texture samplers enum ubyte BGFX_DISCARD_COMPUTE = 0x08; /// Discard only Compute shader related state enum ubyte BGFX_DISCARD_STATE = 0x10; /// Discard only state -enum ubyte BGFX_DISCARD_ALL = 0x1f; /// Discard every rendering states +enum ubyte BGFX_DISCARD_ALL = 0xff; /// Discard every rendering states enum uint BGFX_DEBUG_NONE = 0x00000000; /// No debug. enum uint BGFX_DEBUG_WIREFRAME = 0x00000001; /// Enable wireframe for all primitives. diff --git a/include/bgfx/defines.h b/include/bgfx/defines.h index 303bdff7c..cd2655e15 100644 --- a/include/bgfx/defines.h +++ b/include/bgfx/defines.h @@ -264,15 +264,7 @@ #define BGFX_DISCARD_TEXTURE_SAMPLERS UINT8_C(0x04) //!< Discard only texture samplers #define BGFX_DISCARD_COMPUTE UINT8_C(0x08) //!< Discard only Compute shader related state #define BGFX_DISCARD_STATE UINT8_C(0x10) //!< Discard only state -/// Discard every rendering states -#define BGFX_DISCARD_ALL (0 \ - | BGFX_DISCARD_INDEX_BUFFER \ - | BGFX_DISCARD_VERTEX_STREAMS \ - | BGFX_DISCARD_TEXTURE_SAMPLERS \ - | BGFX_DISCARD_COMPUTE \ - | BGFX_DISCARD_STATE \ - ) - +#define BGFX_DISCARD_ALL UINT8_C(0xff) //!< Discard every rendering states #define BGFX_DEBUG_NONE UINT32_C(0x00000000) //!< No debug. #define BGFX_DEBUG_WIREFRAME UINT32_C(0x00000001) //!< Enable wireframe for all primitives. diff --git a/scripts/bgfx.idl b/scripts/bgfx.idl index f8e56652c..5112f019c 100644 --- a/scripts/bgfx.idl +++ b/scripts/bgfx.idl @@ -201,14 +201,14 @@ flag.Clear { bits = 16 } --- Rendering state discard. When state is preserved in submit, rendering states can be discarded --- on a finer grain. -flag.Discard { bits = 8, desc = "Discard flags" } - .None(0) --- Discard nothing - .IndexBuffer --- Discard only Index Buffer - .VertexStreams --- Discard only Vertex Streams - .TextureSamplers --- Discard only texture samplers - .Compute --- Discard only Compute shader related state - .State --- Discard only state - .All { "IndexBuffer", "VertexStreams", "TextureSamplers", "Compute", "State" } --- Discard every rendering states +flag.Discard { bits = 8, const, desc = "Discard flags" } + .None (0x00) --- Discard nothing + .IndexBuffer (0x01) --- Discard only Index Buffer + .VertexStreams (0x02) --- Discard only Vertex Streams + .TextureSamplers (0x04) --- Discard only texture samplers + .Compute (0x08) --- Discard only Compute shader related state + .State (0x10) --- Discard only state + .All (0xff) --- Discard every rendering states () flag.Debug { bits = 32 }