From 4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 11 Jul 2018 18:11:13 +0200 Subject: Roll back to ANGLE/2845 --- .../renderer/d3d/d3d11/texture_format_table.cpp | 39 +++++++++++++++++----- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'gfx/angle/src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp') 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 -- cgit v1.2.3