Procházet zdrojové kódy

Removed emulated flags from caps.

Branimir Karadžić před 11 roky
rodič
revize
f1533ccc74
3 změnil soubory, kde provedl 22 přidání a 29 odebrání
  1. 0 7
      include/bgfx.c99.h
  2. 22 12
      include/bgfx.h
  3. 0 10
      src/bgfx.cpp

+ 0 - 7
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. */

+ 22 - 12
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];
 	};
 

+ 0 - 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:");
 		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;