mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 09:08:22 -05:00
Removed emulated flags from caps.
This commit is contained in:
parent
4a1a31b538
commit
f1533ccc74
3 changed files with 22 additions and 29 deletions
|
@ -261,13 +261,6 @@ typedef struct bgfx_caps
|
||||||
*/
|
*/
|
||||||
uint64_t supported;
|
uint64_t supported;
|
||||||
|
|
||||||
/**
|
|
||||||
* Emulated functionality. For example some texture compression
|
|
||||||
* modes are not natively supported by all renderers. The library
|
|
||||||
* internally decompresses texture into supported format.
|
|
||||||
*/
|
|
||||||
uint64_t emulated;
|
|
||||||
|
|
||||||
uint16_t maxTextureSize; /* < Maximum texture size. */
|
uint16_t maxTextureSize; /* < Maximum texture size. */
|
||||||
uint16_t maxDrawCalls; /* < Maximum draw calls. */
|
uint16_t maxDrawCalls; /* < Maximum draw calls. */
|
||||||
uint8_t maxFBAttachments; /* < Maximum frame buffer attachments. */
|
uint8_t maxFBAttachments; /* < Maximum frame buffer attachments. */
|
||||||
|
|
|
@ -284,27 +284,37 @@ namespace bgfx
|
||||||
/// Renderer capabilities.
|
/// Renderer capabilities.
|
||||||
struct Caps
|
struct Caps
|
||||||
{
|
{
|
||||||
/// Renderer backend type.
|
/// Renderer backend type. See: `bgfx::RendererType`
|
||||||
RendererType::Enum rendererType;
|
RendererType::Enum rendererType;
|
||||||
|
|
||||||
/// Supported functionality, it includes emulated functionality.
|
/// Supported functionality.
|
||||||
/// Checking supported and not emulated will give functionality
|
///
|
||||||
/// natively supported by renderer.
|
/// - `BGFX_CAPS_TEXTURE_COMPARE_LEQUAL` - Less equal texture
|
||||||
|
/// compare mode.
|
||||||
|
/// - `BGFX_CAPS_TEXTURE_COMPARE_ALL` - All texture compare modes.
|
||||||
|
/// - `BGFX_CAPS_TEXTURE_3D` - 3D textures.
|
||||||
|
/// - `BGFX_CAPS_VERTEX_ATTRIB_HALF` - AttribType::Half.
|
||||||
|
/// - `BGFX_CAPS_INSTANCING` - Vertex instancing.
|
||||||
|
/// - `BGFX_CAPS_RENDERER_MULTITHREADED` - Renderer on separate
|
||||||
|
/// thread.
|
||||||
|
/// - `BGFX_CAPS_FRAGMENT_DEPTH` - Fragment shader can modify depth
|
||||||
|
/// buffer value (gl_FragDepth).
|
||||||
|
/// - `BGFX_CAPS_BLEND_INDEPENDENT` - Multiple render targets can
|
||||||
|
/// have different blend mode set individually.
|
||||||
|
/// - `BGFX_CAPS_COMPUTE` - Renderer has compute shaders.
|
||||||
|
/// - `BGFX_CAPS_FRAGMENT_ORDERING` - Intel's pixel sync.
|
||||||
|
/// - `BGFX_CAPS_SWAP_CHAIN` - Multiple windows.
|
||||||
|
///
|
||||||
uint64_t supported;
|
uint64_t supported;
|
||||||
|
|
||||||
/// Emulated functionality. For example some texture compression
|
|
||||||
/// modes are not natively supported by all renderers. The library
|
|
||||||
/// internally decompresses texture into supported format.
|
|
||||||
uint64_t emulated;
|
|
||||||
|
|
||||||
uint16_t maxTextureSize; ///< Maximum texture size.
|
uint16_t maxTextureSize; ///< Maximum texture size.
|
||||||
uint16_t maxDrawCalls; ///< Maximum draw calls.
|
uint16_t maxDrawCalls; ///< Maximum draw calls.
|
||||||
uint8_t maxFBAttachments; ///< Maximum frame buffer attachments.
|
uint8_t maxFBAttachments; ///< Maximum frame buffer attachments.
|
||||||
|
|
||||||
/// Supported texture formats.
|
/// Supported texture formats.
|
||||||
/// 0 - not supported
|
/// - 0 - not supported
|
||||||
/// 1 - supported
|
/// - 1 - supported
|
||||||
/// 2 - emulated
|
/// - 2 - emulated
|
||||||
uint8_t formats[TextureFormat::Count];
|
uint8_t formats[TextureFormat::Count];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
10
src/bgfx.cpp
10
src/bgfx.cpp
|
@ -858,15 +858,6 @@ namespace bgfx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BX_TRACE("Emulated capabilities:");
|
|
||||||
for (uint32_t ii = 0; ii < BX_COUNTOF(s_capsFlags); ++ii)
|
|
||||||
{
|
|
||||||
if (0 != (g_caps.emulated & s_capsFlags[ii].m_flag) )
|
|
||||||
{
|
|
||||||
BX_TRACE("\t%s", s_capsFlags[ii].m_str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BX_TRACE("Supported texture formats:");
|
BX_TRACE("Supported texture formats:");
|
||||||
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
|
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
|
||||||
{
|
{
|
||||||
|
@ -1883,7 +1874,6 @@ again:
|
||||||
g_caps.supported = 0
|
g_caps.supported = 0
|
||||||
| (BGFX_CONFIG_MULTITHREADED ? BGFX_CAPS_RENDERER_MULTITHREADED : 0)
|
| (BGFX_CONFIG_MULTITHREADED ? BGFX_CAPS_RENDERER_MULTITHREADED : 0)
|
||||||
;
|
;
|
||||||
g_caps.emulated = 0;
|
|
||||||
g_caps.maxDrawCalls = BGFX_CONFIG_MAX_DRAW_CALLS;
|
g_caps.maxDrawCalls = BGFX_CONFIG_MAX_DRAW_CALLS;
|
||||||
g_caps.maxFBAttachments = 1;
|
g_caps.maxFBAttachments = 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue