summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp')
-rwxr-xr-xgfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp39
1 files changed, 30 insertions, 9 deletions
diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp
index a9dfec56b..6697a1177 100755
--- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp
+++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp
@@ -15,19 +15,40 @@ namespace rx
namespace d3d11
{
-const Format &Format::getSwizzleFormat(const Renderer11DeviceCaps &deviceCaps) const
+Format::Format()
+ : internalFormat(GL_NONE),
+ format(angle::Format::Get(angle::Format::ID::NONE)),
+ texFormat(DXGI_FORMAT_UNKNOWN),
+ srvFormat(DXGI_FORMAT_UNKNOWN),
+ rtvFormat(DXGI_FORMAT_UNKNOWN),
+ dsvFormat(DXGI_FORMAT_UNKNOWN),
+ blitSRVFormat(DXGI_FORMAT_UNKNOWN),
+ swizzle(*this),
+ dataInitializerFunction(nullptr)
{
- return (swizzleFormat == internalFormat ? *this : Format::Get(swizzleFormat, deviceCaps));
}
-LoadFunctionMap Format::getLoadFunctions() const
+Format::Format(GLenum internalFormat,
+ angle::Format::ID formatID,
+ DXGI_FORMAT texFormat,
+ DXGI_FORMAT srvFormat,
+ DXGI_FORMAT rtvFormat,
+ DXGI_FORMAT dsvFormat,
+ DXGI_FORMAT blitSRVFormat,
+ GLenum swizzleFormat,
+ InitializeTextureDataFunction internalFormatInitializer,
+ const Renderer11DeviceCaps &deviceCaps)
+ : internalFormat(internalFormat),
+ format(angle::Format::Get(formatID)),
+ texFormat(texFormat),
+ srvFormat(srvFormat),
+ rtvFormat(rtvFormat),
+ dsvFormat(dsvFormat),
+ blitSRVFormat(blitSRVFormat),
+ swizzle(swizzleFormat == internalFormat ? *this : Format::Get(swizzleFormat, deviceCaps)),
+ dataInitializerFunction(internalFormatInitializer),
+ loadFunctions(GetLoadFunctionsMap(internalFormat, formatID))
{
- return GetLoadFunctionsMap(internalFormat, formatID);
-}
-
-const angle::Format &Format::format() const
-{
- return angle::Format::Get(formatID);
}
} // namespace d3d11