2 // Copyright (c) 2013-2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
7 // formatutils11.h: Queries for GL image formats and their translations to D3D11
10 #ifndef LIBGLESV2_RENDERER_FORMATUTILS11_H_
11 #define LIBGLESV2_RENDERER_FORMATUTILS11_H_
13 #include "libGLESv2/formatutils.h"
23 typedef std::map<std::pair<GLenum, GLenum>, ColorCopyFunction> FastCopyFunctionMap;
38 GLenum internalFormat;
41 MipGenerationFunction mipGenerationFunction;
42 ColorReadFunction colorReadFunction;
44 FastCopyFunctionMap fastCopyFunctions;
45 ColorCopyFunction getFastCopyFunction(GLenum format, GLenum type) const;
47 const DXGIFormat &GetDXGIFormatInfo(DXGI_FORMAT format);
53 DXGI_FORMAT texFormat;
54 DXGI_FORMAT srvFormat;
55 DXGI_FORMAT rtvFormat;
56 DXGI_FORMAT dsvFormat;
57 DXGI_FORMAT renderFormat;
59 DXGI_FORMAT swizzleTexFormat;
60 DXGI_FORMAT swizzleSRVFormat;
61 DXGI_FORMAT swizzleRTVFormat;
63 InitializeTextureDataFunction dataInitializerFunction;
65 typedef std::map<GLenum, LoadImageFunction> LoadFunctionMap;
66 LoadFunctionMap loadFunctions;
68 const TextureFormat &GetTextureFormatInfo(GLenum internalFormat);
74 VertexConversionType conversionType;
75 DXGI_FORMAT nativeFormat;
76 VertexCopyFunction copyFunction;
78 const VertexFormat &GetVertexFormatInfo(const gl::VertexFormat &vertexFormat);
84 #endif // LIBGLESV2_RENDERER_FORMATUTILS11_H_