webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
texture_format_table.h
Go to the documentation of this file.
1 //
2 // Copyright 2015 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 // texture_format_table:
7 // Queries for full textureFormat information based on internalFormat
8 //
9 
10 #ifndef LIBANGLE_RENDERER_D3D_D3D11_TEXTUREFORMATTABLE_H_
11 #define LIBANGLE_RENDERER_D3D_D3D11_TEXTUREFORMATTABLE_H_
12 
13 #include <map>
14 
15 #include "common/angleutils.h"
16 #include "common/platform.h"
20 
21 namespace rx
22 {
23 
24 struct Renderer11DeviceCaps;
25 
26 namespace d3d11
27 {
28 
29 // For sized GL internal formats, there are several possible corresponding D3D11 formats depending
30 // on device capabilities.
31 // This structure allows querying for the DXGI texture formats to use for textures, SRVs, RTVs and
32 // DSVs given a GL internal format.
34 {
35  Format();
37  angle::Format::ID formatID,
38  DXGI_FORMAT texFormat,
39  DXGI_FORMAT srvFormat,
40  DXGI_FORMAT rtvFormat,
41  DXGI_FORMAT dsvFormat,
42  DXGI_FORMAT blitSRVFormat,
43  GLenum swizzleFormat,
44  InitializeTextureDataFunction internalFormatInitializer,
45  const Renderer11DeviceCaps &deviceCaps);
46 
47  static const Format &Get(GLenum internalFormat, const Renderer11DeviceCaps &deviceCaps);
48 
51 
52  DXGI_FORMAT texFormat;
53  DXGI_FORMAT srvFormat;
54  DXGI_FORMAT rtvFormat;
55  DXGI_FORMAT dsvFormat;
56 
57  DXGI_FORMAT blitSRVFormat;
58 
59  const Format &swizzle;
60 
62 
64 };
65 
66 } // namespace d3d11
67 
68 } // namespace rx
69 
70 #endif // LIBANGLE_RENDERER_D3D_D3D11_TEXTUREFORMATTABLE_H_
Definition: Format.h:21
const Format & swizzle
Definition: texture_format_table.h:59
GLuint GLint internalFormat
Definition: gl2ext.h:1280
DXGI_FORMAT texFormat
Definition: texture_format_table.h:52
unsigned int GLenum
Definition: gl2.h:69
DXGI_FORMAT rtvFormat
Definition: texture_format_table.h:54
LoadFunctionMap loadFunctions
Definition: texture_format_table.h:63
LoadImageFunctionInfo(*)(GLenum) LoadFunctionMap
Definition: renderer_utils.h:100
Definition: mathutil.h:804
Definition: Renderer11.h:46
DXGI_FORMAT dsvFormat
Definition: texture_format_table.h:55
Format()
Definition: texture_format_table.cpp:18
InitializeTextureDataFunction dataInitializerFunction
Definition: texture_format_table.h:61
Definition: ApplePayLineItem.idl:30
GLenum internalFormat
Definition: texture_format_table.h:49
const angle::Format & format
Definition: texture_format_table.h:50
Definition: angleutils.h:26
DXGI_FORMAT srvFormat
Definition: texture_format_table.h:53
Definition: texture_format_table.h:33
DXGI_FORMAT blitSRVFormat
Definition: texture_format_table.h:57
void(* InitializeTextureDataFunction)(size_t width, size_t height, size_t depth, uint8_t *output, size_t outputRowPitch, size_t outputDepthPitch)
Definition: formatutilsD3D.h:27
ID
Definition: Format_ID_autogen.inl:13
static const Format & Get(GLenum internalFormat, const Renderer11DeviceCaps &deviceCaps)
Definition: texture_format_table_autogen.cpp:31