Commit 1d91a7b1 by Corentin Wallez

Formatutilsgl: Make floating point formats renderable on core GL 3.0

Previously they were listed as requiring ARB_color_buffer_float in all cases even if the extension has been merged in Desktop GL 3.0. Make it require Desktop GL 3.0 _or_ the extension. This fixes the PackUnpackTest and BlendMinMaxTest on Mac BUG=angleproject:891 Change-Id: I504d9ed3ed9f1d908964181a6c21b79f1faee9b1 Reviewed-on: https://chromium-review.googlesource.com/298862Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 50cd39ef
...@@ -53,16 +53,6 @@ static inline SupportRequirement VersionAndExts(GLuint major, GLuint minor, cons ...@@ -53,16 +53,6 @@ static inline SupportRequirement VersionAndExts(GLuint major, GLuint minor, cons
return requirement; return requirement;
} }
static inline SupportRequirement VersionOrExtsAndExts(GLuint major, GLuint minor, const std::string &versionExt,
const std::string &requiredExt)
{ SupportRequirement requirement;
requirement.version.major = major;
requirement.version.minor = minor;
angle::SplitStringAlongWhitespace(versionExt, &requirement.versionExtensions);
angle::SplitStringAlongWhitespace(requiredExt, &requirement.requiredExtensions);
return requirement;
}
static inline SupportRequirement VersionOnly(GLuint major, GLuint minor) static inline SupportRequirement VersionOnly(GLuint major, GLuint minor)
{ {
SupportRequirement requirement; SupportRequirement requirement;
...@@ -189,16 +179,16 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() ...@@ -189,16 +179,16 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap()
// Floating point formats // Floating point formats
// | Format | OpenGL texture support | Filter | OpenGL render support | OpenGL ES texture support | Filter | OpenGL ES render support | // | Format | OpenGL texture support | Filter | OpenGL render support | OpenGL ES texture support | Filter | OpenGL ES render support |
InsertFormatMapping(&map, GL_R11F_G11F_B10F, VersionOrExts(3, 0, "GL_EXT_packed_float"), Always(), VersionOrExtsAndExts(3, 0, "GL_EXT_packed_float", "GL_ARB_color_buffer_float"), VersionOnly(3, 0), Always(), VersionAndExts(3, 0, "GL_EXT_color_buffer_float") ); InsertFormatMapping(&map, GL_R11F_G11F_B10F, VersionOrExts(3, 0, "GL_EXT_packed_float"), Always(), VersionOrExts(3, 0, "GL_EXT_packed_float GL_ARB_color_buffer_float"), VersionOnly(3, 0), Always(), VersionAndExts(3, 0, "GL_EXT_color_buffer_float") );
InsertFormatMapping(&map, GL_RGB9_E5, VersionOrExts(3, 0, "GL_EXT_texture_shared_exponent"), Always(), VersionOrExtsAndExts(3, 0, "GL_EXT_texture_shared_exponent", "GL_ARB_color_buffer_float"), VersionOnly(3, 0), Always(), VersionAndExts(3, 0, "GL_EXT_color_buffer_float") ); InsertFormatMapping(&map, GL_RGB9_E5, VersionOrExts(3, 0, "GL_EXT_texture_shared_exponent"), Always(), VersionOrExts(3, 0, "GL_EXT_texture_shared_exponent GL_ARB_color_buffer_float"), VersionOnly(3, 0), Always(), VersionAndExts(3, 0, "GL_EXT_color_buffer_float") );
InsertFormatMapping(&map, GL_R16F, VersionOrExts(3, 0, "GL_ARB_texture_rg ARB_texture_float"), Always(), VersionOrExtsAndExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float", "GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float GL_EXT_texture_rg"), VersionOrExts(3, 0, "GL_OES_texture_half_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_half_float GL_EXT_texture_rg")); InsertFormatMapping(&map, GL_R16F, VersionOrExts(3, 0, "GL_ARB_texture_rg ARB_texture_float"), Always(), VersionOrExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float GL_EXT_texture_rg"), VersionOrExts(3, 0, "GL_OES_texture_half_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_half_float GL_EXT_texture_rg"));
InsertFormatMapping(&map, GL_RG16F, VersionOrExts(3, 0, "GL_ARB_texture_rg ARB_texture_float"), Always(), VersionOrExtsAndExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float", "GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float GL_EXT_texture_rg"), VersionOrExts(3, 0, "GL_OES_texture_half_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_half_float GL_EXT_texture_rg")); InsertFormatMapping(&map, GL_RG16F, VersionOrExts(3, 0, "GL_ARB_texture_rg ARB_texture_float"), Always(), VersionOrExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float GL_EXT_texture_rg"), VersionOrExts(3, 0, "GL_OES_texture_half_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_half_float GL_EXT_texture_rg"));
InsertFormatMapping(&map, GL_RGB16F, VersionOrExts(3, 0, "GL_ARB_texture_float"), Always(), VersionOrExtsAndExts(3, 0, "GL_ARB_texture_float", "GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_half_float") ); InsertFormatMapping(&map, GL_RGB16F, VersionOrExts(3, 0, "GL_ARB_texture_float"), Always(), VersionOrExts(3, 0, "GL_ARB_texture_float GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_half_float") );
InsertFormatMapping(&map, GL_RGBA16F, VersionOrExts(3, 0, "GL_ARB_texture_float"), Always(), VersionOrExtsAndExts(3, 0, "GL_ARB_texture_float", "GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_half_float") ); InsertFormatMapping(&map, GL_RGBA16F, VersionOrExts(3, 0, "GL_ARB_texture_float"), Always(), VersionOrExts(3, 0, "GL_ARB_texture_float GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float"), VersionOrExts(3, 0, "GL_OES_texture_half_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_half_float") );
InsertFormatMapping(&map, GL_R32F, VersionOrExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float"), Always(), VersionOrExtsAndExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float", "GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_float GL_EXT_texture_rg"), VersionOrExts(3, 0, "GL_OES_texture_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_float GL_EXT_texture_rg") ); InsertFormatMapping(&map, GL_R32F, VersionOrExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float"), Always(), VersionOrExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_float GL_EXT_texture_rg"), VersionOrExts(3, 0, "GL_OES_texture_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_float GL_EXT_texture_rg") );
InsertFormatMapping(&map, GL_RG32F, VersionOrExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float"), Always(), VersionOrExtsAndExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float", "GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_float GL_EXT_texture_rg"), VersionOrExts(3, 0, "GL_OES_texture_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_float GL_EXT_texture_rg") ); InsertFormatMapping(&map, GL_RG32F, VersionOrExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float"), Always(), VersionOrExts(3, 0, "GL_ARB_texture_rg GL_ARB_texture_float GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_float GL_EXT_texture_rg"), VersionOrExts(3, 0, "GL_OES_texture_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_float GL_EXT_texture_rg") );
InsertFormatMapping(&map, GL_RGB32F, VersionOrExts(3, 0, "GL_ARB_texture_float"), Always(), VersionOrExtsAndExts(3, 0, "GL_ARB_texture_float", "GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_float"), VersionOrExts(3, 0, "GL_OES_texture_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_float") ); InsertFormatMapping(&map, GL_RGB32F, VersionOrExts(3, 0, "GL_ARB_texture_float"), Always(), VersionOrExts(3, 0, "GL_ARB_texture_float GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_float"), VersionOrExts(3, 0, "GL_OES_texture_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_float") );
InsertFormatMapping(&map, GL_RGBA32F, VersionOrExts(3, 0, "GL_ARB_texture_float"), Always(), VersionOrExtsAndExts(3, 0, "GL_ARB_texture_float", "GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_float"), VersionOrExts(3, 0, "GL_OES_texture_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_float") ); InsertFormatMapping(&map, GL_RGBA32F, VersionOrExts(3, 0, "GL_ARB_texture_float"), Always(), VersionOrExts(3, 0, "GL_ARB_texture_float GL_ARB_color_buffer_float"), VersionOrExts(3, 0, "GL_OES_texture_float"), VersionOrExts(3, 0, "GL_OES_texture_float_linear"), VersionOrExts(3, 0, "GL_OES_texture_float") );
// Depth stencil formats // Depth stencil formats
// | Format | OpenGL texture support | Filter | OpenGL render support | OpenGL ES texture support | Filter | OpenGL ES render support | // | Format | OpenGL texture support | Filter | OpenGL render support | OpenGL ES texture support | Filter | OpenGL ES render support |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment