src/libGLESv2/validationES2.cpp


Log

Author Commit Date CI Message
Geoff Lang b1196687 2014-07-23T13:47:29 Update validation functions to use new error mechanisms. BUG=angle:520 Change-Id: I1c64af2e57cf2d89138bd23da2b07d5873742e4e Reviewed-on: https://chromium-review.googlesource.com/209880 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0b7eef7c 2014-06-12T14:10:47 Removed common_includes.h reordered includes. Since we are not using precompiled headers anymore, remove common_includes.h so that fewer files are included in cpp files. Reordered includes to be in the following order: 1) Local ANGLE project headers, ordered by directory in descending depth 2) GL headers 3) STL headers This helps enforce the include-what-you-use principal by reducing the number of STL headers unexpectedly shared between files. This include order conflicts with some of the Google c++ style guide which states that STL includes should be first but this helps us catch more issues. Change-Id: I8f7785f4ad574e253dd3c7b4fb1e54d3ce3b99fc Reviewed-on: https://chromium-review.googlesource.com/214850 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ea24759f 2014-08-28T10:37:08 Remove remnants of old PCH code. Remove the precompiled.cpp file which was producing a build warning, and rename the header to make it clear we no longer support PCH. BUG=angle: Change-Id: I944081ae477b1478ca9c18924fb02bb920d420a7 Reviewed-on: https://chromium-review.googlesource.com/214187 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5d601382 2014-07-22T15:14:06 Simplify formatutils.h by exposing the info structures. Removed all the separate query functions and simply expose the internal info structures. This reduces the number of std::map/std::set operations that were hidden behind the API. Moved the validation tables for ES3 format combinations and effective internal formats into validationES3.cpp so that formatutils.h only has generic GL format queries. BUG=angle:658 Change-Id: Ieb60d42b8eafcdb4f21dcbec130b39478ce5f7c5 Reviewed-on: https://chromium-review.googlesource.com/206835 Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods 53a94a82 2014-06-24T15:20:36 Refactors State to be a fully-qualified class BUG=angle:685 Change-Id: I36cff2da985a12c7180fe2850ccd471f4cebbaad Reviewed-on: https://chromium-review.googlesource.com/206634 Tested-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang c0b9ef4b 2014-07-02T10:02:37 Split Caps into Caps, Extensions and TextureFormatCaps. Context now holds it's own Caps, Extensions and TextureFormat caps so that it can modify them based on client version or work-arounds. BUG=angle:658 Change-Id: Id71b6c89b7aa36e1f3dc42b0e4720eaed1851fb9 Reviewed-on: https://chromium-review.googlesource.com/206480 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 55ec3b11 2014-07-03T10:38:57 Refactor common attachment validation to base method. Split the validation of FBO attachment binding to common methods and separate logic for layers and for 2D attachments. BUG=angle:571 Change-Id: I9a59055cca60dd853311751be355440ad1e5ead0 Reviewed-on: https://chromium-review.googlesource.com/205605 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang aae65a4e 2014-05-26T12:43:44 Add caps for texture size limits and other caps in the 6.28 table. BUG=angle:658 Change-Id: Ia265fe1d3713db7701b41e8430d6d186f352ab4a Reviewed-on: https://chromium-review.googlesource.com/201363 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b4472275 2014-07-03T10:38:55 Add a ValidateAttachmentTarget helper method. This helper returns the appropriate error with the user specifies an attachment that is invalid or out-of-range (for indexed color attachments). BUG=angle:571 Change-Id: I80ed347e3540579110e40e742fbacb0467cb85fd Reviewed-on: https://chromium-review.googlesource.com/205604 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 570f7c84 2014-07-03T10:38:54 Add helper methods for FBO attachment validation. Subsequent refactoring will eliminate duplicate code. BUG=angle:571 Change-Id: I086320beb5c432c326d29d047931575e6f2a1d64 Reviewed-on: https://chromium-review.googlesource.com/205603 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang e4a492be 2014-06-19T14:14:41 Remove the clientVersion parameter from the format utils. clientVersion was only useful for intitial validation of formats and not required for queries. Only use the client version and caps structure to validate if a format is available and then trust that it is supported past the validation layer. Fixed some inconsistancies between tables such as missing formats or incorrect load functions in the ES3 tables. BUG=angle:659 Change-Id: I8d33c902156ee6fb41efe937d93b0586191726e5 Reviewed-on: https://chromium-review.googlesource.com/201167 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e261b44a 2014-06-25T12:42:21 Remove obsolete Renderbuffer types. RenderbufferProxySet and FramebufferTextureBindingPointer aren't necessary any more with our refactored renderbuffer classes and ownership of attachments by the Framebuffer. We can also consolidate the FramebufferAttachment and implementation to a single class, and no longer need to store ref counted objects in the Framebuffer class directly. BUG=angle:660 Change-Id: Idcc06dfb42b47242b33494e797a0ba06d6669511 Reviewed-on: https://chromium-review.googlesource.com/201838 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 05b05028 2014-06-11T15:31:45 Add support for EXT_sRGB. BUG=angle:672 Change-Id: I001ff3dde7a39e545a535a399c02f3a6d91634c8 Reviewed-on: https://chromium-review.googlesource.com/203460 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cec3590a 2014-04-16T10:52:36 Use a Caps structure to store extension and texture format support. Removes support for fallbacks in D3D9 texture formats. The fallback formats did not work properly anyways. BUG=angle:658 Change-Id: Idfa5183bf71fd8ebf4608f940f9d93177b9eff08 Reviewed-on: https://chromium-review.googlesource.com/200813 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6f38f823 2014-06-06T17:12:20 Fix up some validation bugs in Texture functions. In several places we weren't handling certain errors, or were returning the wrong error code. Several dEQP negative API tests are affected in functional.negative_api.texture. BUG=angle:571 Change-Id: I19d7250aab2c15d709fd591b8df90ce883f9ac60 Reviewed-on: https://chromium-review.googlesource.com/201250 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 560a8d88 2014-05-21T13:06:20 Refactor CopyTexImage validation. Move the common validation code to a shared base function. BUG=angle:571 Change-Id: Id70b413b408a21f0a8933cfd4a09e261e637bae1 Reviewed-on: https://chromium-review.googlesource.com/200559 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang a836e48a 2014-04-28T10:08:27 Allow non-4x4 compressed blocks for small mip layers. CompressedTexSubImage would disallow 1x1 or 2x2 mips being set for any mip level except 0. This made it impossible to set the data in the lowest mip levels. BUG=angle:623 Change-Id: I623414ae4fd5d6b051579285160296b03fd36486 Reviewed-on: https://chromium-review.googlesource.com/197250 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> (cherry picked from commit cc84a853eb5ab63a744657da704f84905565ab9e) Reviewed-on: https://chromium-review.googlesource.com/197654
Geoff Lang bdc9b2f0 2014-04-16T14:41:54 Add validation for GL_RED and GL_RG in glReadPixels. EXT_texture_rg adds support for these readback formats but validation was not added. BUG=angle:609 Change-Id: Iddd94bb8d8cf3b244a0d8a59cd4445ffa2ae61fe Reviewed-on: https://chromium-review.googlesource.com/195176 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods 4dfed837 2014-03-17T20:03:39 Validate target parameter in CopyTexImage calls before using to check mip level Would cause UNREACHABLE to be triggered if target was invalid, and INVALID_VALUE to be returned instead of INVALID_ENUM if it were the only erroneous argument. Change-Id: I2606e77379fa2832a50b3a299e6474a4b2f68afa Reviewed-on: https://chromium-review.googlesource.com/189701 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang 632192dd 2013-10-04T13:40:46 Added support for EXT_texture_rg in D3D9 and D3D11. TRAC #22423 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
Geoff Lang 005df41f 2013-10-16T14:12:50 Use GLenum instead of GLint to store internal format variables. TRAC #23785 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
Geoff Lang d4f180b2 2013-09-24T13:57:44 Validate compressed texture dimensions based on the per-format compressed block sizes rather than hard-coded values. TRAC #23630 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
Geoff Lang ce635695 2013-09-24T13:56:32 Context now returns maximum texture levels per texture type, updated validation to validate mip level based on the texture target. TRAC #23630 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
Geoff Lang 784a8fd5 2013-09-24T12:33:16 Defer early-exit due to zero-sized copies until after all other validation for CopyTex*Image. TRAC #20925 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods
Geoff Lang 34dbb6f5 2013-08-05T15:05:47 Capitalized the first letter of all validation function names. TRAC #23629 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Geoff Lang
Geoff Lang e8ebe7f6 2013-08-05T15:03:13 Refactored entry point validation functions into their own files. TRAC #23629 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Geoff Lang