src/libANGLE/validationES3.cpp


Log

Author Commit Date CI Message
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 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 d2f0c74c 2016-11-02T10:34:41 Use safe math in ValidateCopyBufferSubData. This should fix any potential out of bounds reads/writes. BUG=chromium:660854 Change-Id: Iffa00e4551d7362115cbf023a09b1d0e15f724c8 Reviewed-on: https://chromium-review.googlesource.com/405816 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 21b786b1 2016-11-01T17:41:31 ES3: Make copy conversion set a static switch. This removes the global std::set initialization. BUG=angleproject:1389 BUG=angleproject:1459 Change-Id: I6a7f4211905ea4a83e0e2337977e2f6fb375a7dd Reviewed-on: https://chromium-review.googlesource.com/405368 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b0817d17 2016-11-01T15:48:31 Refactor CopyBufferSubData entry point. This brings it in line with the new style. BUG=angleproject:747 Change-Id: Ie4b223d018999be18c3b19fae9cc825a78de09a9 Reviewed-on: https://chromium-review.googlesource.com/405815 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: 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 cf255eac 2016-10-20T11:39:09 Implement robust the GetIntegeri_v entry point. BUG=angleproject:1354 Change-Id: I408d0e78064aa4e493d6ca66565384ac585040e1 Reviewed-on: https://chromium-review.googlesource.com/401400 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>
Geoff Lang 2186c385 2016-10-14T10:54:54 Implement robust GetQuery entry points. BUG=angleproject:1354 Change-Id: Ic1aaab56d2313a19fb0362f280dbfbf804fb3fcc Reviewed-on: https://chromium-review.googlesource.com/399040 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 2e43dbb7 2016-10-14T12:27:35 Implement remaining robust Get entry points. BUG=angleproject:1354 Change-Id: I204962a7178d47a43034d0213c81b82d8f6a25be Reviewed-on: https://chromium-review.googlesource.com/399043 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c1984ed4 2016-10-07T12:41:00 Implement robust TexParameter and SamplerParameter entry points. BUG=angleproject:1354 Change-Id: I3aa2dcb8603a839f9c07cd9dd41cb695d2e699f2 Reviewed-on: https://chromium-review.googlesource.com/395529 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 76648fe2 2016-10-05T17:01:41 Constexpr-fy the ES3 effective format map. This removes the global std::vector constructor here. BUG=angleproject:1459 Change-Id: I407a7bda1f8f8a2dd8d5b0e847573f8594eccf39 Reviewed-on: https://chromium-review.googlesource.com/394235 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 55e98210 2016-10-05T16:39:13 Make global ES3 formats STL map a switch. This eliminates another global std::map, and replaces it with a json generated switch. This should be better for threading, better on memory use, and faster. BUG=angleproject:1389 BUG=angleproject:1459 Change-Id: I1d289637c00783690ec8ea743ea2aa17b0ab8e50 Reviewed-on: https://chromium-review.googlesource.com/394234 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Corentin Wallez 886de369 2016-09-27T10:49:35 Factor code between PixelUnpackState and PixelPackState BUG=angleproject:1512 Change-Id: I4c60472d216bfc5198e635d70fd197a5738dde98 Reviewed-on: https://chromium-review.googlesource.com/390133 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez ece7c5a8 2016-09-21T15:28:23 Add validation for the pack buffer in ReadPixels BUG=angleproject:1512 Change-Id: Ia6bac628c35f04bc5d3adfde1569902475519698 Reviewed-on: https://chromium-review.googlesource.com/387668 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Corentin Wallez c5cacd60 2016-09-14T14:50:24 Implement a separate last row texture unpack buffer upload workaround When uploading textures from an unpack buffer, some drivers expect an extra row paading, causing them to think the pixel buffer is not big enough. We work around this by uploading the last row separately. BUG=angleproject:1512 Change-Id: I52fb8b35dc450b957f1fafb0b405c81bf0504157 Reviewed-on: https://chromium-review.googlesource.com/385193 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 4e58af61 2016-08-26T10:56:52 Add missing TexImage and CopyTexImage format combinations for ES3. * Some unsized DEPTH_COMPONENT combinations were not added to the validation tables for the ANGLE_depth_texture extension. * The HALF_FLOAT_OES format was not validated in ES3 for RGB and RGBA formats when the OES_texture_half_float extension is supported. * BGRA->BGRA CopyTexImage validation was missing. No more errors are generated within ANGLE when visiting http://alteredqualia.com/tools/webgl-features/ BUG=605754 Change-Id: If654c34adcebb4cd3eaa994ad7e912f6ffa4df55 Reviewed-on: https://chromium-review.googlesource.com/376281 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Martin Radev 66fb8206 2016-07-28T11:45:20 Add ES3.1 API constants The newly added capability constants are handled in the corresponding glGet functions. Also, getBooleani_v has been added. BUG=angleproject:1442 TEST=angle_deqp_gtest_gles31_tests --gtest_filter=*functional_state_query_integer_max_* TEST=angle_deqp_gtest_gles31_tests --gtest_filter=*state_query_indexed_max_compute_work_group_size* TEST=angle_unittests TEST=angle_end2end_tests Change-Id: I846e006307563ae81d8b6c62cf261417e15186c7 Reviewed-on: https://chromium-review.googlesource.com/362270 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
Olli Etuaho 989cac34 2016-06-08T16:18:49 Validate that unpack skip is in bounds Unpack skip needs to be taken into account when determining which part of the unpack buffer is read. This is now done in the out-of-bounds check when validating texture upload calls. Unpack skip code is removed from D3D9 backend, since skip is not supported in GLES2. BUG=angleproject:1411 TEST=angle_end2end_tests Change-Id: I0db4db0877a352613c57e2820e5b650edb5a73ab Reviewed-on: https://chromium-review.googlesource.com/352450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
Vincent Lang 25ab4510 2016-05-13T18:13:59 Implement GL_EXT_texture_norm16 extension BUG=angleproject:1365 Change-Id: I972b156ecb41ff44bc1f6365373ab386bacc85f1 Reviewed-on: https://chromium-review.googlesource.com/346530 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 76287680 2016-04-25T09:23:38 Fix the CopyTex validation logic for sized types Previously we allowed copies to a sized format only if the depth of each component matched (including 0 depth). Now we require that the bit depth of non-empty component matches. BUG=605775 Change-Id: If8abab886b0da5a1c8e89adabf3809f928dcedce Reviewed-on: https://chromium-review.googlesource.com/340382 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
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>
Ian Ewell bda75597 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I39b6ec393ea338e2c843fb911acc1b36cd1158a0 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com> Reviewed-on: https://chromium-review.googlesource.com/341254 Reviewed-by: Ian Ewell <ewell@google.com>
Corentin Wallez 9670b03e 2016-04-29T09:47:47 Revert "Finish NV12 support via streams." Broke Windows Clang compilation, see https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Clang%20Builder%20%28dbg%29/builds/3583/steps/compile/logs/stdio and search for TextureStorage11.h This reverts commit 9b8b359fa3615be7c7492239a48f61103b2e4fcc. Change-Id: I6e54305eba02b40927a35577594df39e951adb32 Reviewed-on: https://chromium-review.googlesource.com/341430 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Ian Ewell 9b8b359f 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I098940e6f25e113dcc4fc8d22ffed4b5a16fd860 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@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 f0fee07a 2016-03-30T15:11:58 Fix ProgramParameteri validation dEQP tests suggest that passing a value other than GL_FALSE or GL_TRUE to ProgramParameteri generates INVALID_VALUE. The code is also refactored so that the implementation of ProgramParameteri is in the Context object. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.shader.program_parameteri Change-Id: I432d19fb574e58a7e0059189ab5b1863de029cdc Reviewed-on: https://chromium-review.googlesource.com/336163 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 37477918 2016-03-30T14:54:40 Fix samplerParameter validation Refactor the validation out from the API and into a separate Validate function. Also check the sampler parameter first to match dEQP expectations. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.shader.sampler* (all pass) Change-Id: I5f4072d9e52d37f741bd4c90f1bffe13371af3f5 Reviewed-on: https://chromium-review.googlesource.com/336162 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho c3e55a43 2016-03-09T16:29:18 Validate program changes wrt transform feedback UseProgram can't be called while transform feedback is active and unpaused. Validate this by checking the presence of active transform feedback in UseProgram. LinkProgram or ProgramBinary can't be called while transform feedback associated with the program is active. Validate this by going through all of the existing transform feedback objects when one of these functions is called and checking whether they are associated with the program being changed. A program association is added to gl::TransformFeedback to facilitate this. BeginTransformFeedback can't be used to unpause a transform feedback object, so code for that is removed. The validation of the entry points touched in this patch is refactored to follow the current convention of separate Validate* functions, though with LinkProgram following this convention fully isn't practical. This patch also makes sure that ANGLE doesn't invoke behavior that the GL spec doesn't specify if a program object associated with a paused transform feedback is deleted. Tests are edited so that they don't call UseProgram when it generates an error. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.shader.* (2 more tests pass), dEQP-GLES3.functional.transform_feedback.* (no regressions), angle_end2end_tests Change-Id: I2e5b3a027ced11249b762ec01a29fa41d2c0dd96 Reviewed-on: https://chromium-review.googlesource.com/332141 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 71dfb369 2016-03-10T14:04:27 Add validation for DrawRangeElements end < start end < start must generate an INVALID_VALUE error. Before this patch INVALID_OPERATION was generated from the check which validated the actual index range against end and start in this case. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.vertex_array.* (few more subtests pass) Change-Id: Ida9c5a8bc9dc416f1955e9012e5715c0848a0307 Reviewed-on: https://chromium-review.googlesource.com/332143 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>
Olli Etuaho 84c9f593 2016-03-09T14:37:25 Fix framebuffer attachment enum validation In GLES 3.0, GL_COLOR_ATTACHMENTi enums run all the way up to i=31, and don't stop at i=15 which the validation was previously checking against. It's acceptable to use this new enum range also for EXT_draw_buffers, since an error will still be generated if an enum is outside the range of maximum supported attachments. Also, generate INVALID_ENUM when dEQP tests expect it to be generated for color attachment number that's outside the supported range. This is not in line with the published 3.0 spec, but that's just an oversight in the spec document. Also fix incorrect INVALID_VALUE error in the validation of renderbufferStorageMultisample to INVALID_OPERATION. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.buffer.* (all pass) Change-Id: Ib8cf92651d29ef8fe8da0ce4bfa456cbc4d48850 Reviewed-on: https://chromium-review.googlesource.com/332140 Reviewed-by: Corentin Wallez <cwallez@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>
Ian Ewell 3ffd78bc 2016-01-22T16:09:42 Add initial support for EXT_disjoint_timer_query. Basic timer queries are supported and tested in the OpenGL backend but are not enabled by default. A good portion of the existing query code was also refactored for improved validation - specifically for validating that the appropriate extensions are available. BUG=angleproject:1265 Change-Id: Iebae994cd7a8d3ed3e9fc3776fe2f3d99caa9237 Reviewed-on: https://chromium-review.googlesource.com/323450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Ian Ewell <ewell@google.com> Tested-by: Ian Ewell <ewell@google.com>
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>
Jeff Muizelaar bb1a5be9 2015-12-02T12:03:46 Expose unsized GL_FLOAT formats required by GL_OES_texture_float BUG=angleproject:1209 Change-Id: I490c524d203dd72a8e6c556b537c4254720d9447 Reviewed-on: https://chromium-review.googlesource.com/315510 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Geoff Lang <geofflang@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>
Geoff Lang 839ce0b4 2015-10-23T13:13:12 Validate that compressed image formats are supported by the context. This validation was previously acceptable because all renderers supported all compressed formats in the format tables. Adding new formats that are not universally supported would have caused failures in the dEQP negative API tests. BUG=angleproject:1185 Change-Id: I102a3286a351a7c8936527963a382d9673341fc0 Reviewed-on: https://chromium-review.googlesource.com/308490 Reviewed-by: Corentin Wallez <cwallez@chromium.org> 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>
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 7c10269d 2015-10-02T16:43:40 Correcting INVALID_ENUM issue for GLES3. Similar to prior fix for GLES2, validation now correctly returns INVALID_ENUM instead of shorting out. BUG=angleproject:1168 Change-Id: I8247b0b3520b0f116856049c85606bb44fa24021 Reviewed-on: https://chromium-review.googlesource.com/303472 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Tommy Martino <tmartino@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>
Geoff Lang b92c133e 2015-09-04T12:54:55 Don't use the mip level to validate the 2D texture depth parameter. BUG=angleproject:1149 Change-Id: I5dd45c99b373d480814c9fbdbe0abd419a270c89 Reviewed-on: https://chromium-review.googlesource.com/297052 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 86af3d27 2015-07-21T15:14:07 ES3: Fix assertion failure in validation edge case. Passing a 2D texture type to a 3D texture function could result in an explosion. BUG=angleproject:1079 TEST=dEQP-GLES3.functional.negative_api.texture.compressedteximage3d Change-Id: Ibfcc4bdb334270f8fa27ebed6bcc3911986e7c7c Reviewed-on: https://chromium-review.googlesource.com/286852 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 689325c2 2015-07-20T14:36:53 ES3: Add some missing unsized formats to the format tables. These were causing validation errors in the dEQP FBO tests. See Table 3.2 in the ES3 spec. BUG=angleproject:1074 TEST=dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.* Change-Id: Ifbf9199c54060eb3fc1a1dac7bbd74e19e013c61 Reviewed-on: https://chromium-review.googlesource.com/286773 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@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>
Jamie Madill b6bda4af 2015-04-20T12:53:26 Make Framebuffer::Data members private. This makes "Data" a proper class, and enforces access control when used in FramebufferImpl. This gives a cleaner refactor when we switch the internals of the class to use value types to store attachments instead of pointer types. BUG=angleproject:963 Change-Id: If825095458eaf9367f616f0bb54084025efb9882 Reviewed-on: https://chromium-review.googlesource.com/265937 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@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 b885e571 2015-02-03T16:16:04 Implement ReadBuffer functionality. This enables ReadPixels from non-0 FBO attachments. Tested with: dEQP-GLES3.functional.negative_api.buffer.read_buffer (fails due to a possible error in dEQP) dEQP-GLES3.functional.shaders.fragdata.draw_buffers (passes) BUG=angle:903 Change-Id: Ib095e1d50b8fbbc6f197de25f19ec0993309145a Reviewed-on: https://chromium-review.googlesource.com/244841 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@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>
Geoff Lang 748f74ef 2014-12-01T11:25:34 Rename Framebuffer::completeness to checkStatus and add an Impl method. BUG=angle:841 Change-Id: I04b4ffd086424569a15aa21447dd552e0a898928 Reviewed-on: https://chromium-review.googlesource.com/232394 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@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>