src/libANGLE/State.cpp


Log

Author Commit Date CI Message
Jamie Madill 1f750d1e 2019-01-16T13:27:16 Even more inlining and micro-optimization. Improves perf by about 3-4% on the Vulkan VBO state change test. Bug: angleproject:3014 Change-Id: If4415e503cd883cf7de6387bf1ebbca0e5fc994e Reviewed-on: https://chromium-review.googlesource.com/c/1393907 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jeff Gilbert 465d6090 2019-01-02T16:21:18 Add GL_ANGLE_provoking_vertex on D3D11 and GL. This extension is a subset of GL_ARB_provoking_vertex without the QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION query. Bug: angleproject:2829 Change-Id: I907a4d16b7b13d3bbfb948842091eedd7b6a8b77 Reviewed-on: https://chromium-review.googlesource.com/c/1410289 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6e18a238 2019-01-16T13:27:14 Optimize more front-end VertexArray binding. Improves perf slightly (1-2%) in the Vulkan VBO state change test. Bug: angleproject:3014 Change-Id: Ia8082b5b3f5e847a6b2775e896893fa8d38c1afd Reviewed-on: https://chromium-review.googlesource.com/c/1393904 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill dd34b3b9 2019-01-16T09:59:54 Pack VertexAttribType enum. This improves performance slightly in vertex array format checks. Instead of needing to switch on GLenum values we can use packed arrays and tables to determine the values we need. Does not significantly affect performance but will enable future work. Bug: angleproject:3074 Change-Id: I6f4821a463e9b41fe3f8c8967eb3ed4c1d6b84be Reviewed-on: https://chromium-review.googlesource.com/c/1393903 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dbc605ce 2019-01-04T16:39:14 Vulkan: Optimize VBO state changes. Also has some minor optimizations for the front-end. 12% improvement on the Vulkan VBO change test. Bug: angleproject:3014 Change-Id: I38e1a8194edfc14bfe57424be348cb9688e928f4 Reviewed-on: https://chromium-review.googlesource.com/c/1369286 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
James Darpinian e4109f27 2018-12-13T16:25:53 WebGL: validate texture format matches sampler type WebGL requires that drawing produces INVALID_OPERATION if a texture's format doesn't match the sampler type it is bound to. This is a little confusing because samplers have two attributes that could be called "type": addressing mode (2D/3D/Cube), and component format (float/signed/unsigned/shadow). ANGLE already handled checking the addressing mode; this change adds checking for the component format. Fixes WebGL conformance test conformance2/uniforms/incompatible-texture-type-for-sampler.html Bug: chromium:809237 Change-Id: I52ebfecd92625e3ee10274cb5f548d7e53de72dd Reviewed-on: https://chromium-review.googlesource.com/c/1377611 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Jamie Madill c3dc5d48 2018-12-30T12:12:04 Merge gl::Context and gl::ContextState. This reduces the number of indrections when accessing the Extensions or Caps structures. It will provide a small speed-up to some methods. It also cleans up the code. Bug: angleproject:2966 Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685 Reviewed-on: https://chromium-review.googlesource.com/c/1392391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
Qin Jiajia 3f01f53c 2018-12-11T15:13:51 ES31: Add state change tests for image This change adds dirty bit state change tests for image textures. Meanwhile, syncImages related codes are removed since syncTextures will do all texture states sync. Bug: angleproject:3015 Change-Id: I9b299c86af1d589e72c08c5d7c55ac74cc7833aa Reviewed-on: https://chromium-review.googlesource.com/c/1390596 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 91002266 2018-12-12T16:05:24 Use angle::Result and pass a context pointer to TransformFeedbackImpl BUG=angleproject:3020 Change-Id: Ib0877dd33f9a8c6ea57976642f1b904258cb6a86 Reviewed-on: https://chromium-review.googlesource.com/c/1374273 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7c985f5c 2018-11-29T18:16:17 Make angle::Result an enum. This moves away from a class type to a value type. This should improve performance when using angle::Result as a return value. Previously the generated code would return a pointer instead of a value. Improves performance in the most targeted microbenchmark by 10%. In more realistic scanarios it will have a smaller improvement. Also simplifies the class implementation and usage. Includes some unrelated code generation changes. Bug: angleproject:2491 Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa Reviewed-on: https://chromium-review.googlesource.com/c/1356139 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 132d15c2 2018-11-30T15:25:38 Clear uncleared textures as a dirty object. This removes the check for robust resource init from prepareForDraw. It should improve performance more when WebGL compatiblity is enabled. Also inlines Context::syncDirtyBits and Context::prepareForDraw. Reduces CPU overhead in all draw and dispatch calls up to 5%. Bug: angleproject:2966 Change-Id: I7e9009a501c0331a6140bc78678aef27e38c3df2 Reviewed-on: https://chromium-review.googlesource.com/c/1347453 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e3e680ca 2018-12-03T17:49:08 Remove State::syncProgramTextures. Removes the concept of the program textures dirty object. Instead we use a set of dirty bits to represent dirty texture samples. We mark certain textures dirty and update state structures whenever there is a new Texture/Program/Sampler bound, or when Texture/Program/Sampler state changes. This is in preparation for making clearing the uncleared active textures into a dirty bit as well. Also includes new dirty bit handling for texture image units. These are a GLES 3.1 feature. Bug: angleproject:2966 Change-Id: Ibb8619dd2669bb39fdbcd75e3685be9a8aeeee91 Reviewed-on: https://chromium-review.googlesource.com/c/1346649 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 66f0d2c1 2018-11-30T15:25:36 Make Framebuffer attachments angle::Subjects. Now that there's storage change notifications in the GL front-end we no longer need to give the back-end access to the angle::Subject. The Texture object is a special case where it has mirrored dirty bits. To keep the gl::Texture class notified of when the Impl has dirty bits we make the TextureImpl class an angle::Subject that is observed by the gl::Texture class. This will enable further dirty bits improvements. Bug: angleproject:2966 Change-Id: Id22da0926f51ff4679e58af3e62903f4d7948915 Reviewed-on: https://chromium-review.googlesource.com/c/1347670 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ef9fcd91 2018-11-28T14:03:59 Clear draw attachments as a dirty object. This allows us to skip 1/2 of the robust resource init check in Context::setupDraw. The plan is to remove the other half in a follow-up CL. Most of the work of this CL was already handled. We just need to add the right dirty object mask to the Context's draw dirty objects list. We can mask out this check when robust resource is not enabled. Bug: angleproject:2966 Change-Id: I97ec2497c95e5cdf52988e1ce85f7602206935f0 Reviewed-on: https://chromium-review.googlesource.com/c/1343140 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Markus Tavenrath f7f8c518 2018-11-18T15:56:45 Optimize State::syncDirtyObjects Create a function table for State::syncDirtyObjects to avoid the costly switch and inline calls along the Context::syncDirtyObjects calling hierarchy. Bug: angleproject:2975 Change-Id: I1ec797452af41bc767578e4017c8eccb7d83628b Reviewed-on: https://chromium-review.googlesource.com/c/1340222 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 752d220a 2018-11-27T13:29:48 Use flat enum for PrimitiveMode. The GLenum was already mostly packed. There were just a few missing values because of the exclusion of things like GL_QUADS and GL_POLYGON from GLES. Also update the PackedEnumMap initialization to take an intializer. The initializer is a list of key/values which is much more robust to changes in the packed map. Improves draw call speed slightly as there is no conversion needed any more for the mode enum. Bug: angleproject:2966 Change-Id: Icae658272c6234f29335f6a57a63cf341cf5b2a0 Reviewed-on: https://chromium-review.googlesource.com/c/1346529 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Markus Tavenrath 774fe563 2018-11-18T14:14:49 Make all single line getter functions in State class inline functions. Having getter functions in the State class non-inline results in more generated code to call the function than it'd take to just fetch the value from the class. For those cases inline the getter functions to reduce calling overhead and binary size. Bug: angleproject:2973 Change-Id: Iddd14fd836ee89de69cdabfd58b95bcedc7e9e4e Reviewed-on: https://chromium-review.googlesource.com/c/1340220 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 526392dd 2018-11-16T09:35:14 Use angle::Result in front-end (Part 9) This removes the ANGLE_TRY_HANDLE macro. Also the internal uses of gl::ErrorStreamBase. There are remaining uses in the validation code. Further progress will be blocked on removing egl::Error and the use of gl::Error in the validation layer. Also reduces binary size by up to 4k. Bug: angleproject:2491 Change-Id: I3e0481f99738f9f24256c10e73f3efcce9826a35 Reviewed-on: https://chromium-review.googlesource.com/c/1334427 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 9e63a813 2018-11-16T12:30:04 Revert "Minor inlining optimization to Context draw calls." This reverts commit d9ee8bf9620748a65df8f97ae89879eef676caff. Reason for revert: Slightly regresses tests that have dirty objects. See https://chromeperf.appspot.com/report?sid=abdb797da7149beffa29dc8a0869c15d96794749eff50bcb36c07d85fe509096 Original change's description: > Minor inlining optimization to Context draw calls. > > Reduces draw call overhead by up to 3%. > > Bug: angleproject:2966 > Change-Id: Ie7ddb61b905fefe59a06a1528f0a3fde4accaf74 > Reviewed-on: https://chromium-review.googlesource.com/c/1333608 > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org Change-Id: I6fdd34880a711ecc89d407ae90f3991584f65272 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2966 Reviewed-on: https://chromium-review.googlesource.com/c/1340199 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d9ee8bf9 2018-11-12T20:04:20 Minor inlining optimization to Context draw calls. Reduces draw call overhead by up to 3%. Bug: angleproject:2966 Change-Id: Ie7ddb61b905fefe59a06a1528f0a3fde4accaf74 Reviewed-on: https://chromium-review.googlesource.com/c/1333608 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3e92206b 2018-11-15T11:26:29 Allow querying of all draw buffer states on the default framebuffer. Because the default framebuffer isn't tied to a specific context, its drawbuffer state vector was only of size 1. It is still valid to query up to GL_MAX_DRAW_BUFFERS through so a special case is added when the drawbuffer is larger than the state vector. BUG=angleproject:2965 Change-Id: Ib49570df67e59e93932a7e916fe72f2e71c29939 Reviewed-on: https://chromium-review.googlesource.com/c/1337453 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill c1fd7376 2018-10-26T22:48:39 Move index range calculations into VertexArray. This is in preparation for removing the entire DrawCallParams struct. This struct was big enough to cause a performance hit on draw call perf tests just by virtue of initializing the fields. Also dereferencing the struct members is slower than reading function parameters since it adds an indirection. Also includes some error refactoring to enable moving code to a shared location. In total this patch series reduces overhead by up to 5%. Bug: angleproject:2933 Change-Id: Ib663f2538c14ac30d4c31fd10d6350be469626e2 Reviewed-on: https://chromium-review.googlesource.com/c/1298380 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yizhou Jiang 7818a85c 2018-09-06T15:02:04 Implement GL_ANGLE_texture_multisample API part Support GL_ANGLE_texture_multisample extension. This patch adds enums of multisampled texture and texStorage2DMultisampleANGLE API. TEST=angle_end2end_tests.exe --gtest_filter=TextureMultisampleTest* TEST=angle_end2end_tests.exe --gtest_filter=NegativeTextureMultisampleTest.Negtive* BUG=angleproject:2275 Change-Id: I2cab997edc33aa2d0be6082381545335423f64e0 Reviewed-on: https://chromium-review.googlesource.com/c/804613 Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill cd0a0a3c 2018-10-18T18:41:57 Introduce SubjectBindingPointer. We can share the same pointer for the subject binding and the binding pointer. This further allows us to optimize buffer re-binding. The shared memory increases cache coherency and reduces the number of instructions needed. Bug: angleproject:2891 Change-Id: Id3162fa79de203f75989e7289ea02cb2ea1bec73 Reviewed-on: https://chromium-review.googlesource.com/c/1270217 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 472ddc82 2018-10-18T18:41:56 Make gl::Buffer an angle::Subject. This will allow us to share the BindingPointer and ObserverBinding. It also cleans up the code a little bit. Bug: angleproject:2891 Change-Id: Ib8e2c34ccd379dc5b5648bac324fa4ff22a5a1a0 Reviewed-on: https://chromium-review.googlesource.com/c/1270216 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill ca8eda41 2018-10-18T18:41:56 Use dispatch table to optimize buffer binding. Using a table of function pointers is faster than using a switch followed by a function call. Also more aggressively inline binding methods. Based on contribution by mtavenrath@nvidia.com. In total this patch sequence improves the performance of a buffer binding perf test by up to 27%. Test: BindingsBenchmark.Run/gl_100_objects_allocated_at_initialization Bug: angleproject:2891 Change-Id: Iaab1e2a135b635bd72736d7d1d4271562c3a4ece Reviewed-on: https://chromium-review.googlesource.com/c/1281783 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 956ab4d9 2018-10-10T16:13:03 Optimize several functions for the Program perf test. This gives the same or slightly better performance in the ProgramDraw perf test. Also only set the Program object as dirty when there are dirty bits set in the Program itself. Bug: angleproject:2877 Change-Id: I07b428b40d3e3c24e0a42c970524756b6dc3a30e Reviewed-on: https://chromium-review.googlesource.com/c/1271475 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 31116738 2018-10-09T18:30:01 Inline many more hotspots for the Texture draw test. Bug: angleproject:2763 Change-Id: Ib8193e7ff5ee7763b92f4775fb7e9adaa51c9305 Reviewed-on: https://chromium-review.googlesource.com/c/1262738 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com>
Jamie Madill 6f755b21 2018-10-09T12:48:54 Use angle::Result in front-end. (Part 1) This covers most of the hot paths used in draw calls. Gives in the order of a 5% reduction in draw call overhead. Bug: angleproject:2491 Change-Id: I2d53afb1163eaceed61fb9cd9ce6c1267c85c0fa Reviewed-on: https://chromium-review.googlesource.com/c/1258149 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 14246813 2018-10-03T17:51:16 Update sampler directly on Texture change. This saves a lot of extra work when updating a Texture. Bug: angleproject:2763 Change-Id: I87e310ef4f847713123bd24711e1166949ff95d2 Reviewed-on: https://chromium-review.googlesource.com/c/1254043 Reviewed-by: Yuly Novikov <ynovikov@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e3bb6b79 2018-10-03T17:51:15 Update Textures immediately on program change. Instead of deferring this work, we can process it immediately. We have access to the information we need in the prior and current states so can optimize the update more effectively. Bug: angleproject:2763 Change-Id: I77482b0ea490fddf403ccc4a4f32665301fd6e7a Reviewed-on: https://chromium-review.googlesource.com/c/1254042 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill df836ff8 2018-10-01T10:36:24 Call onProgramExecutableChange in useProgram. This cleans up the code slightly and removes a few if checks. Also fixes a potential edge case with ProgramBinary called on a program that is in-use. Bug: angleproject:2763 Change-Id: Ibe0ab20ed44f593bb6c2b0612871680a7df1a15f Reviewed-on: https://chromium-review.googlesource.com/1254041 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f668a4b5 2018-09-23T17:01:20 Skip Texture::syncState when no dirty bits. We sometimes generate local dirty bits in TextureGL. To make sure the local dirty bits don't get skipped we use a Subject/Observer pattern between the TextureGL and gl::Texture. This allows us to skip syncState in the hot path. Also inlines a couple of other texture functions. And fixes a stray header in EGLBlobCacheTest. Bug: angleproject:2763 Change-Id: Ie1d8a5865deaf2a563a358c31ae28bef6b2458b1 Reviewed-on: https://chromium-review.googlesource.com/1228374 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 38fe6840 2018-09-19T07:20:00 Remove secondary Texture rendering loop check. This check was not used. It applied only to rendering Feedback Loops. The behaviour is undefined in non-WebGL and for WebGL we have a separate validation check. Also update the feedback loop tests to ignore the current GL states. This change is based on feedback from the OpenGL ES working group. Bug: angleproject:2763 Bug: chromium:763695 Change-Id: I9882b4f9af2d43fc7b5604ff36dadcc79dfd378f Reviewed-on: https://chromium-review.googlesource.com/1228373 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill e25b8006 2018-09-20T13:39:49 Move sampler sync out of syncProgramTextures. We only need to call the syncState for samplers when they are dirty. Also includes changes to refactor out the sampler sync in GL. Adds observer bindings so sampler sync is handled correctly in resource sharing scenarios. Bug: angleproject:2763 Change-Id: I762f0738ee7572ae29ce6bd5384a30aa9588c848 Reviewed-on: https://chromium-review.googlesource.com/1227797 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
jchen10 99118c1c 2018-09-10T16:28:51 Improve dirtybits for compute For D3D11 backend, dirtybits are used to sync and update state for compute. For GL backend, mProgramUniformBuffersDirty, mProgramAtomicCounterBuffersDirty, mProgramImagesDirty are newly applied. Bug: angleproject:2814 Change-Id: Ia459ca26705b7c685179d64e0c934535bf16741f Reviewed-on: https://chromium-review.googlesource.com/1215245 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Jamie Madill fcfd3382 2018-09-15T22:30:50 More binding inlining. Slight performance increase in binding related tests. Bug: angleproject:2763 Change-Id: I4d14177adab678d596cd34b8f1b99f5309f017f0 Reviewed-on: https://chromium-review.googlesource.com/1227793 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 0fdb956d 2018-09-17T17:18:43 Re-land "Inline and micro-optimize more for perf tests."" Re-land fixes memory leaks. Using a custom array instead of std::vector speeds up the resource manager. One reason is because calls to size() are implemented in many implementations as a difference between two pointers. This sub size implementations are slower than storing a simple size variable in a custom class. Also includes more inlining of hot spots functions. Also includes a small unit test class for ResourceMap. And an unrelated but small test fix for TextureLimisTest. Also a small unrelated fix for a Transform Feedback test. Increase the scores of the draw call perf test with texture and buffer bindings and the buffer binding perf test. Bug: angleproject:2763 Change-Id: Ic2f0f689107b2bf05c63da2ed6bbc9f0feea63f7 Reviewed-on: https://chromium-review.googlesource.com/1229033 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 98a3e078 2018-09-17T19:40:04 Revert "Inline and micro-optimize more for perf tests." This reverts commit 57ff6f95f143bd65a0c3d12d64773f274b9935f4. Reason for revert: Memory leaks detected during roll in https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_asan_rel_ng/100284 Original change's description: > Inline and micro-optimize more for perf tests. > > Using a custom array instead of std::vector speeds up the resource > manager. One reason is because calls to size() are implemented in many > implementations as a difference between two pointers. This sub size > implementations are slower than storing a simple size variable in a > custom class. > > Also includes more inlining of hot spots functions. > > Also includes a small unit test class for ResourceMap. And an unrelated > but small test fix for TextureLimisTest. Also a small unrelated fix for > a Transform Feedback test. > > Increase the scores of the draw call perf test with texture and buffer > bindings and the buffer binding perf test. > > Bug: angleproject:2763 > Change-Id: I41c327987db27ac45e6a62579f01e1cdc22e396c > Reviewed-on: https://chromium-review.googlesource.com/1171510 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=fjhenigman@chromium.org,ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: Ie047289c9bf23a842c3cbb9692c811da0534991c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2763 Reviewed-on: https://chromium-review.googlesource.com/1228893 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 57ff6f95 2018-09-14T12:44:52 Inline and micro-optimize more for perf tests. Using a custom array instead of std::vector speeds up the resource manager. One reason is because calls to size() are implemented in many implementations as a difference between two pointers. This sub size implementations are slower than storing a simple size variable in a custom class. Also includes more inlining of hot spots functions. Also includes a small unit test class for ResourceMap. And an unrelated but small test fix for TextureLimisTest. Also a small unrelated fix for a Transform Feedback test. Increase the scores of the draw call perf test with texture and buffer bindings and the buffer binding perf test. Bug: angleproject:2763 Change-Id: I41c327987db27ac45e6a62579f01e1cdc22e396c Reviewed-on: https://chromium-review.googlesource.com/1171510 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
jchen10 bb2f2c43 2018-09-16T09:47:38 Squash State dirty bits for CHROMIUM_path_rendering Currently we limit the maximum of State bits to 64 for performance consideration. To accommodate new ES31 states, we have to pick and squash some existing bits which are less hot. Bug: angleproject:2814 Change-Id: I8fc19286bbf8d8273949da8d986a8b1587fa105e Reviewed-on: https://chromium-review.googlesource.com/1227069 Reviewed-by: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Will Harris 63aa0e5b 2018-09-05T16:15:46 Fix 64-bit -> 32-bit implicit conversions in libangle. ../../third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp(910,63): warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long long') to 'GLuint' (aka 'unsigned int') [-Wshorten-64-to-32] const gl::ImageUnit &imageUnit = glState.getImageUnit(imageUnitIndex); ~~~~~~~~~~~~ ^~~~~~~~~~~~~~ ../../third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp(914,30): warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long long') to 'GLuint' (aka 'unsigned int') [-Wshorten-64-to-32] bindImageTexture(imageUnitIndex, textureGL->getTextureID(), imageUnit.level, ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~ ../../third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp(920,30): warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long long') to 'GLuint' (aka 'unsigned int') [-Wshorten-64-to-32] bindImageTexture(imageUnitIndex, 0, imageUnit.level, imageUnit.layered, imageUnit.layer, ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~ ../../third_party/angle/src/tests/gl_tests/VertexAttributeTest.cpp(1080,66): warning: implicit conversion loses integer precision: 'GLsizeiptr' (aka 'long long') to 'GLuint' (aka 'unsigned int') [-Wshorten-64-to-32] glVertexAttribFormat(mTestAttrib, 1, GL_FLOAT, GL_FALSE, inputRelativeOffset); ~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~ BUG=chromium:879657 Change-Id: Ic6e8e5ebc0dc5fd38c15a48a936ceafd5407bba8 Reviewed-on: https://chromium-review.googlesource.com/1208315 Commit-Queue: Will Harris <wfh@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho dff32a0d 2018-08-28T14:35:50 Support multisample arrays in shader programs The added tests check that using textureSize() and texelFetch() on textures with a fixed point format return expected results. texelFetch is also covered for integer format textures. dEQP GLES 3.1 tests also cover a variety of multisampled array texture formats. BUG=angleproject:2775 TEST=angle_end2end_tests, angle_deqp_gles31_tests Change-Id: I99b422e24b39e3563ed72f0fb85c9c1907df807d Reviewed-on: https://chromium-review.googlesource.com/1196521 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho d310a434 2018-08-24T15:40:23 Add validation and negative tests for multisample arrays This adds errors for binding and allocating multisample array textures. New tests in TextureMultisampleTest.cpp check that the errors are generated as specified. Tests for querying supported sample counts are also improved and extended for multisample array textures. BUG=angleproject:2775 TEST=angle_end2end_tests Change-Id: I6a0fe7ae04bb3d0072f6cbe09026b05e2bc47325 Reviewed-on: https://chromium-review.googlesource.com/1188576 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Qin Jiajia 47f6dd0d 2018-08-10T13:36:32 Implement robust initialization for image texture This change fixes a bug that the image texture initialization time is not correct. It happens when we use compute shader to write data to an uninitialized texture, then use readPixels to read the result which results that texture initialization falls behind image store and covers the real result. Bug: angleproject:2766 Change-Id: I4e986972096857afc975c40dfa4d559a2f31194c Reviewed-on: https://chromium-review.googlesource.com/1170569 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7b2f0274 2018-08-27T10:16:08 Inline more buffer binding calls. This splits checkObjectAllocation into the inline part and the slow part. It uses ANGLE_INLINE to force the former to be inlined. Also inlines and optimizes a few other buffer binding related checks. Improves performance in a bindings performance test by about 20%. Includes contributions from matavenrath@nvidia.com. Test: Bindings_gl_100_objects_allocated_at_initialization Bug: angleproject:2777 Change-Id: I71b07d72a8e81db7a90140ef84eca599a29239ed Reviewed-on: https://chromium-review.googlesource.com/1190442 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6d32cefd 2018-08-14T02:34:28 Use Observer pattern for Buffers in front-end. This will allow us to react to state change notifications for validation caching. It also cleans up some of the logic in the D3D11 State Manager. Bug: angleproject:2747 Change-Id: I85ed6404206c2b9bf504d552cf5751be56e62146 Reviewed-on: https://chromium-review.googlesource.com/1172086 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 70aeda49 2018-08-20T12:17:40 Add gl::Program::syncState and dirty bits. Currently this handles uniform block bindings. Cleans up some logic in D3D. Bug: angleproject:2747 Change-Id: I8c2989738d50a77d6f6d90a9ff11dceab6d3129c Reviewed-on: https://chromium-review.googlesource.com/1172085 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill bf5177d3 2018-08-21T12:58:20 Optimize element array binding. This inlines some methods and code that was regressing binding performance. Improves the score of a bindings benchmark by 15%. Based on contributions by matavenrath@nvidia.com. Test: bindings_gl_100_objects_allocated_at_initialization Bug: angleproject:2777 Change-Id: Ied5fdbc67ced862a36c5145fff5ac94f93b40c21 Reviewed-on: https://chromium-review.googlesource.com/1181865 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 6e5bf36f 2018-08-15T09:53:17 GLES1: Fixes for Gets() test - Fixed wrong face parameter for glGetMaterial*. - Enabled GL_LINE_SMOOTH capability in state only (no rendering yet) - Enabled logical operation capability in state only (no rendering yet) - Fixed wrong handling of GL_RGB/ALPHA_SCALE and GL_POINT_COORD_REPLACE_OES Test: Enable and pass Gets() GLES1 conformance test BUG=angleproject:2306 Change-Id: Ib5c50a2055129b76ad24053baf0dac24dcc00761 Reviewed-on: https://chromium-review.googlesource.com/1176161 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
jchen10 90f466a6 2018-08-13T15:05:25 Suppress cast warnings for active textures mask Bug: angleproject:2747 Bug: angleproject:2763 Change-Id: I19f9e5ba760d3b5baf3997284523ee1db6bb8166 Reviewed-on: https://chromium-review.googlesource.com/1172206 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Jamie Madill 6c43a01a 2018-08-08T15:49:27 Make Context handle dirty texture events. Moving from State to Context allows the Context to update the State Cache class directly. It also calls through to the State class to update the Texture cache. This consolidates notification events into the Context class. This is also in line with how we handle state event updates in other gl classes. Bug: angleproject:2747 Bug: angleproject:2763 Change-Id: Iff7dc7e46ee8768819235ebd151707cd2a03dfc9 Reviewed-on: https://chromium-review.googlesource.com/1166143 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4787d70b 2018-08-08T15:49:26 Use active textures mask in GL and Vulkan. This also inlines a few accessors and changes the type of the texture cache. Bug: angleproject:2763 Change-Id: I82f3c508613f6284d835e8cb64808cfe26a56161 Reviewed-on: https://chromium-review.googlesource.com/1166142 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7e4eff11 2018-08-08T15:49:26 Program: Add cache samplers and type masks. This mask cleans up some of the iteration logic in State::syncProgramTextures. It will make it easier to optimize this function in the future. This will also make it easier to recompute the sampler type validation. Leads to a 5% improvement in State::syncProgramTextures. Bug: angleproject:2747 Bug: angleproject:2763 Change-Id: Ic9a555df843ad23b4c562e6e4a2d425bee58a856 Reviewed-on: https://chromium-review.googlesource.com/1164306 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill cc73f241 2018-08-01T11:34:48 Micro-optimize some validation checks. Prepares for caching hasMappedBuffer. Also inclines several checks for faster speed. Bug: angleproject:2746 Change-Id: I74f9408d7b41e245c3f58d367dd2cc8fbace4a7a Reviewed-on: https://chromium-review.googlesource.com/1150762 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill a11819de 2018-07-30T10:26:01 Context: Use Observer pattern for container objects. Container objects in this case are the Vertex Array and Read and Draw Framebuffers. Instead of using a mutable dirty bit state with a const function to notify of dirty bits we can use the Observer/Subject pattern. This more cleanly allows us to do cache updates. Bug: angleproject:1391 Change-Id: I88f863894ec3efa00322038f323a84850166107d Reviewed-on: https://chromium-review.googlesource.com/1153399 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 9bf86f07 2018-07-26T11:46:34 Don't sync the read framebuffer on draw calls. The read framebuffer may not be complete and be incapable of syncing. Removed the generate syncDirtyObjects method so each caller must make sure they are only syncing objects that are known to be valid for the operation. BUG=angleproject:2737 Change-Id: Ia8edf3fca3a8369aa813be46ba99f6b50a36b2e6 Reviewed-on: https://chromium-review.googlesource.com/1151621 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
James Darpinian 09303e44 2018-06-22T17:53:57 Treat transform feedback generic binding point specially The transform feedback generic binding point is not part of the transform feedback object and is not used for transform feedback. Only the indexed binding points are used. A buffer that is bound to the generic binding point should be usable for either transform feedback or non-transform-feedback purposes. Bug: 853978 Change-Id: I5b730212c65524188134ac34645328328664f0a4 Reviewed-on: https://chromium-review.googlesource.com/1112841 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 82af620e 2018-06-22T10:59:52 ParallelCompile: Add entry points. Add the extension text, entry points and validations. BUG=chromium:849576 TEST=angle_end2end_tests Change-Id: I4c06ee30e4f4fe9bb1c1fecada747b9c78fed0ea Reviewed-on: https://chromium-review.googlesource.com/1103789 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Lingfeng Yang 9c4c0926 2018-06-13T09:29:00 Reland "GLES1: Point rasterization (partial implementation)" This is a reland of 4004ae0e033a0169de3cb53c0a036833ad47178a Fix: Put the missing early-out in ValidatePointParameterCommon Original change's description: > GLES1: Point rasterization (partial implementation) > > - Not included: Smooth points > > - GL_OES_point_sprite > - Update test expectations. Note: due to different random sampling, > edge cases were hit in UserClip. Disabling that test for now. > > BUG=angleproject:2306 > > Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa > Reviewed-on: https://chromium-review.googlesource.com/1101910 > Reviewed-by: Corentin Wallez <cwallez@chromium.org> > Commit-Queue: Lingfeng Yang <lfy@google.com> Bug: angleproject:2306 Change-Id: Id8e71352a77ff0ce71cb604965effbfb8aca613e Reviewed-on: https://chromium-review.googlesource.com/1108458 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Frank Henigman a58d69e9 2018-06-20T18:07:11 Revert "GLES1: Point rasterization (partial implementation)" This reverts commit 4004ae0e033a0169de3cb53c0a036833ad47178a. Crash in PointParameterTest.NegativeEnum/ES1_OPENGL. https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac%20FYI%20GPU%20ASAN%20Release/1178 angle_end2end_tests on Intel GPU on Mac on Mac-10.12.6 angle_end2end_tests on ATI GPU on Mac Retina on Mac-10.12.6 Original change's description: > GLES1: Point rasterization (partial implementation) > > - Not included: Smooth points > > - GL_OES_point_sprite > - Update test expectations. Note: due to different random sampling, > edge cases were hit in UserClip. Disabling that test for now. > > BUG=angleproject:2306 > > Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa > Reviewed-on: https://chromium-review.googlesource.com/1101910 > Reviewed-by: Corentin Wallez <cwallez@chromium.org> > Commit-Queue: Lingfeng Yang <lfy@google.com> TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,lfy@google.com Change-Id: I776ce0506d349382b3af035c962aa2c3f6826b99 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2306 Bug: angleproject:2680 Reviewed-on: https://chromium-review.googlesource.com/1108457 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Lingfeng Yang 4004ae0e 2018-06-13T09:29:00 GLES1: Point rasterization (partial implementation) - Not included: Smooth points - GL_OES_point_sprite - Update test expectations. Note: due to different random sampling, edge cases were hit in UserClip. Disabling that test for now. BUG=angleproject:2306 Change-Id: If8367bc3321804b3299d3bc381d6a8e236754baa Reviewed-on: https://chromium-review.googlesource.com/1101910 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Lingfeng Yang 7ba3f425 2018-06-01T09:43:04 GLES1: Fog API and rendering - Update test expectations BUG=angleproject:2306 Change-Id: Ic5aa5f052bcbe9c5adaf0eb0c6c06df66fd1720c Reviewed-on: https://chromium-review.googlesource.com/1082978 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang 060088a5 2018-05-30T20:40:57 GLES1: Clip plane API and rendering - Add unit tests for the API - Update test expectations + Pass through point size from the vertex array to the shader, required for new tests to pass. BUG=angleproject:2306 Change-Id: Ib19436c1f4cb12873adea94f734c821363f9e27d Reviewed-on: https://chromium-review.googlesource.com/1079993 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4fb8a8bd 2018-06-01T16:47:57 Move the EGL-based initial state to the gl::State constructor. This is a small refactor to allow State::initialize to be called without needing the EGL context creation attributes. BUG=angleproject:2464 Change-Id: Ifa167cc83f652435ecc00a0a73e4c6c4a3295430 Reviewed-on: https://chromium-review.googlesource.com/1083312 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 6b600645 2018-05-31T14:53:31 D3D11: Micro-optimize StateManager11::updateState. This inlines several accessors. Bug: angleproject:2574 Change-Id: I61d223dd2a8f08e5331ccefde02e6ce55f5a607d Reviewed-on: https://chromium-review.googlesource.com/1067118 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4166f014 2018-05-31T14:53:30 D3D11: Optimize Renderer11::drawArrays. Uses inlining and more efficient computation re-use to streamline this function. Bug: angleproject:2575 Change-Id: Ib13e32811f56ec9a010ed66f298d4235e5c6807d Reviewed-on: https://chromium-review.googlesource.com/1067120 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang a0cfa873 2018-05-30T21:12:17 GLES1: Shade model API + add sample BUG=angleproject:2306 Change-Id: Ie0c391618ec2b771cc99b96db02b9008a86272b9 Reviewed-on: https://chromium-review.googlesource.com/1079992 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang d0febe7a 2018-05-17T22:36:52 Reland "GLES1: Entry points for lighting and materials" This is a reland of 4a09c1a245c406e402b3996b7ed33798b897e60f Entry points have been autogenerated again. Original change's description: > GLES1: Entry points for lighting and materials > > - glLight*/glMaterial and their queries > - Use new packed enums in these entry points, except for lightmodel > which stays GLenum to be consistent with other generic glGet's > - State.cpp: New glGet* queries related to light model and > light/normal rescale enablement > - GLES1State.cpp: Functions to get/set lighting/material state > - Validation for lighting/materials > > + Add a few convenience methods to random_utils for sampling > non-negative floats and a sampler for random booleans > > BUG=angleproject:2306 > > Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e > Reviewed-on: https://chromium-review.googlesource.com/1065502 > Commit-Queue: Lingfeng Yang <lfy@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:2306 Change-Id: I434273acd5200dd9f4925e239a032cc8db31a434 Reviewed-on: https://chromium-review.googlesource.com/1072849 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Lingfeng Yang <lfy@google.com>
Lingfeng Yang 668e507f 2018-05-24T17:12:14 Revert "GLES1: Entry points for lighting and materials" This reverts commit 4a09c1a245c406e402b3996b7ed33798b897e60f. Reason for revert: Seems to break the build Original change's description: > GLES1: Entry points for lighting and materials > > - glLight*/glMaterial and their queries > - Use new packed enums in these entry points, except for lightmodel > which stays GLenum to be consistent with other generic glGet's > - State.cpp: New glGet* queries related to light model and > light/normal rescale enablement > - GLES1State.cpp: Functions to get/set lighting/material state > - Validation for lighting/materials > > + Add a few convenience methods to random_utils for sampling > non-negative floats and a sampler for random booleans > > BUG=angleproject:2306 > > Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e > Reviewed-on: https://chromium-review.googlesource.com/1065502 > Commit-Queue: Lingfeng Yang <lfy@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,lfy@google.com Change-Id: Ifabd708ded87c7484ad6d466508e2c2d6ea2557c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2306 Reviewed-on: https://chromium-review.googlesource.com/1071828 Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 4a09c1a2 2018-05-17T22:36:52 GLES1: Entry points for lighting and materials - glLight*/glMaterial and their queries - Use new packed enums in these entry points, except for lightmodel which stays GLenum to be consistent with other generic glGet's - State.cpp: New glGet* queries related to light model and light/normal rescale enablement - GLES1State.cpp: Functions to get/set lighting/material state - Validation for lighting/materials + Add a few convenience methods to random_utils for sampling non-negative floats and a sampler for random booleans BUG=angleproject:2306 Change-Id: If7ba0c0a0dc75f88fbaa986b904f1ea96ee6512e Reviewed-on: https://chromium-review.googlesource.com/1065502 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez ad3ae90a 2018-03-09T13:40:42 Use packed enums for QueryType. BUG=angleproject:2169 Change-Id: I129a9d8e295859daa071a298dab9fe1895315cc0 Reviewed-on: https://chromium-review.googlesource.com/957318 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 7267aa65 2018-04-17T15:28:21 Optimize ValidateDrawAttribs: Part 3. This is a small optimization for the WebGL compatibility mode. Instead of scanning the list of attributes for a Transform feedback conflict, it can quickly check a cached mask. This should save a lot of cycles on the fast path. Bug: angleproject:1391 Change-Id: Icb8d095493a629dbff0e93872357e5bf7c7458ae Reviewed-on: https://chromium-review.googlesource.com/1011236 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Lingfeng Yang 23dc90b8 2018-04-23T09:01:49 GLES1: Enable/disable for texture targets BUG=angleproject:2306 Change-Id: I08ac9ef91753112f8185d16423925cf265f0384e Reviewed-on: https://chromium-review.googlesource.com/1023987 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron 4bba74f0 2018-04-19T14:40:45 Refactor Texture::syncState to pass down the Context Also returning a gl::Error everywhere. Bug: angleproject:2478 Change-Id: Ic8cae0ee7aee318bb95b3588044c34c62707b578 Reviewed-on: https://chromium-review.googlesource.com/1020083 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Lingfeng Yang abb09f12 2018-04-16T10:43:53 GLES1: Client vertex array pointer API glVertexPointer glNormalPointer glColorPointer glPointSizePointerOES glTexCoordPointer BUG=angleproject:2306 Change-Id: Id022b467ac998ea116130c5cec0c77afefb0dd4c Reviewed-on: https://chromium-review.googlesource.com/1014381 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 427064d2 2018-04-13T16:20:34 Fix perf regression with checkStatus. Returning an Error was costing us performance in extra error checks. This intead uses the Context to process the Error immediately, and returns a value from isComplete and checkStatus. Improves performance in draw call validation. Bug: chromium:822235 Change-Id: I0793fc690e86137425fed593d45083e40aee8db9 Reviewed-on: https://chromium-review.googlesource.com/1011370 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 01074436 2018-04-16T10:19:51 GLES1: gl(Enable|Disable)ClientState + Introduce the GL_OES_point_size_array extension for point size array support. BUG=angleproject:2306 Change-Id: Ib1a60b7dcd0497eb807f0d3c80bc95b4748d9a96 Reviewed-on: https://chromium-review.googlesource.com/1014282 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Lingfeng Yang 3a41af64 2018-04-09T07:28:56 GLES1: glLoadIdentity / glLoadMatrix(f|x) BUG=angleproject:2306 Change-Id: I46fe961e6eb87b2f41c39afe1e943d9146a0abfa Reviewed-on: https://chromium-review.googlesource.com/1002913 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang e547aac7 2018-04-05T09:39:20 GLES1: gl(Push|Pop)Matrix BUG=angleproject:2306 Change-Id: I96498aebbbc62ebd53e5320db17ef6a54d20d2dc Reviewed-on: https://chromium-review.googlesource.com/998308 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang d2488aba 2018-04-04T09:25:48 GLES1: glMatrixMode BUG=angleproject:2306 Change-Id: I83e15990c10d9354c2db00766ddc7b0ab960aa5c Reviewed-on: https://chromium-review.googlesource.com/996019 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Lingfeng Yang 038dd539 2018-03-29T17:31:52 GLES1: glMultiTexCoord4(f|x) BUG=angleproject:2306 + common validation for multitexturing units + clang-format Change-Id: I6eb456c273490e85fc7008e7e11d15e22dd20276 Reviewed-on: https://chromium-review.googlesource.com/987298 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0946393d 2018-04-04T05:26:59 Move Buffer Subject/Observer to front end. This makes BufferImpl into an Observer Subject. It also refactors the Vertex Array updates for the D3D11 backend use more of a dirty bit coding style. This change makes it so Buffer contents changes trigger front-end dirty bits from the back-end, which may be undesirable. Bug: angleproject:2389 Change-Id: Iac8ce1171284a86851c18cd1373ddf24fcefe40b Reviewed-on: https://chromium-review.googlesource.com/979812 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang 5a7e61bb 2018-03-29T16:50:32 GLES1: glNormal3(f|x) BUG=angleproject:2306 Change-Id: I42834078b14aaa20c4d4e6b67c097c810f5a17a3 Reviewed-on: https://chromium-review.googlesource.com/987297 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang a43994c9 2018-03-29T07:21:41 GLES1: glColor4(f|ub|x) BUG=angleproject:2306 Change-Id: I4a57732d4c470c821a3847a7ee012cf3ccbba197 Reviewed-on: https://chromium-review.googlesource.com/986454 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Lingfeng Yang 96310cda 2018-03-28T11:56:28 GLES1: glClientActiveTexture + adds query for GL_MAX_TEXTURE_UNITS BUG=angleproject:2306 Change-Id: Ie89fa6a067551170856bf0f7e6d7b4452b3da132 Reviewed-on: https://chromium-review.googlesource.com/984894 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman 0af5b86a 2018-03-27T20:19:33 Return gl::Error from VertexArray::syncState(). No functional change. When we add vertex data format conversion to Vulkan we will need to be able to return an error from VertexArray::syncState(). BUG=angleproject:2405 Change-Id: I4b537946ecbb6593280b6510c5cd8d8e3c65e8dd Reviewed-on: https://chromium-review.googlesource.com/982897 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Lingfeng Yang 13b708f2 2018-03-21T12:14:10 GLES1: glAlphaFunc BUG=angleproject:2306 Change-Id: I0bf229d3ab8a4a1217c12b434dcd8fa67d7cbadc Reviewed-on: https://chromium-review.googlesource.com/973897 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao d2fa07e4 2018-03-15T09:20:25 ES31: Support queries on primitives generated by geometry shader This patch implements a new query target GL_PRIMITIVES_GENERATED_EXT for querying the number of primitives generated by geometry shader. BUG=angleproject:1941 TEST=dEQP-GLES31.functional.geometry_shading.query.primitives_generated* Change-Id: Icdc0d2d8be4ff4d589972eada2fa1f917d7bae4c Reviewed-on: https://chromium-review.googlesource.com/963793 Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jiajia Qin 5ae6ee45 2018-03-06T17:39:42 ES31: Sync dirty objects for compute shader BUG=angleproject:2395 TEST=angle_end2end_tests Change-Id: Ife833a6573c49fc453c120ebc66765064d807b16 Reviewed-on: https://chromium-review.googlesource.com/954991 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 690c8eb7 2018-03-12T15:20:03 Framebuffer: syncState before internal format query. Since querying the internal format of an attachment might need ot look at the RenderTarget for some back-ends, or otherwise flush attachment changes, we should call syncState internally. This means that we can't mark these queries as const. Bug: angleproject:2372 Change-Id: I9bfb43a472bcd7dfdd6ea7fab4751d494e1126bb Reviewed-on: https://chromium-review.googlesource.com/948784 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
James Darpinian 4d9d4839 2018-03-13T12:43:28 Optimize buffer deletion by returning early if buffer is not bound. This improves angle_perftests bindings_gl_100_objects_allocated_every_iteration by over 30%. Bug: 820723 Change-Id: Icfaa0f54f7c61db6475948e3a95296f37ab4f7dc Reviewed-on: https://chromium-review.googlesource.com/961302 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lingfeng Yang dbb9c534 2018-02-25T19:58:24 GLES1: state: Define / initialize GLES1-specific states Contains definitions of GLES1-specific states such as material / lighting. Tweaked the Color class for easier copying to uniforms / reading as a float array. This CL also adds the GLES1-specific state in GLES1State, which is then part of the State class and is initialized to the spec's values if the context major version is ES 1. + Some clang-format BUG=angleproject:2306 Change-Id: I7fc3bd9a22ebf0ffcd98d931d0176f21e17b1c5c Reviewed-on: https://chromium-review.googlesource.com/936424 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Lingfeng Yang 54ef3ad4 2018-03-12T08:31:12 Run clang-format on State.cpp BUG=angleproject:2306 Change-Id: I1c5a2dd40fb7d9b51cbf3fd37720a172578d76e8 Reviewed-on: https://chromium-review.googlesource.com/959105 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill e98b1b5d 2018-03-08T09:47:23 Framebuffer: Handle errors in checkStatus. This pipes a lot more errors around in the Validation, where they now will be caught. Bug: angleproject:2372 Change-Id: Ibb4e47ddc932995a02dd92e10578b7a4097182a9 Reviewed-on: https://chromium-review.googlesource.com/954406 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang d4fff506 2017-09-22T11:28:28 Reorder state synchronization for resource init. Some backends may change state while initializing resources. Make sure that all resources are initialized before synchronizing the backend state for the given operation. BUG=angleproject:2107 Change-Id: Ie75ac3eee986e41dfe3dd11a94a706e19df7497e Reviewed-on: https://chromium-review.googlesource.com/678481 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
James Darpinian e8a93c6e 2018-01-04T18:02:24 New transform feedback buffer binding rules Detects undefined behavior when a buffer is bound to a transform feedback binding point and a non transform feedback binding point at the same time. Also moves the transform feedback buffer generic binding point out of the transform feedback object and into the context's global state, to match driver behavior. This way binding a new transform feedback object does not affect GL_TRANSFORM_FEEDBACK_BUFFER_BINDING which is similar to how VAOs work with GL_ARRAY_BUFFER_BINDING. Bug: 696345 Change-Id: If3b9306cde7cd2197a8ce35e10c3af9ee58da0b8 Reviewed-on: https://chromium-review.googlesource.com/853130 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 19fa1c6f 2018-03-08T09:47:21 Return an Error from Framebuffer::syncState. This pipes errors up from the Impl to the top level. There are still a few places were error swallowing is needed, because the Framebuffer API doesn't support returning an error. Bug: angleproject:2372 Change-Id: Idc06bda1817fd28075940f69874d8b6ba69194f9 Reviewed-on: https://chromium-review.googlesource.com/954290 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Jamie Madill bc918e7d 2018-03-08T09:47:21 Return errors from gl::State::syncDirtyObjects. This plumbs the front-end code, but doesn't implement Error handling for any objects yet. Framebuffers and VertexArrays will get error handling from their syncState methods. Bug: angleproject:2372 Change-Id: I226049e25ac7af2bdd3c4787b67a5d297c0b9c4b Reviewed-on: https://chromium-review.googlesource.com/954289 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>