util/random_utils.h


Log

Author Commit Date CI Message
Jamie Madill 4a65040b 2022-01-30T14:00:48 Add new Vulkan uniform update test. This covers a specific case with multiple programs and descriptor set caching. It could get tripped up by more complicated patterns in the trace tests. Bug: angleproject:6776 Change-Id: Ic8e42e55e60ef0fc01f0386712d3457abeea94e9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3426884 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8257ac30 2020-02-07T14:17:08 Vulkan: Defer RenderPass image barriers. We accumulate image barriers in two places: * for GL sampler textures * for GL framebuffer attachments (Render Targets) Then we issue the barriers together in a single call before the RP. This fixes a bug where we were missing a layout transition in some cases when transitioning between a sampler and a render target. It should also be faster to issue a single barrier before a RP than issue several smaller barriers. Bug: angleproject:3539 Bug: angleproject:4029 Change-Id: I180b770f0df6b44d209e5c618ba36bcc1c6372e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2044236 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ba319ba3 2018-12-29T10:29:33 Re-land "Load entry points dynamically in tests and samples." Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL headers. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57 Reviewed-on: https://chromium-review.googlesource.com/c/1392382 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 9f088621 2018-12-29T20:46:15 Revert "Load entry points dynamically in tests and samples." This reverts commit 03923558a7103827ffec6a4d2a1453ed91f01c6f. Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624 Original change's description: > Load entry points dynamically in tests and samples. > > This CL adds a dynamic loader generator based on XML files. It also > refactors the entry point generation script to move the XML parsing > into a helper class. > > Additionally this includes a new GLES 1.0 base header. The new > header allows for function pointer types and hiding prototypes. > > All tests and samples now load ANGLE dynamically. In the future this > will be extended to load entry points from the driver directly when > possible. This will allow us to perform more accurate A/B testing. > > The new build configuration leads to some tests having more warnings > applied. The CL includes fixes for the new warnings. > > Bug: angleproject:2995 > Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 > Reviewed-on: https://chromium-review.googlesource.com/c/1359516 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2995 Reviewed-on: https://chromium-review.googlesource.com/c/1392381 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 03923558 2018-12-29T10:29:33 Load entry points dynamically in tests and samples. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 Reviewed-on: https://chromium-review.googlesource.com/c/1359516 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Luc Ferron 071fc3f9 2018-06-11T12:51:35 Fix build on Windows using Visual Studio This is a follow-up of this change: https://chromium-review.googlesource.com/c/angle/angle/+/1092101 Just to fix a warning that prevents building in Visual Studio successfully. Bug: angleproject:2306 Change-Id: Ib87d5cb349019fb6b2d7f75b46552146d41787de Reviewed-on: https://chromium-review.googlesource.com/1095480 Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Lingfeng Yang 45b5a875 2018-06-07T11:33:25 GLES1: Texture environment API BUG=angleproject:2306 Change-Id: Ibb168d5c9f7aa96a48c96ffbe96ecead2276975e Reviewed-on: https://chromium-review.googlesource.com/1092101 Commit-Queue: Lingfeng Yang <lfy@google.com> 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>
Jamie Madill 5dd4ad89 2018-01-29T13:53:43 Vulkan: Add a perf test for the Pipeline cache. This micro-benchmark can be used to measure the performance impact of changing the Pipeline cache. For instance, we can check if changing the size of the hash key affects performance significantly. Also updates the build files so angle_perftests can see vulkan.h, and makes the Vulkan headers an explicit source set. This test currently shows that a lot of time is spent in PMurmurHash, with some time also spent in memcmp. Bug: angleproject:2163 Change-Id: Ie8bb3e31d58590f373d28cbbb59f7e372b80cc29 Reviewed-on: https://chromium-review.googlesource.com/884882 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill cc6ac25e 2017-01-25T12:57:21 GLES: Expose OES_mapbuffer in GLES2 on GLES3. This extension is mandatory for EXT_map_buffer_range support. We can emulate it using GLES 3.0 core map functionality. BUG=angleproject:1751 Change-Id: Idba09ce7276603d5556039f4a49aa0b87cae22aa Reviewed-on: https://chromium-review.googlesource.com/431826 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yuly Novikov e3352f94 2016-08-12T20:40:14 Change angle_util to be a shared library So that there will be one instance of static thread synchronization variables in AndroidWindow. Previously there was one instance in lib_angle_deqp_gles2_tests__library and one in libangle_deqp_libgles2, resulting in AndroidWindow::initialize waiting forever. Also make the change in GYP build to fix standalone build, and fix rpath issues on Mac. BUG=angleproject:1471 TEST=end2end and deqp tests on standalone Win10 and end2end on GN Mac 10.11 Change-Id: I731578459400bb47d269df129aabed9b67b555e6 Reviewed-on: https://chromium-review.googlesource.com/376202 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 55033e58 2016-08-25T17:32:12 Revert "Change angle_util to be a shared library" This reverts commit 2f9b5e6f79cd576bd3b7110272d58f143801bf0f. Change-Id: I90a7ba0596e79795c9549bc268eabff69c96d572 Reviewed-on: https://chromium-review.googlesource.com/376079 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 2f9b5e6f 2016-08-12T20:40:14 Change angle_util to be a shared library So that there will be one instance of static thread synchronization variables in AndroidWindow. Previously there was one instance in lib_angle_deqp_gles2_tests__library and one in libangle_deqp_libgles2, resulting in AndroidWindow::initialize waiting forever. BUG=angleproject:1471 Change-Id: Ia529c91e34960eb352730c1bb89a91ce6336c8a0 Reviewed-on: https://chromium-review.googlesource.com/368983 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f83cbc65 2016-01-22T15:27:21 Use std::random functions for test and samples RNG. These standard functions are much more powerful than the C random() routines. Use them to improve the random utils, and use a class to clean things up further. This fixes a problem I was having using random_utils where I was having trouble generating random 32 bit unsigned integers. BUG=angleproject:1290 Change-Id: I5081764053d0667a4e323553b7dea531256aa778 Reviewed-on: https://chromium-review.googlesource.com/323440 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 90c253a6 2015-12-15T15:14:08 Add an instancing perf test. BUG=526217 BUG=angleproject:1164 Change-Id: Ia353a3b2fa0ab0e8b7fd15d72bb63e5ecb7833b1 Reviewed-on: https://chromium-review.googlesource.com/301469 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ea0e8733 2014-09-24T10:26:49 Add a point sprite benchmark. This benchmark will attempt to reproduce the slowdown we see in D3D11 on the turbulenz GPU particles demo. BUG=angle:705 Change-Id: I9c4c2f09d4282feae30f448fd374cdbb6bceae9b Reviewed-on: https://chromium-review.googlesource.com/216467 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>