summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h')
-rw-r--r--src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h56
1 files changed, 23 insertions, 33 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h
index 7b97527140..883d338377 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/formatutils11.h
@@ -15,6 +15,7 @@
#include "common/platform.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/formatutils.h"
+#include "libANGLE/renderer/renderer_utils.h"
#include "libANGLE/renderer/d3d/formatutilsD3D.h"
namespace rx
@@ -24,58 +25,47 @@ struct Renderer11DeviceCaps;
namespace d3d11
{
-typedef std::map<std::pair<GLenum, GLenum>, ColorCopyFunction> FastCopyFunctionMap;
-typedef bool (*NativeMipmapGenerationSupportFunction)(D3D_FEATURE_LEVEL);
+// A texture might be stored as DXGI_FORMAT_R16_TYPELESS but store integer components,
+// which are accessed through an DXGI_FORMAT_R16_SINT view. It's easy to write code which queries
+// information about the wrong format. Therefore, use of this should be avoided where possible.
-struct DXGIFormat
+bool SupportsMipGen(DXGI_FORMAT dxgiFormat, D3D_FEATURE_LEVEL featureLevel);
+
+struct DXGIFormatSize
{
- DXGIFormat();
+ DXGIFormatSize(GLuint pixelBits, GLuint blockWidth, GLuint blockHeight);
GLuint pixelBytes;
GLuint blockWidth;
GLuint blockHeight;
-
- GLuint redBits;
- GLuint greenBits;
- GLuint blueBits;
- GLuint alphaBits;
- GLuint sharedBits;
-
- GLuint depthBits;
- GLuint depthOffset;
- GLuint stencilBits;
- GLuint stencilOffset;
-
- GLenum internalFormat;
- GLenum componentType;
-
- MipGenerationFunction mipGenerationFunction;
- ColorReadFunction colorReadFunction;
-
- FastCopyFunctionMap fastCopyFunctions;
-
- NativeMipmapGenerationSupportFunction nativeMipmapSupport;
-
- ColorCopyFunction getFastCopyFunction(GLenum format, GLenum type) const;
};
-const DXGIFormat &GetDXGIFormatInfo(DXGI_FORMAT format);
+const DXGIFormatSize &GetDXGIFormatSizeInfo(DXGI_FORMAT format);
-struct VertexFormat
+struct VertexFormat : private angle::NonCopyable
{
- VertexFormat();
- VertexFormat(VertexConversionType conversionType,
- DXGI_FORMAT nativeFormat,
- VertexCopyFunction copyFunction);
+ constexpr VertexFormat();
+ constexpr VertexFormat(VertexConversionType conversionType,
+ DXGI_FORMAT nativeFormat,
+ VertexCopyFunction copyFunction);
VertexConversionType conversionType;
DXGI_FORMAT nativeFormat;
VertexCopyFunction copyFunction;
};
+
const VertexFormat &GetVertexFormatInfo(gl::VertexFormatType vertexFormatType,
D3D_FEATURE_LEVEL featureLevel);
+// Auto-generated in dxgi_format_map_autogen.cpp.
+GLenum GetComponentType(DXGI_FORMAT dxgiFormat);
+
} // namespace d3d11
+namespace d3d11_angle
+{
+const angle::Format &GetFormat(DXGI_FORMAT dxgiFormat);
+}
+
} // namespace rx
#endif // LIBANGLE_RENDERER_D3D_D3D11_FORMATUTILS11_H_