src/libANGLE/validationES.cpp


Log

Author Commit Date CI Message
Xinghua Cao 971f8508 2017-10-17T13:01:24 Implement get compute work group size for glGetProgramiv BUG=angleproject:2187 TEST=dEQP-GLES31.functional.state_query.program.compute_work_group_size_get_programiv Change-Id: Ic09153ffccfb207e37ad70cf7e14714be987e7e1 Reviewed-on: https://chromium-review.googlesource.com/722178 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 63c5a597 2017-09-27T14:08:16 Make GL_ANGLE_instanced_arrays enableable. BUG=angleproject:1523 Change-Id: Id1dd5d0426c1b55bfd6cca8b0c8c73596080f2a9 Reviewed-on: https://chromium-review.googlesource.com/688101 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
jchen10 a99ed554 2017-09-22T08:10:32 Refactor data conversions for state commands This mainly enforces the rules as descripted in ES 3.10, section 2.2.1 and 2.2.2, by enhancing the "queryconversions" to support more rules, removing the scattered type convertors in "utilities" , "mathutil" and "queryutils", and forcing to only use the convertors in "queryconversions". BUG=angleproject:2165 Change-Id: I73c1dc850e2b3b8a479ece1d9c5eb7ae4ce851fe Reviewed-on: https://chromium-review.googlesource.com/680094 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 8c5b31c2 2017-09-26T18:07:44 Make query extensions enableable. BUG=angleproject:1523 Change-Id: If2da4bff180664de997c981165672858c19ebe78 Reviewed-on: https://chromium-review.googlesource.com/685649 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Yunchao He f0fd87d8 2017-09-12T04:55:05 Code refactoring in validation part. Some code refactoring in this change: 1) It moves some public methods to static. These methods are only used in validationES3.cpp. They are not necessay to be exposed to public. 2) The error messages to check context version are inconsistent. It makes them to be consistent. BUG:angleproject:2005 Change-Id: I5af4c3300634ccc44aac386c90dcb0522acbff83 Reviewed-on: https://chromium-review.googlesource.com/661324 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill fb997ec1 2017-09-20T15:44:27 Removed "name" and "used" from variable location. The used flag was redundant with the index (which used MAXUINT). The name was redundant with the stored uniform. Removing these gives a very minor performance speed up when iterating and retrieving uniform locations. BUG=angleproject:1390 Change-Id: Ieeccdff7c131e1359e754e246d3648b73aad5baf Reviewed-on: https://chromium-review.googlesource.com/659224 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jiajia Qin 729b2c6e 2017-08-14T09:36:11 ES31: Enable shader storage buffer support for OpenGL backend BUG=angleproject:1951 TEST=angle_end2end_tests:ShaderStorageBuffer Change-Id: I1afc3cd005ad2e595c6ce937fc53e17423f8ec8b Reviewed-on: https://chromium-review.googlesource.com/618132 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev da8e257c 2017-09-12T17:21:16 Number of views should match when Draw* is called The ANGLE_multiview specification is modified so that Draw* generates an error if the number of views in the active program does not match with the number of views in the active draw framebuffer object. The tests and validation are modified accordingly. The patch also sets a contact person, updates the contributor list and sets the correct enum values in the ANGLE_multiview specification. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I15fee4c5e729605bb1d6292f7ad1155637578dea Reviewed-on: https://chromium-review.googlesource.com/663160 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 7d4602fc 2017-09-13T10:45:09 Allow ReadPixels with GL_FLOAT type and EXT_color_buffer_half_float. BUG=angleproject:2148 Change-Id: If3fa4a42a7343ed133f85be1a4d9d0fa48b427cd Reviewed-on: https://chromium-review.googlesource.com/665158 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jiajia Qin 8a7b3a0c 2017-08-25T16:05:48 Reland 'Remove IndexRange retrieving in validation' This change adds GL_KHR_robust_buffer_access_behavior support. The old change is in https://chromium-review.googlesource.com/c/angle/angle/+/607413 BUG=755897, angleproject:1393, angleproject:1463 Change-Id: I04a1132c3ae8d3a766194df61c4ff7bf0b084f03 Reviewed-on: https://chromium-review.googlesource.com/640750 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 487653b1 2017-09-01T17:17:55 Don't divide in the validation of DrawElements BUG=angleproject:1671 Change-Id: I58dd30d0aaffd1a776aa14a04011cbdd72181bf2 Reviewed-on: https://chromium-review.googlesource.com/648356 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Jones ed5b46f1 2017-07-21T08:39:17 Add additional ES2 and WebGL 1.0 Validation Adds validation for various cases. Adds corresponding unit tests. Change-Id: I9451d286bcf2d6fa32de495e5d0bdec1eb5c955d Reviewed-on: https://chromium-review.googlesource.com/633157 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 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 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 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>
Corentin Wallez c1346fba 2017-08-24T16:11:26 Revert "Remove IndexRange retrieving in validation" This reverts commit 59d9da089580afac175ff5f1a932b987c9d194d6. Reason for revert: <INSERT REASONING HERE> Original change's description: > Remove IndexRange retrieving in validation > > This change can improve the performance of drawElements which uses > the path without translation. > Paste a set of mean data (repeated 30) for reference on Intel skylake > Win10 desktop. > DrawElementsPerfBenchmark.Run/d3d11: > before after > mean: 13644.4666667 -> mean: 13887.8333333 > DrawElementsPerfBenchmark.Run/d3d11_index_buffer_changed: > before after > mean: 45.8 -> mean: 46.3666666667 > > BUG=755897, angleproject:1393 > > Change-Id: I11f5db25445346958dfef52b1d23df5483cda32f > Reviewed-on: https://chromium-review.googlesource.com/607413 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,jiajia.qin@intel.com Change-Id: I4b00af2c32af36aa978ac2fddcf7514134497cf3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 755897, angleproject:1393 Reviewed-on: https://chromium-review.googlesource.com/633296 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Qin Jiajia 59d9da08 2017-08-09T16:59:17 Remove IndexRange retrieving in validation This change can improve the performance of drawElements which uses the path without translation. Paste a set of mean data (repeated 30) for reference on Intel skylake Win10 desktop. DrawElementsPerfBenchmark.Run/d3d11: before after mean: 13644.4666667 -> mean: 13887.8333333 DrawElementsPerfBenchmark.Run/d3d11_index_buffer_changed: before after mean: 45.8 -> mean: 46.3666666667 BUG=755897, angleproject:1393 Change-Id: I11f5db25445346958dfef52b1d23df5483cda32f Reviewed-on: https://chromium-review.googlesource.com/607413 Reviewed-by: Geoff Lang <geofflang@chromium.org> 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 ffe754b7 2017-07-31T10:38:07 Disallow timer queries with multi-view draw framebuffers According to the ANGLE_multiview spec Draw* commands should generate an INVALID_OPERATION error if there is an active query object for target TIME_ELAPSED_EXT and the number of views in the active draw framebuffer is greater than 1. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I8a4434784ecec753a39c5ef82fa3ee46255a0851 Reviewed-on: https://chromium-review.googlesource.com/593315 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Martin Radev <mradev@nvidia.com>
Martin Radev 2803168e 2017-07-28T14:47:56 Disallow glReadPixels with multi-view read framebuffers According to the ANGLE_multiview spec, glReadPixels must generate an INVALID_FRAMEBUFFER_OPERATION error if the active read framebuffer has a multi-view layout. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ia5311ff7a62c5ff732491eb80befd32de57b9d44 Reviewed-on: https://chromium-review.googlesource.com/591368 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev a3ed4576 2017-07-27T18:29:37 Disallow glBlitFramebuffer for multi-view framebuffers According to the ANGLE_multiview spec, glBlitFramebuffer must generate an INVALID_FRAMEBUFFER_OPERATION error if either the active read framebuffer, or active draw framebuffer has a multi-view layout. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I885bdc970c9606cfad882f31759f5780c65d15e5 Reviewed-on: https://chromium-review.googlesource.com/590237 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 04e2c3bc 2017-07-27T16:54:35 Disallow glCopyTex* with multi-view read framebuffers According to the ANGLE_multiview spec, glCopyTex* functions must generate an INVALID_FRAMEBUFFER_OPERATION error if the active read framebuffer has a multi-view layout. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Icadc4ac79843986076594da25a90ba807e511d1e Reviewed-on: https://chromium-review.googlesource.com/589447 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Martin Radev <mradev@nvidia.com>
Martin Radev 7e69f76a 2017-07-27T14:54:13 Disallow active transform feedback with a multi-view draw framebuffer According to the ANGLE_multiview spec Draw* commands should generate an INVALID_OPERATION error if there is an active transform feedback object and the number of views in the active draw framebuffer is greater than 1. The patch addresses this by extending the base draw call validation. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I67221cb2cfee6febae8d97697b234aeffff313de Reviewed-on: https://chromium-review.googlesource.com/589268 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 7cf6166a 2017-07-26T17:10:53 Generate error on program-framebuffer num views mismatch According to the ANGLE_multiview spec Draw* commands should generate an INVALID_OPERATION error if the program uses the multiview extension and the number of views in the active draw framebuffer and active program differs. The patch addresses this by extending the base draw call validation. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I369070beb5ccb17211dbe61ebec40bfcbcf5bc4e Reviewed-on: https://chromium-review.googlesource.com/586605 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kenneth Russell 6938285b 2017-07-21T16:38:44 Fix BlitFramebuffer validation for BGRA sources and targets. It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and destinations when resolving multisampled renderbuffers. Expand BlitFramebuffer's validation to handle this case. Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work around an error generated on macOS when querying GL_MAX_VARYING_COMPONENTS. Expand the BlitFramebuffer tests to cover these cases and start running them on the OpenGL backend. Fix detectition of multisampled D3D11 rendertargets when the sample count is 1. BUG=angleproject:891 Change-Id: Ief5531756651caa66f612e647d3d5c05c8c51ff5 Reviewed-on: https://chromium-review.googlesource.com/587459 Reviewed-by: Kenneth Russell <kbr@chromium.org>
Corentin Wallez 26cf35a8 2017-07-26T11:01:02 Revert "Fix BlitFramebuffer validation for BGRA sources and targets." This reverts commit 17d270311efcd8c72f251a67e726518278e81c26. Reason for revert: - New test fails on NVIDIA and AMD on Windows when using the backbuffer FAST_PATH. - SetUp code ASSERT_GL_NO_ERROR (line 269) but a GL error happens on all Windows and Linux Intel OpenGL. Original change's description: > Fix BlitFramebuffer validation for BGRA sources and targets. > > It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and > destinations when resolving multisampled renderbuffers. Expand > BlitFramebuffer's validation to handle this case. > > Work around a bug in macOS' OpenGL driver querying the number of > samples for GL_BGRA8. > > Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work > around an error generated on macOS when querying > GL_MAX_VARYING_COMPONENTS. > > Expand the BlitFramebuffer tests to cover these cases and start > running them on the OpenGL backend. > > BUG=angleproject:891 > > Change-Id: I4829585d2b6428ce0bc7509c4734d33709a0930b > Reviewed-on: https://chromium-review.googlesource.com/582268 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,kbr@chromium.org Change-Id: I220bc482194cf7fad5e7e732a6d043ce0d504d79 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:891 Reviewed-on: https://chromium-review.googlesource.com/586428 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kenneth Russell 17d27031 2017-07-21T16:38:44 Fix BlitFramebuffer validation for BGRA sources and targets. It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and destinations when resolving multisampled renderbuffers. Expand BlitFramebuffer's validation to handle this case. Work around a bug in macOS' OpenGL driver querying the number of samples for GL_BGRA8. Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work around an error generated on macOS when querying GL_MAX_VARYING_COMPONENTS. Expand the BlitFramebuffer tests to cover these cases and start running them on the OpenGL backend. BUG=angleproject:891 Change-Id: I4829585d2b6428ce0bc7509c4734d33709a0930b Reviewed-on: https://chromium-review.googlesource.com/582268 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
JiangYizhou 24fe74c1 2017-07-06T16:56:50 ES31: Query multisampled texture binding id Add GL_TEXTURE_BINDING_2D_MULTISAMPLE option to State.cpp to query binding id of GL_TEXTURE_2D_MULTISAMPLE. BUG=angleproject:1590 TEST=angle_deqp_gles31_tests.exe --deqp-case=dEQP-GLES31.functional.state_query.integer.texture_binding_2d_multisample_* Change-Id: I86b24f00ac4e75eb0e2986f7cf2eb108aae14674 Reviewed-on: https://chromium-review.googlesource.com/561196 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev e5285d29 2017-07-14T16:23:53 Handle ANGLE_multiview state queries The patch extends glGetIntegerv and glGetFramebufferAttachmentParameteriv logic to handle the new tokens from the ANGLE_multiview extension. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ide145279cd7b58cd03502458d7d3a1a0f5e9e86d Reviewed-on: https://chromium-review.googlesource.com/573780 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
JiangYizhou 4cff8d62 2017-07-06T14:54:09 ES31: TexParameter{if} validation for TEXTURE_2D_MULTISAMPLE on OpenGL When setting parameters by TexParameter{if} for TEXTURE_2D_MULTISAMPLE, an INVALID_ENUM error is generated if target is TEXTURE_2D_MULTISAMPLE, and pname is any sampler state from table 20.11. An INVALID_OPERATION error is generated if target is TEXTURE_2D_MULTISAMPLE, and pname TEXTURE_BASE_LEVEL is set to a value other than zero. BUG=angleproject:1590 TEST=angle_deqp_gles31_tests.exe --deqp-case=dEQP-GLES31.functional.texture.multisample.negative.texture* Change-Id: I5d71731c11fb6e114a57e753e439e180695a7c79 Reviewed-on: https://chromium-review.googlesource.com/560607 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Martin Radev d178aa46 2017-07-13T14:03:22 Fix attachment validation bug Passing COLOR_ATTACHMENTm, where m is greater or equal to MAX_COLOR_ATTACHMENTS, to a FramebufferTexture* function should generate an INVALID_OPERATION instead of an INVALID_VALUE error. BUG=angleproject:2106 TEST=angle_end2end_tests Change-Id: I99045defcbe5eb2afefac1b45062ee4245f50dd3 Reviewed-on: https://chromium-review.googlesource.com/569966 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Commit Bot 59bc668c 2017-07-12T18:57:24 Merge "Validate the ReadPixels type and format for INVALID_ENUM."
Geoff Lang 280ba991 2017-04-18T16:30:58 Validate the ReadPixels type and format for INVALID_ENUM. GL_INVALID_ENUM should be generated if the type or format arguments were not valid for any ReadPixels command. This validation should happen before validating if the combination of format and type is valid. TEST=conformance/reading/read-pixels-test BUG=angleproject:2000 Change-Id: If49d69655f5ab0a3abbde58b49541c84249c1750
jchen10 eaef1e5e 2017-06-13T10:44:11 Link atomic counters to buffers Gather counters from each shader and group them according the layout qualifier 'binding' into each buffer. BUG=angleproject:1729 TEST=angle_end2end_tests:AtomicCounterBufferTest Change-Id: I8d0cd0d2bf65be37c035b0e1540481c8bee0bae4
Geoff Lang 69df242c 2017-07-05T12:42:31 Don't validate attribute types match for gl_VertexID and gl_InstanceID. TEST=conformance2/glsl3/no-attribute-vertex-shader TEST=deqp/functional/gles3/instancedrendering BUG=angleproject:2012 Change-Id: I234410fabf6a8fcd87040c8085ca5dce82fa8932 Reviewed-on: https://chromium-review.googlesource.com/559851 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Brandon Jones 6cad5667 2017-06-14T13:25:13 Improve Debugging Strings This change replaces common string literals used for error messages with const string variables mapped in a new header file. Additionally, more validation for WebGL naming scenarios has been added, along with unit tests. BUG=:angleproject:1644 Change-Id: Icff44a456aa78221c6df12b0454a7cc147a7d26e Reviewed-on: https://chromium-review.googlesource.com/535974 Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 0dc97810 2017-06-22T14:38:44 WebGL2 Compat: having no 0 divisor is now valid BUG=angleproject:TBD Change-Id: Icb19a685290f4313ad567391cab5152eda91a346 Reviewed-on: https://chromium-review.googlesource.com/544545 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Geoff Lang 8700a98e 2017-06-13T10:15:13 Fix missing return statement in VertexFormat validation. BUG=angleproject:2063 Change-Id: Idc1c7b42ed0a2545d9ad4f3c645d0dea2c85c11e Reviewed-on: https://chromium-review.googlesource.com/533273 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4928b7ca 2017-06-20T12:57:39 Proliferate gl::Context everywhere. This gives the D3D back-end access to the GL state almost anywhere. This uses the onDestroy hook for Textures to push errors up from destructors, although they still don't quite make it to the Context. There are places, such as in EGL object (Context/Surface) destruction, where we end up calling through to GL implementation internals without having access to a gl::Context. We handle this via a proxy Context to a Display, basically a null context, that has access to impl-side state like the Renderer pointer if necessary. It does not have access to the normal GL state. Also Pass gl::Context to RefCountObject::release(). Since we're using destroy() methods now, we should not ever call the destructor directly. BUG=angleproject:1156 Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259 Reviewed-on: https://chromium-review.googlesource.com/529707 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 672f7f3f 2017-06-15T17:42:17 WebGL Compat: forbid client side arrays, even unused BUG=angleproject:2064 Change-Id: I9a9c2df9a158799dbdc490446352cdf30fb87ca6 Reviewed-on: https://chromium-review.googlesource.com/537812 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 61e16b44 2017-06-19T11:13:23 Context: Bind current display/surface. Looking at the EGL spec, it says for eglGetCurrentDisplay: "The display for the current context in the calling thread, for the current rendering API, is returned." This implies that MakeCurrent binds a display to a Context. There's also pretty clear language for the read/draw Surface as well, that they can only be bound to one Context/thread at a time. Hence we don't need to duplicate this storage in the egl::Thread structure, merely storing a pointer to the current Context, which has access to the read/draw Surface and current Display. BUG=angleproject:1156 Change-Id: Ia3b99d50b3591012c43e851834c1af02ff62a33f Reviewed-on: https://chromium-review.googlesource.com/538865 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Martin Radev dd5f27ee 2017-06-07T10:17:09 Make VertexBinding's member variables private The patch decorates all members in VertexBinding as private and limits access to them only through getters and setters. This makes it easier to debug and keep track of any assignments to the class members. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Iddd49063d060f136bc9cf11c313a5af0931d433c Reviewed-on: https://chromium-review.googlesource.com/530786 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov c4d18aac 2017-03-09T18:45:02 Use ErrorStream everywhere Eliminates one more usage of FormatString and its static initializer. Add more ErrorStream types and replace gl::Error and egl::Error with them. BUG=angleproject:1644 Change-Id: Ib498d0ae4b81a332ec71aed7cf709993b154e6bb Reviewed-on: https://chromium-review.googlesource.com/505429 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang fff7a7dd 2017-06-02T10:39:17 Mark the S3TC SRGB formats as requiring exact block sizes. TEST=conformance/extensions/webgl-compressed-texture-s3tc-srgb BUG=angleproject:2049 Change-Id: I00d816299db914c078d140f791cd7c98c6428a54 Reviewed-on: https://chromium-review.googlesource.com/522762 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9ab5b822 2017-05-30T16:19:23 Validate that vertex shader input matches the vertex attribute types. BUG=angleproject:2012 TEST=conformance2/rendering/attrib-type-match Change-Id: Ic282e0933a5c3c377322dd484534fcc1dfcb3840 Reviewed-on: https://chromium-review.googlesource.com/517974 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang e0cff190 2017-05-30T13:04:56 Validate that fragment shader output matches the draw buffer type. TEST=conformance2/rendering/fs-color-type-mismatch-color-buffer-type BUG=angleproject:1688 Change-Id: I17848baf40b6d32b5adc1458fe2369b850164da3 Reviewed-on: https://chromium-review.googlesource.com/518246 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@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>
Corentin Wallez 170efbf9 2017-05-02T13:45:01 validationES: reorder draw validation for the WebGL CTS dEQP dEQP tries to test specific GL ES errors, but also triggers errors in the additional WebGL validation. This commit reoders ANGLE's validation so that WebGL-specific validation for draws is done after the common GL ES checks. BUG=angleproject:2021 Change-Id: Ie06b132ef6a4378f7c82ae8d354a8343d897c478 Reviewed-on: https://chromium-review.googlesource.com/493828 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill be849e4f 2017-05-02T15:49:00 GLES2: Clean up entry points for auto-gen. This cleans up a few things: * refactors a few remaining missed EPs * removes unnecessary includes * rename one Context entry point * moves some ES2 EP validation to validationES2 The last item makes for a significant diff, but this is a refactor change only, with no functionality change. BUG=angleproject:747 Change-Id: I7860cc4b6260b6c22faa5f2885297333c0cdb4ed Reviewed-on: https://chromium-review.googlesource.com/483426 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 876429b7 2017-04-20T15:46:24 Update gl2.h and update entry points. Some method signatures were updated. Types like GLclampf and GLvoid were replaced with other equivalents. BUG=angleproject:1309 Change-Id: I05e8e2072c5a063d87ad96a855b907424661e680 Reviewed-on: https://chromium-review.googlesource.com/475011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9c9b40ac 2017-04-26T16:31:57 Use parameter cache to skip passing IndexRange. For DrawElements et al., we can use a simple design to store entry point parameters and compute index ranges lazily. This allows us to compute the index range outside of the validation layer. Fixing this will let us implement a few things, such as the no error extension. It will also allow auto-generation of the entry points, since we won't have to have special cases for certain entry points. It will also help fix the syncState layering problem. Now the cached parameter helper (which is owned by the Context) can make the impl layer calls, instead of the validation layer calling the impl directly. We use a small array in Context to gather parameters in a generic way without reallocation on call. We also check type safety by storing a type info struct which can handle inheritance between type classes. Optional variables for the cache determine when to re-compute values. The intent with gatherParams is to call this in every entry point, and have in most cases be a no-op. In some cases like for IndexRange, we store some parameters for later use. The inheritance scheme enables auto-generation of the entry points by keeping signatures similar. BUG=angleproject:747 Change-Id: I871e99e1334cf6e61ef8da62fde3ced094903f8a Reviewed-on: https://chromium-review.googlesource.com/474119 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He f81ce4a3 2017-04-24T10:49:17 Refactoring: replace NULL by nullptr for pointers (3rd CL). This CL mainly handles passing/returning NULL to/from a function. BUG=angleproject:2001 Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009 Reviewed-on: https://chromium-review.googlesource.com/485060 Commit-Queue: Jamie Madill <jmadill@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>
Geoff Lang e491578f 2017-04-12T15:19:07 WebGL: Validate the read and write buffers for BlitFramebuffer are unique. TEST=conformance2/rendering/blitframebuffer-test BUG=angleproject:1990 Change-Id: I0caeaac824f1689867134f34f74e5ef2c2f1b016 Reviewed-on: https://chromium-review.googlesource.com/475990 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yunchao He 4f285443 2017-04-21T12:15:49 Refactoring: replace NULL by nullptr for pointers (2nd CL). This CL mainly handles the pointer comparisons (== or !=). BUG=angleproject:2001 Change-Id: I25ac3b61032e7ad91459a1c6541cadc87cf9b160 Reviewed-on: https://chromium-review.googlesource.com/483935 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 407d4e77 2017-04-12T14:54:11 Perform ANGLE_instanced_arrays validation for WebGL contexts. TEST=conformance2/rendering/instanced-arrays BUG=angleproject:1988 Change-Id: Ie513dcc7b1af540764fd5fe3790d3e6e3457f048 Reviewed-on: https://chromium-review.googlesource.com/475136 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@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>
Yunchao He 33151a53 2017-04-13T09:58:17 Code refactoring: remove unneeded variables BUG=angleproject:1996 Change-Id: If635bf836251f90ec40d791b5f80d43f751aad9b Reviewed-on: https://chromium-review.googlesource.com/476079 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c1d770e8 2017-04-13T17:31:24 Refactor remaining GLES 2.0 entry points. This will pave the way for several features, like auto-generation. BUG=angleproject:747 Change-Id: Ic390ac412f4e6b61346629093f185a4c07ea0284 Reviewed-on: https://chromium-review.googlesource.com/474118 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill dd43e6cd 2017-03-24T14:18:49 Pass Context to VertexArray and Framebuffer syncstate. This will enable more Vulkan-friendly idioms like clearing the vulkan pipeline caches correctly on GL state changes immediately because we have access to the ContextVk. BUG=angleproject:1898 Change-Id: I16c848d8abdde8e26a38d384e565cec8548a66d0 Reviewed-on: https://chromium-review.googlesource.com/459079 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang e93dabaa 2017-03-30T13:54:40 Output the number of columns and rows written for robust ReadPixels. BUG=angleproject:1354 Change-Id: Ib78f74d7b1a449468e2c477955f6795dc5dbc811 Reviewed-on: https://chromium-review.googlesource.com/463786 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@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>
Corentin Wallez fe9306a8 2017-02-01T17:41:05 WebGLCompatibility: Add test for "negative" offset in DrawElements BUG=angleproject:1523 BUG=chromium:668223 Change-Id: I2d21c15b53fa204b3cb2b0be849cfe91ca63046b Reviewed-on: https://chromium-review.googlesource.com/435884 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e08a1d36 2017-03-07T17:24:06 Plumb robust resource init extensions. This also cleans up a few minor glitches in the extension texts, and renames the EGL extension for consistency. It incidentally fixes a bug in our EGL init where we were checking the wrong client versions for KHR_create_context. It also implements a new feature for tests which allow them to defer Context creation until the test body. This allows tests to check for EGL extension available before trying to create a context with certain extensions. BUG=angleproject:1635 Change-Id: I9311991332c357e36214082b16f2a4a57bfa8865 Reviewed-on: https://chromium-review.googlesource.com/450920 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Minmin Gong 390208b5 2017-02-28T18:03:06 Implements ETC lossy decode for ETC2 formats. This is the 2nd payload of GL_ANGLE_lossy_etc_decode feature. In this change, RGB8, SRGB8, RGB8A1, and SRGB8A1 formats in ETC2 family can be converted to BC1. BUG=angleproject:1285 Change-Id: I96fe2f07c62716a31d37f20a202b6cabbb4ebbd2 Reviewed-on: https://chromium-review.googlesource.com/447846 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4e0e6f8a 2017-02-17T11:06:03 WebGL Compat: Add DEPTH_STENCIL renderbuffers. This special internal format was defined in the WebGL 1 spec as a special unsized format with at least 16 bits of depth and at least 8 bits of stencil. Intenally ANGLE will translate this to packed 24/8 depth/stencil. The new test is adapted from the WebGL test: conformance/renderbuffers/framebuffer-object-attachment BUG=angleproject:1708 Change-Id: I44b03e41889eed02481f603b8d52c530dcfed5ce Reviewed-on: https://chromium-review.googlesource.com/442094 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiawei-Shao 2597fb64 2016-12-09T16:38:02 ES31: Refactor VertexArray for Vertex Attrib Binding OpenGL ES3.1 feature Vertex Attrib Binding requires vertex arrays should be split into two arrays: 1. an array of vertex buffer binding points, each of which specifies: - a bound buffer object, - a starting offset for vertex attribute data in that buffer object, - a stride used by all attributes using that binding point, - a frequency divisor used by all attributes using that binding point. 2. an array of generic vertex attribute format information records, each of which specifies: - a reference to one of the new buffer binding points above, - a component count and format, and a normalization flag for the attribute data, - the offset of the attribute data relative to the base offset of each vertex found at the associated binding point. Current ANGLE implementation simply uses a struct to represent a vertex attribute object, which does not meet the requirements above. This patch aims to be the the basis of the implementation of all ES3.1 Vertex Attrib Binding APIs by refactoring the struct VertexAttribute and the class VertexArray to fit the new data layout and ensuring all current functionality is retained. BUG=angleproject:1593 TEST=angle_unittests, angle_end2end_tests, gpu_unittests Change-Id: Ieb41f1bf503f815fd0476d2ea045dcb863465254 Reviewed-on: https://chromium-review.googlesource.com/418880 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang feb8c686 2017-02-13T16:07:35 Add extensions to disable client arrays. Chrome doesn't allow any client data in its command buffer. Add an ANGLE extension to request a context that disallows client data. BUG=602737 Change-Id: If9d5144daea3c629a73562396000df59a671aad3 Reviewed-on: https://chromium-review.googlesource.com/441986 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill e8fb640d 2017-02-14T17:56:40 Update RenderbufferStorage EPs to new style. This will facilitate changes for WebGL compatibility. BUG=angleproject:747 BUG=angleproject:1708 Change-Id: I62e5d684ca10a843b5e958afe9954c1065bfeb19 Reviewed-on: https://chromium-review.googlesource.com/442093 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fd3dd436 2017-02-02T19:59:59 WebGL: Add 3D tex copying feedback loop detection. When copying to and from the same texture, we need to reject only the feedback loops formed with the same levels of the texture - copying between different unrelated layers and levels is fine. This change also fixes a couple bugs in our D3D11 CopyTexSubImage3D implementation. We were missing some "!" operators, and we actually would hit an ASSERT when trying to blit from a level of a 3D texture. BUG=angleproject:1685 Change-Id: Id715bebafe8336cf8bb95d0d06275a8b95e522e1 Reviewed-on: https://chromium-review.googlesource.com/425494 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Frank Henigman 999b0fd2 2017-02-02T21:45:55 Validate uniform sampler values. Generate GL_INVALID_VALUE when setting a sampler uniform with a value outside the range [0, GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS). Add a test for the new behavior. Remove TextureLimitsTest.DrawWithTexturePastMaximum, which is made obsolete by the new test. BUG=angleproject:1711 Change-Id: I9a4ea13b8cb47742816476689bd3932ce267fd0a Reviewed-on: https://chromium-review.googlesource.com/430196 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Frank Henigman a98a647e 2017-02-02T21:38:32 Add uniform1iv validation functions. Add two new validation functions: ValidateUniform1iv() and ValidateProgramUniform1iv(). No functional change, just hooks for additional sampler uniform validation that will come later. This also lets us skip the sampler test in the more generic ValidateUniformValue() function. BUG=angleproject:1711 Change-Id: Ia6b7b45c22c2cf4b49a55fac62410ca4c91d09f4 Reviewed-on: https://chromium-review.googlesource.com/436884 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Frank Henigman f5f74ae0 2017-02-02T21:14:23 Refactor and clean up uniform validation. Move uniform value checking to two new functions: ValidateUniformValue() and ValidateUniformMatrixValue(). This reduces code duplication slightly and paves the way for further validation of sampler uniforms in a later change. The checking also becomes slightly more efficient by virtue of reording the tests to put cheap/common cases first. ValidateUniformCommonBase() moves to the anonymous namespace and loses an unused parameter. BUG=angleproject:1711 Change-Id: I6c4deeea27c54027f542500644636064167d5714 Reviewed-on: https://chromium-review.googlesource.com/431677 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 0844f2db 2017-01-31T17:02:59 WebGLCompatibility: add tests for OOB in DrawElements' index buffer Also add a small fix for a WebGL test where DrawElements with a count of 0 should skip OOB checks. BUG=angleproject:1523 BUG=chromium:668223 Change-Id: I67fbe939f6c8b925551b658b6178dbbae982df89 Reviewed-on: https://chromium-review.googlesource.com/435279 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 3f6d4dff 2017-01-30T18:04:36 WebGLCompatibility implement and add tests for section 6.4 The checks for VertexAttribPointer were already implemented in a previous patch, so we only add the checks for DrawElements. BUG=angleproject:1523 BUG=chromium:668223 Change-Id: I5da55f9a7e7479627099c7f77618353a63b75a8e Reviewed-on: https://chromium-review.googlesource.com/434958 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill cc6ac25e 2017-01-25T12:57:21 GLES: Expose OES_mapbuffer in GLES2 on GLES3. This extension is mandatory for EXT_map_buffer_range support. We can emulate it using GLES 3.0 core map functionality. BUG=angleproject:1751 Change-Id: Idba09ce7276603d5556039f4a49aa0b87cae22aa Reviewed-on: https://chromium-review.googlesource.com/431826 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yuly Novikov d73f852f 2017-01-13T17:48:57 Reland "Replace gl::trace logging with Chromium style logging" Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. Fix incorrect enabling of ERR() calls in UNIMPLEMENTED() and UNREACHABLE(), resulting in increased code size and <iostream> adding 5 static initializers to chrome because of cerr referenced in statically linked translator. BUG=angleproject:1660 Change-Id: I7caa18036118d532e0544f75278602559172ae04 Reviewed-on: https://chromium-review.googlesource.com/431457 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
JiangYizhou bddc46b4 2016-12-09T09:50:51 ES31: Implement multisampled Textures. Implement TexStorage2DMultisample and getMultisamplefv entry point. Also modify sample state for Textures and Framebuffers. BUG=angleproject:1590 TEST=angle_unittests TEST=angle_end2end_tests TEST=dEQP-GLES31.functional.texture.multisample.samples_*.sample_position TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_color_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_depth_2d TEST=dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_sample_count_tex_tex TEST=dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_sample_count_tex_rbo TEST=dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_non_zero_level TEST=dEQP-GLES31.functional.texture.multisample.negative.texture_high_sample_count TEST=dEQP-GLES31.functional.texture.multisample.negative.texture_zero_sample_count TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_1_texture_2d TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_4_texture_2d Change-Id: I8fa7bd4e73b95745858a3e16b1b92004b4a18712 Reviewed-on: https://chromium-review.googlesource.com/414309 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ac4e9c3f 2017-01-13T14:07:12 Micro-optimize Uniform updates. This saves a few re-computations of the same stuff. BUG=angleproject:1671 Change-Id: I28f955cd880366a86c0bb22285a119e97661e2cb Reviewed-on: https://chromium-review.googlesource.com/427326 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill f695a3a1 2017-01-11T17:36:35 WebGL: Validate texture copying feedback loops. This adds basic validation for catching CopyTex{Sub}Image calls whose source and destination textures overlap. It does not yet implement full support for ES3 types (3D textures, array textures). BUG=angleproject:1685 Change-Id: I83e7b1998df5575057fed8f99f7ee9970fb38df0 Reviewed-on: https://chromium-review.googlesource.com/425491 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
He Yunchao 11b038be 2016-11-22T21:24:04 ES31: Implement glGetTexLevelParameter{i|f}v entry point BUG=angleproject:1679 TEST=dEQP-GLES31.functional.state_query.texture_level.* Change-Id: I36cc7406199fc0c3c1585ad48f010d7dba5fe9e4 Reviewed-on: https://chromium-review.googlesource.com/414250 Commit-Queue: Yunchao He <yunchao.he@intel.com> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 6a6b09c9 2017-01-12T21:52:29 Revert "Replace gl::trace logging with Chromium style logging" Failing Chromium static initializers check: FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower Possibly due to the static initializer for std::array for the log severity types. We should change it to POD. BUG=angleproject:1660 This reverts commit afcc41cee4ff63e7f6c9e60e55fc061adbba7dd4. Change-Id: Ifb362a4af78542608397c7a0b19e6afe076f2cf3 Reviewed-on: https://chromium-review.googlesource.com/427235 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov afcc41ce 2016-12-13T12:59:39 Replace gl::trace logging with Chromium style logging Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. BUG=angleproject:1660 Change-Id: I58192988ad16196706fe48d0c0ab0fd1a10c0210 Reviewed-on: https://chromium-review.googlesource.com/424173 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill a4595b80 2017-01-11T17:36:34 WebGL: Validate simple rendering feedback loops. This adds the most basic form of rendering feedback loop detection: when we're rendering to a texture that's also bound as an input. It doesn't filter by selected mipmap level or 3D texture slice, or do depth attachment validation. It also is missing checks for feedback loops against the default Framebuffer. BUG=angleproject:1685 Change-Id: Idb0ee2bfe1c35611544d132204c0da832c0f1c48 Reviewed-on: https://chromium-review.googlesource.com/425489 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 5f319a4b 2017-01-09T16:49:19 Fix incorrect NPOT availability check. Add tests for enabling NPOT extensions. BUG=angleproject:1678 Change-Id: Ibcbfc1192bceb634deb2904dbb9644902471e3fd Reviewed-on: https://chromium-review.googlesource.com/425713 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez fd456445 2016-12-21T17:57:00 Add tests for the OOB checks for vertex buffers BUG=angleproject:1523 Change-Id: I9ec9fefc635d0338285b430152586fdd39f227c5 Reviewed-on: https://chromium-review.googlesource.com/422964 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill cbcde724 2017-01-06T14:50:00 WebGL: Remove error spam on separate stencil masks. It's fully conformant to not support separate stencil masks in WebGL, so we only need to print the error if we're failing validation from the limitation. BUG=angleproject:1523 Change-Id: Iaa08567180dee839a7b78e61e5a4ad7208c41924 Reviewed-on: https://chromium-review.googlesource.com/425488 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
He Yunchao 66a41a28 2016-12-15T16:45:05 Generate errors when read buffers are missing in BlitFramebuffer. The corresponding gl_tests has been updated too. BUG=672719 Change-Id: Ief37bc397f7aa065bf99d6ebad0a1b50b1917dac Reviewed-on: https://chromium-review.googlesource.com/420469 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez b1d0a255 2016-12-19T16:15:54 WebGL compatibility: add stencil mask and ref restriction BUG=angleproject:1523 BUG=chromium:668223 Change-Id: I0726769c938fdfd50af0fad1cef1746d4af2a589 Reviewed-on: https://chromium-review.googlesource.com/422084 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 71168a07 2016-12-19T15:11:18 Manually write overflow checks for glDraw* The usage of checked numerics showed has a big hotspot in ValidateDrawAttribs. BUG=angleproject:1671 BUG=chromium:674143 Change-Id: I96392e099b2257e465fb47e1c96f9aa1f54a89ba Reviewed-on: https://chromium-review.googlesource.com/422428 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>