Add EGL_EXT_pixel_format_float support, enables float EGL surfaces.
Add floating point EGL configs for the D3D11 backend.
BUG=angleproject:1707
Change-Id: Ic84cd3a0d41e78cc39d0275d83e7695f55673ddf
Reviewed-on: https://chromium-review.googlesource.com/428294
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/Config.cpp b/src/libANGLE/Config.cpp
index 822518e..e0268d0 100644
--- a/src/libANGLE/Config.cpp
+++ b/src/libANGLE/Config.cpp
@@ -58,7 +58,8 @@
transparentRedValue(0),
transparentGreenValue(0),
transparentBlueValue(0),
- optimalOrientation(0)
+ optimalOrientation(0),
+ colorComponentType(EGL_COLOR_COMPONENT_TYPE_FIXED_EXT)
{
}
@@ -134,6 +135,10 @@
static_assert(EGL_NONE < EGL_SLOW_CONFIG && EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG, "Unexpected EGL enum value.");
SORT(configCaveat);
+ static_assert(EGL_COLOR_COMPONENT_TYPE_FIXED_EXT < EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT,
+ "Unexpected order of EGL enums.");
+ SORT(colorComponentType);
+
static_assert(EGL_RGB_BUFFER < EGL_LUMINANCE_BUFFER, "Unexpected EGL enum value.");
SORT(colorBufferType);
@@ -255,6 +260,9 @@
case EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE:
match = config.optimalOrientation == attributeValue;
break;
+ case EGL_COLOR_COMPONENT_TYPE_EXT:
+ match = config.colorComponentType == static_cast<EGLenum>(attributeValue);
+ break;
default: UNREACHABLE();
}