- 22 Jun, 2018 4 commits
-
-
Alexis Hetu authored
Early returns were erroneous and were causing memory leaks Change-Id: Ifd6e37d79b6abd3f7d8d8899c951f1a0b4a66fb0 Reviewed-on: https://swiftshader-review.googlesource.com/19588Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
The use of std::unordered_map was the main source of slowdowns in the optimizer code, so it was re-written without any maps. In order to do so, the information originally carried by the maps was moved to user-defined information stored within Subzero classes. The optimizer now manages the memory used to store this information. Bug swiftshader:69 Bug b/67872293 Change-Id: I2757169f0d3d467766317af6e00e149b4317fb9c Reviewed-on: https://swiftshader-review.googlesource.com/19508Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Previously we were only attempting to obtain a handle to an already loaded sibling library residing in the same directory. If it wasn't already pre-loaded, we only loaded the library by name without any directory prefix. This could lead to not finding the correct library. Also, it's fine if the directory prefix is empty, so there's no need for duplicate loops. Bug b/110407478 Change-Id: Ia55b426e58b9f4039064bba9253dae80e4fdf5cf Reviewed-on: https://swiftshader-review.googlesource.com/19549Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Added MSAN, ASAN, TSAN, and UBSAN build options. Disabled use of --no-undefined if a Santizer is used, since by design they leave some symbols unresolved until run time. UBSAN required blacklisting of our old copy of LLVM. Bug swiftshader:108 Change-Id: Iab94b6815bc188c2a7f07d5b7a461234fb1035f3 Reviewed-on: https://swiftshader-review.googlesource.com/19548Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 21 Jun, 2018 1 commit
-
-
Adrienne Walker authored
BUG=chromium:854817 Change-Id: Icd81848fbbf3691eca46c9582b3c053ba1b00353 Reviewed-on: https://swiftshader-review.googlesource.com/19528Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Adrienne Walker <enne@chromium.org>
-
- 20 Jun, 2018 2 commits
-
-
Alexis Hetu authored
ChromeOS runs tests on some bots which run on Linux, but do not support X11. In order to allow SwiftShader to successfully build on these bots, all X11 dependencies are #ifdefed behind the USE_X11 flag, which is already supplied by the Chromium build system. Change-Id: I6b914b1e662d9fbf101eb7caea7ac59e43cc7b56 Reviewed-on: https://swiftshader-review.googlesource.com/19488Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Bug b/110185979 Bug b/72330874 Change-Id: I593e975dca0798d027c8c5476e384eeca0fd1f7f Reviewed-on: https://swiftshader-review.googlesource.com/19428Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 18 Jun, 2018 1 commit
-
-
Alexis Hetu authored
Whenever a cube map was being used, these asserts would fire as soon as any border computation would happen. Fixed the asserts to allow cube maps to work properly. Change-Id: Iedc2661e63db37e5b4e77e08f97ce044e9f88837 Reviewed-on: https://swiftshader-review.googlesource.com/19468Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
- 15 Jun, 2018 2 commits
-
-
Nicolas Capens authored
When clear operations fall back to the slow path (i.e. neither fastClear nor blitReactor is used), we were copying a rectangle the size of the destination image. It should only sample within the 1x1 source pixel instead. Bug chromium:852641, chromium:851707 Change-Id: I9f247483f6167f92be8308b8470c021f5641b657 Reviewed-on: https://swiftshader-review.googlesource.com/19448Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Tom Anderson authored
After [1], a manual dependency on exe_and_shlib_deps is no longer necessary since it's automatically added. This CL removes all remaining manual references to exe_and_shlib_deps. [1] https://chromium.googlesource.com/chromium/src.git/+/d7ed1f0a9c28c932fddc834ca5de44f28266c7f5 BUG=chromium:845700 R=capn Change-Id: I20a88d716ed4cddd55047529f87267b5383366bc Reviewed-on: https://swiftshader-review.googlesource.com/19348Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Tom Anderson <thomasanderson@google.com>
-
- 14 Jun, 2018 2 commits
-
-
Alexis Hetu authored
Optimizer::optimizeStoresInSingleBasicBlock() was taking an extremely long time due to looping through all the instructions of a single basic block at every iteration. By creating a much smaller list of only load/store operations the first time a single basic block is encountered and reusing that list when the same block is encountered again, this function now runs ~10X faster. In my test case: out/Default/cc_unittests --gtest_filter=ImageBackgroundFilter.BackgroundFilterRotated_GL The sw::optimize function went from taking almost 16s to roughly 1.5s. Bug b/67872293 Change-Id: I7e2e2aa8dc1bf2663988fb59b58d72d9ee986e36 Reviewed-on: https://swiftshader-review.googlesource.com/19408Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
SwiftShader should be able to build on Fuchsia, but it would hit a collision error if added as a dependency in Fuchsia, so the same logic currently used on MacOS could also be used to avoid the collision on Fuchsia. Change-Id: I9ac216dfc2180165a82bd5ae81c843ee4aea7ce6 Reviewed-on: https://swiftshader-review.googlesource.com/19328Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Sergey Ulanov <sergeyu@chromium.org> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 08 Jun, 2018 1 commit
-
-
Nicolas Capens authored
The parameters of the matrix constructor form an aggregate node that was passed directly to the constructor of the structure, instead of creating a one-element aggregate containing the matrix. https://github.com/mc-imperial/shader-compiler-bugs/issues/74 Bug swiftshader:56 Change-Id: Iff9a2d8dc60d79a0dde28f2aad76407028486ec8 Reviewed-on: https://swiftshader-review.googlesource.com/19308Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 05 Jun, 2018 4 commits
-
-
Alexis Hetu authored
It appears that not only render targets, but also samplers that use IOSurfaces require SwiftShader to perform synchronized draws, otherwise it seems like using a shared IOSurface's CPU memory is unsafe and can cause crashes in Layout Tests. Bug chromium:846693 Change-Id: I0ce24700d34c657ac2447ceb2f6f837bfa3a9a58 Reviewed-on: https://swiftshader-review.googlesource.com/19288Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: If953be0cce3cd11b833d9646e10ede0b31732729 Reviewed-on: https://swiftshader-review.googlesource.com/19248Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: I0984f43de3846428c30232192c7ba83342b1debd Reviewed-on: https://swiftshader-review.googlesource.com/19228Reviewed-by:
Krzysztof Kosiński <krzysio@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Bug chromium:849217 Change-Id: I69d2269c117500d21e5d0860aed0acea212948ba Reviewed-on: https://swiftshader-review.googlesource.com/19268Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 04 Jun, 2018 2 commits
-
-
Alexis Hetu authored
Added missing function declaration. Change-Id: I52ddb666d70733187242906d298fb986f413756a Reviewed-on: https://swiftshader-review.googlesource.com/19208Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Because of the way SwiftShader is integrated into Chromium on MacOS, a synchronization issue exists when Chromium attempts to use an IOSurface before SwiftShader is done rendering into it. In order to solve this, all draw calls that end up rendering into an IOSurface must be synchronized within SwiftShader and can't yield to Chromium until rendering is complete. Bug chromium:847094 Change-Id: If2dba4fa998e7437ec414d3b4aff9e8b19ecc128 Reviewed-on: https://swiftshader-review.googlesource.com/19188Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 02 Jun, 2018 2 commits
-
-
Nicolas Capens authored
Fixes "error: conditional expression is ambiguous; 'sw::Float' can be converted to 'RValue<sw::Float>' and vice versa". Change-Id: I2bd21036803dc54ce212df61a7520b7276b94b2a Reviewed-on: https://swiftshader-review.googlesource.com/19168Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The numeric imprecision can accumulate quickly and cause visible sampling errors. Bug chromium:848238 Change-Id: Ie41c10a0462e5b5e5c3ed5f7329ece00dab3f7f9 Reviewed-on: https://swiftshader-review.googlesource.com/19148Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 01 Jun, 2018 1 commit
-
-
Nicolas Capens authored
On Windows, GLAPI defaults to __declspec(dllimport), while GLAPICALL is empty, leading to declaration mismatches. Either should be empty for the unit tests since we link statically, for all platforms. Change-Id: I2dde0ca35108678fd9767895e0120ee4b0d7030f Reviewed-on: https://swiftshader-review.googlesource.com/19128Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 31 May, 2018 2 commits
-
-
Nicolas Capens authored
GLAPI is the desktop OpenGL equivalent of OpenGL ES's GL_APICALL macro. They need to be consistent to prevent CLang from producing errors when compiling with -Werror,-Winconsistent-dllimport. Change-Id: Iceb73f42f52628a31aba7ce18fe60221529f890c Reviewed-on: https://swiftshader-review.googlesource.com/19108Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
https://github.com/KhronosGroup/EGL-Registry/pull/43 made eglplatform.h include X11 headers on Mac OS, which aren't pre-installed and breaks the Chrome build. https://github.com/KhronosGroup/EGL-Registry/issues/52 Change-Id: I73e3c11244a07e269684323ce76cc9700fe9c1aa Reviewed-on: https://swiftshader-review.googlesource.com/19088Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 30 May, 2018 6 commits
-
-
Nicolas Capens authored
Fixing https://github.com/KhronosGroup/OpenGL-Registry/pull/149 and https://github.com/KhronosGroup/OpenGL-Registry/pull/183 enabled including desktop OpenGL headers without conflicts, so we no longer have to define enums for ARB extensions ourselves. Change-Id: I4f2e2d3b79a6f5cacf53f2a8ace78b6d124cb5d1 Reviewed-on: https://swiftshader-review.googlesource.com/19029Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: If56e711f15236397ac0f8b15f4ca182a7b1e7c49 Reviewed-on: https://swiftshader-review.googlesource.com/19028Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Peter Collingbourne authored
This allows compilers targeting the MS ABI to select the correct inheritance model for the member function pointer field DrawCall::setupPrimitives using the complete type of Renderer. It will allow us to enable the new Clang flag -fcomplete-member-pointers globally. Bug: chromium:847724 Change-Id: Ied5859ec2f5d38b3ccf51608527506caec53f470 Reviewed-on: https://swiftshader-review.googlesource.com/19068Tested-by:
Peter Collingbourne <pcc@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
delete[] should be called on memory allocated with new[]. Change-Id: Ic21e270a7aa0e6e15132cbc3c454ea4f1e0222ea Reviewed-on: https://swiftshader-review.googlesource.com/19048Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Loops were no longer getting unrolled because we analyzed the entire loop, not just the body, for changes to the index variable. Also, the logic was inverted. Also, be conservative about loops with return statements not being unrollable. Bug chromium:845103 Change-Id: I5957e17f7b985ae90b10053216b6945f3f64338e Reviewed-on: https://swiftshader-review.googlesource.com/19008Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Previously we only copied the GLSL shader compiler's info log on failure. This hid any warnings or debug info from the application. Bug chromium:845103 Change-Id: Ia1877a405db2017d327dfc68037596fbda1579fa Reviewed-on: https://swiftshader-review.googlesource.com/19009Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 29 May, 2018 3 commits
-
-
Nicolas Capens authored
Previously only dynamic indexing of uniforms was supported. Since this is essentially a gather operation within the register file, it is slow. We optimize the common case of using the loop index variable as relative address, where the index value would be the same for all shader invocations running in lock-step across SIMD lanes. Bug chromium:845103 Bug skia:7846 Change-Id: Idb36b512dd560d740ac9088691b633ff3a1561c1 Reviewed-on: https://swiftshader-review.googlesource.com/18968Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
This allows to address the registers with a vector of indices. Also rename 'dynamic' register files to 'indirect addressable', to disambiguate from 'dynamic indexing' at the shader level. Indexing with a uniform does not require gather/scatter operations, but does require indirect addressing. Bug chromium:845103 Bug skia:7846 Change-Id: I3c42be33def66328688f2900c61c80246bf1e584 Reviewed-on: https://swiftshader-review.googlesource.com/18989Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Loops can only be unrolled if their loop index variable is not being modified in the loop body. Also check that the increment step of the loop operates on the initial index variable. Also remove some UNIMPLEMENTED's that were benign. Bug chromium:845103 Bug chromium:843867 Bug skia:7846 Change-Id: Ib2b39f2d58763f0299ce7f6f75a8a75e6bdc7963 Reviewed-on: https://swiftshader-review.googlesource.com/18988Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 23 May, 2018 2 commits
-
-
Nicolas Capens authored
Change-Id: Icdeb96a3044ddf215a59ab832703bb447d85c3ab Reviewed-on: https://swiftshader-review.googlesource.com/18948Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: I3cd5b2514149c5bf44dfab483eda415082da7793 Reviewed-on: https://swiftshader-review.googlesource.com/18928Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 18 May, 2018 1 commit
-
-
Krzysztof Kosiński authored
This usage is not explicitly specified in EXT_texture_filter_anisotropic, but in practice all notable ES 3.0 implementations treat maximum anisotropy as sampler state. Furthermore, it's already accepted as a valid sampler parameter by ValidateSamplerObjectParameter in Context.cpp. This avoids a crash when calling glSamplerParameteri(sampler, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.f); Bug: b/79951966 Change-Id: I4013f621781fc74a0fbfbf14ab326871fbb87b7c Reviewed-on: https://swiftshader-review.googlesource.com/18908Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Krzysztof Kosiński <krzysio@google.com>
-
- 17 May, 2018 3 commits
-
-
Nicolas Capens authored
We assume the pixels of an image can be addressed with a signed 32-bit offset, including any padding. For a 3D image it's possible to exceed this without exceeding the per-dimension limits. Lowering the per- dimension limit so the allocation is always less than 2 GiB makes them unreasonably small, so instead we must check the total size. Use 1 GiB as the soft limit in OpenGL. Bug chromium:835299 Change-Id: I9c5184002c1710e3923b549f8c21e7f6a516e1c7 Reviewed-on: https://swiftshader-review.googlesource.com/18869Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
This eliminates the duplication between pitchB() and size(), and ensures that the latter is the full allocation size. Bug chromium:835299 Change-Id: Icf555ad497fb3b92fd00e9a3e6ced6810b2d310d Reviewed-on: https://swiftshader-review.googlesource.com/18789Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
OpenGL has separate implementation-defined texture size limits, for 3D textures and array textures. For now just give them the same value. Bug chromium:835299 Change-Id: Ifaf537511f016e21992388f56598d5ec12a393b8 Reviewed-on: https://swiftshader-review.googlesource.com/18788Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 16 May, 2018 1 commit
-
-
Nicolas Capens authored
https://gitlab.khronos.org/opengl/API/issues/72 was resolved to treat these cases as a no-op and not generate an error. Bug chromium:825545 Change-Id: Ic4cfbc728156bb88a6dc70486ae57c3e12ea43ae Reviewed-on: https://swiftshader-review.googlesource.com/18870Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-