diff --git a/doc/ExtensionSupport.md b/doc/ExtensionSupport.md index 79afe10ab..7e3444ff1 100644 --- a/doc/ExtensionSupport.md +++ b/doc/ExtensionSupport.md @@ -228,6 +228,7 @@ using data from registry_xml.py and gl.xml. | [GL_ANGLE_provoking_vertex](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_provoking_vertex.txt) | | | | | | | | | [GL_ANGLE_read_only_depth_stencil_feedback_loops](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_read_only_depth_stencil_feedback_loops.txt) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | [GL_ANGLE_relaxed_vertex_attribute_type](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_relaxed_vertex_attribute_type.txt) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| [GL_ANGLE_renderability_validation](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_renderability_validation.txt) | | | | | | | | | [GL_ANGLE_request_extension](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_request_extension.txt) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | [GL_ANGLE_rgbx_internal_format](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_rgbx_internal_format.txt) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | [GL_ANGLE_robust_client_memory](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_robust_client_memory.txt) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | diff --git a/extensions/ANGLE_renderability_validation.txt b/extensions/ANGLE_renderability_validation.txt new file mode 100644 index 000000000..fd4da8841 --- /dev/null +++ b/extensions/ANGLE_renderability_validation.txt @@ -0,0 +1,90 @@ +Name + + ANGLE_renderability_validation + +Name Strings + + GL_ANGLE_renderability_validation + +Contributors + + Vikas Soni, Google + +Contact + + Vikas Soni, Google (vikassoni 'at' chromium.com) + +Status + + Draft + +Version + + Last Modified Date: April 20, 2023 + Revision: 1 + +Number + + OpenGL ES Extension XX + +Dependencies + + None + +Overview + + This extension allows skipping texture format renderability validation if + the implementation is capable of rendering to the underlying texture + format. This can be useful in situations where textures are created + externally and the current context's version and extensions do not allow + rendering to the texture but the implementation is capable. + +New Procedures and Functions + + None + +New Tokens + + Accepted as a value for for the TexParameter{if} and + TexParameter{if}v commands and for the parameter of + GetTexParameter{if}v: + + GL_RENDERABILITY_VALIDATION_ANGLE 0x9EA0 + +Additions to the OpenGL Specification + + None. + +New Behavior + Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) + + Add a new row to Table 3.10 (Texture parameters and their values): + + Name | Type | Legal Values + ------------------------------------------------------------ + RENDERABILITY_VALIDATION_ANGLE | bool | TRUE, FALSE + + Add a new section 3.7.x (Texture Usage) before section 3.7.12 and + renumber the subsequent sections: + + "3.7.x Texture Usage + + Texture renderability validation can be controled via the + RENDERABILITY_VALIDATION_ANGLE value for the argument to + TexParameter{if}[v]. + + Possible values for when is TEXTURE_USAGE_ANGLE are: + + TRUE - the default. Renderability validation is unchanged. + + FALSE - Renderability of the texture becomes implementation dependent. + The implementation will allow rendering to the format if it is + capable." + +Issues + +Revision History + + Version 1, 2023-04-20(Vikas Soni) + - Initial draft + diff --git a/include/GLES2/gl2ext_angle.h b/include/GLES2/gl2ext_angle.h index 09a312a58..f8c2a8f8d 100644 --- a/include/GLES2/gl2ext_angle.h +++ b/include/GLES2/gl2ext_angle.h @@ -66,6 +66,11 @@ GL_APICALL void GL_APIENTRY glProvokingVertexANGLE(GLenum provokeMode); #define GL_DEPTH_STENCIL_TEXTURE_MODE_ANGLE 0x90EA #endif /* GL_ANGLE_stencil_texturing */ +#ifndef GL_ANGLE_renderability_validation +#define GL_ANGLE_renderability_validation 1 +#define GL_RENDERABILITY_VALIDATION_ANGLE 0x9EA0 +#endif /* GL_ANGLE_renderability_validation */ + #ifndef GL_CHROMIUM_framebuffer_mixed_samples #define GL_CHROMIUM_frambuffer_mixed_samples 1 #define GL_COVERAGE_MODULATION_CHROMIUM 0x9332 diff --git a/scripts/code_generation_hashes/Extension_files.json b/scripts/code_generation_hashes/Extension_files.json index cbfb0cdbb..a943ed529 100644 --- a/scripts/code_generation_hashes/Extension_files.json +++ b/scripts/code_generation_hashes/Extension_files.json @@ -1,6 +1,6 @@ { "doc/ExtensionSupport.md": - "8161eaef2c3f42dadefae2020b3822cc", + "40be935f259a55d6e958fac85dc54295", "scripts/egl_angle_ext.xml": "bee532d3939bddbb2bb823645e2a5ab9", "scripts/extension_data/intel_630_linux.json": @@ -20,15 +20,15 @@ "scripts/extension_data/swiftshader_win10_gles1.json": "bea8e2106d62e1ea0e8938f150865a37", "scripts/gl_angle_ext.xml": - "796894fd74d141b88000669104a663ea", + "56be6b22acdf4e24ad2721965c14e264", "scripts/registry_xml.py": - "8dc1bcf2e8324094c19c41613897b212", + "2b9d83efcf1941169b6c043e501b9b05", "src/libANGLE/gen_extensions.py": "6ea1cb1733c4df98b527bbf2752e118b", "src/libANGLE/gles_extensions_autogen.cpp": - "533966f41f2f2fee23fe76ffdc2f00e5", + "27c53434e4aab8a88d36c19ee9808163", "src/libANGLE/gles_extensions_autogen.h": - "e0b24986c8d346e8b1f94d6259f51d87", + "c81652690d4364de11925ee03db2c272", "third_party/EGL-Registry/src/api/egl.xml": "2056d54ea07156f1988ca1366bdee21a", "third_party/OpenCL-Docs/src/xml/cl.xml": diff --git a/scripts/code_generation_hashes/GL_EGL_WGL_loader.json b/scripts/code_generation_hashes/GL_EGL_WGL_loader.json index fe9396096..d9bba04e8 100644 --- a/scripts/code_generation_hashes/GL_EGL_WGL_loader.json +++ b/scripts/code_generation_hashes/GL_EGL_WGL_loader.json @@ -4,9 +4,9 @@ "scripts/generate_loader.py": "93c78a8d11323fa311fed5118fbcf083", "scripts/gl_angle_ext.xml": - "796894fd74d141b88000669104a663ea", + "56be6b22acdf4e24ad2721965c14e264", "scripts/registry_xml.py": - "8dc1bcf2e8324094c19c41613897b212", + "2b9d83efcf1941169b6c043e501b9b05", "src/libEGL/egl_loader_autogen.cpp": "8a743c210f7dbe7e306849203dff7889", "src/libEGL/egl_loader_autogen.h": diff --git a/scripts/code_generation_hashes/GL_EGL_entry_points.json b/scripts/code_generation_hashes/GL_EGL_entry_points.json index 4617e8453..8b76f67c7 100644 --- a/scripts/code_generation_hashes/GL_EGL_entry_points.json +++ b/scripts/code_generation_hashes/GL_EGL_entry_points.json @@ -8,9 +8,9 @@ "scripts/generate_entry_points.py": "6a4b3692ed978291cad5e20b09f0bb76", "scripts/gl_angle_ext.xml": - "796894fd74d141b88000669104a663ea", + "56be6b22acdf4e24ad2721965c14e264", "scripts/registry_xml.py": - "8dc1bcf2e8324094c19c41613897b212", + "2b9d83efcf1941169b6c043e501b9b05", "src/common/entry_points_enum_autogen.cpp": "73d3025dc640d30a49cd504fb7235e63", "src/common/entry_points_enum_autogen.h": @@ -38,7 +38,7 @@ "src/libANGLE/Context_gles_3_2_autogen.h": "48567dca16fd881dfe6d61fee0e3106f", "src/libANGLE/Context_gles_ext_autogen.h": - "3f9faf6e143186b859a5e1b90dcce498", + "9ed29301206d1bf9d37736041ab74a95", "src/libANGLE/capture/capture_egl_autogen.cpp": "a5b8f710309de8deab29f2e9d6414cd5", "src/libANGLE/capture/capture_egl_autogen.h": @@ -82,7 +82,7 @@ "src/libANGLE/capture/capture_gles_ext_autogen.cpp": "db8c61a153f0c6c0d5fff7fc8847e834", "src/libANGLE/capture/capture_gles_ext_autogen.h": - "b5e2424ccd014b8890ce38f4e90033ce", + "74e4ae91b61997799e058c6caeeb3844", "src/libANGLE/validationCL_autogen.h": "0022d0cdb6a9e2ef4a59b71164f62333", "src/libANGLE/validationEGL_autogen.h": @@ -98,7 +98,7 @@ "src/libANGLE/validationES3_autogen.h": "ffffaca63434b2b419614ddb25a57149", "src/libANGLE/validationESEXT_autogen.h": - "97074a6a51c02855649f64088038218f", + "4454264335cc02b22121fceac64f32bf", "src/libANGLE/validationGL1_autogen.h": "a247dddc40418180d4b2dbefeb75f233", "src/libANGLE/validationGL2_autogen.h": @@ -168,17 +168,17 @@ "src/libGLESv2/entry_points_gles_3_2_autogen.h": "647f932a299cdb4726b60bbba059f0d2", "src/libGLESv2/entry_points_gles_ext_autogen.cpp": - "b7b297aeb8d7bf1821f82cba8ed59837", + "00640741cabec59c6ad5c386709602e5", "src/libGLESv2/entry_points_gles_ext_autogen.h": - "d92af68d596f38233ad4d405ff768602", + "6d48f054dedba824cfac584dc3114f3b", "src/libGLESv2/libGLESv2_autogen.cpp": - "4c9709f0941129ab32f756982857eb18", + "0ec612866b9dd08c647d09e010c7a3ff", "src/libGLESv2/libGLESv2_autogen.def": - "5570b88cba60a26c3501b2c98166663d", + "c9776bbf2c2a34a1c78a74cd3c7a9649", "src/libGLESv2/libGLESv2_no_capture_autogen.def": - "faf99ff497aba83ea9918d0edc167ddc", + "fb875aa3be2b31f61dfc3add1f3be788", "src/libGLESv2/libGLESv2_with_capture_autogen.def": - "d340f7f78f7f87d1b9de00664e52b7ca", + "f4162fdbcf74a24909abb10f8be4d242", "src/libOpenCL/libOpenCL_autogen.cpp": "10849978c910dc1af5dd4f0c815d1581", "third_party/EGL-Registry/src/api/egl.xml": diff --git a/scripts/code_generation_hashes/GLenum_value_to_string_map.json b/scripts/code_generation_hashes/GLenum_value_to_string_map.json index a14ce3edb..8322764d0 100644 --- a/scripts/code_generation_hashes/GLenum_value_to_string_map.json +++ b/scripts/code_generation_hashes/GLenum_value_to_string_map.json @@ -2,11 +2,11 @@ "scripts/gen_gl_enum_utils.py": "3ec60ab12923f4825b57fe183f2152b2", "scripts/gl_angle_ext.xml": - "796894fd74d141b88000669104a663ea", + "56be6b22acdf4e24ad2721965c14e264", "scripts/registry_xml.py": - "8dc1bcf2e8324094c19c41613897b212", + "2b9d83efcf1941169b6c043e501b9b05", "src/common/gl_enum_utils_autogen.cpp": - "9b038ad3f6e389bc42aeeeb2c0518732", + "a8f045264b09660f02b23bdabc82448a", "src/common/gl_enum_utils_autogen.h": "85dea9edf87ad08c322868823e61a40c", "third_party/OpenGL-Registry/src/xml/gl.xml": diff --git a/scripts/code_generation_hashes/interpreter_utils.json b/scripts/code_generation_hashes/interpreter_utils.json index b4036eeb6..7db9dbc57 100644 --- a/scripts/code_generation_hashes/interpreter_utils.json +++ b/scripts/code_generation_hashes/interpreter_utils.json @@ -4,9 +4,9 @@ "scripts/gen_interpreter_utils.py": "10ba16ee78604763fc883525dd275de8", "scripts/gl_angle_ext.xml": - "796894fd74d141b88000669104a663ea", + "56be6b22acdf4e24ad2721965c14e264", "scripts/registry_xml.py": - "8dc1bcf2e8324094c19c41613897b212", + "2b9d83efcf1941169b6c043e501b9b05", "third_party/EGL-Registry/src/api/egl.xml": "2056d54ea07156f1988ca1366bdee21a", "third_party/OpenCL-Docs/src/xml/cl.xml": diff --git a/scripts/code_generation_hashes/proc_table.json b/scripts/code_generation_hashes/proc_table.json index e11384dd7..be40452a2 100644 --- a/scripts/code_generation_hashes/proc_table.json +++ b/scripts/code_generation_hashes/proc_table.json @@ -4,9 +4,9 @@ "scripts/gen_proc_table.py": "073351265b085943f816498cecaa281c", "scripts/gl_angle_ext.xml": - "796894fd74d141b88000669104a663ea", + "56be6b22acdf4e24ad2721965c14e264", "scripts/registry_xml.py": - "8dc1bcf2e8324094c19c41613897b212", + "2b9d83efcf1941169b6c043e501b9b05", "src/libGLESv2/proc_table_cl_autogen.cpp": "ed003b0f041aaaa35b67d3fe07e61f91", "src/libGLESv2/proc_table_egl_autogen.cpp": diff --git a/scripts/gl_angle_ext.xml b/scripts/gl_angle_ext.xml index b021e5549..b5eef3e7c 100644 --- a/scripts/gl_angle_ext.xml +++ b/scripts/gl_angle_ext.xml @@ -1200,7 +1200,12 @@ - + + + + + + @@ -1355,6 +1360,10 @@ + + + + diff --git a/scripts/registry_xml.py b/scripts/registry_xml.py index 87b125b3e..d7d49a79e 100644 --- a/scripts/registry_xml.py +++ b/scripts/registry_xml.py @@ -62,6 +62,7 @@ angle_requestable_extensions = [ "GL_ANGLE_multiview_multisample", "GL_ANGLE_provoking_vertex", "GL_ANGLE_read_only_depth_stencil_feedback_loops", + "GL_ANGLE_renderability_validation", "GL_ANGLE_robust_fragment_shader_output", "GL_ANGLE_semaphore_fuchsia", "GL_ANGLE_shader_pixel_local_storage", diff --git a/src/common/gl_enum_utils_autogen.cpp b/src/common/gl_enum_utils_autogen.cpp index 51371b2e3..e698c8a7d 100644 --- a/src/common/gl_enum_utils_autogen.cpp +++ b/src/common/gl_enum_utils_autogen.cpp @@ -2760,6 +2760,8 @@ const char *GLenumToString(GLESEnum enumGroup, unsigned int value) return "GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE"; case 0x96EE: return "GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE"; + case 0x9EA0: + return "GL_RENDERABILITY_VALIDATION_ANGLE"; case 0xFFFFFFFF: return "GL_INVALID_INDEX"; default: @@ -7453,6 +7455,8 @@ const char *GLenumToString(GLESEnum enumGroup, unsigned int value) return "GL_DEPTH_STENCIL_TEXTURE_MODE"; case 0x9580: return "GL_TEXTURE_TILING_EXT"; + case 0x9EA0: + return "GL_RENDERABILITY_VALIDATION_ANGLE"; default: return UnknownEnumToString(value); } @@ -22918,6 +22922,7 @@ static StringEnumEntry g_stringEnumTable[] = { {"GL_RELATIVE_VERTICAL_LINE_TO_NV", 0x0009}, {"GL_RELEASED_APPLE", 0x8A19}, {"GL_RENDER", 0x1C00}, + {"GL_RENDERABILITY_VALIDATION_ANGLE", 0x9EA0}, {"GL_RENDERBUFFER", 0x8D41}, {"GL_RENDERBUFFER_ALPHA_SIZE", 0x8D53}, {"GL_RENDERBUFFER_ALPHA_SIZE_EXT", 0x8D53}, diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp index c73b4c786..e2343f480 100644 --- a/src/libANGLE/Context.cpp +++ b/src/libANGLE/Context.cpp @@ -3806,6 +3806,12 @@ Extensions Context::generateSupportedExtensions() const supportedExtensions.colorBufferFloatRgbaCHROMIUM = false; } + if (getClientVersion() >= ES_3_0) + { + // Enable this extension for GLES3+. + supportedExtensions.renderabilityValidationANGLE = true; + } + if (getFrontendFeatures().disableDrawBuffersIndexed.enabled) { supportedExtensions.drawBuffersIndexedEXT = false; diff --git a/src/libANGLE/Context_gles_ext_autogen.h b/src/libANGLE/Context_gles_ext_autogen.h index 53c347886..3affdd8b1 100644 --- a/src/libANGLE/Context_gles_ext_autogen.h +++ b/src/libANGLE/Context_gles_ext_autogen.h @@ -426,6 +426,7 @@ void provokingVertex(ProvokingVertexConvention provokeModePacked); \ /* GL_ANGLE_read_only_depth_stencil_feedback_loops */ \ /* GL_ANGLE_relaxed_vertex_attribute_type */ \ + /* GL_ANGLE_renderability_validation */ \ /* GL_ANGLE_request_extension */ \ void requestExtension(const GLchar *name); \ void disableExtension(const GLchar *name); \ diff --git a/src/libANGLE/Texture.cpp b/src/libANGLE/Texture.cpp index d79bef289..30d161d03 100644 --- a/src/libANGLE/Texture.cpp +++ b/src/libANGLE/Texture.cpp @@ -16,6 +16,7 @@ #include "libANGLE/State.h" #include "libANGLE/Surface.h" #include "libANGLE/formatutils.h" +#include "libANGLE/renderer/ContextImpl.h" #include "libANGLE/renderer/GLImplFactory.h" #include "libANGLE/renderer/TextureImpl.h" @@ -129,6 +130,7 @@ TextureState::TextureState(TextureType type) mImmutableLevels(0), mUsage(GL_NONE), mHasProtectedContent(false), + mRenderabilityValidation(true), mImageDescs((IMPLEMENTATION_MAX_TEXTURE_LEVELS + 1) * (type == TextureType::CubeMap ? 6 : 1)), mCropRect(0, 0, 0, 0), mGenerateMipmapHint(GL_FALSE), @@ -1103,6 +1105,12 @@ bool Texture::hasProtectedContent() const return mState.mHasProtectedContent; } +void Texture::setRenderabilityValidation(Context *context, bool renderabilityValidation) +{ + mState.mRenderabilityValidation = renderabilityValidation; + signalDirtyState(DIRTY_BIT_RENDERABILITY_VALIDATION_ANGLE); +} + const TextureState &Texture::getTextureState() const { return mState; @@ -2013,6 +2021,19 @@ bool Texture::isRenderable(const Context *context, return true; } + // Skip the renderability checks if it is set via glTexParameteri and current + // context is less than GLES3. Note that we should not skip the check if the + // texture is not renderable at all. Otherwise we would end up rendering to + // textures like compressed textures that are not really renderable. + if (context->getImplementation() + ->getNativeTextureCaps() + .get(getAttachmentFormat(binding, imageIndex).info->sizedInternalFormat) + .textureAttachment && + !mState.renderabilityValidation() && context->getClientMajorVersion() < 3) + { + return true; + } + return getAttachmentFormat(binding, imageIndex) .info->textureAttachmentSupport(context->getClientVersion(), context->getExtensions()); } diff --git a/src/libANGLE/Texture.h b/src/libANGLE/Texture.h index 2a2a57350..d29b24ab9 100644 --- a/src/libANGLE/Texture.h +++ b/src/libANGLE/Texture.h @@ -144,6 +144,7 @@ class TextureState final : private angle::NonCopyable const SamplerState &getSamplerState() const { return mSamplerState; } GLenum getUsage() const { return mUsage; } bool hasProtectedContent() const { return mHasProtectedContent; } + bool renderabilityValidation() const { return mRenderabilityValidation; } GLenum getDepthStencilTextureMode() const { return mDepthStencilTextureMode; } bool hasBeenBoundAsImage() const { return mHasBeenBoundAsImage; } @@ -243,6 +244,8 @@ class TextureState final : private angle::NonCopyable // GL_EXT_protected_textures bool mHasProtectedContent; + bool mRenderabilityValidation; + std::vector mImageDescs; // GLES1 emulation: Texture crop rectangle @@ -351,6 +354,8 @@ class Texture final : public RefCountObject, void setProtectedContent(Context *context, bool hasProtectedContent); bool hasProtectedContent() const override; + void setRenderabilityValidation(Context *context, bool renderabilityValidation); + const TextureState &getState() const { return mState; } void setBorderColor(const Context *context, const ColorGeneric &color); @@ -634,6 +639,7 @@ class Texture final : public RefCountObject, DIRTY_BIT_BASE_LEVEL, DIRTY_BIT_MAX_LEVEL, DIRTY_BIT_DEPTH_STENCIL_TEXTURE_MODE, + DIRTY_BIT_RENDERABILITY_VALIDATION_ANGLE, // Image state DIRTY_BIT_BOUND_AS_IMAGE, diff --git a/src/libANGLE/capture/capture_gles_ext_autogen.h b/src/libANGLE/capture/capture_gles_ext_autogen.h index 4468aa404..deac5e27c 100644 --- a/src/libANGLE/capture/capture_gles_ext_autogen.h +++ b/src/libANGLE/capture/capture_gles_ext_autogen.h @@ -337,6 +337,8 @@ angle::CallCapture CaptureProvokingVertexANGLE(const State &glState, bool isCallValid, ProvokingVertexConvention provokeModePacked); +// GL_ANGLE_renderability_validation + // GL_ANGLE_request_extension angle::CallCapture CaptureRequestExtensionANGLE(const State &glState, bool isCallValid, diff --git a/src/libANGLE/gles_extensions_autogen.cpp b/src/libANGLE/gles_extensions_autogen.cpp index 746ed9e9b..70204fc1c 100644 --- a/src/libANGLE/gles_extensions_autogen.cpp +++ b/src/libANGLE/gles_extensions_autogen.cpp @@ -240,6 +240,7 @@ const ExtensionInfoMap &GetExtensionInfoMap() map["GL_ANGLE_provoking_vertex"] = enableableExtension(&Extensions::provokingVertexANGLE); map["GL_ANGLE_read_only_depth_stencil_feedback_loops"] = enableableExtension(&Extensions::readOnlyDepthStencilFeedbackLoopsANGLE); map["GL_ANGLE_relaxed_vertex_attribute_type"] = esOnlyExtension(&Extensions::relaxedVertexAttributeTypeANGLE); + map["GL_ANGLE_renderability_validation"] = enableableExtension(&Extensions::renderabilityValidationANGLE); map["GL_ANGLE_request_extension"] = esOnlyExtension(&Extensions::requestExtensionANGLE); map["GL_ANGLE_rgbx_internal_format"] = esOnlyExtension(&Extensions::rgbxInternalFormatANGLE); map["GL_ANGLE_robust_client_memory"] = esOnlyExtension(&Extensions::robustClientMemoryANGLE); diff --git a/src/libANGLE/gles_extensions_autogen.h b/src/libANGLE/gles_extensions_autogen.h index 3f5163057..e6bca42df 100644 --- a/src/libANGLE/gles_extensions_autogen.h +++ b/src/libANGLE/gles_extensions_autogen.h @@ -676,6 +676,9 @@ struct Extensions // GL_ANGLE_relaxed_vertex_attribute_type bool relaxedVertexAttributeTypeANGLE = false; + // GL_ANGLE_renderability_validation + bool renderabilityValidationANGLE = false; + // GL_ANGLE_request_extension bool requestExtensionANGLE = false; diff --git a/src/libANGLE/queryutils.cpp b/src/libANGLE/queryutils.cpp index 079e960c1..cc8f4430e 100644 --- a/src/libANGLE/queryutils.cpp +++ b/src/libANGLE/queryutils.cpp @@ -485,6 +485,9 @@ void SetTexParameterBase(Context *context, Texture *texture, GLenum pname, const case GL_TEXTURE_PROTECTED_EXT: texture->setProtectedContent(context, (params[0] == GL_TRUE)); break; + case GL_RENDERABILITY_VALIDATION_ANGLE: + texture->setRenderabilityValidation(context, (params[0] == GL_TRUE)); + break; default: UNREACHABLE(); break; @@ -3075,6 +3078,7 @@ unsigned int GetTexParameterCount(GLenum pname) case GL_DEPTH_STENCIL_TEXTURE_MODE: case GL_TEXTURE_NATIVE_ID_ANGLE: case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES: + case GL_RENDERABILITY_VALIDATION_ANGLE: return 1; default: return 0; diff --git a/src/libANGLE/renderer/gl/TextureGL.cpp b/src/libANGLE/renderer/gl/TextureGL.cpp index 09b583287..b06553645 100644 --- a/src/libANGLE/renderer/gl/TextureGL.cpp +++ b/src/libANGLE/renderer/gl/TextureGL.cpp @@ -1701,6 +1701,7 @@ angle::Result TextureGL::syncState(const gl::Context *context, break; } case gl::Texture::DIRTY_BIT_USAGE: + case gl::Texture::DIRTY_BIT_RENDERABILITY_VALIDATION_ANGLE: break; case gl::Texture::DIRTY_BIT_IMPLEMENTATION: diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp index 20f1e1333..a6cf6c276 100644 --- a/src/libANGLE/validationES.cpp +++ b/src/libANGLE/validationES.cpp @@ -7927,6 +7927,14 @@ bool ValidateTexParameterBase(const Context *context, } break; + case GL_RENDERABILITY_VALIDATION_ANGLE: + if (!context->getExtensions().renderabilityValidationANGLE) + { + context->validationErrorF(entryPoint, GL_INVALID_ENUM, kEnumNotSupported, pname); + return false; + } + break; + default: context->validationErrorF(entryPoint, GL_INVALID_ENUM, kEnumNotSupported, pname); return false; diff --git a/src/libANGLE/validationESEXT_autogen.h b/src/libANGLE/validationESEXT_autogen.h index 91114f924..99fe078fc 100644 --- a/src/libANGLE/validationESEXT_autogen.h +++ b/src/libANGLE/validationESEXT_autogen.h @@ -336,6 +336,8 @@ bool ValidateProvokingVertexANGLE(const Context *context, angle::EntryPoint entryPoint, ProvokingVertexConvention provokeModePacked); +// GL_ANGLE_renderability_validation + // GL_ANGLE_request_extension bool ValidateRequestExtensionANGLE(const Context *context, angle::EntryPoint entryPoint, diff --git a/src/libGLESv2/entry_points_gles_ext_autogen.cpp b/src/libGLESv2/entry_points_gles_ext_autogen.cpp index b256f3d87..485ed2600 100644 --- a/src/libGLESv2/entry_points_gles_ext_autogen.cpp +++ b/src/libGLESv2/entry_points_gles_ext_autogen.cpp @@ -1430,6 +1430,8 @@ void GL_APIENTRY GL_ProvokingVertexANGLE(GLenum provokeMode) } } +// GL_ANGLE_renderability_validation + // GL_ANGLE_request_extension void GL_APIENTRY GL_RequestExtensionANGLE(const GLchar *name) { diff --git a/src/libGLESv2/entry_points_gles_ext_autogen.h b/src/libGLESv2/entry_points_gles_ext_autogen.h index 141169f14..1e62272e4 100644 --- a/src/libGLESv2/entry_points_gles_ext_autogen.h +++ b/src/libGLESv2/entry_points_gles_ext_autogen.h @@ -261,6 +261,8 @@ ANGLE_EXPORT void GL_APIENTRY GL_MultiDrawElementsInstancedANGLE(GLenum mode, // GL_ANGLE_provoking_vertex ANGLE_EXPORT void GL_APIENTRY GL_ProvokingVertexANGLE(GLenum provokeMode); +// GL_ANGLE_renderability_validation + // GL_ANGLE_request_extension ANGLE_EXPORT void GL_APIENTRY GL_RequestExtensionANGLE(const GLchar *name); ANGLE_EXPORT void GL_APIENTRY GL_DisableExtensionANGLE(const GLchar *name); diff --git a/src/libGLESv2/libGLESv2_autogen.cpp b/src/libGLESv2/libGLESv2_autogen.cpp index 12bbf5cdd..f2046d461 100644 --- a/src/libGLESv2/libGLESv2_autogen.cpp +++ b/src/libGLESv2/libGLESv2_autogen.cpp @@ -3109,6 +3109,8 @@ void GL_APIENTRY glProvokingVertexANGLE(GLenum provokeMode) return GL_ProvokingVertexANGLE(provokeMode); } +// GL_ANGLE_renderability_validation + // GL_ANGLE_request_extension void GL_APIENTRY glRequestExtensionANGLE(const GLchar *name) { diff --git a/src/libGLESv2/libGLESv2_autogen.def b/src/libGLESv2/libGLESv2_autogen.def index 7f4afe2be..e1d74242e 100644 --- a/src/libGLESv2/libGLESv2_autogen.def +++ b/src/libGLESv2/libGLESv2_autogen.def @@ -534,6 +534,8 @@ EXPORTS ; GL_ANGLE_provoking_vertex glProvokingVertexANGLE + ; GL_ANGLE_renderability_validation + ; GL_ANGLE_request_extension glDisableExtensionANGLE glRequestExtensionANGLE diff --git a/src/libGLESv2/libGLESv2_no_capture_autogen.def b/src/libGLESv2/libGLESv2_no_capture_autogen.def index 40cb88321..51460c6dc 100644 --- a/src/libGLESv2/libGLESv2_no_capture_autogen.def +++ b/src/libGLESv2/libGLESv2_no_capture_autogen.def @@ -534,6 +534,8 @@ EXPORTS ; GL_ANGLE_provoking_vertex glProvokingVertexANGLE + ; GL_ANGLE_renderability_validation + ; GL_ANGLE_request_extension glDisableExtensionANGLE glRequestExtensionANGLE diff --git a/src/libGLESv2/libGLESv2_vulkan_secondaries_autogen.def b/src/libGLESv2/libGLESv2_vulkan_secondaries_autogen.def index ba748414f..e01f23bb7 100644 --- a/src/libGLESv2/libGLESv2_vulkan_secondaries_autogen.def +++ b/src/libGLESv2/libGLESv2_vulkan_secondaries_autogen.def @@ -534,6 +534,8 @@ EXPORTS ; GL_ANGLE_provoking_vertex glProvokingVertexANGLE + ; GL_ANGLE_renderability_validation + ; GL_ANGLE_request_extension glDisableExtensionANGLE glRequestExtensionANGLE diff --git a/src/libGLESv2/libGLESv2_with_capture_autogen.def b/src/libGLESv2/libGLESv2_with_capture_autogen.def index 1d2c78de8..935704537 100644 --- a/src/libGLESv2/libGLESv2_with_capture_autogen.def +++ b/src/libGLESv2/libGLESv2_with_capture_autogen.def @@ -534,6 +534,8 @@ EXPORTS ; GL_ANGLE_provoking_vertex glProvokingVertexANGLE + ; GL_ANGLE_renderability_validation + ; GL_ANGLE_request_extension glDisableExtensionANGLE glRequestExtensionANGLE diff --git a/src/libGLESv2/opengl32_autogen.def b/src/libGLESv2/opengl32_autogen.def index d4137557d..2cf8fd84e 100644 --- a/src/libGLESv2/opengl32_autogen.def +++ b/src/libGLESv2/opengl32_autogen.def @@ -534,6 +534,8 @@ EXPORTS ; GL_ANGLE_provoking_vertex glProvokingVertexANGLE + ; GL_ANGLE_renderability_validation + ; GL_ANGLE_request_extension glDisableExtensionANGLE glRequestExtensionANGLE diff --git a/src/libGLESv2/opengl32_with_wgl_autogen.def b/src/libGLESv2/opengl32_with_wgl_autogen.def index 6ce33cd6d..97a9f9ae9 100644 --- a/src/libGLESv2/opengl32_with_wgl_autogen.def +++ b/src/libGLESv2/opengl32_with_wgl_autogen.def @@ -534,6 +534,8 @@ EXPORTS ; GL_ANGLE_provoking_vertex glProvokingVertexANGLE + ; GL_ANGLE_renderability_validation + ; GL_ANGLE_request_extension glDisableExtensionANGLE glRequestExtensionANGLE