Branimir Karadžić 9 лет назад
Родитель
Сommit
3feceda054
2 измененных файлов с 19 добавлено и 5 удалено
  1. 18 4
      include/bgfx/bgfx.h
  2. 1 1
      src/renderer_d3d9.cpp

+ 18 - 4
include/bgfx/bgfx.h

@@ -515,10 +515,24 @@ namespace bgfx
 		GPU gpu[4]; //!< Enumerated GPUs.
 
 		/// Supported texture formats.
-		///   - `BGFX_CAPS_FORMAT_TEXTURE_NONE` - not supported
-		///   - `BGFX_CAPS_FORMAT_TEXTURE_2D` - supported
-		///   - `BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED` - emulated
-		///   - `BGFX_CAPS_FORMAT_TEXTURE_VERTEX` - supported vertex texture
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_NONE` - Texture format is not supported.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_2D` - Texture format is supported.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB` - Texture as sRGB format is supported.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED` - Texture format is emulated.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_3D` - Texture format is supported.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB` - Texture as sRGB format is supported.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED` - Texture format is emulated.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_CUBE` - Texture format is supported.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB` - Texture as sRGB format is supported.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED` - Texture format is emulated.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_VERTEX` - Texture format can be used from vertex shader.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_IMAGE` - Texture format can be used as image from compute
+		///     shader.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER` - Texture format can be used as frame
+		///     buffer.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA` - Texture format can be used as MSAA
+		///     frame buffer.
+		///   - `BGFX_CAPS_FORMAT_TEXTURE_MSAA` - Texture can be sampled as MSAA.
 		uint16_t formats[TextureFormat::Count];
 	};
 

+ 1 - 1
src/renderer_d3d9.cpp

@@ -628,7 +628,7 @@ namespace bgfx { namespace d3d9
 
 			for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
 			{
-				uint8_t support = 0;
+				uint16_t support = BGFX_CAPS_FORMAT_TEXTURE_NONE;
 
 				support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter
 					, m_deviceType