src/libANGLE/validationES3.cpp


Log

Author Commit Date CI Message
Jamie Madill 6f5444da 2018-03-14T10:08:11 Remove HasIndexRange. This is superseded by the DrawCallParams class. Instead of storing the context, we also return an error from the index range resolution. Bug: angleproject:2389 Change-Id: I9e7d58f006f51872eb3b52cbb9efbee16fff7ef6 Reviewed-on: https://chromium-review.googlesource.com/960570 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill e98b1b5d 2018-03-08T09:47:23 Framebuffer: Handle errors in checkStatus. This pipes a lot more errors around in the Validation, where they now will be caught. Bug: angleproject:2372 Change-Id: Ibb4e47ddc932995a02dd92e10578b7a4097182a9 Reviewed-on: https://chromium-review.googlesource.com/954406 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5b772312 2018-03-08T20:28:32 Nuke ValidationContext. This pattern never really took off. It was intended to be used to unit-test our Validation logic, but it become so complex because of interactions with Framebuffer::syncState that we could never really make use of it. Nuke it entirely and simplify the Context class. Bug: angleproject:2372 Change-Id: I40b9d46ce7706511a210da496ee19192cf609366 Reviewed-on: https://chromium-review.googlesource.com/954291 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
James Darpinian e8a93c6e 2018-01-04T18:02:24 New transform feedback buffer binding rules Detects undefined behavior when a buffer is bound to a transform feedback binding point and a non transform feedback binding point at the same time. Also moves the transform feedback buffer generic binding point out of the transform feedback object and into the context's global state, to match driver behavior. This way binding a new transform feedback object does not affect GL_TRANSFORM_FEEDBACK_BUFFER_BINDING which is similar to how VAOs work with GL_ARRAY_BUFFER_BINDING. Bug: 696345 Change-Id: If3b9306cde7cd2197a8ce35e10c3af9ee58da0b8 Reviewed-on: https://chromium-review.googlesource.com/853130 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 99d492c2 2018-02-27T15:17:10 Use packed enums for the texture types and targets, part 2 This completes the refactor by using the packed enums in the gl:: layer and in the backends. The packed enum code generation is modified to support explicitly assigning values to the packed enums so that the TextureTarget cube map faces are in the correct order and easy to iterate over. BUG=angleproject:2169 Change-Id: I5903235e684ccf382e92a8a1e10c5c85b4b16a04 Reviewed-on: https://chromium-review.googlesource.com/939994 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez f0e89be6 2017-11-08T14:00:32 Use packed enums for the texture types and targets, part 1 In OpenGL there are two enum "sets" used by the API that are very similar: texture types (or bind point) and texture targets. They only differ in that texture types have GL_TEXTURE_CUBEMAP and target have GL_TEXTURE_CUBEMAP_[POSITIVE|NEGATIVE]_[X|Y|Z]. This is a problem because in ANGLE we use GLenum to pass around both types of data, making it difficult to know which of type and target a variable is. In addition these enums are placed somewhat randomly in the space of OpenGL enums, making it slow to have a mapping from texture types to some data. Such a mapping is in hot-code with gl::State::mTextures. This commit stack makes the texture types and target enums be translated to internal packed enums right at the OpenGL entry point and used throughout ANGLE to have type safety and performance gains. This is the first of two commit which does the refactor for all of the validation and stops inside gl::Context. This was the best place to split patches without having many conversions from packed enums to GL enums. BUG=angleproject:2169 Change-Id: Ib43da7e71c253bd9fe210fb0ec0de61bc286e6d3 Reviewed-on: https://chromium-review.googlesource.com/758835 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He 2f3a0dc5 2018-02-27T22:39:44 Report INVALID_VALUE if width/height of invalidateSubFramebuffer is negative. BUG=angleproject:2376 TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.invalidate_sub_framebuffer Change-Id: Ie1ca30f29d7583c86130f46d4e6b5c7211eee63a Reviewed-on: https://chromium-review.googlesource.com/938367 Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9fdaa497 2018-02-16T10:52:11 Don't no-op draw calls for zero count in validation. Make the no-op happen in the Context, so we can properly generator more errors for negative WebGL tests. Some validation tests still need to check for no-ops, such as range checks. BUG=angleproject:2050 Change-Id: I48d0b3cf640f7f128679600e5df108146cfd6348 Reviewed-on: https://chromium-review.googlesource.com/522869 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Luc Ferron 9dbaeba8 2018-02-01T07:26:59 Validation layer fixes for compressedtexsubimage* dEQP tests * Change order of validation in ValidateCompressedTexSubImage3D to get the errors in the same order as the dEQP tests are expecting them. * ES 3.1: Section 8.7, page 169: If the internal format is ETC2/EAC, the target must be a GL_TEXTURE_2D_ARRAY. * ES 3.1: Section 8.7, page 171: For sub textures, ET2/EAC formats also requires exact size to be validated. Bug: angleproject:2327 Change-Id: Ib049c70a52ed5683885a73fb06503898a85786d1 Reviewed-on: https://chromium-review.googlesource.com/897726 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He c081020c 2018-01-22T09:48:48 ES3.1: multisample renderbuffer can support interger format. BUG=angleproject:2315 Change-Id: I3ef289a6043745c822e1c9b0a1b363ac81292c4c Reviewed-on: https://chromium-review.googlesource.com/878021 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Xinghua Cao 9c8e1a36 2017-12-06T17:59:58 ES31: Implement image state query BUG=angleproject:2278 TEST=dEQP-GLES31.functional.state_query.indexed.image_binding* Change-Id: Ia624d55ccf1fdf92188d9e710265bdffe96a23c6 Reviewed-on: https://chromium-review.googlesource.com/810465 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
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>
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 5ca5c65c 2017-10-27T17:29:54 Pass offsets to base validation for CompressedSubTexImage3D. BUG=angleproject:2216 Change-Id: I54716fe7ba08a19d5f4c3287701cffc650adb2d8 Reviewed-on: https://chromium-review.googlesource.com/742504 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Olli Etuaho 02032bda 2017-10-13T18:10:17 Generate an error if no XFB varyings are in use GLES specifies an error if BeginTransformFeedback is called when no binding points would be used. BUG=angleproject:2184 TEST=angle_end2end_tests Change-Id: Ie4489b5ba63885e718dafdcdaacc02b603959be3 Reviewed-on: https://chromium-review.googlesource.com/719136 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 23e02843 2017-10-17T13:24:09 Only validate texture layer if texture is non-zero. From the ES3.0 spec: The error INVALID_VALUE is generated if texture is non-zero and layer is negative. BUG=765919 Change-Id: I0ac9bd0335ab4d55701d6def0158297d5add993e Reviewed-on: https://chromium-review.googlesource.com/723741 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jiawei Shao db342276 2017-09-27T10:21:45 ES31: Implement glSampleMaski on OpenGL This patch intends to implement glSampleMaski on OpenGL backends. Refers to: https://chromium-review.googlesource.com/c/487603 BUG=angleproject:1592 TEST=dEQP-GLES31.functional.state_query.*.sample_mask* TEST=dEQP-GLES31.functional.texture.multisample.*.sample_mask* Change-Id: If5ddd6ab57259593919a482be80fbdbe29f6f54d Reviewed-on: https://chromium-review.googlesource.com/573727 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Martin Radev 14b2126e 2017-08-25T13:54:37 Relax multi-view end-point validation on detach Passing invalid arguments to the multi-view end-points should not generate an error if a texture is being detached from the framebuffer. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I22e1ed13b64db046724031d0189612d5e111dcac Reviewed-on: https://chromium-review.googlesource.com/635166 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 9696d073 2017-08-26T23:19:57 Clean up the ES3 entry points for auto-generation. Removes some unnecessary includes, and moves some validatoinfunctions to the ES3-only file. BUG=angleproject:1309 Change-Id: I3b274014c48f6f39b5e67223987c91fbc5b4d390 Reviewed-on: https://chromium-review.googlesource.com/636519 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@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 3ef140a9 2017-08-26T23:11:21 Finish refactoring the rest of the ES3 entry points. BUG=angleproject:747 Change-Id: I3da02120bfff5f33f15a5a9dd45ec99fd654425f Reviewed-on: https://chromium-review.googlesource.com/636518 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7f0c5a4b 2017-08-26T22:43:26 Refactor sync EPs (plus one extra). More entry point validation refactor for auto-gen. BUG=angleproject:747 Change-Id: I9462a28838df3f265e1401f66c838cc5a73d511f Reviewed-on: https://chromium-review.googlesource.com/636517 Reviewed-by: Jamie Madill <jmadill@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 f0dcb8b5 2017-08-26T19:05:13 Refactor transform feedback EPs. BUG=angleproject:747 Change-Id: I4891966cd7b3d478980202e795742e15dd1dcb01 Reviewed-on: https://chromium-review.googlesource.com/637125 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>
Jamie Madill c8c95817 2017-08-26T18:40:09 Refactor uniform matrix entry points. This should also slightly speed up some of the validation. BUG=angleproject:747 BUG=angleproject:1390 Change-Id: I60735e2773788aef3f535bf7d3d8cd27bc4df5b1 Reviewed-on: https://chromium-review.googlesource.com/637123 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f0e0449e 2017-08-26T15:28:42 Format ES3 query entry points. Also refactor some query extension entry points. BUG=angleproject:747 Change-Id: I5a8a3b2616a3872b5645a655641ec9c12739f804 Reviewed-on: https://chromium-review.googlesource.com/636062 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ff325f1b 2017-08-26T15:06:05 Refactor ES3 uniform entry points. This should improve validation speed slightly because it allows us to move the ES3-only check into the ES3-only code, and make it a bit simpler. BUG=angleproject:747 BUG=angleproject:1390 Change-Id: I41f9ffef1c6a552fde924e62e481831f07b1503a Reviewed-on: https://chromium-review.googlesource.com/636061 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Martin Radev 137032d9 2017-07-13T10:11:12 Validate ANGLE_multiview end-points The patch adds validation for the ANGLE_multiview end-points and propagates the calls to the unimplemented stubs in Context. The patch also removes the glFramebufferTextureMultiviewSideBySideRobustANGLE end-point because the size of the viewport offsets buffer can trivially be computed from the number of views. BUG=angleproject:2062 Change-Id: I9a10bc00c19825e586d3df2750fabea4daf5ef8f Reviewed-on: https://chromium-review.googlesource.com/573861 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0fb0864e 2017-07-04T15:07:23 Fix inverted validation check for glClearBuffer. The validation would generate the correct errors to satisfy tests but would skip clears. TEST=conformance2/reading/format-r11f-g11f-b10f.html TEST=conformance2/reading/read-pixels-from-fbo-test.html TEST=conformance2/rendering/clearbuffer-sub-source.html TEST=deqp/functional/gles3/fbocolorbuffer/clear.html TEST=deqp/functional/gles3/fboinvalidate/sub.html TEST=deqp/functional/gles3/framebufferblit/default_framebuffer_*.html BUG=angleproject:1954 Change-Id: I0f220d06f98b630be5d27c7ffb1837d4ef29e0ac Reviewed-on: https://chromium-review.googlesource.com/558786 Reviewed-by: Corentin Wallez <cwallez@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>
Jamie Madill 5ea762a6 2017-06-07T14:59:51 Consolidate base:: imports. This merges the mrucache and numerics into one folder, to prevent having to make two identical versions of logging. BUG=angleproject:2044 Change-Id: Iba6dab05b21eb9ba0de44f27a90579c590a9a7fd Reviewed-on: https://chromium-review.googlesource.com/522870 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@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 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 8ceaedf8 2017-05-09T10:32:22 Generate an INVALID_OPERATION error if a texture format is not supported. We already generate an INVALID_VALUE in the ValidES3InternalFormat check above. If an error is generated here, it is because the internal format and type are not valid. TEST: conformance2/textures/misc/tex-image-with-bad-args BUG=angleproject:1958 BUG=angleproject:1715 Change-Id: I50d479e64d687cc971c8f41b5691dcb123da0391 Reviewed-on: https://chromium-review.googlesource.com/499690 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c4e93668 2017-05-01T10:45:59 Update end2end tests to function without EXT_texture_storage. This also exposed an issue in our glTexSubImage2D validation where the sized format would be used for the texture support check when the unsized format was provided. The GL_ALPHA32F format is not valid unless EXT_texture_storage is present but using GL_ALPHA + GL_FLOAT is valid. BUG=angleproject:1958 Change-Id: Ice0b7549c39559990942176481c5175df17aaf92 Reviewed-on: https://chromium-review.googlesource.com/491246 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez d262799c 2017-04-28T17:17:03 Take depth into account when checking for OOB in TexImage3D BUG=angleproject:2017 Change-Id: Id75a8c0ddf4eda4b569509e2014c20db6f5c46ff Reviewed-on: https://chromium-review.googlesource.com/490848 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@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 6d1ccf01 2017-04-24T14:09:58 Re-order the error generation for ES3 TexImage calls. Explictly check if the internal format enum is ever valid before checking if it is valid in combination with other parameters. Some WebGL tests expect a certain order for generated errors. BUG=angleproject:2009 TEST=conformance2/textures/misc/tex-input-validation Change-Id: I31166a78d00629f8281ef53eced72575497ae448 Reviewed-on: https://chromium-review.googlesource.com/486099 Commit-Queue: Geoff Lang <geofflang@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 d7297bfb 2017-04-19T15:27:10 Code refactoring: replace NULL by nullptr for pointers. This is the frist change to replace NULL by nullptr. It handles the initialization and assignment for pointers. BUG=angleproject:2001 Change-Id: I6d4bb198a72e38b867cd2f65a6e6f2f61339a0b5 Reviewed-on: https://chromium-review.googlesource.com/481600 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Geoff Lang 38f2cfb8 2017-04-11T15:23:08 Refactor validation of glGetSynciv. BUG=angleproject:1985 Change-Id: Idf1057e6d8d8c850643e3b2a22be5a881c8a2301 Reviewed-on: https://chromium-review.googlesource.com/474550 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@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>
Jiajia Qin f546e7df 2017-03-27T14:12:59 ES31: Add GL_SHADER_STORAGE_BUFFER_BINDING binding point The affected APIs are below: getIntegeri_v getInteger64i_v BindBuffer BindBufferBase BindBufferRange BUG=angleproject:1951 TEST=dEQP-GLES31.functional.state_query.integer.shader_storage_buffer_binding_* dEQP-GLES31.functional.state_query.indexed.shader_storage_buffer_* Change-Id: Ief7186b2ebe305f14e620c31841bc244f84429a5 Reviewed-on: https://chromium-review.googlesource.com/459093 Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Yunchao He 61afff14 2017-03-14T15:34:03 ES31: Add PROGRAM_SEPARABLE to ProgramParameter and GetProgram BUG=angleproject:1939 TEST=angle_end2end_tests Change-Id: I97ad11360f7c015947a2c0cc7d4a47f994726834 Reviewed-on: https://chromium-review.googlesource.com/454264 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang aa086d68 2017-03-23T16:47:21 Refactor glVertexAttribIPointer validation. BUG=angleproject:1523 BUG=chromium:668223 Change-Id: I51eca98ad14d8be6f5009149ed6c0daecf569178 Reviewed-on: https://chromium-review.googlesource.com/458106 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jiajia Qin 6eafb04c 2016-12-27T17:04:07 ES31: Add GL_ATOMIC_COUNTER_BUFFER_BINDING binding point BUG=angleproject:1729 TEST=dEQP-GLES31.functional.state_query.integer.atomic_counter* dEQP-GLES31.functional.state_query.indexed.atomic_counter* angle_end2end_tests:AtomicCounterBufferTest Change-Id: I059c4e22e04cedec9134ec9f631de33f77b1fbe2 Reviewed-on: https://chromium-review.googlesource.com/430959 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: 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>
Geoff Lang c5508d6e 2017-02-10T14:58:38 Validate that the format is compressed before calculating data size. glCompressedTexImage3D was missing a check that the format was valid before trying to compute the expected data size. This lead to an assertion failure in the size computation code. BUG=602737 Change-Id: I74e6ced082e78396a0af92317fb1c0098299a026 Reviewed-on: https://chromium-review.googlesource.com/441185 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: 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>
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>