src/libANGLE/validationES2.cpp


Log

Author Commit Date CI Message
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>
Martin Radev 4c4c8e72 2016-08-04T12:25:34 Add compute program compilation and linking support Compute shaders can be now compiled and linked to create programs. Some tests are added to verify successful and unsuccessful compute shader linking. The patch also replaces std::array<int, 3> with a custom struct WorkGroupSize. BUG=angleproject:1442 TEST=angle_end2end_tests TEST=angle_unittests Change-Id: I4ab0ac05755d0167a6d2a798f8d7f1516cf54d84 Reviewed-on: https://chromium-review.googlesource.com/366740 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 97073d12 2016-04-20T10:42:34 Implement CHROMIUM_copy_texture for D3D11. BUG=angleproject:1356 Change-Id: I70246762411dbeeb3e291e317854139a68d80070 Reviewed-on: https://chromium-review.googlesource.com/339434 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 0c8abca1 2016-07-22T20:21:26 Fix CopyTexSubImage validation. Now that we preserve the sized-ness information, we can validate CopyTexSubImage and related methods correctly. Fixed a lot of WebGL 2 tests when using ANGLE. BUG=angleproject:1228 Change-Id: I959322c0a9bb16a2f16d60dce7cd1e63ca95b45a Reviewed-on: https://chromium-review.googlesource.com/362618 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a3944d4f 2016-07-22T22:13:26 Add gl::Format to represent a texture/rb/surface format. This has a few advantages: it preserves all the information of the internal format, such as if it is sized or unsized. It also saves looking up the format multiple times in the table, which should improve speed in some cases. The extra sized-ness information will allow us to perform the correct validation in CopyTexSubImage calls. BUG=angleproject:1228 Change-Id: I42954771b0a9a968f5d787b8cf6e0af721791855 Reviewed-on: https://chromium-review.googlesource.com/362626 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Martin Radev 1be913cf 2016-07-11T17:59:16 Add support for ES31 context creation The dEQP test for context creation passes. SH_WEBGL3_SPEC has been added, but it should be considered whether we should keep it, remove it or rename it. It was added so that there is a webgl mapping to es 310 shaders. Check Compiler.cpp. The bison file has been modified so that some tokens from es3 can be also used in es31 as well. A separate macro ES3_1_ONLY is added so that some tokens are limited only for es 310 shaders. BUG=angleproject:1442 TEST=angle_unittests Change-Id: I2e5ca227c96046c30dc796ab934f3fda9c533eba Reviewed-on: https://chromium-review.googlesource.com/360300 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Martin Radev 9d901791 2016-07-15T15:58:58 Fix KHR_Debug segfault errors Calls to functions ObjectLabel, ObjectPtrLabel, GetObjectLabel, GetObjectPtrLabel were resulting into segfaults due to improper validation and parameter handling. It could be that the implementations of those functions were based on an earlier version of the KHR_Debug extension. The patch fixes the segfault error and almost all failing dEQP 3.1 tests related to KHR_Debug. The failing tests were also relevant to older ES versions. There is still one failing test, but that one fails since ES3.1 is not fully supported yet. List of reasons for the segfault error and failing tests: - the segfault error was caused by strlen called on a null pointer - another segfault was caused by writing out the length to a null pointer - even if the buffer size for getObject(Ptr)Label is 0, still the length of the label can be returned. That was not handled. BUG=angleproject:1446 TEST=angle_deqp_gtest_gles31_tests --gtest_filter=*functional_debug_object* Change-Id: I4743be8e862f3620091061cd7abb206a426655ed Reviewed-on: https://chromium-review.googlesource.com/361300 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill a8503cef 2016-07-18T13:47:12 Re-land "GN: Enable chromium_code config instead." Using "no_chromium_code" is a bit less strict, but ANGLE should be able to handle slightly stricter warnings. Re-land with fix for Clang build. BUG=angleproject:1449 Change-Id: I8988287d630a6258f2f9ee90e7bfef5f2d5799cd Reviewed-on: https://chromium-review.googlesource.com/361331 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5bc93c41 2016-07-18T16:34:42 Revert "GN: Enable chromium_code config instead." Seems to fail the Clang build: ../../third_party/angle/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp(35,60): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare] maxSrvMip = (desc.Texture2D.MipLevels == -1) ? INT_MAX : maxSrvMip; ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~ BUG=angleproject:1449 This reverts commit aeb477fbe5fad337815560a0031815f0636471a1. Change-Id: I01baaf082f282c9d80a9c17fd6ffc2b8911313b2 Reviewed-on: https://chromium-review.googlesource.com/361094 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill aeb477fb 2016-07-15T13:32:37 GN: Enable chromium_code config instead. Using "no_chromium_code" is a bit less strict, but ANGLE should be able to handle slightly stricter warnings. BUG=angleproject:1449 Change-Id: Ifaf77201085dd70cf5ff628b1aa02de55c5e96ba Reviewed-on: https://chromium-review.googlesource.com/360940 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Sami Väisänen 46eaa946 2016-06-29T10:26:37 Support CHROMIUM_path_rendering fragment operations This brings two new APIs, BindFragmentInputLocation and ProgramPathFragmentInputGen that together dictate how the fragment shader varyings are used. BUG=angleproject:1382 Change-Id: I4b52fd8a3555235a73aecd4f3dba2d500789cbb0 Reviewed-on: https://chromium-review.googlesource.com/357071 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Sami Väisänen <svaisanen@nvidia.com> Commit-Queue: Sami Väisänen <svaisanen@nvidia.com>
Sami Väisänen d59ca052 2016-06-21T16:10:00 Support instanced CHROMIUM_path_rendering This implements instanced path rendering. BUG=angleproject:1382 Change-Id: I4654251882975d707b22c7bb522af14ae34eb1a1 Reviewed-on: https://chromium-review.googlesource.com/355401 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Sami Väisänen <svaisanen@nvidia.com>
Sami Väisänen e45e53bd 2016-05-25T10:36:04 Support CHROMIUM_path_rendering This is partial support for CHROMIUM_path_rendering and implements basic path management and non-instanced rendering. BUG=angleproject:1382 Change-Id: I9c0e88183e0a915d522889323933439d25b45b5f Reviewed-on: https://chromium-review.googlesource.com/348630 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 51f40ecd 2016-06-15T14:06:00 Make Framebuffer::checkStatus non-const. BUG=angleproject:1388 Change-Id: Ia9befba0c915c087f2fe0557d91060256f6d4950 Reviewed-on: https://chromium-review.googlesource.com/348955 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dfde6abf 2016-06-09T07:07:18 Context: Remove mutable gl::State getter. This will preserve layering - the API layer doesn't mutate the state directly, it passes the API call through to the Context. Is also removes the possiblity of any shenanigans of the Validation layer changing the GL state. Also, this CL refactors a few validation entry points to take ValidationContext instead of Context. ValidationContext will be the correct way to interact with the gl::Context in the Validation code. Finally, additional refactorings make ContextState a proper class with private data. This allows the ContextState itself to keep a mutable pointer to the gl::State, so ValidationContext can modify it if necessary (and it will be necessary for Framebuffer completeness caching). BUG=angleproject:1388 Change-Id: I86ab3561573caa9535c8d1b8aad4ab3d0e7cd470 Reviewed-on: https://chromium-review.googlesource.com/348954 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4b4cdff8 2016-06-06T13:53:38 Fix unpack parameter validation. BUG=angleproject:1397 Change-Id: Icdfc99eefcfad730ec887b82ec0758a6d6c0b9a7 Reviewed-on: https://chromium-review.googlesource.com/348064 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 513558d3 2016-06-02T13:04:11 Pass depth to computeBlockSize. This was very wrong for 3D textures. BUG=angleproject:1384 Change-Id: I7f042449e30e1e909778c0524d1ce99d20ddfd65 Reviewed-on: https://chromium-review.googlesource.com/348063 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e2e406c3 2016-06-02T13:04:10 Add base::numerics for safe math and conversions. This replaces are "IsUnsignedXXXSafe" family of methods. Also add overflow checks to unpack block sizes. BUG=angleproject:1397 Change-Id: Ib47be149b0486c70f795b0d0f8899441faac9340 Reviewed-on: https://chromium-review.googlesource.com/348062 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang b66a9097 2016-05-16T15:59:14 Add support for OES_EGL_image_external and OES_EGL_image_external_essl3. BUG=angleproject:1372 Change-Id: I8489e7fd0ab409b0775041ad5e9fbf0aab53886d Reviewed-on: https://chromium-review.googlesource.com/344734 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Sami Väisänen a797e066 2016-05-12T15:23:40 Support CHROMIUM_framebuffer_mixed_samples in the GL backend BUG=angleproject:1378 Change-Id: I634c41f3507dbdeaa56234c4de1b498f81c848ed Reviewed-on: https://chromium-review.googlesource.com/344520 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Sami Väisänen <svaisanen@nvidia.com>
Jamie Madill 437fa654 2016-05-03T15:13:24 Add a ContextImpl class. This class can contain impl-specific functionality for a Context. This will eventually replace the Renderer class, and we can then start passing around a gl::Context instead of gl::ContextState. In D3D11, the ContextImpl could hold a DeferredContext, which would enable multi-thread rendering. In GL, we can implement non-virtual (native) Contexts. In Vulkan it might store the logical device. BUG=angleproject:1363 Change-Id: I39617e6d1a605d1a9574832e4d322400b09867ec Reviewed-on: https://chromium-review.googlesource.com/340745 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang d860552f 2016-04-13T10:19:12 Implement support for CHROMIUM_bind_uniform_location. BUG=angleproject:1353 Change-Id: Ia219ff973de0de2f8e112c276b3ab6319f7d3884 Reviewed-on: https://chromium-review.googlesource.com/334252 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Ian Ewell 54f8746e 2016-03-10T13:47:21 Add initial support for various stream extensions. Add entry points and validation for various egl stream extensions including EGL_KHR_stream_consumer_gltexture and EGL_NV_stream_consumer_gltexture_yuv and NV_EGL_stream_consumer_external. The extensions functionality is not yet implemented and the extension strings are thus not exposed yet. BUG=angleproject:1332 Change-Id: I115d872557db38d8dd94cc367038668406719109 Reviewed-on: https://chromium-review.googlesource.com/332026 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Olli Etuaho 4f66748d 2016-03-30T15:56:35 Fix buffer mapping validation and refactor entry points Checks for extension support are added to GetBufferPointervOES, mapBufferOES, unmapBufferOES, mapBufferRangeEXT and flushMappedBufferRangeEXT. The GetBufferPointerv function now checks if state is queried from buffer object zero. The code is also refactored so that validation happens in separate validation functions and the implementations are in Context functions. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.state.get_buffer_pointerv dEQP-GLES3.functional.*buffer*map* (no regression) Change-Id: I0f439abd12c92c51324f2e5a31bf621f61534306 Reviewed-on: https://chromium-review.googlesource.com/336164 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 41997e76 2016-03-10T13:38:39 Improve validation of Gen/Delete calls Add checks for negative count to GenTransformFeedbacks and DeleteTransformFeedbacks, and check for active transform feedbacks in DeleteTransformFeedbacks. Unify validation and error messages of all other Gen/Delete calls. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.* (two more tests pass) Change-Id: I128063fab3db27a25e282a10c916c53646d68b9c Reviewed-on: https://chromium-review.googlesource.com/332142 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 73a84969 2016-02-12T09:27:23 Refactor more Texture entry points to a consistent style. TexImage, SubImage and the Compressed variants were all taking a GL Context as the first parameter, which is a layering violation and also caused problems with reworking how the sync works. Fix this by refactoring them in the same style as the CopyTex* entry points. BUG=angleproject:1260 BUG=angleproject:747 Change-Id: Ibe5e87d0ebc790e2dcadb8ba153cf40fec73d1f6 Reviewed-on: https://chromium-review.googlesource.com/327258 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Minmin Gong e3939b98 2015-12-01T15:36:51 D3D11: Transcode ETC1 to BC1. Adds a new extension to allow transcode ETC formats to suitable BC formats. This commit implements ETC1 to BC1. More formats will be supported soon. BUG=angleproject:1285 Change-Id: Iacbfbc2248dfe1aebf24b92696249a9404e331cd Reviewed-on: https://chromium-review.googlesource.com/316511 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang a15472a3 2015-08-11T11:48:03 Fix bugs with drawbuffer state. * IsAttachmentEnabled was checking the wrong draw buffer state. Instead of checking that drawbuffer[colorAttachment] is in use, it should have been scanning for a drawbuffer state that points to colorAttachment. * Allow for maxDrawBuffer != maxColorAttachments. Tested by the GL backend on some systems that don't have the draw buffers extension. Fixed by updating the helpers and adding a new getDrawBuffer helper. BUG=angleproject:1121 Change-Id: Idd1b0a9ec4a3f944d332c708364408bf5d59e1fd Reviewed-on: https://chromium-review.googlesource.com/292740 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Ian Ewell fc7cf8e9 2016-01-20T15:57:46 Fixed validation errors in teximage3d and friends. BUG=angleproject:1169 BUG=angleproject:1101 Change-Id: I3770335d04cafd652c2f3839afca3e4a854e6e76 Reviewed-on: https://chromium-review.googlesource.com/322381 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Ian Ewell <ewell@google.com>
Jamie Madill c29968bb 2016-01-20T11:17:23 Refactor FBO related entry points. Change the validation to the consistent style for easy auto-generation and make the context itself implement the entry points. This will more easily allow us to sync state without passing the Context to the Texture methods, or doing work in the entry point. BUG=angleproject:1260 BUG=angleproject:747 Change-Id: I7ed6ec5418b7f51d9e59529267b14b76b87743fb Reviewed-on: https://chromium-review.googlesource.com/319823 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 70d0f499 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I9ced3e7ab1515feddf2ec103c26b2610a45b1784 Reviewed-on: https://chromium-review.googlesource.com/319830 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 66988745 2015-12-22T19:39:19 Revert "Implement GL_KHR_debug." This reverts commit 6c521b7a70a53b1c9f7762e53e34b5a8146b0f7b. Change-Id: I6ff981198e31f34d3e405edea6277ee75516d6ee Reviewed-on: https://chromium-review.googlesource.com/319820 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6c521b7a 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I78d14cc8c94f5cef58604220f0ca847473b25bf8 Reviewed-on: https://chromium-review.googlesource.com/317820 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e102fee7 2015-12-10T11:23:30 Add stub entry points for GL_KHR_debug. BUG=angleproject:520 Change-Id: I6f19ca160214a44c75619c320d5e1db7e4098eda Reviewed-on: https://chromium-review.googlesource.com/317540 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c5629759 2015-12-07T16:29:04 Implement full program binary support for ES3. Refactor validation to be used in both the OES and ES3 entry points. BUG=angleproject:600 BUG=angleproject:1101 Change-Id: I2008c4ea04ce07910f03ae0b997f8a77b66203d8 Reviewed-on: https://chromium-review.googlesource.com/316620 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross bc781f31 2015-10-26T09:27:38 Re-re-land "Add GL_OES_vertex_array_object to D3D11 and GL renderers" + Include fixed validation logic for GL_UNPACK_SKIP_IMAGES and GL_UNPACK_ROW_LENGTH + Include fix for Clang build break BUG=angleproject:1186 Change-Id: I403a066e29614f532db6931755265d2ee088d442 Reviewed-on: https://chromium-review.googlesource.com/308746 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5296141b 2015-10-26T15:33:27 Revert "Re-land "Add GL_OES_vertex_array_object to D3D11 and GL renderers"" Fails build on Clang because Caps.cpp defines a constructor initializer out-of-order with the member variable order in the header. BUG=angleproject:1186 This reverts commit 7432321e03a70a99639b149f44cf80086feb4ea2. Change-Id: I2840d02e6e7b6bbc76eb495b5462c43116a5c4a6 Reviewed-on: https://chromium-review.googlesource.com/308800 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 7432321e 2015-10-23T10:07:18 Re-land "Add GL_OES_vertex_array_object to D3D11 and GL renderers" Include fixed validation logic for GL_UNPACK_SKIP_IMAGES and GL_UNPACK_ROW_LENGTH BUG=angleproject:1186 Change-Id: I9910a67733702a05991f62129d200ea39adb910c Reviewed-on: https://chromium-review.googlesource.com/308421 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 023a290e 2015-10-23T16:43:24 Revert "Add GL_OES_vertex_array_object to D3D11 and GL renderers" This is failing the WebGL 2 test: WebglConformance.conformance2_state_gl_get_calls http://build.chromium.org/p/chromium.gpu.fyi/builders/Win8%20Debug%20%28NVIDIA%29/builds/9807 Also the dEQP-GLES3 tests: dEQP-GLES3.functional.state_query.integers.unpack_skip_images_get* BUG=angleproject:1186 This reverts commit eb36e275b8f63ebd442a2580e858ef671ddfe1be. Change-Id: If903c471f4610ac0b33a268df42f3329d672f429 Reviewed-on: https://chromium-review.googlesource.com/308460 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross eb36e275 2015-10-20T13:44:10 Add GL_OES_vertex_array_object to D3D11 and GL renderers BUG=angleproject:1186 Change-Id: I7c685084b42f977902228cadca3263064881ba77 Reviewed-on: https://chromium-review.googlesource.com/307038 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 6ea6f942 2015-09-11T13:11:22 Support GL_ETC1_RGB8_OES. Passes all dEQP tests related to etc1. Reland: Updated to work with the D3D11 renderer and re-tested with chromium's gles2_conform_test. Change-Id: Id2ce1b0eb58129152f67016ce2dc3ab19208269c Reviewed-on: https://chromium-review.googlesource.com/299770 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 08528e17 2015-10-07T16:24:40 glTexSubImage2D should always allow non-power-of-two inputs If GL_OES_texture_npot isn't active then ANGLE currently prevents calls to glTexSubImage2D with: - level > 0 - width/height NPOT This isn't correct. It is legitimate to supply data to a NPOT subregion of a POT texture via glTexSubImage2D. Fixes these dEQP tests on 9_3: dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.a8_2d dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.a8_cube dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.l8_2d dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.l8_cube dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.la88_2d dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.la88_cube dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.rgb565_2d dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.rgb565_cube dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.rgb888_2d dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.rgb888_cube dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.rgba4444_2d dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.rgba4444_cube dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.rgba5551_2d dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.rgba5551_cube dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.rgba8888_2d dEQP-GLES2.functional.texture.specification.basic_texsubimage2d.rgba8888_cube Change-Id: I5889a27edbfa807995fa20b16f36456f676b80fc Reviewed-on: https://chromium-review.googlesource.com/304612 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com> Tested-by: Jamie Madill <jmadill@chromium.org>
tmartino 0ccd5aee 2015-10-01T14:33:14 Correcting INVALID_OPERATION to INVALID_ENUM Should return INVALID_ENUM when uncompressed texture passed to compressed image constructor. BUG=angleproject:1168 Change-Id: If30f0407e7455d6e19432831883d33a1e8bfec9a Reviewed-on: https://chromium-review.googlesource.com/303750 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 69cce580 2015-09-17T13:20:36 Split the SamplerState struct into SamplerState and TextureState. SamplerState is now only the members that are overridden by a sampler object, this makes it easy to update those specific members. Opted for getters and setters for each member in Texture and Sampler because it will be required to enable dirty bits for these states. Added maxAnisotropy to the SamplerState instead of texture state. The sampler objects extension mentions it should be there. BUG=angleproject:1162 Change-Id: I5aa6d702bd5915ee9df1976afef3c8c1f69d27c8 Reviewed-on: https://chromium-review.googlesource.com/300490 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Dian Xiang bf18ed01 2015-09-11T10:50:04 Adding checks in DrawBuffers to return INVALID_ENUM When a enum is given that is not a BACK, NONE, or COLOR_ATTACHMENTi where i ranges from 0 to MAX_COLOR_ATTACHMENT, an INVALID_ENUM should be returned rather than an INVALID_OPERATION. BUG=angleproject:1148 Change-Id: I3663f897face14f6ba46a15fb982efda6f4f4b05 Reviewed-on: https://chromium-review.googlesource.com/299312 Tryjob-Request: Dian Xiang <dianx@google.com> Tested-by: Dian Xiang <dianx@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Zhenyao Mo 1170e474 2015-09-11T21:48:20 Revert "Support GL_ETC1_RGB8_OES in the OpenGL renderer." This reverts commit 20bf7034533fbd9ff57296c5f9a5b1b9e06059db. Broke GL2ExtensionTests_compressed_etc1_rgb8_texture_input_run on win bots Change-Id: I2b48aac1512d916671d41e03f0409c404d6d7c88 Reviewed-on: https://chromium-review.googlesource.com/299429 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
Geoff Lang 20bf7034 2015-09-11T13:11:22 Support GL_ETC1_RGB8_OES in the OpenGL renderer. Passes all dEQP tests related to etc1. Change-Id: I33f37c44396899d87e9ef19bd7a6e2b2482d232a Reviewed-on: https://chromium-review.googlesource.com/299342 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 08332634 2015-05-05T13:35:47 Implement EXT_discard_framebuffer in D3D11 renderer Change-Id: I52bcf0cfb1aa123e085a35730fdefb006b617c3c Reviewed-on: https://chromium-review.googlesource.com/269232 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1ea584c5 2015-03-26T21:08:33 Revert "Implement EXT_discard_framebuffer in D3D11 renderer" Causes failures in video related WebGL tests. Either there is a bug in the implementation or how chrome is using it. This reverts commit b13daa8f79f4d16a990d968d7d2c04da6b72d302. Change-Id: Ic0d74840c664bf4de18d85cc3ff7f7153936d9b0 Reviewed-on: https://chromium-review.googlesource.com/262715 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross b13daa8f 2015-03-19T17:00:44 Implement EXT_discard_framebuffer in D3D11 renderer Change-Id: I0e39a196796813203c841c46aa2a6b89957f6051 Reviewed-on: https://chromium-review.googlesource.com/261355 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill bc393df9 2015-01-29T13:46:07 Allow 32-bit float formats in ES2 CopyTexSubImage. These corner case formats can come about from using floating point textures and trying to copy between them. There currently isn't a good alternative in WebGL 1 for copies. BUG=angle:850 Change-Id: I3dc29e42b5ec7dcf071185bc09c6b3e9e3cb3207 Reviewed-on: https://chromium-review.googlesource.com/241048 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 051dbc79 2015-01-05T15:48:58 Create a formatutilsD3D and move some functions from formatutils. BUG=angle:681 Change-Id: I694073c50dccd05c3117761e446eba0d15c03293 Reviewed-on: https://chromium-review.googlesource.com/238480 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 691e58cd 2014-12-19T17:03:25 Merge all gl::Texture* classes. The validation for sampler completeness had a lot of duplicated code. The special cases have been merged into the base class by checking mTarget. BUG=angle:681 Change-Id: I11d94c1432f8fc70a1edaaf8228bbc43c3c8fff3 Reviewed-on: https://chromium-review.googlesource.com/236932 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a9be0dc6 2014-12-17T12:34:40 Refactor Texture to track image information for size and format queries. BUG=angle:681 Change-Id: Ifb3f52d6348e4479181e66f1c39578f49e9dcf76 Reviewed-on: https://chromium-review.googlesource.com/235613 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 054369e3 2015-01-07T10:57:08 Allow the special format BGR5_A1 in CopyTexImage. We use this format as a backbuffer texture for the EGL surface in some configs. Thus, the app needs to be able to use it, since they don't know when they are secretly using BGRA instead of RGBA, similar to our existing logic which allows BGRA in CopyTexImage. BUG=angle:811 Change-Id: I3748d38b3b085aa4ccaae67ce88711b13eb2c98e Reviewed-on: https://chromium-review.googlesource.com/239192 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 27839c6d 2014-12-03T10:58:53 Remove unrefed texture validation variables. These were causing unused variable warnings in Linux GCC builds. BUG=angle:773 Change-Id: I860d425a1caef07a58f6ff1b6c113ad7b63283dc Reviewed-on: https://chromium-review.googlesource.com/231856 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang 2b5420c0 2014-11-19T14:20:15 Merge libGLESv2 and libEGL classes into libANGLE. BUG=angle:733 Change-Id: Ic491c971411fe82c56cd97c5c8325ac14ec218df Reviewed-on: https://chromium-review.googlesource.com/230830 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>