webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
formatutils11.h
Go to the documentation of this file.
1 //
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.
5 //
6 
7 // formatutils11.h: Queries for GL image formats and their translations to D3D11
8 // formats.
9 
10 #ifndef LIBANGLE_RENDERER_D3D_D3D11_FORMATUTILS11_H_
11 #define LIBANGLE_RENDERER_D3D_D3D11_FORMATUTILS11_H_
12 
13 #include <map>
14 
15 #include "common/platform.h"
16 #include "libANGLE/angletypes.h"
17 #include "libANGLE/formatutils.h"
20 
21 namespace rx
22 {
23 struct Renderer11DeviceCaps;
24 
25 namespace d3d11
26 {
27 
28 // A texture might be stored as DXGI_FORMAT_R16_TYPELESS but store integer components,
29 // which are accessed through an DXGI_FORMAT_R16_SINT view. It's easy to write code which queries
30 // information about the wrong format. Therefore, use of this should be avoided where possible.
31 
32 bool SupportsMipGen(DXGI_FORMAT dxgiFormat, D3D_FEATURE_LEVEL featureLevel);
33 
35 {
37 
41 };
42 const DXGIFormatSize &GetDXGIFormatSizeInfo(DXGI_FORMAT format);
43 
45 {
46  VertexFormat();
47  VertexFormat(VertexConversionType conversionType,
48  DXGI_FORMAT nativeFormat,
49  VertexCopyFunction copyFunction);
50 
52  DXGI_FORMAT nativeFormat;
54 };
56  D3D_FEATURE_LEVEL featureLevel);
57 
58 // Auto-generated in dxgi_format_map_autogen.cpp.
59 GLenum GetComponentType(DXGI_FORMAT dxgiFormat);
60 
61 } // namespace d3d11
62 
63 } // namespace rx
64 
65 #endif // LIBANGLE_RENDERER_D3D_D3D11_FORMATUTILS11_H_
VertexConversionType conversionType
Definition: formatutils11.h:51
GLint GLint GLint GLsizei GLsizei GLenum format
Definition: gl2.h:403
GLenum GetComponentType(DXGI_FORMAT dxgiFormat)
Definition: dxgi_format_map_autogen.cpp:21
Definition: formatutils11.h:34
unsigned int GLenum
Definition: gl2.h:69
VertexFormatType
Definition: formatutils.h:184
DXGI_FORMAT nativeFormat
Definition: formatutils11.h:52
Definition: mathutil.h:804
VertexConversionType
Definition: formatutilsD3D.h:32
GLuint blockHeight
Definition: formatutils11.h:40
bool SupportsMipGen(DXGI_FORMAT dxgiFormat, D3D_FEATURE_LEVEL featureLevel)
Definition: formatutils11.cpp:28
const DXGIFormatSize & GetDXGIFormatSizeInfo(DXGI_FORMAT format)
Definition: formatutils11.cpp:40
void(* VertexCopyFunction)(const uint8_t *input, size_t stride, size_t count, uint8_t *output)
Definition: formatutilsD3D.h:30
unsigned int GLuint
Definition: gl2.h:70
GLuint pixelBytes
Definition: formatutils11.h:38
Definition: formatutils11.h:44
const VertexFormat & GetVertexFormatInfo(gl::VertexFormatType vertexFormatType, D3D_FEATURE_LEVEL featureLevel)
Definition: formatutils11.cpp:301
GLuint blockWidth
Definition: formatutils11.h:39
VertexCopyFunction copyFunction
Definition: formatutils11.h:53
DXGIFormatSize(GLuint pixelBits, GLuint blockWidth, GLuint blockHeight)
Definition: formatutils11.cpp:35