From f1533ccc7481a5112839c6acf95dd6f1e0e4d2ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 11 Oct 2014 12:51:32 -0700 Subject: [PATCH] Removed emulated flags from caps. --- include/bgfx.c99.h | 7 ------- include/bgfx.h | 34 ++++++++++++++++++++++------------ src/bgfx.cpp | 10 ---------- 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/include/bgfx.c99.h b/include/bgfx.c99.h index 3eb0c3f1..a3b0aab6 100644 --- a/include/bgfx.c99.h +++ b/include/bgfx.c99.h @@ -261,13 +261,6 @@ typedef struct bgfx_caps */ 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 maxDrawCalls; /* < Maximum draw calls. */ uint8_t maxFBAttachments; /* < Maximum frame buffer attachments. */ diff --git a/include/bgfx.h b/include/bgfx.h index c937626f..624084a2 100644 --- a/include/bgfx.h +++ b/include/bgfx.h @@ -284,27 +284,37 @@ namespace bgfx /// Renderer capabilities. struct Caps { - /// Renderer backend type. + /// Renderer backend type. See: `bgfx::RendererType` RendererType::Enum rendererType; - /// Supported functionality, it includes emulated functionality. - /// Checking supported and not emulated will give functionality - /// natively supported by renderer. + /// Supported functionality. + /// + /// - `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; - /// 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 maxDrawCalls; ///< Maximum draw calls. uint8_t maxFBAttachments; ///< Maximum frame buffer attachments. /// Supported texture formats. - /// 0 - not supported - /// 1 - supported - /// 2 - emulated + /// - 0 - not supported + /// - 1 - supported + /// - 2 - emulated uint8_t formats[TextureFormat::Count]; }; diff --git a/src/bgfx.cpp b/src/bgfx.cpp index fdc9b6d7..856feaa6 100644 --- a/src/bgfx.cpp +++ b/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:"); for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { @@ -1883,7 +1874,6 @@ again: g_caps.supported = 0 | (BGFX_CONFIG_MULTITHREADED ? BGFX_CAPS_RENDERER_MULTITHREADED : 0) ; - g_caps.emulated = 0; g_caps.maxDrawCalls = BGFX_CONFIG_MAX_DRAW_CALLS; g_caps.maxFBAttachments = 1;