src


Log

Author Commit Date CI Message
Jamie Madill 8aeeed6e 2017-03-15T18:09:26 D3D11: Work around compiler nested sampling bug. We can potentially work around a bug in the HLSL compiler by omitting the const qualifier from some sampling operations. BUG=angleproject:1923 Change-Id: I8a5d119707721e9c19f06be4ad808f87bfcdbee5 Reviewed-on: https://chromium-review.googlesource.com/454938 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman a5eb2941 2017-03-09T17:03:54 Remove unused/unnecessary stuff. Change-Id: Ib409fee5422765cc4124a59a690a93c0fb2de8e7 Reviewed-on: https://chromium-review.googlesource.com/456123 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill e11bf7bd 2017-03-15T13:23:50 Lift uniform packing test suppressions. These were to be lifted in "Fix non-square matrix uniform packing." BUG=angleproject:1923 Change-Id: I6c5cc973f9dff31ffefdfda9fe640b97d28799ad Reviewed-on: https://chromium-review.googlesource.com/455466 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill cc2ed612 2017-03-14T15:59:00 Fix non-square matrix uniform packing. This was broken in two places: the register count was using the non- transposed matrix row count. The block layout encoder was also not set to transpose matrices, which was causing incorrect packing info to be calculated in link. BUG=angleproject:1923 Change-Id: I89094aa116fad4bda15f018498f8637520f12bd4 Reviewed-on: https://chromium-review.googlesource.com/454876 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
jchen10 36e120ef 2017-03-14T14:53:58 Refactor the staticUse checks for attribute and output Remove these needless checks as GetActiveShaderVariables in Shader.cpp has filtered them already. BUG=angleproject:1920 Change-Id: Ife85614a8f636768dd585a827bca81e2f15009c8 Reviewed-on: https://chromium-review.googlesource.com/454129 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez ded1b5a6 2017-03-09T18:58:48 WebGL Compat: make sure to test the correct error In ForbidsClientSideElementArrayBuffer we test that WebGL Compatibility returns a GL_INVALID_OPERATION but on NVIDIA Shield, the pointer had the top bit set and caused a GL_INVALID_VALUE to be generated instead. Use a intptr_t(1) for indices to test the correct error. BUG=angleproject:1523 Change-Id: I1497694264befa14b2b6df167b4f20fdbb707983 Reviewed-on: https://chromium-review.googlesource.com/452547 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jiawei-Shao ddb5eb56 2017-03-14T13:36:18 Fix build failure in UniformLinker.cpp on Linux This patch adds the declaration of libANGLE/features.h in UniformLinker.cpp to fix the build failure on Linux when you use gn to build ANGLE alone. BUG=angleproject:1938 Change-Id: I19636df8f81b307e6d2e08fdac286cfb3f705eab Reviewed-on: https://chromium-review.googlesource.com/454083 Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Qin Jiajia fbe49a8f 2016-12-19T14:19:10 ES31: Implement DrawArraysIndirect D3D part There are four buffer types for vertex attribute storage in D3D11: DIRECT STATIC DYNAMIC CURRENT_VALUE When drawing, it will call applyVertexBuffer to bind the right type buffers in D3D11. DIRECT uses the gl buffer directly without any translation. CURRENT_VALUE uses a single value for the attribute. STATIC translates the whole vertex buffer once. So it doesn't need the first, count and instance informations since it always translates the whole buffer. DYNAMIC translates the data every frame. To improve the performance, in implementation, it only translates 'count' vertexes from 'first' location in vertex buffer with one drawing for non-instanced vertices. 'first' and 'count' are got from draw parameter list. And for the translated vertex buffer, when drawing, the first vertex location is 0. From above analysis, we can see that if all attribute storages are non-dynamic, we can directly use the indirect buffer to draw. But for dynamic storages, we have to calculate the first, count, and instances from indirect buffer and apply them to translate the dynamic type buffers. Meanwhile, we have to set the first to 0 (see above description)when drawing. DrawArrysIndirect implementation is like below: 1. Check whether all vertex attributes are non-dynamic 2. If yes, applyVertexBuffer and DrawInstancedIndirect 3. If no, 1) calculate first, count, and instances from indirect buffer. 2) applyVertexBuffer with these parameters. 4) Use DrawInstanced instead of DrawInstancedIndirect. BUG=angleproject:1595 TEST=dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect* Change-Id: I36431f416443279d51de523b07ce60727914cbbf Reviewed-on: https://chromium-review.googlesource.com/446690 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahmeer Esmail fe34780f 2017-03-13T17:07:08 RenderStateCache BlendState Hash Fix Fix hash function for blendState cache BUG=angleproject:1937 Change-Id: I0acd7dfcfb933b2b7ff0c1dc6854c7623ec57b3b Reviewed-on: https://chromium-review.googlesource.com/453887 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahmeer Esmail e5cdca7e 2017-03-13T16:45:56 RenderStateCache memory usage Reduce RenderStateCache cache sizes from 4k to 2k. Saves 64kb of memory. Change-Id: I9e92bbdf095f1e66cf9b84ba81899a8af59d6d86 Reviewed-on: https://chromium-review.googlesource.com/453886 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov c1f8d61a 2017-03-10T14:13:06 Disable VertexAttributeTestES31.MaxVertexAttribStride on Linux AMD GL Due to AMD driver bug. BUG=angleproject:1593 Change-Id: Ic1fee717ffb55c67d3c4d0a43848d73ed6794732 Reviewed-on: https://chromium-review.googlesource.com/452940 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shao 7a0b3044 2017-03-10T10:03:33 Reland "ES31: Add test on large strides" In OpenGL 4.3 there is no limit on the maximum value of stride. This patch choose an emulated value for OpenGL 4.3 to fix the fyi failure on Linux AMD. BUG=angleproject:1593 Change-Id: I83cecc2ed1a3734dc8b8df3edb48ecc16039ba6e Reviewed-on: https://chromium-review.googlesource.com/452746 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Olli Etuaho b78707c8 2017-03-09T15:03:11 Move default-block uniform linking to a separate file The code is easier to understand when it's encapsulated better. This change is pure refactoring with no functional changes. BUG=angleproject:1442 TEST=angle_end2end_tests Change-Id: I6128fd72c65ca7a87af596cda4866c74c2a66c48 Reviewed-on: https://chromium-review.googlesource.com/452502 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e14951e6 2017-03-09T18:55:16 Implement robust buffer initialization. This uses the most simple implementation: on BufferData calls without explicit data arguments, it will initialize the buffer data store to zero. This could be improved by deferring the init until needed, and skipping it if the buffer store is cleared through other API calls, but it is not a regression from current Chromium implementation. BUG=angleproject:1635 Change-Id: I2fb1594851c5050dc2578736c3f74761555da267 Reviewed-on: https://chromium-review.googlesource.com/450921 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 0bb791ed 2017-03-09T23:44:40 Revert "ES31: Add test on large strides" This is failing on Linux AMD: https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.gpu.fyi%2FLinux_Release__AMD_R7_240_%2F1729%2F%2B%2Frecipes%2Fsteps%2Fangle_end2end_tests%2F0%2Fstdout ../../third_party/angle/src/tests/gl_tests/VertexAttributeTest.cpp:684: Failure Expected: (maxStride) >= (2048), actual: 0 vs 2048 This reverts commit 0ba963ef27d1d656986f2f4382391dd5da8c8104. Reason for revert: <INSERT REASONING HERE> Original change's description: > ES31: Add test on large strides > > ES3.1 requires the implementation should define MAX_VERTEX_ATTRIB_STRIDE, > which should be emulated when we use D3D11 backends. > > This patch adds tests to verify this value required in ES3.1 are > supported to be used directly in glVertexAttribPointer for rendering. > > BUG=angleproject:1593 > > TEST=angle_end2end_tests > > Change-Id: I1ac206e4f6c972b5748552177c787c0adcb66786 > Reviewed-on: https://chromium-review.googlesource.com/441308 > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> > TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,yunchao.he@intel.com,qiankun.miao@intel.com,jiawei.shao@intel.com,yang.gu@intel.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=angleproject:1593 Change-Id: I036da9d6d5633bcc055cc8cfbfde9a15ae67f59c Reviewed-on: https://chromium-review.googlesource.com/452743 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 6445ddf8 2017-03-08T19:00:32 end2end_tests: Adds more skips for new tests and testers BUG=angleproject:1924 Change-Id: I3ca25545632c9884eb1a8dba5e8e402b14324f80 Reviewed-on: https://chromium-review.googlesource.com/451877 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 6ca2b65c 2017-02-19T18:05:10 Implement location layout qualifier for uniforms This is a complete implementation of the uniform location layout qualifier. Uniform location set in the shader is plumbed to shader linking, which does several link-time checks for conflicts and recursively applies the location to struct members. Validate that location is consistent as specified in the table in section 9.2.1 of the ESSL 3.10.4 spec. The location set in the shader overrides the one set via the CHROMIUM_bind_uniform_location API. Location conflicts must be checked even if the uniforms are not statically used. Because of this unused uniforms are now recorded during uniform linking. After linking checks are done, unused uniforms are pruned from the program state. Location is validated against the maximum number of uniform locations at compile time as specified in section 4.4.3 of the ESSL 3.10.4 spec. All dEQP uniform location tests don't yet pass due to unrelated bugs. BUG=angleproject:1442 TEST=angle_end2end_tests, dEQP-GLES31.functional.uniform_location.* Change-Id: I1f968e971f521fbc804b01e1a7c2b4d14f24d20f Reviewed-on: https://chromium-review.googlesource.com/447942 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Shao 0ba963ef 2017-02-14T22:03:09 ES31: Add test on large strides ES3.1 requires the implementation should define MAX_VERTEX_ATTRIB_STRIDE, which should be emulated when we use D3D11 backends. This patch adds tests to verify this value required in ES3.1 are supported to be used directly in glVertexAttribPointer for rendering. BUG=angleproject:1593 TEST=angle_end2end_tests Change-Id: I1ac206e4f6c972b5748552177c787c0adcb66786 Reviewed-on: https://chromium-review.googlesource.com/441308 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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 e16a4519 2017-03-07T20:46:40 D3D11 FL9_3: Fix bug in R32F vertex format emulation. We would allow direct storage when this format is emulated. Noticed this when making a test which used a single float vertex format. BUG=angleproject:1635 Change-Id: Ia2164b0f311b27f24b6aa7760eb9f9a3834c6044 Reviewed-on: https://chromium-review.googlesource.com/451578 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Frank Henigman 146e8a1c 2017-03-02T23:22:37 WebGL validation of constant color & alpha blend. In WebGL, generate INVALID_OPERATION if constant color and constant alpha are used together as source and destination blend functions. BUG=angleproject:1817 Change-Id: I9b2d05ab5017c013bb89c13256efbd80198de91b Reviewed-on: https://chromium-review.googlesource.com/448940 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang d61396b4 2017-03-06T14:49:46 Reduce the number of iterations of SwizzleTest. KHR_debug from the GL drivers was generating a lot of spam. BUG=angleproject:1925 Change-Id: I89568ea2bec3afb629f86c25d9e80aad1dbe79f8 Reviewed-on: https://chromium-review.googlesource.com/450857 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho c9da71ff 2017-03-06T16:28:54 Fix translating dynamic indexing of swizzle to HLSL This was broken due to a simple omission in deep copying swizzle AST nodes. It was found that several if not most OpenGL drivers also have some issue related to this, so the end2end test is suppressed on many OpenGL platforms. Intel Windows driver seems to be behaving correctly. BUG=angleproject:1921 TEST=angle_end2end_tests Change-Id: Ieefcedc2f2e36c3d8b607c28e449b696b8ad6892 Reviewed-on: https://chromium-review.googlesource.com/449717 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 9f9b1d2d 2017-03-06T18:25:22 Make ScratchBuffer its own type. This helper tool in Renderer11 can be useful in other back-ends, or even in the front end. BUG=angleproject:1635 Change-Id: I18ec19a891a9bdfa7b80dea1b8e308abf206906b Reviewed-on: https://chromium-review.googlesource.com/450919 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ef964d48 2017-03-06T18:25:22 Buffer: Minor error macro cleanups. Refactoring patch only. BUG=angleproject:1635 Change-Id: I9b86fc77f8f62a0f67f9fc73debdc8fb5e379bcc Reviewed-on: https://chromium-review.googlesource.com/450918 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 817232ef 2017-02-22T18:36:10 Validate invariance of built-in variables when linking According to ESSL 1.00.17 paragraph 4.6.4 BUG=angleproject:1876 Change-Id: I61e142c31dce11eec28fe240a9bc9ce2c632daf6 Reviewed-on: https://chromium-review.googlesource.com/446870 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
He Yunchao 010e4dbd 2017-03-03T14:22:06 Code refactoring for getters and setters. The entry point should call into Context at first for getters and setters. BUG=angleproject:1922 Change-Id: Ibc8f726298cf334a6dafd6402e39c4dcd7e6d333 Reviewed-on: https://chromium-review.googlesource.com/450028 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
JiangYizhou 461d9a30 2017-01-04T16:37:26 ES31:Check framebuffer status for multisample and default params This patch implements FRAMEBUFFER_INCOMPLETE_MULTISAMPLE checking for checkFramebufferStatus, and also modify conditions of FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENTS when setting default parameters to fbo. BUG=angleproject:1594 TEST=angle_end2end_tests --gtest_filter=FramebufferTest_ES31* TEST=dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_fixed_state_tex* Change-Id: I86954056d3a5d89dca517b267bd16e17b70e5652 Reviewed-on: https://chromium-review.googlesource.com/437991 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Bruce Dawson 09e7c0a4 2017-03-01T16:38:32 Avoid redundant INSERT_PROC_ADDRESS calls PVS-Studio pointed out that seven GL functions were being initialized twice. This isn't critical but is slightly inefficient. R=jmadill@chromium.org BUG=697659 Change-Id: I199bd06ae1136bc3b8efd519787d89f4447f326d Reviewed-on: https://chromium-review.googlesource.com/448639 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 547cbd46 2017-02-27T11:54:00 Validate uniform binding at link time GLSL ES Spec 3.10.4, section 4.4.5 has the rules for linking uniforms with binding layout qualifiers. If a binding layout qualifier for a uniform variable is specified in both vertex and fragment shaders, the qualifiers must match. BUG=angleproject:1893 TEST=dEQP-GLES31.functional.layout_binding.*binding_contradictory* Change-Id: I0ae6a1a8967df818be8136510c22daee848b9da7 Reviewed-on: https://chromium-review.googlesource.com/447557 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho a55102c5 2017-02-24T12:36:50 Unify and simplify shader variable collection Instead of setting variable information in both CollectVariables and the GetVariableTraverser helper class it uses, keep all of this functionality in CollectVariables. A single helper function handles setting variable information that doesn't depend on variable type, and the rest is done in "record" functions that are implemented for each variable type. This removes templates from the code, making it leaner and easier to understand, and will help with implementing future features like adding binding and location layout qualifiers for uniforms. BUG=angleproject:1442 TEST=angle_unittests, angle_end2end_tests, dEQP-GLES2.functional.shaders.* Change-Id: I79148b7b3fa9cb46634a22bdcc9ce0c04f970384 Reviewed-on: https://chromium-review.googlesource.com/446838 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
chrome-bot 7d670a33 2017-02-21T21:35:57 Make ozone backend work if it can't display. The ozone backend will no longer fail if it is unable to display on screen for any reason. It no longer assumes it can control the first screen it finds. BUG=angleproject:1423 Change-Id: I5d5274c54b1bc6de50e704903391bf6161efa487 Reviewed-on: https://chromium-review.googlesource.com/445805 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tom Anderson 61f0db8e 2017-02-24T15:34:19 Fix GCC build Change-Id: I30e6e8d82821ed86cc7f53a48b1b23fc0cbf060c Reviewed-on: https://chromium-review.googlesource.com/446866 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 200db9dc 2017-02-24T12:59:26 DisplayGLX: Create a highest version core profile context. Previously the code was hitting a weirdness of glXCreateConfigAttrib where a compatilibility context was created even if the core profile bit was set. BUG=chromium:694877 Change-Id: I17164d620b39a26d73e34e1fc8de0ef66aef80f4 Reviewed-on: https://chromium-review.googlesource.com/446673 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 4c26fc2f 2017-02-24T11:04:10 Vulkan: Initial command queueing implementation. This removes the sychronous operation of the command buffers. It also introduces a serial type for assigning ids to queue operations. This gives us the ability to manage lifetimes of resources and track when they're no longer in use on the device. BUG=angleproject:1898 Change-Id: I91a4836d3098f1d7bd06cd389d88601a3a4826ab Reviewed-on: https://chromium-review.googlesource.com/428352 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 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 a02315b0 2017-02-23T14:14:47 WebGL Compat: Add DEPTH_STENCIL attachments. This is a special WebGL 1 binding point, that does not correspond to any native functionality. Due to particularities in validation we need to represent this with additional state in the Framebuffer. WebGL 2 fixes this oddity by resolving to the GLES 3 native spec. In order to pass the WebGL framebuffer objects test, we will also need a chromium-side CL to work with the additional state tracking it does in the blink layer, and an additional patch to ANGLE to clear the depth buffer before the first use (robust resource init). BUG=angleproject:1708 Change-Id: I111f8f5a451cce7de6cf281a6bc335b92dd2daf2 Reviewed-on: https://chromium-review.googlesource.com/444095 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Milan Sreckovic 89fcb8e8 2017-02-22T15:38:55 Check for getColorAttachment returning null before using it. BUG=angleproject:1916 Change-Id: I98413198089081cc354e9e14dff95f233c3f34ff Reviewed-on: https://chromium-review.googlesource.com/446044 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez c16678a2 2017-02-22T15:24:55 ASTMetadataHLSL: handle WebGL2 gradient builtins BUG=angleproject:1915 Change-Id: Id54e6dd417a1a288c71355e74184366d1492e92b Reviewed-on: https://chromium-review.googlesource.com/446521 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 6f60d05f 2017-02-22T15:20:11 Make Framebuffer backbuffer constructor take Surface. This allows the Framebuffer to initialize all the attachment info internally. This in turn will allow us to clean up the way we validate WebGL1 depth/stencil attachments. BUG=angleproject:1708 Change-Id: I8871a9791dfce0ac806f4e1367a521610e5283ae Reviewed-on: https://chromium-review.googlesource.com/446130 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez d83f64f5 2017-02-16T10:58:46 gpu_info_util: Implement GetSystemInfo on OSX Also adds a test that prints the gathered information for manual checking and to help know what the system is when looking at the logs. BUG=angleproject:1874 Change-Id: Icb0cc390c9808fd8db0f966d667b94dde4b94e62 Reviewed-on: https://chromium-review.googlesource.com/443845 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill f0eafe10 2017-02-21T15:03:50 Vulkan: Use Mailbox present mode when possible. This is a hack to force an equivalent of eglSwapInterval(0) for perf testing on the bots. This isn't quite the same as Immediate but Immediate doesn't seem to be as widely available. BUG=angleproject:1898 Change-Id: I3c5053e58969ba48f4f8595138e8fd38ea059bf6 Reviewed-on: https://chromium-review.googlesource.com/445798 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
JiangYizhou e18e6394 2017-02-20T10:32:23 ES3.1: Move FramebufferParameteri and GetFramebufferParameteriv to context. Follow-up of the cl, implementing fmamebuffer parameters api (https://chromium-review.googlesource.com/c/412126/). Moving entry point function FramebufferParameteri and GetFramebufferParameteriv to context according to Jamie's commemts. BUG=angleproject:1594 TEST=dEQP-GLES31.functional.state_query.framebuffer_default.framebuffer_default* Change-Id: Ib8a286afe97716576cf5d0a5338eee6588a4e25c Reviewed-on: https://chromium-review.googlesource.com/444283 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 4a92cebc 2017-02-19T17:51:24 Clarify code around setting uniform locations Use the name "uniformLocationBindings" for location information set by the API instead of "uniformBindings", which can be easily confused with binding layout qualifiers that can be set for some types of uniforms. Also use more straightforward names throughout the indexUniforms function. BUG=angleproject:1442 Change-Id: I47d504479b36def696305f060e9c9bd3de3ade48 Reviewed-on: https://chromium-review.googlesource.com/445236 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Yuly Novikov f5bb220f 2017-02-17T23:25:17 Restore Default Platform logging to stderr Was lost in https://chromium-review.googlesource.com/434188 Also, don't reset pre-set Platform to Default, otherwise Chrome's platform gets reset. BUG=angleproject:1660, angleproject:1892 Change-Id: I052c86c513c8d89d2420a4724a8bd0dc7446c7c2 Reviewed-on: https://chromium-review.googlesource.com/444928 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Qin Jiajia cde4f024 2017-02-21T14:06:02 Remove unused parameters of StoreStaticAttrib The parameters count and instances in VertexDataManager::StoreStaticAttrib are never used in the function body. So this patch will remove them. BUG=none Change-Id: Ic3fe21ae50e5016145bfd0c78542540c8ec76fd2 Reviewed-on: https://chromium-review.googlesource.com/445337 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman 308d745d 2017-02-15T22:51:21 Don't use GL_FRAMEBUFFER_SRGB unless available. Don't try to enable or disable GL_FRAMEBUFFER_SRGB unless extensions.sRGBWriteControl is true. For example if you try it with Mesa GLES2 you get a GL error. BUG=angleproject:1896 Change-Id: I5f5b4e8ea4f5a7c6913f27761a6e2dc88aacc78c Reviewed-on: https://chromium-review.googlesource.com/443824 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Frank Henigman 5a53d54e 2017-02-16T21:24:10 Remove unneeded ContextImpl::syncState parameter. The 'state' parameter passed to ContextImpl::syncState() is already available in ContextImpl as mState.getState(). BUG=none Change-Id: I13283664579fa04ae67b1d1bbc0cb4426a950b97 Reviewed-on: https://chromium-review.googlesource.com/444099 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 75066e7a 2017-02-15T17:26:13 Clean up EVENT() logging. These don't need newlines, or a severity prefix. BUG=angleproject:1660 Change-Id: I8a01c55a7e3d8915f48c2a29f43ddc0a37eb64f3 Reviewed-on: https://chromium-review.googlesource.com/443353 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman e6091987 2017-02-15T22:03:36 Set formats in Ozone configs. The fields renderTargetFormat and depthStencilFormat are now required. BUG=none Change-Id: I8dff771fc8c28b297bc7d47f9aef7f78ba0f3f86 Reviewed-on: https://chromium-review.googlesource.com/443804 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 5deea723 2017-02-16T10:44:46 Vulkan: Don't store device handles in wrapped objects. BUG=angleproject:1684 Change-Id: I0ec11ec79f2e9893600a8ffd8cdbfc6040fb6f70 Reviewed-on: https://chromium-review.googlesource.com/426402 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill abe89c7d 2017-02-16T10:24:06 Tweak platform method signatures. This works around a limitation in UBSAN which can't handle decltype. Instead use void * and typedef where appropriate. BUG=chromium:692274 Change-Id: I4eab796db3aa2e51c0fc558170eb2af61f07223d Reviewed-on: https://chromium-review.googlesource.com/443885 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
JiangYizhou f7bbc8a3 2016-11-16T09:57:22 ES3.1: Implement framebuffer parameters api for opengl part. Add new framebuffer parameters that can be set with glFramebufferParameteri and queried with glGetFramebufferParameteriv. GL_FRAMEBUFFER DEFAULT WIDTH GL_FRAMEBUFFER_DEFAULT_HEIGHT GL_FRAMEBUFFER_DEFAULT_SAMPLES GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS BUG=angleproject:1594 TEST=angle_unittests TEST=angle_end2end_tests TEST=dEQP-GLES31.functional.state_query.framebuffer_default.framebuffer_default* Change-Id: I425e73a6b798fc7c73841ab98d7c8aabc381133d Reviewed-on: https://chromium-review.googlesource.com/412126 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 878baf90 2017-02-15T13:57:16 gpu_info_util: address comments for CL 438940 BUG=angleproject:1874 Change-Id: I6397d9141a7c25f818ce970212a4a8e8afbd5a27 Reviewed-on: https://chromium-review.googlesource.com/442676 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 38a24a94 2017-02-15T13:53:06 Fix incorrect indices being used when divisor is non-zero. When streaming client data in the OpenGL backend, incorrect vertex data was uploaded. The 'first' parameter should be ignored when drawing with a non-zero divisor, even when doing non-instanced draw calls. BUG=angleproject:1894 Change-Id: If5a9ed4683f5c64eea1436eff28b2b2f86befcf4 Reviewed-on: https://chromium-review.googlesource.com/443067 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 294a5608 2017-02-15T10:41:32 Vulkan: Make CommandPool a wrapped type. This faciliatates an upcoming change to treat all handle types uniformly with respect to releasing. BUG=angleproject:1684 Change-Id: I632262a57b3a447cf4999c28ab359fe931549576 Reviewed-on: https://chromium-review.googlesource.com/442674 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3764b257 2017-02-15T10:41:31 Vulkan: Run simple triangle perf test. The most basic perf test possible. BUG=angleproject:xxxx Change-Id: I71b28098c0a1f2174a0177b08bddf74d337438e9 Reviewed-on: https://chromium-review.googlesource.com/427270 Reviewed-by: Geoff Lang <geofflang@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>
Olli Etuaho 4336489f 2017-02-13T16:00:12 Parse binding layout qualifier for opaque types This patch adds binding layout qualifier support for opaque types. Binding layout qualifier on blocks is not yet supported. This includes support for GLSL output and some minor simplification of related functionality in ParseContext. TEST=angle_unittests, dEQP-GLES31.functional.layout_binding.* BUG=angleproject:1442 Change-Id: I53fb505b5a539bccee70613f3969fba81965ae84 Reviewed-on: https://chromium-review.googlesource.com/441586 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 92db39e8 2017-02-15T12:11:04 Fix multisample texture operations crashing HLSL generation This includes a partial implementation of multisample texture operations on the HLSL backend. It can't be fully tested yet, since the API side isn't implemented. BUG=angleproject:1442 TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.* (successfully compiles instead of crashing) Change-Id: Ief782db28388a3f8fd8113cc86ce3c4f500f322a Reviewed-on: https://chromium-review.googlesource.com/443264 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 21534776 2017-02-13T15:21:02 DisplayGL: remove getDriverVersion It was unused and going forward angle_gpu_info_util will be used instead. BUG=angleproject:1874 Change-Id: I262cc36066aa28805d50f3fc4442b08477f9e24d Reviewed-on: https://chromium-review.googlesource.com/442024 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill f4f8db85 2017-02-15T09:31:39 Fix a couple forward declares in angletypes.h. These were vestigal from previous code. BUG=angleproject:1593 Change-Id: I1d9a8e6f60d1dadf8a8a598bdbddd98457eb559c Reviewed-on: https://chromium-review.googlesource.com/442651 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 34fefb7e 2017-02-14T15:05:47 Fix initialization of Caps members. sRGB was never initialized and maxTextureAnisotropy was initialized with a bool instead of a float. BUG=602737 Change-Id: Ied7c27d1dbdbec96f8aead618132b4f59892bd99 Reviewed-on: https://chromium-review.googlesource.com/442668 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 485eefdd 2017-02-14T17:40:06 Fix checking image memory access Checks for image memory access used to assume that image nodes are symbol nodes, but they can also be array indexing nodes. In invalid shaders struct indexing nodes of an image type may also appear after error recovery. TEST=angle_unittests, dEQP-GLES31.functional.layout_binding.* BUG=angleproject:1442 Change-Id: Ib45728d38485cb78c594e080f3decec1233a0046 Reviewed-on: https://chromium-review.googlesource.com/442764 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 6c1f671b 2017-02-14T19:08:04 Add destroy hooks for several GL objects. These hooks allow the back-end renderer to free object resources without having to store pointers to shared device handles for each and every object. This will allow us to save memory on back-ends that really care about memory overhead. There is a downside in that there is more boilerplate in passing gl::Context handles around everywhere. BUG=angleproject:1684 Change-Id: I89463bba8d23f92920e8956650cb73c7fc6d66b7 Reviewed-on: https://chromium-review.googlesource.com/426401 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill abf38572 2017-02-14T16:47:59 Remove old C++ ANGLE platform. Now that the new platform is in place, we can remove the old methods. Must be landed after https://codereview.chromium.org/2697463003/ BUG=angleproject:1892 BUG=chromium:678870 Change-Id: Ia29a3b120cf3521fc0409019c2e64e4dbc6f460d Reviewed-on: https://chromium-review.googlesource.com/441274 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Frank Henigman 6137ddc5 2017-02-10T18:55:07 WebGL validation for depthRange. Generate INVALID_OPERATION for depthRange(zNear, zFar) if zNear > zFar. Add corresponding test. BUG=angleproject:1816 Change-Id: I28b5876a74c9765c0eef1e0f6e5e96d0380586d0 Reviewed-on: https://chromium-review.googlesource.com/441207 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 14154827 2017-02-14T13:53:26 Fix D3DTextureTest. This test was not releasing resource in the correct order. BUG=chromium:691136 Change-Id: Ie95c4d595eac49da2707afde033eff744131fcbe Reviewed-on: https://chromium-review.googlesource.com/442684 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 40dc8c10 2017-02-14T10:41:32 Release the global texture manager with the last referencing context. This ensures that when the global texture manager is released, there is a valid context. BUG=angleproject:1639 Change-Id: I1b75885e9dc02b607bb1a386de394f6087429f5d Reviewed-on: https://chromium-review.googlesource.com/442074 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang b5c3d27a 2017-02-14T09:40:41 D3D11: Disable the RGB10A2 backbuffer format. Chrome was using this format by accident for video decode surfaces, resulting in a power usage regression. BUG=angleproject:1662 BUG=691106 Change-Id: I3b9ac814f06c07490fceb88e8b087b235e5b25bf Reviewed-on: https://chromium-review.googlesource.com/441950 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho ceb1048f 2017-02-13T12:31:03 Add classification of image type enums Implement classifying image enums in utilities and plumb the image type check to Uniform objects as well. This functionality will be used to add API support for images. BUG=angleproject:1442 Change-Id: Idd2ee5ebacd38290aeeace1177165c740bc42c7e Reviewed-on: https://chromium-review.googlesource.com/441585 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill dbffdfbd 2017-02-13T18:52:38 Fix counting of the new platform methods. The context pointer was throwing off the count by one. Also change the type to void * for ease of use. BUG=angleproject:1892 BUG=chromium:678870 Change-Id: Iffac667f0aa896d9247e9ffddfeb3bc447a9692f Reviewed-on: https://chromium-review.googlesource.com/441931 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b1eeba1f 2017-02-13T16:36:40 Use a C API for the ANGLE platform. The main purpose of this change is to fix a fuzzer bug where we would trigger undefined behaviour calling between Chrome and ANGLE. It's not specced how virtual function calls work if the shared objects are not directly linked together, and ANGLE and Chrome are not linked. Replace the old class-style API with a C dispatch table. Follow-up work will make the Platform owned by the Display instead of using global variables, but fixing this is a bit tricky. BUG=angleproject:1892 BUG=chromium:678870 Change-Id: Iad188bc2e50f2b5e4a03ce0de233d686f569c705 Reviewed-on: https://chromium-review.googlesource.com/441273 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez c47e3407 2017-02-13T11:24:03 gpu_test_expectations: fix compile on OSX 10.8 and 10.9 OSX10.8 deprecates Gestalt but doesn't expose a replacement in the public interface so we forward declare it. BUG=angleproject:1890 Change-Id: Ie4825c9191e81a5894dca4e394275c26a3e27853 Reviewed-on: https://chromium-review.googlesource.com/441309 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 7b4e00d2 2017-02-08T10:43:47 gpu_info_util: Implement GetSystemInfo on Linux BUG=angleproject:1874 Change-Id: Id39c26b806e6a7937517235afe0ca60f5087df5b Reviewed-on: https://chromium-review.googlesource.com/438940 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 1b60d8d2 2017-02-10T14:56:55 Add artificial limits to the total memory allocated by the NULL backend. Fuzzer tests were capable of allocating very large chunks of memory by calling glBufferData with a null pointer. This sets a limit before the NULL backend starts returning out of memory GL errors. BUG=602737 Change-Id: Ic53ebcf999f951b96c1df82e4db57e949d03c908 Reviewed-on: https://chromium-review.googlesource.com/441184 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 1e031b27 2017-02-10T15:01:28 Expose the CHROMIUM copy texture extensions on the NULL backend. These extensions are required by the passthrough command decoder. BUG=602737 Change-Id: Ifd04fca27ae35b30e4c8ab458904530e3dd44377 Reviewed-on: https://chromium-review.googlesource.com/441204 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 44ec2f59 2017-02-10T10:08:54 Fix GL_MAX_SAMPLES query for ES3 when the extension is missing. This query was added in both ES3 and ANGLE_framebuffer_multisample but the code was never updated to accept it for an ES3 context without the extension present. Caught by the angle passthrough command decoder fuzzer. BUG=602737 Change-Id: Ic9a8c67747777ef48e1dd227110482998fee75ce Reviewed-on: https://chromium-review.googlesource.com/440651 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@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>
Jamie Madill 5f45e7c3 2017-02-10T15:23:28 Refactor ResourceManagers. This makes ResourceManagers use more common code. It uses static polymorphism to implement the various typed resource managers, and unifies the FramebufferManager into a TypedResourceManager. The lack of virtual calls and inlining in the header should keep performance high. This will make the upcoming refactor to add a destroy hook for Vulkan objects simpler to implement. TEST=manual performance testing of BindingPerf. BUG=angleproject:1684 BUG=angleproject:1639 Change-Id: Ic2f102196020d1005e63a1b2cf0867577fc7c885 Reviewed-on: https://chromium-review.googlesource.com/439488 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Frank Henigman 875bbba0 2017-02-08T16:38:17 Zero gl_Position in WebGL mode. Set the SH_INIT_GL_POSITION bit in WebGL compatibility mode so gl_Position gets zeroed out. Add corresponding test. BUG=angleproject:1825 Change-Id: I47107804abaa83d6aee5cd46e6b69b532c08e6e8 Reviewed-on: https://chromium-review.googlesource.com/439784 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang ce02f086 2017-02-06T16:46:21 Add an extension to share textures at the display level. BUG=angleproject:1639 Change-Id: If9140142ebce89f33921c13d9d212c17d1894162 Reviewed-on: https://chromium-review.googlesource.com/437618 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 85334dcb 2017-02-06T16:03:07 Refactor shader state setting in the GL backend This is needed in preparation of implementing DispatchCompute, which will need to set some of the same state as draw calls, but not everything. Also move setTextureCubemapSeamlessEnabled to onMakeCurrent, this way it doesn't need to be called on every draw call. Overall this patch doesn't have a measurable performance impact. BUG=angleproject:1442 TEST=angle_perftests, angle_end2end_tests Change-Id: I9958bfe7bf895b3cd805e3146a8f74d28ff2835e Reviewed-on: https://chromium-review.googlesource.com/438349 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Yuly Novikov 3ed50a1d 2017-02-07T20:45:37 Skip TransformFeedbackLifetimeTest.DeletedBuffer on Win Intel OpenGL Suspecting driver bug on Win10 Debug Intel HD 530. BUG=angleproject:1879 Change-Id: I362ffd83694c7e222826cd3766fa57f785f3ea35 Reviewed-on: https://chromium-review.googlesource.com/438936 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@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>
Yuly Novikov c8a08f40 2017-02-07T12:33:57 Make failure to create Debug D3D11 device a warning instead of error Tests started failing after directing ERR to Platform BUG=angleproject:1660, angleproject:1878 Change-Id: I3e6d99bee266c0e7fa541c6e19be7253dcc01cdf Reviewed-on: https://chromium-review.googlesource.com/438819 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 8897afa1 2017-02-06T17:17:23 Pass Context around to Texture::copyImage. Passing this through the chain will allow us to have access to the platform methods, as well as be useful in the future for Vulkan. BUG=angleproject:1660 Change-Id: I819984fceeb5a2a299aa54e59ef3b428f5f9c91f Reviewed-on: https://chromium-review.googlesource.com/438684 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov a631e93b 2017-02-07T12:46:40 Disable RobustClientMemoryTest.ReadPixels on Linux Intel OpenGL Looks like a driver bug on Intel HD 530, uncovered by directing ERR to Platfrom. BUG=angleproject:1660, angleproject:1877 Change-Id: I0b8cd1b2bacb2a95c7667be783801686bc8fdb7b Reviewed-on: https://chromium-review.googlesource.com/438679 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
shinchiro f8de6667 2017-01-29T18:41:29 Fix compilation on mingw BUG=angleproject:1795 Change-Id: Ic25805f99154395c9af28197ceb1218f9c5c3138 Reviewed-on: https://chromium-review.googlesource.com/434457 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1d37bc50 2017-02-02T19:59:58 WebGL: Validate depth/stencil feedback loops. BUG=angleproject:1685 Change-Id: I6019555af69800f07862a0038fd0c25a9bb5aab8 Reviewed-on: https://chromium-review.googlesource.com/425493 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill baa25fd7 2017-02-06T17:11:30 Framebuffer: Remove ext check for depth/stencil textures. The absence of the extension should not prevent depth/stencil textures in FBOs in ES3, since they are core. In fact it shouldn't be possible to make depth/stencil attachments at all without support, so the check shouldn't be necessary. BUG=angleproject:1828 Change-Id: Ibec1e95c78b79cec9654f06ba11beec447017f1c Reviewed-on: https://chromium-review.googlesource.com/438604 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 5f56ddb9 2017-01-13T17:29:55 Buffer: Pass Context to all impl methods. This allows us to retrieve Device handles for Vulkan, and could allow us to avoid storing some pointers for other back-ends. BUG=angleproject:1684 Change-Id: Iccd5b97cf1c3a332d62a38ad0fcf21c352270439 Reviewed-on: https://chromium-review.googlesource.com/426400 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 34bf2d93 2017-02-06T13:40:59 translator: Fix ASSERT in array init corner case. This ASSERT was benign and can be turned into an error check. The pattern in question is to initialize an array with another array as the first argument, but dereferencing the array with "." instead of "[]". This would trip up our error handling. BUG=chromium:662702 Change-Id: Ie0e44af7b9d1a66cad03cefae9bf931f8e216cd9 Reviewed-on: https://chromium-review.googlesource.com/437599 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 70ee0f61 2017-02-06T16:04:20 Add destroy handler to SurfaceImpl. This allows the Vulkan back-end to avoid storing a reference to the VkDevice. This will extend to all the Vulkan object handle wrapper types. BUG=angleproject:1684 Change-Id: I3a98e94bc171ca27f225ce57996c3fdf9581e6e1 Reviewed-on: https://chromium-review.googlesource.com/424229 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 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>