src/libANGLE/validationES2.cpp


Log

Author Commit Date CI Message
Jamie Madill fa920ebb 2018-01-04T11:45:50 Entry Points: Auto-generate extensions EPs. This is partially complete - it is missing the auto-gen for custom ANGLE and Chromium extensions that aren't present in gl.xml. We can upstream some of these extensions, but will also need to make custom handling for some extensions that are too volatile or under- specced to upstream to Khronos. This also tweaks some of the Context method names to match what the auto-generator expects. It also updates some TexStorage entry points. Also includes a specialized error return value for glTestFenceNV. Also removes the TexImage3DOES entry point which was neither used nor accessible to the application. Bug: angleproject:2263 Change-Id: I3667c22b1b15f84ab4c7dfecb5745aaf73d11e76 Reviewed-on: https://chromium-review.googlesource.com/846420 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 007530ea 2017-12-28T14:27:04 Entry Points: Refactor Extensions Part 2. This moves the validation and entry point files to use a consistent syntax. This will facilitate auto-generation. Bug: angleproject:2263 Change-Id: If5d06e97db66783d7b3d7fb1d6365f8218d956ae Reviewed-on: https://chromium-review.googlesource.com/846022 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2b7bbc28 2017-12-21T17:30:38 Entry Points: Refactor Extensions Part 1. This moves the validation and entry point files to use a consistent syntax. This will facilitate auto-generation. Bug: angleproject:2263 Change-Id: Ica2dbffff3898103c6827ae7f6b1154a45d14a85 Reviewed-on: https://chromium-review.googlesource.com/841345 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez e4477001 2017-12-01T14:39:58 Add PackedEnumBitSet, use it for buffer binding validation Includes angle::BitSetT changes from jmadill@chromium.org BUG=angleproject:2169 Change-Id: I9f896613f5c6cdc91281cb9a00134f67291870d9 Reviewed-on: https://chromium-review.googlesource.com/804177 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Bryan Bernhart (Intel Americas Inc) 2eeb1b34 2017-11-29T16:06:43 WebGLCompat: Fix depthstencil query results. getFramebufferAttachmentParameter returns incorrect result for framebuffers in an inconsistent state. BUG=angleproject:2259 Change-Id: I76fa99f1b8847c30469d344bd93dedd9cf6657bf Reviewed-on: https://chromium-review.googlesource.com/798318 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao 89be29a5 2017-11-06T14:36:45 ES31: Implement creation and attaching geometry shader on OpenGL This patch intends to implement the creation of a geometry shader and attaching a geometry shader to a program on OpenGL back-ends. This patch also adds all geometry shader related dEQP-GLES31 test failures to deqp_gles31_test_expectations.txt. BUG=angleproject:1941 TEST=angle_end2end_tests Change-Id: Ib0b497030255b15dacd967e48bc59eef0009af46 Reviewed-on: https://chromium-review.googlesource.com/757979 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e8afa902 2017-09-27T15:00:43 Make GL_ANGLE_framebuffer_blit enableable. BUG=angleproject:1523 Change-Id: I5d6df35d2e65be6d73ec6100e3351ba5f9ff53a2 Reviewed-on: https://chromium-review.googlesource.com/688639 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jeff Gilbert 48590358 2017-11-07T16:03:38 Remove formatType arg from computeCompressedImageSize. BUG=angleproject:2230 Change-Id: Ie291ba05efa89bc4ea52966e975d5a21431a461f Reviewed-on: https://chromium-review.googlesource.com/757877 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 336129f6 2017-10-17T15:55:40 Use a packed enum for buffer targets. BUG=angleproject:2169 Change-Id: I4e08973d0e16404b7b8ee2f119e29ac502e28669 Reviewed-on: https://chromium-review.googlesource.com/723865 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang fb05264b 2017-10-24T13:42:09 Disallow null pixel data for TexSubImage that have non-zero size. BUG=angleproject:2055 Change-Id: I4c338691776c6d807333c169ed876d686188a97c Reviewed-on: https://chromium-review.googlesource.com/735786 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 86f8116b 2017-10-30T15:10:45 Make compressed texture format extensions enableable. Fix allowing CompressedTexSubImage calls on ETC1 texture types (disallowed in the extension spec). BUG=angleproject:1523 Change-Id: Ic90175ff4626da0170b6c94f204a9d31fd0154a7 Reviewed-on: https://chromium-review.googlesource.com/744443 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 63458a3e 2017-10-30T15:16:53 CopyTextureCHROMIUM: Validate the texture target enums first. INVALID_ENUM should be generated before any INVALID_VALUE errors based on the texture state. BUG=angleproject:1932 Change-Id: If74440602d56b1a86fa24ff87c38d2b0dec2bfb2 Reviewed-on: https://chromium-review.googlesource.com/744448 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Bryan Bernhart (Intel Americas Inc) 2a35741b 2017-09-05T10:42:47 WebGLCompatibility: Disable ES format extensions by default. Prevents format validation errors with WebGL context. BUG=angleproject:1523 Change-Id: Iddc525eeb467de0139e166dad0893f3bea3ef35f Reviewed-on: https://chromium-review.googlesource.com/650807 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Bryan Bernhart (Intel Americas Inc) 335d8bf2 2017-10-23T15:41:43 WebGLCompatibility: Fix shader validation using define macros. Backslash as line-continutation character is not permitted to be used within a pre-processor directive for WebGL1. BUG=angleproject:2093 Change-Id: I649a914b9bc544a3e4f9e7eff23b95a62c9b7008 Reviewed-on: https://chromium-review.googlesource.com/734218 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 111a99e8 2017-10-17T10:58:41 Check that the requested extension is supported by the backend. Previously, we would only check that the extension was requestable and not verify that the driver could support it. BUG=angleproject:1523 Change-Id: I5273920fc08a20beda54d4afaeb406c6c1c2056f Reviewed-on: https://chromium-review.googlesource.com/723559 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 2e568cfb 2017-09-18T17:05:22 Add generator for packed GL enums. For testing this also converts two unimportant GLenums, gl::BufferUsage and gl::CullModeFace. BUG=angleproject:2169 Change-Id: If1e86a97d0fed3fd567303aca6506ec579503076 Reviewed-on: https://chromium-review.googlesource.com/688000 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang b433e872 2017-10-05T14:01:47 Change robust resource init into a context creation attribute. Enabled support on OpenGL even through the extension is not fully implemented so that testing with Chromium/Passthrough commmand decoder is still possible. BUG=angleproject:1635 Change-Id: Ia417b1779aace1eae19514325701a79cd33f4ef3 Reviewed-on: https://chromium-review.googlesource.com/678479 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 000dab88 2017-09-27T14:27:07 Make pack and unpack image extensions enableable. BUG=angleproject:1523 Change-Id: Ic728a777ad7e05373de03ee98e9b0a17101cd45d Reviewed-on: https://chromium-review.googlesource.com/688102 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 536eca10 2017-09-13T11:23:35 Simplify GenerateMipmap validation now that sized format info is tracked. The previous validation used some workarounds because it didn't know if the texture format was sized or not. Now that the InternalFormat struct tracks this, the validation can work correctly for floating point formats. BUG=angleproject:2149 Change-Id: I583db4a36137a57dd1b7fc81cd4e3b6d5972fc67 Reviewed-on: https://chromium-review.googlesource.com/665163 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 50cac57a 2017-09-26T17:37:43 Make GL_EXT_blend_minmax enableable. BUG=angleproject:1523 Change-Id: I73df8d9a23c3d22792abde44b495be7478abfc22 Reviewed-on: https://chromium-review.googlesource.com/685648 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Yunchao He f0fd87d8 2017-09-12T04:55:05 Code refactoring in validation part. Some code refactoring in this change: 1) It moves some public methods to static. These methods are only used in validationES3.cpp. They are not necessay to be exposed to public. 2) The error messages to check context version are inconsistent. It makes them to be consistent. BUG:angleproject:2005 Change-Id: I5af4c3300634ccc44aac386c90dcb0522acbff83 Reviewed-on: https://chromium-review.googlesource.com/661324 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Jones 72f58fa3 2017-09-19T10:47:41 Change Returned Error For Invalid Hint When using FRAGMENT_SHADER_DERIVATIVE_HINT_OES as a hint with OES_standard_derivatives disabled, we should return INVALID_ENUM, not INVALID_OPERATION. Bug: angleproject:2158 Change-Id: I5759f1e8bb19d2caed278506054aebc5d82d431c Reviewed-on: https://chromium-review.googlesource.com/673374 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Brandon Jones ed5b46f1 2017-07-21T08:39:17 Add additional ES2 and WebGL 1.0 Validation Adds validation for various cases. Adds corresponding unit tests. Change-Id: I9451d286bcf2d6fa32de495e5d0bdec1eb5c955d Reviewed-on: https://chromium-review.googlesource.com/633157 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 70b5bb00 2017-08-28T13:32:37 Rename gl::FenceSync to gl::Sync. The spec refers to Sync objects, FenceSyncs being a subtype. The motivation for this fix is to clear up the FenceSync_ entry point for auto-generation. BUG=angleproject:1309 Change-Id: I94c440476d701628575e7a3eea68b6dd110f41c3 Reviewed-on: https://chromium-review.googlesource.com/636516 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 12e957f8 2017-08-26T21:42:26 Refactor uniform block and other query EPs. Also some minor fixes to validation and error messages. BUG=angleproject:747 Change-Id: I4f97a45c2d39a8deec2255620e5cc2bcb8cad7b9 Reviewed-on: https://chromium-review.googlesource.com/637126 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d7576737 2017-08-26T18:49:50 Refactor VAO entry points. This also touches the extension EPs for ES2. BUG=angleproject:747 Change-Id: Iaa04d97465e518f6b0496e64bc7a737914709b8f Reviewed-on: https://chromium-review.googlesource.com/637124 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang c0094eca 2017-08-16T14:16:24 Validate the combination of type and internal format for CopyTextureCHROMIUM. Sized internal formats with invalid types would pass validation because GetInternalFormatInfo does not validate that the type is a valid upload type for the given internal format. TEST=conformance2/textures/misc/tex-image-with-bad-args-from-dom-elements.html BUG=angleproject:1932 Change-Id: I07fd542630a4508383263c1fe3d7a80c037d7ca0 Reviewed-on: https://chromium-review.googlesource.com/617508 Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Brandon Jones afa75152 2017-07-21T13:11:29 Refactor More Validation Error Messages Replace many error string literals with variables existing in ErrorStrings.h BUG=:angleproject:1644 Change-Id: If5665a6787a1fa8d789811d774711c3705dfb0ab Reviewed-on: https://chromium-review.googlesource.com/598588 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 79f7104a 2017-08-14T16:43:43 Validate that transform feedback buffers are not mapped. Mapping a buffer that is bound for active transform feedback or starting transform feedback on a mapped buffer is undefined behaviour under section 2.10.3.2 of the ES 3.0 spec "Effects of Mapping Buffers on Other GL Commands". The spec suggests that an error is generated in this case. TEST=ES3MapBufferRangeTest.TransformFeedback BUG=754000 Change-Id: I613defd07cc1a4348682d992cda61cc898936720 Reviewed-on: https://chromium-review.googlesource.com/614483 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 13c0dd46 2017-07-04T18:27:01 Add texture rectangle extension. This is needed to support binding IOSurfaces to textures on OSX. This commit adds support in the API and tests, but didn't need to implement compiler changes as it already supported ARB_texture_rectangle. Implementation of CHROMIUM_opy_texture for rectangle texture and the spec are left for follow-up commits. Change-Id: I45c66be763a9d3f6f619640f9f95f39b05c70867 Reviewed-on: https://chromium-review.googlesource.com/559106 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kenneth Russell 6938285b 2017-07-21T16:38:44 Fix BlitFramebuffer validation for BGRA sources and targets. It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and destinations when resolving multisampled renderbuffers. Expand BlitFramebuffer's validation to handle this case. Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work around an error generated on macOS when querying GL_MAX_VARYING_COMPONENTS. Expand the BlitFramebuffer tests to cover these cases and start running them on the OpenGL backend. Fix detectition of multisampled D3D11 rendertargets when the sample count is 1. BUG=angleproject:891 Change-Id: Ief5531756651caa66f612e647d3d5c05c8c51ff5 Reviewed-on: https://chromium-review.googlesource.com/587459 Reviewed-by: Kenneth Russell <kbr@chromium.org>
Corentin Wallez 26cf35a8 2017-07-26T11:01:02 Revert "Fix BlitFramebuffer validation for BGRA sources and targets." This reverts commit 17d270311efcd8c72f251a67e726518278e81c26. Reason for revert: - New test fails on NVIDIA and AMD on Windows when using the backbuffer FAST_PATH. - SetUp code ASSERT_GL_NO_ERROR (line 269) but a GL error happens on all Windows and Linux Intel OpenGL. Original change's description: > Fix BlitFramebuffer validation for BGRA sources and targets. > > It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and > destinations when resolving multisampled renderbuffers. Expand > BlitFramebuffer's validation to handle this case. > > Work around a bug in macOS' OpenGL driver querying the number of > samples for GL_BGRA8. > > Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work > around an error generated on macOS when querying > GL_MAX_VARYING_COMPONENTS. > > Expand the BlitFramebuffer tests to cover these cases and start > running them on the OpenGL backend. > > BUG=angleproject:891 > > Change-Id: I4829585d2b6428ce0bc7509c4734d33709a0930b > Reviewed-on: https://chromium-review.googlesource.com/582268 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,kbr@chromium.org Change-Id: I220bc482194cf7fad5e7e732a6d043ce0d504d79 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:891 Reviewed-on: https://chromium-review.googlesource.com/586428 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kenneth Russell 17d27031 2017-07-21T16:38:44 Fix BlitFramebuffer validation for BGRA sources and targets. It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and destinations when resolving multisampled renderbuffers. Expand BlitFramebuffer's validation to handle this case. Work around a bug in macOS' OpenGL driver querying the number of samples for GL_BGRA8. Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work around an error generated on macOS when querying GL_MAX_VARYING_COMPONENTS. Expand the BlitFramebuffer tests to cover these cases and start running them on the OpenGL backend. BUG=angleproject:891 Change-Id: I4829585d2b6428ce0bc7509c4734d33709a0930b Reviewed-on: https://chromium-review.googlesource.com/582268 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cab92ee4 2017-07-19T17:32:07 Fix WebGL validation of characters in shader source strings. Shader source strings are allowed invalid ESSL characters when they are in comments. Added a simple comment parser to determine which characters should be validated. BUG=angleproject:2093 Change-Id: If78a4ecbd61f1700fc18dcb844f3de03314a6a39 Reviewed-on: https://chromium-review.googlesource.com/578567 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3847f94d 2017-07-12T11:17:28 Validate that the mip level is not too large for CopyTextureCHROMIUM. When the mip level was greater than the maximum, it could cause an out-of-bounds read when trying to query the Texture's size and format later in the validation. BUG=740426 Change-Id: Ibd6c977981e5f8b7368c161b7969d9e916c6095b
Commit Bot f69ac0a5 2017-07-12T14:18:57 Merge "Add support for new internalformats in copyTextureCHROMIUM"
Corentin Wallez 59c41597 2017-07-11T13:19:54 Fix Clear validation assert for default FBOs The validation was iterating over maxDrawBuffers attachments when default framebuffers only have one attachment. Use the framebuffer's drawBufferCount instead. Also adds a regression test in the form of a WebGLComptibility test for glClearBuffer with the default framebuffer. BUG=angleproject:2091 Change-Id: I07ee524db1fcb8a99dab4043248c0885100fd216
Brandon Jones 340b7b8b 2017-06-26T13:02:31 Add support for new internalformats in copyTextureCHROMIUM This adds support in blit11::copyTexture for LUMA, LUMA_ALPHA, and ALPHA formats as destinations. Added is handling for each case to match up the corresponding shader. This required new premultiply and unmultiply D3D11 shaders for some cases. Changed copyTextureCHROMIUM validation to allow new formats. Tests have been created to demonstrate using copyTextureCHROMIUM with the new formats with default parameters, as well as with the unpackPremultiply and unpackUnmultiply parameters. BUG=:angleproject:2101 Change-Id: Id8cd303a46fe70710bc18172fc938552a6e4cfaf
Brandon Jones 6cad5667 2017-06-14T13:25:13 Improve Debugging Strings This change replaces common string literals used for error messages with const string variables mapped in a new header file. Additionally, more validation for WebGL naming scenarios has been added, along with unit tests. BUG=:angleproject:1644 Change-Id: Icff44a456aa78221c6df12b0454a7cc147a7d26e Reviewed-on: https://chromium-review.googlesource.com/535974 Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6be3d4cd 2017-06-16T15:54:15 Fix incorrect format set being used for destination copy formats. This validation matches Chrome's. BUG=angleproject:1932 Change-Id: I2dc75c21924231ab75000dff92ef92cbc12adf55 Reviewed-on: https://chromium-review.googlesource.com/538956 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e7bd218c 2017-06-16T16:13:13 Accept GL_FRAGMENT_SHADER_DERIVATIVE_HINT in ES3 contexts. BUG=angleproject:2070 TEST=deqp/functional/gles3/shaderderivate_dfdx TEST=deqp/functional/gles3/shaderderivate_dfdy TEST=deqp/functional/gles3/shaderderivate_fwidth Change-Id: I4e10343036a813c122ca41913324051b5c02e785 Reviewed-on: https://chromium-review.googlesource.com/538861 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4928b7ca 2017-06-20T12:57:39 Proliferate gl::Context everywhere. This gives the D3D back-end access to the GL state almost anywhere. This uses the onDestroy hook for Textures to push errors up from destructors, although they still don't quite make it to the Context. There are places, such as in EGL object (Context/Surface) destruction, where we end up calling through to GL implementation internals without having access to a gl::Context. We handle this via a proxy Context to a Display, basically a null context, that has access to impl-side state like the Renderer pointer if necessary. It does not have access to the normal GL state. Also Pass gl::Context to RefCountObject::release(). Since we're using destroy() methods now, we should not ever call the destructor directly. BUG=angleproject:1156 Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259 Reviewed-on: https://chromium-review.googlesource.com/529707 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a71a98ee 2017-06-19T15:15:00 Allow '\' characters in shader source for WebGL2. TEST=deqp/data/gles3/shaders/preprocessor.html BUG=angleproject:2016 Change-Id: Ia5240a1ff65ebadc15604a5c3eb63042953c43a5 Reviewed-on: https://chromium-review.googlesource.com/540198 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang bb1b19b6 2017-06-16T16:59:00 Generate INVALID_OPERATION when the copy texture destination level is missing. TEST=conformance2/textures/misc/tex-image-with-bad-args-from-dom-elements BUG=angleproject:1932 Change-Id: I6e0e9213d86a72aa092131189ecaefa60afa4194 Reviewed-on: https://chromium-review.googlesource.com/538864 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 165dcf15 2017-06-07T15:05:14 Allow CHROMIUM_copy_texture to copy to non-zero mips. Fix some errors in the GL backend related to source and destination mipmap targets. BUG=angleproject:1356 Change-Id: I030529c8626f3bc30dbb4f7f859a02ba56e315e3 Reviewed-on: https://chromium-review.googlesource.com/527653 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang dbcced8e 2017-06-06T15:55:54 When validating image size, use format for SubImage calls. internalFormat is GL_NONE when validating these calls for glTexSubImage and leads to an expected minimum size of 0. Add extra unsized formats that are never supported to the format tables. These are needed for determining the size of input data. BUG=angleproject:2054 Change-Id: Ic827a279a246ff92c9f279232574521692b1c6f2 Reviewed-on: https://chromium-review.googlesource.com/526356 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yuly Novikov c4d18aac 2017-03-09T18:45:02 Use ErrorStream everywhere Eliminates one more usage of FormatString and its static initializer. Add more ErrorStream types and replace gl::Error and egl::Error with them. BUG=angleproject:1644 Change-Id: Ib498d0ae4b81a332ec71aed7cf709993b154e6bb Reviewed-on: https://chromium-review.googlesource.com/505429 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill bd044ed8 2017-06-05T12:59:21 Defer shader compiles when possible. When using the program binary memory cache inside ANGLE, this will give a potential fast path. If the user doesn't query the shader compile status or info log before calling LinkProgram, then we can check the program cache before translating the program, and if it finds a hit, we don't even need to call the translator. To preserve the shader settings at compile time, a reference to the current shader translator is kept in a binding pointer on the call to compile. This mirrors a similar implementation in Chromium's command buffer. Also the compile options and source are cached at compile to preserve the correct shader state. BUG=angleproject:1897 Change-Id: I3c046d7ac8c3b5c8cc169c4802ffe47f95537212 Reviewed-on: https://chromium-review.googlesource.com/517379 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 6e898aa3 2017-06-02T11:17:26 Allow sized GL_RGB[A]_32F to be used for TexImage2D with the chromium extensions. GL_CHROMIUM_color_buffer_float_rgb[a] allows these sized formats to be used in TexImage2D even in ES2. With this patch, the conformance/extensions/oes-texture-float and conformance/extensions/oes-texture-half-float tests now pass for WebGL1 and WebGL 2 contexts. BUG=angleproject:1958 Change-Id: I568dea5da42ba310463d2690c3e764c48598311b Reviewed-on: https://chromium-review.googlesource.com/522349 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang fc32e8b7 2017-05-31T14:16:59 WebGL: Validate shader entry point names do not contain invalid characters. Section 6.20 of the WebGL spec states that all shader-related entry points that accept strings must validate that the string does not contain characters that are not valid in ESSL. TEST=conformance/misc/invalid-passed-params BUG=2016 Change-Id: I220d9dd79c4b0e8e0195277093268b9e1e66f9d9 Reviewed-on: https://chromium-review.googlesource.com/519445 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 4f0e003e 2017-05-01T16:04:35 Implement the new formats/features of the ES3 CHROMIUM_copy_texture. Some non-renderable texture formats remain unimplemented. BUG=angleproject:1932 Change-Id: Id206432d6e26a70fc0e84478a4e43e9eefadcf2f Reviewed-on: https://chromium-review.googlesource.com/491948 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 231c7f56 2017-04-26T13:45:37 Apply clang-format to many files. This cleans up the formatting in many places. BUG=None Change-Id: I6c6652ebc042f1f0ffecced53582d09d66b4f384 Reviewed-on: https://chromium-review.googlesource.com/487884 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 0c09e265 2017-05-03T09:43:13 Add BGRA formats to glCopyTexSubImage validation. These formats were already accepted by glCopyTexImage and allow glCopyTexSubImage to work on the default framebuffer for D3D9 and D3D11. BUG=angleproject:2027 Change-Id: I5d8b839ae2c69e1e8381aa011df6223e18afb308 Reviewed-on: https://chromium-review.googlesource.com/493803 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 65ac5b9c 2017-05-01T13:16:30 Allow glGenerateMipmaps on sRGB textures in WebGL. The generated mipmaps are still not correct on all ANGLE backends. TEST=conformance/extensions/ext-sRGB BUG=angleproject:2009 Change-Id: I6299dcb93c71f48e61ec660347b4747366ecfb71 Reviewed-on: https://chromium-review.googlesource.com/491367 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 677bb6ff 2017-04-05T12:40:40 Update checks for floating point renderability. * Expose GL_CHROMIUM_color_buffer_float_rgb and GL_CHROMIUM_color_buffer_float_rgba * Fix many texture formats that were incorrectly checking the wrong extension for support or renderability. * Make all floating point texture extensions dynamically enableable. BUG=angleproject:1958 BUG=angleproject:1715 Change-Id: Iefccc8b5ae5edd97623affa9de05b1d9af5c9598 Reviewed-on: https://chromium-review.googlesource.com/468450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill be849e4f 2017-05-02T15:49:00 GLES2: Clean up entry points for auto-gen. This cleans up a few things: * refactors a few remaining missed EPs * removes unnecessary includes * rename one Context entry point * moves some ES2 EP validation to validationES2 The last item makes for a significant diff, but this is a refactor change only, with no functionality change. BUG=angleproject:747 Change-Id: I7860cc4b6260b6c22faa5f2885297333c0cdb4ed Reviewed-on: https://chromium-review.googlesource.com/483426 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 876429b7 2017-04-20T15:46:24 Update gl2.h and update entry points. Some method signatures were updated. Types like GLclampf and GLvoid were replaced with other equivalents. BUG=angleproject:1309 Change-Id: I05e8e2072c5a063d87ad96a855b907424661e680 Reviewed-on: https://chromium-review.googlesource.com/475011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9c9b40ac 2017-04-26T16:31:57 Use parameter cache to skip passing IndexRange. For DrawElements et al., we can use a simple design to store entry point parameters and compute index ranges lazily. This allows us to compute the index range outside of the validation layer. Fixing this will let us implement a few things, such as the no error extension. It will also allow auto-generation of the entry points, since we won't have to have special cases for certain entry points. It will also help fix the syncState layering problem. Now the cached parameter helper (which is owned by the Context) can make the impl layer calls, instead of the validation layer calling the impl directly. We use a small array in Context to gather parameters in a generic way without reallocation on call. We also check type safety by storing a type info struct which can handle inheritance between type classes. Optional variables for the cache determine when to re-compute values. The intent with gatherParams is to call this in every entry point, and have in most cases be a no-op. In some cases like for IndexRange, we store some parameters for later use. The inheritance scheme enables auto-generation of the entry points by keeping signatures similar. BUG=angleproject:747 Change-Id: I871e99e1334cf6e61ef8da62fde3ced094903f8a Reviewed-on: https://chromium-review.googlesource.com/474119 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 966c940b 2017-04-18T12:38:27 Fix validation for compressed texture functions. * No validation that the format matched the texture level's format for SubImage calls. * WebGL does not allow the base level to be smaller than the block size. * ANGLE used to allow mips of size 3 when this is disallowed. * Don't early-exit validation when dimensions are 0, imageSize validation happens later. TEST=conformance/extensions/webgl-compressed-texture-s3tc BUG=angleproject:1998 Change-Id: I05f5a0b5180344d67b036fdecc17edd2256e85ab Reviewed-on: https://chromium-review.googlesource.com/480442 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yunchao He 4f285443 2017-04-21T12:15:49 Refactoring: replace NULL by nullptr for pointers (2nd CL). This CL mainly handles the pointer comparisons (== or !=). BUG=angleproject:2001 Change-Id: I25ac3b61032e7ad91459a1c6541cadc87cf9b160 Reviewed-on: https://chromium-review.googlesource.com/483935 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang ca27139e 2017-04-05T12:30:00 Key the format tables on internal format and type. Keying the format tables on internal format alone is not enough to fully validate the unsized formats which require additional type information. This CL has no functional changes, it just splits the tables and updates the calls to GetInternalFormat info to provide type information when the format is not sized. BUG=angleproject:1523 BUG=angleproject:1958 BUG=angleproject:1228 Change-Id: I37e5201e7f54fa8eca01b8a6e64b11a6b94484e7 Reviewed-on: https://chromium-review.googlesource.com/468449 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez b2931601 2017-04-11T15:58:57 Add robust entry point for CompressedTex(Sub)Image BUG=angleproject:1354 Change-Id: I925db827c4ccf4e6f037a058f8f6b960a56047e1 Reviewed-on: https://chromium-review.googlesource.com/474964 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c1d770e8 2017-04-13T17:31:24 Refactor remaining GLES 2.0 entry points. This will pave the way for several features, like auto-generation. BUG=angleproject:747 Change-Id: Ic390ac412f4e6b61346629093f185a4c07ea0284 Reviewed-on: https://chromium-review.googlesource.com/474118 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill dd43e6cd 2017-03-24T14:18:49 Pass Context to VertexArray and Framebuffer syncstate. This will enable more Vulkan-friendly idioms like clearing the vulkan pipeline caches correctly on GL state changes immediately because we have access to the ContextVk. BUG=angleproject:1898 Change-Id: I16c848d8abdde8e26a38d384e565cec8548a66d0 Reviewed-on: https://chromium-review.googlesource.com/459079 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 76e6565e 2017-03-27T14:58:02 Validate clear attachment formats match color clear types. TEST=conformance2/rendering/clear-func-buffer-type-match.html BUG=angleproject:1954 Change-Id: Iefeb38041608f11781f87aadb8611737ba2ee96f Reviewed-on: https://chromium-review.googlesource.com/461270 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 2d62ab72 2017-03-23T16:54:40 Apply WebGL validation to glVertexAttribIPointer. TEST=deqp/functional/gles3/shaderstatequery.html BUG=angleproject:1523 BUG=chromium:668223 Change-Id: I24230144f8529d84cdbde3d5a8ad9178481550a9 Reviewed-on: https://chromium-review.googlesource.com/458680 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Shao 80957d99 2017-02-20T21:25:59 ES31: Implement Vertex Attrib Binding entry points This patch intends to implement all entry points related to Vertex Attrib Binding. (1) Add entry points and validation code on following APIs: - VertexAttribFormat - VertexAttribIFormat - VertexAttribBinding - BindVertexBuffer - VertexBindingDivisor (2) Add queries on following parameters: - VERTEX_ATTRIB_BINDING - VERTEX_ATTRIB_RELATIVE_OFFSET - VERTEX_BINDING_DIVISOR - VERTEX_BINDING_OFFSET - VERTEX_BINDING_STRIDE - VERTEX_BINDING_BUFFER BUG=angleproject:1593 TEST=angle_end2end_tests TEST=angle_unittests TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_relative_offset_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_bindings_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_stride_* TEST=dEQP-GLES31.functional.state_query.vertex_attribute_binding.* TEST=dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.vertex_attrib_pointer TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_format TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_i_format Change-Id: I4b477a82df6aad89b89b088580a06d66963e6666 Reviewed-on: https://chromium-review.googlesource.com/446124 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang fc72a073 2017-03-24T14:52:39 Update CHROMIUM_copy_texture entry points to the ES3 versions. BUG=angleproject:1932 Change-Id: Ia45f8522320af1d747fbfb57468e8b881b033543 Reviewed-on: https://chromium-review.googlesource.com/459101 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Frank Henigman 146e8a1c 2017-03-02T23:22:37 WebGL validation of constant color & alpha blend. In WebGL, generate INVALID_OPERATION if constant color and constant alpha are used together as source and destination blend functions. BUG=angleproject:1817 Change-Id: I9b2d05ab5017c013bb89c13256efbd80198de91b Reviewed-on: https://chromium-review.googlesource.com/448940 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Minmin Gong 390208b5 2017-02-28T18:03:06 Implements ETC lossy decode for ETC2 formats. This is the 2nd payload of GL_ANGLE_lossy_etc_decode feature. In this change, RGB8, SRGB8, RGB8A1, and SRGB8A1 formats in ETC2 family can be converted to BC1. BUG=angleproject:1285 Change-Id: I96fe2f07c62716a31d37f20a202b6cabbb4ebbd2 Reviewed-on: https://chromium-review.googlesource.com/447846 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang feb8c686 2017-02-13T16:07:35 Add extensions to disable client arrays. Chrome doesn't allow any client data in its command buffer. Add an ANGLE extension to request a context that disallows client data. BUG=602737 Change-Id: If9d5144daea3c629a73562396000df59a671aad3 Reviewed-on: https://chromium-review.googlesource.com/441986 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill e8fb640d 2017-02-14T17:56:40 Update RenderbufferStorage EPs to new style. This will facilitate changes for WebGL compatibility. BUG=angleproject:747 BUG=angleproject:1708 Change-Id: I62e5d684ca10a843b5e958afe9954c1065bfeb19 Reviewed-on: https://chromium-review.googlesource.com/442093 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman 6137ddc5 2017-02-10T18:55:07 WebGL validation for depthRange. Generate INVALID_OPERATION for depthRange(zNear, zFar) if zNear > zFar. Add corresponding test. BUG=angleproject:1816 Change-Id: I28b5876a74c9765c0eef1e0f6e5e96d0380586d0 Reviewed-on: https://chromium-review.googlesource.com/441207 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 44ff5a76 2017-02-03T15:15:43 Validate xoffset and yoffset are multiples of blocksize. Affects glCompressedTexSubImage and glCopyCompressedTexSubImage calls. BUG=668223 Change-Id: Ie71faa1fa7dac12cec51a2e29e0ce212ac54e411 Reviewed-on: https://chromium-review.googlesource.com/437605 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Yuly Novikov 72e27b02 2017-02-03T15:43:24 Fix error logging in ValidateBlitFramebufferANGLE Bundle an error message about whole buffer copies inside gl::Error instead of delivering it to the Platform. BUG=angleproject:1660 Change-Id: I13205b74529fbe40af05e7c1896c6315486e90e0 Reviewed-on: https://chromium-review.googlesource.com/437628 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov d73f852f 2017-01-13T17:48:57 Reland "Replace gl::trace logging with Chromium style logging" Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. Fix incorrect enabling of ERR() calls in UNIMPLEMENTED() and UNREACHABLE(), resulting in increased code size and <iostream> adding 5 static initializers to chrome because of cerr referenced in statically linked translator. BUG=angleproject:1660 Change-Id: I7caa18036118d532e0544f75278602559172ae04 Reviewed-on: https://chromium-review.googlesource.com/431457 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6a6b09c9 2017-01-12T21:52:29 Revert "Replace gl::trace logging with Chromium style logging" Failing Chromium static initializers check: FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower Possibly due to the static initializer for std::array for the log severity types. We should change it to POD. BUG=angleproject:1660 This reverts commit afcc41cee4ff63e7f6c9e60e55fc061adbba7dd4. Change-Id: Ifb362a4af78542608397c7a0b19e6afe076f2cf3 Reviewed-on: https://chromium-review.googlesource.com/427235 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov afcc41ce 2016-12-13T12:59:39 Replace gl::trace logging with Chromium style logging Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. BUG=angleproject:1660 Change-Id: I58192988ad16196706fe48d0c0ab0fd1a10c0210 Reviewed-on: https://chromium-review.googlesource.com/424173 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Kai Ninomiya 02f075c8 2016-12-22T14:55:46 Support EXT_texture_compression_s3tc_srgb on DX11 Also passes WEBGL_compressed_texture_s3tc_srgb conformance on WebGL 1/2 on DX11 BUG=angleproject:1553 BUG=chromium:630498 Change-Id: If1d17b54b1e8b998410079fd217626410015d7f1 Reviewed-on: https://chromium-review.googlesource.com/422585 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 0c7baf1b 2016-12-19T15:43:10 Implement the WebGL VertexAttribPointer restrictions BUG=angleproject:1523 BUG=chromium:668223 Change-Id: Ic89c476a6c95824069772e22ede596ba85ac8859 Reviewed-on: https://chromium-review.googlesource.com/422347 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cc507aa0 2016-12-12T10:09:52 Make the NPOT extension requestable. Fix NPOT validation in CopyTexImage. BUG=angleproject:1523 BUG=668223 TEST=conformance/more/functions/copyTexImage2DBadArgs.html Change-Id: I5fbf4f99fa941c356ecb57d67dd47a33741ce189 Reviewed-on: https://chromium-review.googlesource.com/418944 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 47c48080 2016-12-07T15:38:13 Validate that line width is not NaN. BUG=668223 Change-Id: I2f38b358dd4a6b9327562704dacce37f2b16acaa Reviewed-on: https://chromium-review.googlesource.com/417192 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9f09037b 2016-12-02T10:20:43 Change dEQP ES 3.1 expectations from FAIL to SKIP. UNIMPLEMENTED debug spam was causing the tests time time out. We can mark them as FAIL again once the dEQP test setup/tear down code doesn't emmit so many messages. Implement a couple validation cases for ES 3.1 to greatly reduce the spam. BUG=angleproject:1647 BUG=angleproject:1442 Change-Id: Ie7b4ac8737a2df1c0ada6ad53154ddf2f37d9c3c Reviewed-on: https://chromium-review.googlesource.com/415520 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c339c4e5 2016-11-29T10:37:36 Split WebGL compatibility into two extensions. The mechanism for requesting extensions is now a separate extension. Added a way to query the extensions that support enabling. BUG=angleproject:1523 Change-Id: I2efaa9f6d67b12ecae325f455404e34ba04d0e7c Reviewed-on: https://chromium-review.googlesource.com/414529 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
He Yunchao ced53ae2 2016-11-29T15:00:51 Fix the coding style issue for validation code Change-Id: I63aa1c1b3bbc52b0b522e4a703e6d20574eb21ad Reviewed-on: https://chromium-review.googlesource.com/414588 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3b573612 2016-10-31T14:08:10 Add enough ES 3.1 enums to support initializing the dEQP ES 3.1 tests. BUG=angleproject:1442 Change-Id: Iece3efb272fdcbe004d4136129ba7bfe74ba5265 Reviewed-on: https://chromium-review.googlesource.com/405530 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c51642b4 2016-11-14T16:18:26 Validate level exists for TexSubImage calls. Before validating the texture format, verify that the texture level already exists in glTexSubImage calls. BUG=602737 Change-Id: I0d83c7d43c7b358abdb59583dc83265df70c13b5 Reviewed-on: https://chromium-review.googlesource.com/411361 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 8a9e4bcf 2016-11-13T20:02:12 Refactor GLES2 Blend entry points. BUG=angleproject:747 Change-Id: I775265a7494aedd19ca4f18019e3b3181bfb12e9 Reviewed-on: https://chromium-review.googlesource.com/410135 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 01a80eeb 2016-11-07T12:06:18 Refactor all the Bind* GLES 2.0 entry points. This requires storing a reference the the Context's Framebuffer map in the ValidationContext. Likely we'll need to do this as well for the other non-shared object types. BUG=angleproject:747 Change-Id: I73ee8b0be3c3b9e54b7e48e49d6f738cf1d926dd Reviewed-on: https://chromium-review.googlesource.com/407843 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang eb66a6e2 2016-10-31T13:06:12 Replace the GLVersion class with gl::Version. Update code to use gl::Version in as many places as possible to ease ES 3.1 support. BUG=angleproject:1588 Change-Id: I3490b53a81027cf849dac551a9cc66ce04506144 Reviewed-on: https://chromium-review.googlesource.com/404946 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 496c02df 2016-10-20T11:38:11 Implement robust the GetBufferPointerv entry point. BUG=angleproject:1354 Change-Id: Id7dd8438224adb1e2729bcdc18a306e5dfc83a3b Reviewed-on: https://chromium-review.googlesource.com/401399 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang c52f6f1a 2016-10-14T10:18:00 Implement remaining robust TexImage entry points. BUG=angleproject:1354 Change-Id: Ied04fa28387f3bef9f2bead7b60878b1a353c8bd Reviewed-on: https://chromium-review.googlesource.com/399039 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill ef300b15 2016-10-07T15:12:09 Refactor some entry point stuff. BUG=angleproject:747 Change-Id: I80634b5e6de8bae1433c49a56a92d3b19c24e11d Reviewed-on: https://chromium-review.googlesource.com/395568 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 47110bf4 2016-04-20T11:13:22 Implement CHROMIUM_copy_compressed_texture for D3D11. BUG=angleproject:1356 Change-Id: Id563997d2921cf558c52a781ae66d8bde58d1f2f Reviewed-on: https://chromium-review.googlesource.com/339847 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang ff5b2d51 2016-09-07T11:32:23 Add a GL_ANGLE_robust_client_memory extension. This allows specifying data size to all GL functions that provide a pointer to client memory and a length parameter for all functions in which the driver writes to client memory. BUG=angleproject:1354 Change-Id: Ia68be1576b957cb529c87b5e0d1bd638c7dbd371 Reviewed-on: https://chromium-review.googlesource.com/382012 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang f41a7151 2016-09-19T15:11:17 Add an extension to disable resource generation on bind. BUG=angleproject:1518 Change-Id: I662f7b07da5c97831496f2617b0adadf9858bdc9 Reviewed-on: https://chromium-review.googlesource.com/386799 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang f607c60a 2016-09-21T11:46:48 Fix validation of ReadPixels format and type. The validation for ReadPixels allows for two combations of format/type: 1. Based on the current framebuffer's component type. * GL_RGBA/GL_UNSIGNED_BYTE if the framebuffer is a normalized (signed or unsigned). * GL_RGBA_INTEGER/GL_INTEGER if the framebuffer is an integer format. * GL_RGBA_INTEGER/GL_UNSIGNED_INTEGER if the framebuffer is an unsigned integer format. * GL_RGBA/GL_FLOAT if the framebuffer is any type of float framebuffer (added in EXT_color_buffer_float). * These combations are detailed in the ES2 spec on pg 105 or ES3 on pg 193. 2. The implementation read format/type returned from glGetIntegerv. * These formats are added by specs, OES_texture_float, EXT_texture_rg, EXT_read_format_bgra, etc. Update the GL and D3D backends to perform the conversion from GL_HALF_FLOAT to GL_HALF_FLOAT_OES. Continue allowing reading as BGRA_EXT to support Skia. Should be removed in the future. BUG=607283 BUG=angleproject:1478 Change-Id: I0312cad4d5f138ab036f383d221f8ccd19a77f6d Reviewed-on: https://chromium-review.googlesource.com/346232 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang c287ea6e 2016-09-16T14:46:51 Add WebGL validation extensions to ANGLE. BUG=angleproject:1523 Change-Id: I6fecb5055ed8087665aeee34b3a066ea8f38d51b Reviewed-on: https://chromium-review.googlesource.com/386281 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 29639857 2016-09-02T15:00:09 D3D11: Work around Intel uniform buffers bug. When copying from a staging buffer to a uniform buffer, the first upload would be incorrect. Work around this by trying to upload directly to a uniform buffer on the first BufferSubData call. BUG=chromium:593024 Change-Id: I0df3a1422b962bf3ece5d445f435df01e3544b67 Reviewed-on: https://chromium-review.googlesource.com/368774 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>