src/libANGLE/validationES2.cpp


Log

Author Commit Date CI Message
Tim Van Patten ef65edf2 2021-11-22T14:23:35 Add extension: ANGLE_rgbx_internal_format Add the extension ANGLE_rgbx_internal_format, which exposes the ANGLE internal format GL_RGBX8_ANGLE. The format GL_RGBX8_ANGLE enables emulating RGB8 formats with RGBA8 within ANGLE. This also renames the format GL_RGBX8_ANGLEX to GL_RGBX8_ANGLE, since it's being exposed. Bug: angleproject:6690 Test: Texture2DTestES3.TextureRGBXImplicitAlpha1 Change-Id: I5548a3578a14e2f2a4006bbf59983b01f694b7f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3296625 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang f045fe07 2021-11-04T10:44:20 Fix MSRTT unsized texture formats querying supported samples. The texture format information in gl::Context is sized formats only. When MSRTT textures are used, they would query the potentially unsized format for maximum supported samples. This would return 0 and cause an incomplete framebuffer when the sample count missmatched with other attachments. Bug: chromium:1238327 Change-Id: I06514b1b9badefa81bba3b7ad9ba5db932b4c12b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3260555 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Amirali Abdolrashidi 6a749cda 2021-10-29T12:45:53 Complete validation of glGetAttribLocation() -Added more checks to glGetAttribLocation() similar to glBindAttribLocation(). -Added the corresponding unit tests. Using a reserved prefix in glGetAttribLocation() should return -1. Bug: angleproject:2419 Change-Id: I3f691f344c7003f855e53d35cd5f9578069acdae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3252643 Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
YuxinHu 2aa5286d 2021-10-12T17:05:48 Add Entry Point name to validation errors Add gl/gles entry point names to validation error messages some special cases: 1. Debug::insertPerfWarning() is invoked from multiple places, such as TextureVK, ContextVK, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 2.ErrorSet::hangleError() is invoked from multiple Context*.cpp files, adding an extra entryPoint function parameter in these files will need extra investigations. I am passing the entryPoint name GLInvalid as a temp workaround. 3. Debug::insertMessage(), Debug::popGroup(), Debug::pushGroup() can be invoked from more than one GL entry points, e.g. Debug::pushGroup() can be invoked from either GL_APIENTRY GL_PushDebugGroup() or GL_APIENTRY GL_PushDebugGroupKHR() through context->pushDebugGroup() call. Right now the same entry point name glPushDebugGroup will be printed out in the error message for both cases. However, we should be able to tell the actual entry point by checking which version: KHR version or core version the application uses, and this helps avoid the confusion. For now we will let the same entry point name getting printed for both cases. Bug: angleproject:6523 Change-Id: I64a5463d9168d8444d376d1f428c3b3d894f2ea9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3215063 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Alexis Hetu c0aa6108 2021-09-17T16:22:55 Add new GL_RGBX8_ANGLEX format Currently, IOSurface objects using {GL_RGB, GL_UNSIGNED_BYTE} are natively represented with GL_BGRX8_ANGLEX, which we use instead of other RGBA formats in order to avoid issues when a canvas uses 'no alpha': https://source.chromium.org/chromium/chromium/src/+/main:third_party/swiftshader/third_party/angle/angle/src/libANGLE/renderer/vulkan/mac/IOSurfaceSurfaceVkMac.mm;l=44 This unfortunately causes some other issues because of the implicit RGB <-> BGR conversion like type mismatches in subresource updates. This CL adds a new type, RGBX8, which will be usable by IOSurface objects and which behaves exactly like the BGRX8 format with the B and R channels flipped. Bug: chromium:1209250 Change-Id: I345eadc8addd05a0964cae30d89c20005479e37b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3188910 Commit-Queue: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 49ac15a5 2021-09-20T11:29:01 Optimize VAO bindings. This CL makes the XFB binding tracking WebGL-only. That will speed up VAO binding changes in non-WebGL considerably. Also has a few inline micro-optimizations that may not have a large effect. Bug: angleproject:6371 Change-Id: Ib0a26a3b956dcd6ff78626e5cd6514b46270d882 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3170116 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e84b0154 2021-09-13T16:04:20 Update extension boolean names. This is in preparation for auto-gen, which uses a simple naming scheme. This fixes the bool names to be totally consistent with the extension names. Bug: angleproject:6379 Change-Id: Ia212449be04accb0e4f006b55b1813ab4481fa0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3157417 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1ca1589f 2021-09-13T10:56:58 Give GLES extension bools a vendor suffix. This is in preparation for auto-generation which will give all of these bools suffixes. Bug: angleproject:6379 Change-Id: I7e3f6c9b644c41a2165e6bf7b62d661fd352a250 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3158503 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9ada074a 2021-09-10T16:18:19 Move capability values from gl::Extensions to gl::Caps. Several extensions stored extra information in the wrong structure. Move them to the Caps structure in prepraration for auto-generating the Extensions struct. Bug: angleproject:6379 Change-Id: If5643b72039e299cb0f7c49591d13b3c7cd8a36c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3158403 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Alexey Knyazev 82423ad1 2021-08-27T11:48:22 Cleanup ValidateES2TexImageParametersBase; update tests Non-compressed TexImage entry points consistently reject compressed format enums. They no longer have a special case for four S3TC formats. Expanded coverage of CompressedTextureFormatsTest. Bug: angleproject:5731, angleproject:6280 Change-Id: I058a1e745a0d5257bd5e0333d71b238b0a2e7b96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3123414 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Alexey Knyazev 77151a6c 2021-08-26T19:32:35 Cleanup ValidateES2CopyTexImageParameters; add test Compressed and depth formats are rejected earlier with ValidateCopyTexImageParametersBase. Added a new Texture2DTest.CopyAfterCompressed test to ensure that validation code for non-subImage case does not fail new assertions. Bug: angleproject:5731, chromium:1216276 Change-Id: I11d2ac3389418731b6cc6e2bd5c9655b1590b02d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3122156 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev a5e95c07 2021-08-26T02:40:10 Adjust TexStorage2DEXT validation; update tests - Use common texture format support function. - Enforce size restrictions for compressed formats. - Expand CompressedTexture* and WebGLCompatibilityTest.CompressedTexImage* tests. - Adjust GL_DEPTH_COMPONENT16 support condition on ES 2.0. - Adjust GL_DEPTH24_STENCIL8 support condition on ES 2.0. - Adjust GL_RGB10_A2 support condition on ES 2.0; adjust VulkanExternalImageTest.TextureFormatCompatChromium* tests. - Do not use integer formats in TextureRectangleTest.TexStorage2D. Bug: angleproject:5731, angleproject:6230 Change-Id: I2f288f459b511cc004601238df717aa78433be7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3118553 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cody Northrop 0bd5cac2 2021-08-06T17:56:58 Allow BufferSubData with persistently mapped buffers Per the GL_EXT_buffer_storage extension: What commands are affected by the relaxed errors for persistently mapped buffers? RESOLVED: In GL 4.5 the following commands have the relaxed language BufferSubData, ClearBufferSubData, CopyBufferSubData, GetBufferSubData and InvalidateBufferSubData. Of these commands the only ones that apply to ES 3.1 are BufferSubData and CopyBufferSubData. However, if additional extensions add any of the other commands and EXT_buffer_storage is supported, they would have the same behavior in ES. Therefore we need to allow BufferSubData and CopyBufferSubData on persistently mapped buffers. Current we fail these scenarios in validation. This was detected when running Fortnite on Android using the game's GLES backend. Also added two tests: - StorageCopyBufferSubDataMapped to recreate the exact Fortnite scenario using glCopyBufferSubData. - StorageBufferSubDataMapped is a contrived case to cover glBufferSubData Test: BufferStorageTestES3.StorageCopyBufferSubDataMapped/* Test: BufferStorageTestES3.StorageBufferSubDataMapped/* Bug: b/180418810 Bug: angleproject:5658 Change-Id: Ib678e84f367934656ec10f0f4ad0d35ac687f0b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3078316 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Peter Kasting 1bffabe8 2021-06-29T18:13:39 Fix -Wunreachable-code-aggressive. Bug: chromium:1066980 Change-Id: I1fa08a40dbf223d60a10681af33ca8a29b12bf8b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2991094 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev dbfc119a 2021-06-22T08:56:33 Fix overflow in gl::ValidateES2TexImageParametersBase Bug: chromium:1222516 Change-Id: I532dc6e1c80c442af2c35d1facc262c48222def3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2978251 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Brandon Schade 69f2fb00 2021-03-08T10:49:31 Vulkan: Expose OES_geometry_shader extension Modify the symbol table generation script to accept a list of supported extensions. This allows for the EXT and OES versions of the geometry shader extension to be exposed. Test: angle_deqp_khr_gles31_tests --deqp-case=*geometry_shader* Bug: angleproject:3571 Change-Id: Ia7127a03dbd3fce78957f0505d3ce0c9bab6cb15 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2765011 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 046f70a3 2021-06-04T15:40:16 Revert "Remove unused code from ValidateES2CopyTexImageParameters" This reverts commit fcd7affb6bfd9e17d6c12e836158f8f0fc634b14. Reason for revert: Differences in format checks make the validation logic trip a newly added ASSERT. Bug: chromium:1216276 Original change's description: > Remove unused code from ValidateES2CopyTexImageParameters > > Compressed formats are rejected earlier with > ValidateCopyTexImageParametersBase > > Bug: angleproject:5731 > Change-Id: I7809140af84f2c565008e211adf0f998a0e57e91 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2741580 > Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:5731 Change-Id: I7734d9bce538e5679c8ee672f547941f5f693261 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2940904 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Elliott af58be7e 2021-04-08T17:07:53 Add TextureType::Buffer to RecordBindTextureTypeError() Bug: b/184767884 Change-Id: I67098de503748c86f2b957db76539e73c87bd179 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2818818 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Jamie Madill 9b0911a0 2021-04-02T12:46:37 Add GL_ANGLE_get_serialized_context_string. This will provide a front-door entry point where we can get a serialized string representing the context state. Previously we would have to call ANGLE internal directly. This will enable a refactor of the replays to work more like standalone plugin libraries. Bug: angleproject:5811 Change-Id: I5a97d7aa3cd70c49199264c2eb7ca953943ac3c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2803391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Tim Van Patten ae937aae 2021-03-19T20:10:42 Detach separable shaders This effectively reverts the following CL: Vulkan: Don't detach separable shaders in Program::detachShader() https://chromium-review.googlesource.com/c/angle/angle/+/2084399 Bug: angleproject:3570 Bug: b/182409935 Test: ProgramPipelineTest31.DetachAndModifyShader Change-Id: Id69f732d1d4f3eea70b2de8c008452878eaf1682 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2776267 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Alexey Knyazev fcd7affb 2021-03-07T17:23:33 Remove unused code from ValidateES2CopyTexImageParameters Compressed formats are rejected earlier with ValidateCopyTexImageParametersBase Bug: angleproject:5731 Change-Id: I7809140af84f2c565008e211adf0f998a0e57e91 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2741580 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kenneth Russell b4fd4628 2021-01-27T15:56:58 Revise WebGL's shaderSource validation. Per discussion in the WebGL working group, shaderSource no longer generates INVALID_VALUE for sources containing characters outside the ESSL character set. Compilation and/or linking is still specified to fail when illegal constructs are used. With this change, https://github.com/KhronosGroup/WebGL/pull/3206 passes with the passthrough command decoder. Revise WebGL compatibility tests to follow the new rules. Bug: chromium:1171506 Change-Id: Id132e0b64fa94b373f2732acf2a7071f38f0d4ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2654264 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 6cfbe252 2021-01-27T13:42:55 Fix geometry/tessellation checks to account for ES3.2 Bug: angleproject:5557 Bug: angleproject:5579 Change-Id: Iae54940cefb5ba516dc173413b35b646e1968ba6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2653906 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill b912eec5 2020-11-27T11:08:41 Vulkan: Support GL_EXT_tessellation_shader. Shader translator changes done in http://crrev.com/c/2633936 Adds a new DIRTY_BIT_PATCH_VERTICES state to Context. Supportes state query and transform feedback. 4 test suppressions remain as follow-up fixes. Adds a new varying packing mode for a simple Vulkan rule set. Based on work by Mohan Maiya (m.maiya@samsung.com). Test: dEQP-GLES31.functional.tessellation.* Bug: angleproject:3572 Change-Id: I4cad2cca30adb754fd12c83027673906541f566a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568234 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya cea86910 2021-01-14T08:13:00 Vulkan: Support EXT_clip_cull_distance extension EXT_clip_cull_distance extension is supported except for some features related to EXT_tessellation_shader and EXT_geometry_shader. Also added a few compiler tests to validate the transformation from ESSL to GLSL for Vulkan backend. Bug: angleproject:5458 Tests: angle_end2end_tests --gtest_filter=Clip*DistanceTest* angle_unittests --gtest_filter=*Clip*Distance* Change-Id: Ie74e6b2b55112ad92ad111191d629b63506032ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2585987 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Shahbaz Youssefi 29eeb610 2021-01-12T11:59:48 Vulkan: Fix validation of MSRTT framebuffer attachment The attachment was being accessed before being validated. A fuzzer test was giving this function texture ID -1. Bug: chromium:1146753 Change-Id: Ic48f5fd2eed4252e90be5d63fd698b38bd3ef85f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2623814 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis fb35201a 2020-12-22T13:14:41 GL: Expose NV_framebuffer_blit for ES2 contexts when available ANGLE_framebuffer_blit is already exposed but has restrictions on scaling/flipping and mismatched color buffer formats. When NV_framebuffer_blit, EXT_framebuffer_blit, or an ES3 context is available we can expose a less restrictive BlitFramebuffer. Bug: angleproject:5474 Bug: chromium:1157057 Change-Id: I916ee39c8d6120216f91461080eb3ee9ca777e29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601165 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis 88fec1e8 2020-12-23T11:53:55 Code generation for NV_framebuffer_blit Generate the entry points for NV_framebuffer_blit. Bug: angleproject:5474 Bug: chromium:1157057 Change-Id: Iadffa24ce7368d8ab6c4bf9d5b6c016276e762f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2602242 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Mohan Maiya ccd0b7e1 2020-11-30T08:37:04 Add support for OES_framebuffer_object extension Expose OES_framebuffer_object extension for GLES1 contexts. Bug: angleproject:5401 Test: FramebufferObjectTest* Change-Id: I63b504f580cdab4655b4bfbd3438bcd807b422ea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2561795 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 5b419533 2020-11-03T13:33:44 GL: Implement EXT_YUV_target Add test coverage of YUV format sampling as RGB or directly as YUV and rendering as YUV using layout(yuv). Initializing YUV AHardwareBuffers requires Android API 29 so ANGLE must be compiled with: android32_ndk_api_level = 29 android64_ndk_api_level = 29 The following tests can still run with Android API 26 because they don't need to initialize the buffer: ImageTestES3.ClearYUVAHB ImageTestES3.YUVValidation Bug: angleproject:4852 Bug: b/172649538 Change-Id: I4fe9afb2a68fb827dc5a5732b213b5eb60d585ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2517562 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 57f86257 2020-10-08T12:38:50 Support RGB -> BGRX copies in copySubImage. This was showing up in the following test for me on OSX: IOSurfaceClientBufferTest.CopySubImageToBGRX8888IOSurface/ES2_Vulkan_SwiftShader Test: angle_end2end_tests on OSX 10.15 Bug: angleproject:5147 Change-Id: I666dc832e8be33cde1617c849990c6092f4e2240 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462041 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya 9f5eb0b8 2020-10-05T08:18:05 Vulkan: Add OES_sample_shading extension support Support OES_sample_shading extension if the underlying Vulkan ICD supports sampleRateShading. Bug: angleproject:3587 Tests: dEQP-GLES31.functional.sample_shading.* Change-Id: I1b324c1ad3ea3b2157d3cbe0abcdf7085aa4231b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444213 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jeff Vigil 7a92d958 2020-07-21T16:32:49 Implement GL_OES_texture_stencil8 Add extension to Caps and code gen files. Add to Validation of TexImage Add all the autogen for new extension Fix swizzle for stencil only Add LoadFunction Fix formatutils Add validation Test: angle_deqp_egl_tests --deqp-case=GLES31.functional.stencil_texturing.format.stencil_index8_2d Bug: angleproject:3231 Change-Id: Id59c7d183ea1658732887e99637d9c8faab938e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404327 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
James Darpinian 74ed9b65 2020-09-16T16:50:31 Support EXT_color_buffer_half_float on WebGL 2.0 contexts EXT_color_buffer_half_float was recently updated to be valid for WebGL 2 contexts because iOS can't support EXT_color_buffer_float. Bug: angleproject:5038 Change-Id: Ib0d35c6b26a6cd215ff6725e92c47d1efd64e048 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2415187 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Mohan Maiya a2d8bbb5 2020-09-18T18:18:34 Vulkan: Add GL_EXT_buffer_storage extension support Addition of support for immutable storage to buffer objects. Also adds new end2end tests for these usecases * Basic BufferStorage * SubData update * map/unmap buffer Bug: angleproject:5056 Tests: angle_end2end_tests --gtest_filter=BufferStorageTestES3*Vulkan Change-Id: Iba74b372ad033711927b63c6a04cec0eeb4db699 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2419952 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Shahbaz Youssefi 37457d08 2020-09-15T14:38:53 Vulkan: Support MSRTT color renderbuffers Color renderbuffers are similar to multisampled-render-to-texture textures, but much simpler. The same mechanism is used to implement them. Bug: angleproject:4836 Change-Id: I298529c9fd1b03e78b1e37cdbe595e66166ee130 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2412847 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi bedac4f0 2020-08-05T21:57:50 Move EXT_external_objects validation to validationESEXT.cpp Bug: angleproject:4912 Bug: fuchsia:52759 Change-Id: I8883d65ecac763cf46d792cc69bce98dc53121d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2340174 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi fc4bd898 2020-08-03T16:29:06 Vulkan: Support ANGLE_external_objects_flags With this extension, it is possible to import Vulkan images into ANGLE (similar to EXT_external_objects) while specifying the Vulkan create and usage flags used to create that image. This can be used by the application to drop usage flags it does not need to improve performance, or add create flags as it requires. Bug: angleproject:4912 Bug: fuchsia:52759 Change-Id: Ia568973b19670999dd0e69f6ac5548e8ef0c3eec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2335020 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Michael Spang <spang@chromium.org>
Shahbaz Youssefi e4e2a847 2020-08-03T14:09:49 Entry points for ANGLE_external_objects_flags Bug: angleproject:4912 Bug: fuchsia:52759 Change-Id: If339f096a74cc87d16a6494562711d718a7738ea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2335019 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi f776eb9c 2020-08-01T23:45:24 Vulkan: EXT_multisampled_render_to_texture2 support The previous change that implemented EXT_multisampled_render_to_texture already provisioned this extension in the Vulkan backend. This change implements the front-end for this extension and enables it in the Vulkan backend. Bug: angleproject:4836 Change-Id: I7080260972e61727c5716051c236f635668cb67b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2330510 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi 9b1cab0d 2020-07-31T11:40:05 Fix validation of glFramebufferTexture2DMultisampleEXT In preparation for GL_EXT_multisampled_render_to_texture2. This makes the validation reuse what's there for glFramebufferTexture2D in addition to what GL_EXT_multisampled_render_to_texture requires. Additionally, it uses packed enums for texture target and id. Bug: angleproject:4836 Change-Id: Ie778c84e1ff5a0cb6615257f2aff9e04395dd5aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2332956 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Antonio Maiorano 4f343f3e 2020-05-13T14:11:51 Reland "Add support for GL_CHROMIUM_texture_filtering" This is a reland of 38780ae3921d2570316119a881adfb9520e7e296 modulo the changes to disable VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT, as this was causing problems. With this landed, the extension will not work on SwiftShader until we find a way to allow this extension through the validation layers. Bug: b/146423360 Bug: b/154620295 Change-Id: Ie09fc507c01a47be3bb227bc78771660170ba5d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2199639 Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tim Van Patten 3b82fdcf 2020-05-12T23:44:07 Revert "Add support for GL_CHROMIUM_texture_filtering" This reverts commit 38780ae3921d2570316119a881adfb9520e7e296. Reason for revert: Breaks SWANGLE-VK: 05-12 23:42:28.612 22836 22861 D libEGL : dlopen_ext from APK (libEGL_angle.so) success at 0x79f4485a10 05-12 23:42:28.617 22836 22861 D libEGL : dlopen_ext from APK (libGLESv1_CM_angle.so) success at 0x79f4485eb0 05-12 23:42:28.619 22836 22861 D libEGL : dlopen_ext from APK (libGLESv2_angle.so) success at 0x79f4485c60 05-12 23:42:28.624 14223 14223 D StatusBar: disable<e i a s b h r c s > disable2<q i n > 05-12 23:42:28.633 14014 14057 V DisplayPowerController: Brightness [0.19986142] reason changing to: 'automatic', previous reason: 'automatic [ dim ]'. 05-12 23:42:28.635 22836 22861 D vulkan : searching for layers in '/data/app/~~0AfWfBsFEO78tqKlnanevg==/org.khronos.gl_cts-NOs3SGclHqlbcqe-08gHrw==/lib/arm64' 05-12 23:42:28.635 22836 22861 D vulkan : searching for layers in '/data/app/~~0AfWfBsFEO78tqKlnanevg==/org.khronos.gl_cts-NOs3SGclHqlbcqe-08gHrw==/base.apk!/lib/arm64-v8a' 05-12 23:42:28.632 22836 22836 W .khronos.gl_cts: type=1400 audit(0.0:218): avc: denied { ptrace } for scontext=u:r:zygote:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=0 b/77925912 app=org.khronos.gl_cts 05-12 23:42:28.636 14014 14034 I EventSequenceValidator: Transition from ACTIVITY_LAUNCHED to ACTIVITY_FINISHED 05-12 23:42:28.637 22836 22861 F SwiftShader: external/swiftshader/src/Vulkan/libVulkan.cpp:425 vkCreateInstance TRACE_ASSERT: pCreateInfo->pNext sType = 1000247000 --------- beginning of crash 05-12 23:42:28.637 22836 22861 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 22861 (.khronos.gl_cts), pid 22836 (.khronos.gl_cts) Original change's description: > Add support for GL_CHROMIUM_texture_filtering > > Chromium enables a custom extension, GL_CHROMIUM_texture_filtering, when > using SwiftShaderGL, to enable high precision filtering. This change > makes it so ANGLE also handles this same extension when using the > SwiftShaderVK backend, by enabling the new > VK_GOOGLE_sampler_filtering_precision custom extension. > > Bug: b/146423360 > Bug: b/154620295 > Change-Id: I69cafc1ccf5970a3d220ac7e13ec3c8fdd4a9643 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2185822 > Commit-Queue: Antonio Maiorano <amaiorano@google.com> > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,amaiorano@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: b/146423360, b/154620295 Change-Id: I803d7a7baac81cf178b59c4bf2789346ec1d3f87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2197168 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Antonio Maiorano 38780ae3 2020-05-06T16:05:02 Add support for GL_CHROMIUM_texture_filtering Chromium enables a custom extension, GL_CHROMIUM_texture_filtering, when using SwiftShaderGL, to enable high precision filtering. This change makes it so ANGLE also handles this same extension when using the SwiftShaderVK backend, by enabling the new VK_GOOGLE_sampler_filtering_precision custom extension. Bug: b/146423360 Bug: b/154620295 Change-Id: I69cafc1ccf5970a3d220ac7e13ec3c8fdd4a9643 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2185822 Commit-Queue: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 57d95828 2020-04-30T17:35:50 Revert "Add type for attribute locations." This reverts commit 9349c14344b2d1fd6bc357063b602bc2626c140f and commit d43b057435e6c9e3194dd20627681ffca0c0808e. It's no longer needed after we bind attribute locations before link. Original CL message: This will allow the capture/replay tool to easily intercept and label attribute locations for remapping. There's some inconsistency in implementation in the GL desktop front- end. This is a quick fix and the full implementation is left for when we implement the full desktop GL API set. Bug: angleproject:4598 Change-Id: Ic510159d4d1982eff41560503cabf983a1be0381 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2174076 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9349c143 2020-04-29T16:36:17 Add type for attribute locations. This will allow the capture/replay tool to easily intercept and label attribute locations for remapping. There's some inconsistency in implementation in the GL desktop front- end. This is a quick fix and the full implementation is left for when we implement the full desktop GL API set. Bug: angleproject:4598 Change-Id: Ibf11bcb8669d27265ea376494a2e3124825cf3be Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171933 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Le Hoang Quyen dadd1986 2020-04-21T01:50:00 Implement GL_APPLE_clip_distance - Built-in variable gl_ClipDistance has been added to compiler. - Desktop GL: gl_ClipDistance is supported since GL 3.0. Enable/Disable each gl_ClipDistances[i] works out of the box via glEnable(). - Vulkan/Metal: Use uniform variable to control writing to each gl_ClipDistance. One bit flag controls one element in the gl_ClipDistance array. The writing to the disabled element in vertex shader will be ignored, and turned into zero assignment instead. - Direct3D/Mobile GL: Not implemented yet. - Added ClipDistanceTest to gl_tests and compiler unittests. - GL_APPLE_clip_distance is a subset of GL_EXT_clip_cull_distance, so GL_EXT_clip_cull_distance could be implemented in future if needed. Bug: angleproject:4452 Change-Id: I571ac8b56826989808a680226a04bec4cf59988e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2084324 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen dc3477f3 2020-03-14T17:22:41 Separate GLES1's state enum switch code from GLES2+ Some enum values such as GLES1's GL_CLIP_PLANE0 and GLES2+'s GL_CLIP_DISTANCE0_EXT have the same value. Thus, the enum switch code has to be separated for GLES1 & GLES2+ Bug: angleproject:4481 Change-Id: I2fcb95f3f75f1fe683a072bee02e797a95686480 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2145284 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Tim Van Patten 405f8e7b 2020-02-24T17:38:10 Vulkan: Support Program Pipeline Objects Add support for PPOs to the Vulkan back end. Bug: angleproject:3570 Change-Id: I5403456929847c185467b008d810f31ecfcb60cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2072652 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Tim Van Patten 4db77367 2020-03-03T12:04:26 Vulkan: Don't detach separable shaders in Program::detachShader() To support Program Pipeline Objects, we need to hold on to the shaders in separable programs, rather than detaching them during glDetachShader()/glCreateShaderProgramv(). This is necessary due to requiring the shader information for validating shader interfaces, varyings, etc. Instead, a new ShaderMap of bools will be stored in ProgramState::mAttachedShadersMarkedForDetach to track when a caller attempts to detach a shader from a separable Program. Later, when a new shader is attached, we will first validate that the old shader is marked to be detached, and if so, release it then. Bug: angleproject:3570 Change-Id: I63fac2e5914c1c1a73f0b37863bac0f185ecb44c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2084399 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Nico Weber dcd98298 2020-04-01T16:58:16 Remove breaks after returns. No behavior change. Bug: chromium:1066980 Change-Id: I26a5c13a730cbc6cde8e888a8a18bd633bb3f748 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2133087 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org>
Alexis Hetu b83b0f5e 2020-01-31T15:09:17 Add support for NV_read_depth, NV_read_stencil and NV_depth_buffer_float2 extensions This cl adds the ability for the ReadPixels function to read other attachments than the color attachment. Checks were added for both depth and stencil attachments. A new test was added (DepthStencilFormatsTest.DepthStencilReadback) to test this new functionality. As the name mentions, it's used to test reading from the depth and stencil attachments using ReadPixels. Bug: angleproject:4295 Change-Id: I6fe9be11f05d6055a5883b4315f870e7c0ac41ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2031702 Commit-Queue: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 74e816bf 2020-03-26T17:40:25 Vulkan: Expose extension for ETC1 usage with subimage updates This CL implements the GL_EXT_compressed_ETC1_RGB8_sub_texture extension, which was added to relax restrictions on using ETC1_RGB8_OES for subimage updates. Test: Temple Run on Android Bug: b:152512564 Change-Id: I78cfd7dfd54fab36dee59a93b3ec3bfce17e73e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2123232 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 13ea5b7f 2020-03-19T12:43:12 Implement gl[Get]MemoryObjectParameterivEXT These functions are required to tell the driver that the memory object is dedicated memory. This is required for AMD drivers on Linux. Bug: chromium:1049218 Change-Id: I17d69cde5e6308791dc90784f4d6e348503a6ed6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2110051 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 07467b4a 2020-03-20T10:40:56 Remove GL_CHROMIUM_path_rendering Bug: chromium:1063193 Bug: angleproject:4270 Change-Id: I35b24b7d8d892181955e49dd2495655bc57cb0df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112275 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Michael Spang c4197713 2019-06-03T19:23:02 Implement glImportMemoryZirconHandle & glImportSemaphoreZirconHandle Implement import of fuchsia external objects passed by zircon handle. This works exactly the same as with file descriptors. Bug: angleproject:3492 Change-Id: I4d46917dfc5902f00c94550158a9f8073097f0a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642334 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill a18f4145 2020-02-19T22:42:12 Trace/Replay: Add uniform location type. This is a large refactor that replaces instances of "GLint location" for uniform locations with "UniformLocation location". This boxed type is similar to the ResourceID types that we use to capture resource IDs more easily. Eventually this will give us a more portable replay. Bug: angleproject:4411 Change-Id: I848e861c3956d95b6b953f57f8b6a2c4a676766f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2066117 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Michael Spang dec00bc8 2019-04-03T15:51:28 Generate entrypoints for Fuchsia external objects extensions Add GL_ANGLE_memory_object_zircon_handle & GL_ANGLE_semaphore_zircon_handle extensions to supported extensions list and re-generate bindings. Bug: angleproject:2475 Change-Id: I464aa402aaac916c1f459930c771a0813ec63c9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642333 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill bd4e756a 2020-02-17T09:49:45 Const-ify the validation layer. Enforces that the validation layers should be working pretty much read- only with the exeption of updating caches. Requires a few tricks: - updates EP code generation to add 'const' to pointer parameters - enables a kludge const_cast to enable the robust query extension - makes some members of Framebuffer mutable to work around syncState - makes 'is' queries and other methods in Context/State const Will allow us to more safely expose the no_error extension. Bug: angleproject:1280 Change-Id: Id9756757854c9e68fc096ecec8d93759fbe6b3a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2060689 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexis Hetu 33027d3e 2020-01-28T16:08:02 Enable GL_OES_depth_texture_cube_map with Vulkan backend GL_OES_depth_texture_cube_map depends on depthTextureOES, but adds the same new texture format/type requirements as GL_OES_packed_depth_stencil, so instead of adding a specific check for GL_OES_depth_texture_cube_map, the Vulkan backend checks for a combination of GL_OES_depth_texture and GL_OES_depth_texture_cube_map to enable GL_OES_depth_texture_cube_map. ANGLE has no specific checks for whether a format is "cubemappable", but Vulkan has no restrictions of the format of cubemaps, so if the proper formats are supported, creating a cube of any of these formats should be implicitly supported. Bug: angleproject:4293 Change-Id: I968dbe8869ba0f50de18dd41f1195e847c06b520 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2026027 Commit-Queue: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Alexis Hetu 94de306d 2020-01-14T16:18:56 Extensions suffixes Added NV/OES suffixes to relevant Extensions members. Bug: angleproject:3104 Change-Id: Ia1798157086230bde8d11c6fcb4fe93211e996ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2013168 Reviewed-by: Alexis Hétu <sugoi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
James Darpinian 27db2458 2019-10-03T13:46:28 Optimize disabling ARB_texture_rectangle In https://crrev.com/c/1838418 I added the ability to disable ARB_texture_rectangle so that we can use it in the WebGL implementation but disable it when compiling user shaders. Unfortunately disabling and re-enabling the extension causes the shader translator to be reinitialized which turns out to be more expensive than the actual work of shader translation, at least for small shaders. It's slow enough to cause timeouts in WebKit's WebGL conformance test runs. This introduces an alternate method of disabling ARB_texture_rectangle in the translator which is much faster because it avoids reinitializing the translator. Bug: angleproject:3956 Change-Id: I5d31b683ff19a59bdfd289cfd3c609f64ef5e25b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1991969 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Yan 17b3c2f3 2019-10-14T14:13:59 Implement SamplerVideoWEBGL for WEBGL_video_texture extension on desktop WEBGL_video_texture is an extension that will improve uploading video frame to WebGL performance. (https://www.khronos.org/registry/webgl/extensions/proposals/WEBGL_video_texture/) This extension introduced a new texture type TEXTURE_VIDEO_IMAGE_WEBGL and a new sampler type samplerVideoWEBGL to sample it. In chromium implementation, TEXTURE_VIDEO_IMAGE_WEBGL maps to different native texture type based on platform. On desktop, it maps to GL_TEXTURE2D(Currently supported). On Android, it should map to GL_TEXTURE_EXTERNAL(TODO). SamplerVideoWEBGL needs to be mapped to sampler2D or samplerExternalOES according to TEXTURE_VIDEO_IMAGE_WEBGL implementation. This patch implements samplerVideoWEBGL in Angle to support WEBGL_video_texture on desktop. In this case, samplerVideoWEBGL should map to sampler2D. Bug: chromium:776222, angleproject:3889 Change-Id: Idb0a5fcde37ca75ccc1181226b91f257212e7500 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866274 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Xinyi He 4c7db77e 2019-10-31T15:42:31 Vulkan: Set limitation on maxComputeWorkGroupCount According to Table 20.45 and Chapter 17 in the ES 3.1 spec, MAX_COMPUTE_WORK_GROUP_COUNT is get as a GLint by using GetIntegeri_v. However, it is an unsigned integer in the Vulkan. It needs to set limitation on maxComputeWorkGroupCount[] during translating. 1. Change the data type to GLint stored in Caps. 2. Ensure that the limitation is set during initialization. 3. Add workaround for angleproject:4120 Bug: angleproject:4066 Change-Id: I1659ba1d560e30b9599cace0feeab8a18890c3ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1890586 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
shrekshao e33c1582 2019-11-06T16:55:29 Fix EXT_texture_norm16 * Add norm16 format info for OpenGL backend * Add validation for newly introduced norm16 formats * Fix some logic of texture tests Bug: chromium:1000354, angleproject:1365 Change-Id: Ie6d6e5e276da4df4b7c667be28d324d4976b35ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1902720 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shrek Shao <shrekshao@google.com> Commit-Queue: Shrek Shao <shrekshao@google.com>
Mingyu Hu 2d0e5b55 2019-08-27T13:49:07 GL_EXT_multisampled_render_to_texture extension. Part 2. For textures that use this extension, a multisampled texture is implicitly created for the texture. Upon write or read, the multisampled texture is either return to be drawn to or resolved and returned as a single sampled texture. This is the functionality change with end2end tests. Bug: angleproject:980428 Change-Id: I5776875a132fed7a3f4f00fb02f9e8e250684630 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1773717 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
James Darpinian c42da4e5 2019-10-03T13:46:28 Extend ANGLE_request_extension with DisableExtension ARB_texture_rectangle is the only currently supported disablable extension. This allows us to use ARB_texture_rectangle in WebGL implementations without exposing it to WebGL user shaders. Bug: angleproject:3956 Bug: angleproject:3770 Change-Id: I80b10d2e9c9feebe545ce15195721487165ecc51 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1838418 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Le Quyen 6e653981 2019-10-09T15:19:02 Added PVRTC compression extension needed for Metal on iOS. Bug: angleproject:2634 Change-Id: I413f754fe5551b1e248bc2b824b327b92d8c70f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1849076 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill f703443b 2019-09-21T14:10:35 Use Resource IDs in RefCountObject. This lets us use strongly typed IDs pretty much everywhere. Only one or two additional places still use GLuint IDs. Mostly for external queries and for Framebuffer Attachments. With some clever type reflection helpers lets us define a single template function for handling operator== and != for resource IDs. Refactor in preparation for more Capture/Replay work. Bug: angleproject:3611 Change-Id: I1c0c848e89eb8a4b769714d57686f816daf01634 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1815550 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Mingyu Hu 7e44ec26 2019-08-26T15:59:48 GL_EXT_multisampled_render_to_texture extension. Part 1. Adding new parameters for extension without adding any real code change. Since no new code paths were added, we expect all tests to pass as before. Bug: angleproject:980428 Change-Id: I551b46a66f422eabd357fd021e00cf266a991efb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1772377 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiacheng Lu c3f7873b 2019-08-30T15:00:52 Use TransformFeedbackID in place of GLuint handle Bug: angleproject:3804 Change-Id: Ib8fbec89f28645790df98a184f47303f4a8d64c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1779343 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Jiacheng Lu feb8507f 2019-09-03T13:22:04 Use VertexArrayID in place of GLuint handle Bug: angleproject:3804 Change-Id: I0454533eff13218a6aa1e1672ffcd0e76aedb399 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769716 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu 9deb3bfa 2019-08-23T15:57:50 Use MemoryObjectID in place of GLuint handle Bug: angleproject:3804 Change-Id: I7ca86089fe1e72c136c0fc1947ad43cecee122eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769544 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu f0640bc3 2019-08-23T10:26:25 Use SemaphoreID in place of GLuint handle Bug: angleproject:3804 Change-Id: Iabaae60ed7cbbe423bf768c506099d26cf0dedcf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1768978 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu 2c5d48a6 2019-08-23T09:28:35 Use FramebufferID in place of GLuint handle Bug: angleproject:3804 Change-Id: I5e1b5f1903b05a91468379e00ec130802315cdc2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769039 Reviewed-by: Jiacheng Lu <lujc@google.com> Commit-Queue: Jiacheng Lu <lujc@google.com>
Tim Van Patten 56ba54cc 2019-08-08T13:03:34 Support separate read and draw surfaces in eglMakeCurrent Update ANGLE's default framebuffer implementation to support reading and writing to different surfaces within the same framebuffer. Bug: angleproject:2620 Test: EGLSurfaceTest[3] Change-Id: I4b1ea04ca87a751f80cf190bf3adec148fc4fce3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1744746 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiacheng Lu 120b61d3 2019-08-21T12:51:58 Use ShaderProgramID in place of GLuint handles Bug: angleproject:3804 Change-Id: I5dc640004c2cc054c53261e8e939b6a9f5fc23bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762363 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com>
Jiacheng Lu 7b5744f4 2019-08-22T16:26:35 Use PathID in place of GLuint handle Bug: angleproject:3804 Change-Id: Ibadfc2c33e4af1cca22caa1dbe96ac48a4a85ffa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1766822 Reviewed-by: Jiacheng Lu <lujc@google.com> Commit-Queue: Jiacheng Lu <lujc@google.com>
Jiacheng Lu 814a0a1b 2019-08-22T11:50:43 Use QueryID in place of GLuint handle Bug: angleproject:3804 Change-Id: I921bbe7f67c025ab2b624fe14530c04ac17346f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1765889 Reviewed-by: Jiacheng Lu <lujc@google.com> Commit-Queue: Jiacheng Lu <lujc@google.com>
Jiacheng Lu 962503e7 2019-08-21T13:18:30 Use FenceNVID in place of GLuint handles Bug: angleproject:3804 Change-Id: I29c16e17c3a426efbbf0b60670581962ee505f3e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1764298 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jaedon Lee 3b46885e 2019-07-30T16:50:36 Vulkan: Implement EXT_texture_type_2_10_10_10_REV - Expose GLES 3.0 feature of 2_10_10_10_REV texture type on GLES 2.0 as EXT. - Handle alpha channel value as 1.0 when used with RGB format. - Add test for "RGB+UNSIGNED_INT_2_10_10_10_REV" case into TextureUploadFormatTest. BUG=angleproject:3232. Test: dEQP-GLES2.capability.extensions.uncompressed_texture_formats.GL_EXT_texture_type_2_10_10_10_REV dEQP-GLES2.functional.fbo.completeness.renderable.texture.*2_10_10_10_rev dEQP-GLES3.functional.fbo.completeness.renderable.texture.*2_10_10_10_rev KHR-GLES2.core.internalformat.*2_10_10_10_rev* KHR-GLES3.core.internalformat.*2_10_10_10_rev* Change-Id: Iac00517971f9242161115c7256117a69093fb5df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1732618 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiacheng Lu ee79e2ff 2019-08-20T11:28:36 Use SamplerID in place of GLuint handles Update all Sampler handles to type SamplerID, preparing for midframe capture of sampler. Bug: angleproject:3804 Change-Id: I9337919f97d61e28718987612d642c569b90246a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1761780 Commit-Queue: Jiacheng Lu <lujc@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2ab08edc 2019-08-12T16:20:21 Use TextureID in place of GLuint handles. Bug: angleproject:3611 Change-Id: Ie6156e8732b3ca4dc6c4439c059a5481a4dfd250 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738753 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3b3fe837 2019-08-06T17:44:12 Use BufferID in place of GLuint handles. Introduces enable_if handling for "FromGL". Avoids the use of any macro code to handle resource id casting. Bug: angleproject:3611 Change-Id: I1a6d10c3c9cc6ba0dc072bad1d62c33551f05d87 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1736127 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Cody Northrop 90958e35 2019-08-07T16:26:14 Implement ValidateFramebufferTexture3DOES Bug: angleproject:3188 Test: KHR-GLES2.texture_3d.framebuffer_texture.negative Change-Id: I9a27c713bd7ea18b9f7d9943c6c180f92856c643 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1743079 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7c7dec01 2019-08-06T17:44:11 Use RenderbufferID in place of GLuint handles. This will allow frame capture/replay to more easily emulate object handle manipulation. It also provides a bit of type safety. Also generalizes ResourceMap to handle non-GLuint IDs. Bug: angleproject:3611 Change-Id: I174fd260f326e0dbe2aca3f818215c91d82cf48c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706559 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Clemen Deng ce330593 2019-07-16T10:02:21 Rename ProvokingVertex and TextureBarrier Need to rename these so that they don't conflict with GL function declarations Bug: angleproject:3702 Change-Id: Iefe490cb53a384c45f0d0024321deda43b461bcc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704214 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Clemen Deng <clemendeng@google.com>
Geoff Lang d9c17107 2019-07-10T14:56:26 Add support for GL_OES_texture_compression_astc This extension adds 3D compressed texture formats, something ANGLE has not seen before. This requires tracking a compressed block depth for validation and image size computations. Update the ldr and hdr extension checks to be in line with the spec. HDR requires LDR and is not detectable by texture formats alone. Expose all of the ASTC extensions on the GL backend. BUG=angleproject:3675 Change-Id: Id04c7c8ef8541e9556579536cdba899b64303caf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695923 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Kenneth Russell cbdf8616 2019-07-09T20:30:45 Support blitFramebuffer to and from IOSurface-backed textures. Extend validation to allow texture rectangle-backed textures as blitFramebuffer sources and destinations. Add end-to-end test covering this functionality, and run the IOSurfaceClientBufferTests against both ES2 and ES3. Bug: angleproject:3669 Change-Id: I7b8815a2c98072c12de45717afbba9e9b29ba253 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1694483 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4e71b2bc 2019-07-08T13:23:38 Framebuffer: Clean up query naming. Changes instances where we were querying 'color buffers' and 'depth buffers' to 'color attachments' and 'depth attachments', etc. Bug: angleproject:3611 Change-Id: I7af7d33e5204f21d288f5bcad997988d36eabfc5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1690679 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Cody Northrop 5faff91a 2019-06-28T14:04:50 texture3D: Codegen changes towards OES_texture_3D Also accompanying hand edits to validationES2.cpp and Context.cpp to allow linking. Bug: angleproject:3188 Change-Id: I89832265092fabc71bade464f0171d65038d8b0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1648454 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Chris Dalton a9dfb3ba 2019-06-26T18:36:10 Allow "GL_INVERT" nvpr fill mode to pass validation Bug: angleproject:3617 Bug: skia:9214 Change-Id: I11f4e845095cc1ebcbc2717682e945bcf2bb67e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1679631 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 8af6c6f5 2019-06-18T15:43:44 Vulkan: Minor cleanup of Transform Feedback validation By using the helper isTransformFeedbackActive* functions. Bug: angleproject:3205 Change-Id: I50b3e9db427da9f65c3e2b50d7847464e8c28202 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1665353 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Michael Spang 6c824a1b 2019-06-18T15:43:33 Vulkan: Add missing layout for VK_IMAGE_LAYOUT_UNDEFINED This this was missed because it doesn't add its own enum value and instead reuses GL_NONE. Bug: chromium:976374 Test: chrome --enable-features=UseSkiaRenderer,UiGpuRasterization \ --enable-gpu-rasterization \ --enable-oop-rasterization \ --use-vulkan=native \ --use-gl=angle \ --use-angle=vulkan Change-Id: I73437211fef3253801e899cb6e50a8e18865cc65 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1665329 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 857880e5 2019-05-27T13:39:15 GL: Add extensions to enable hardware video decode on Android. The Android SurfaceTexture API has to be initialized with a texture id which Chrome has to query from an ANGLE external texture. It also rebinds and sets the texture dimensions on calls to SurfaceTexture.updateTexImage so ANGLE must be notified about these changes so that state tracking and validation continue to function. BUG=967410 Change-Id: I92e9077f75835b088da3a8caffb3ff40e9ad0361 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1630293 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang ab6a59b2 2019-05-21T21:26:26 Vulkan: Submit semaphores from glWaitSemaphoreEXT & glSignalSemaphoreEXT Implement submission of client semaphores passed to glWaitSemaphoreEXT & glSignalSemaphoreEXT. This also relaxes the expectation that we will not flush() if there are no commands. Signaling semaphores in particular requires queue submission irrespective of whether there are any command buffers to submit. If there are neither commands nor semaphores, we can still skip queue submission. WebGL runs in Chrome with ANGLE & Vulkan interop as of this patch, albeit with incorrect synchronization due to texture barriers not being implemented yet. Quite a few flags are needed to try this: GN args: angle_vulkan_conformant_configs_only=true chrome \ --enable-features=UseSkiaRenderer,UiGpuRasterization \ --enable-gpu-rasterization \ --enable-oop-rasterization \ --enable-vulkan \ --use-gl=angle \ --use-angle=vulkan Bug: angleproject:3289 Change-Id: I3d49c230a2fbf0cd2a2b943b05ded0e4604cc313 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1623815 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang 6bb193c8 2019-05-22T16:32:21 Vulkan: Implement glImportSemaphoreFdEXT Allow importing file descriptors into semaphores on linux. This can be used to synchronize ANGLE's GL renderer with respect to vulkan composition in chromium. Bug: angleproject:3289 Change-Id: I04ba3bbb2e343baa000ff89c21c03ca36163a713 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1623812 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang 5093ba67 2019-05-14T17:36:36 Implement resource management for GL_EXT_semaphore This implements glGenSemaphoresEXT, glDeleteSemaphoresEXT, and glIsSemaphoreEXT. It's not possible to do anything useful with them yet. Bug: angleproject:3289 Change-Id: I20ad90dbcd3fc573a4650c8531d6e1b8ccf7ca9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1623811 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Courtney Goeltzenleuchter eaf2d928 2019-04-18T16:31:25 Add support for OES_depth_texture Note: Includes workaround for http://anglebug.com/3452 - some Android devices do not indicate filtering support on VK_FORMAT_D16_UNORM. Bug: angleproject:3103 Test: angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTexture/* angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.PackedDepthStencil/* angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTextureRender/ES2_VULKAN Change-Id: Ic325fb94ab0e619a17c2e149e0e0865fa4142f3a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575426 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>