- 15 Jul, 2019 4 commits
-
-
Alexis Hetu authored
Fixed typos where end() was used instead of begin() Bug b/137554711 Change-Id: I5faff14d400a644146501a941c35d503535355c4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34111Tested-by:
Alexis Hétu <sugoi@google.com> Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
Coroutines have a larger performance overhead to regular functions. If a rr::Coroutine does not call Yield(), then keep it as a regular function, and stub `coroutine_await` and `coroutine_destroy`. Bug: b/135609394 Bug: b/137167505 Change-Id: Id890e86eb3602f9cd9ed4e68e50c68a98705c753 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33950Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
This pass is automatically added by LLVM when using the CoroSplit pass which is not peformed by regular functions. These passes have been shown to provide a big performance gain for certain dEQP tests. Bug: b/135609394 Bug: b/137167505 Change-Id: Iecdae495bc741c855c38daf67f95ad83155fc213 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33969 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Jeff Muizelaar authored
Using =A is not the right constraint for x86-64. rdtsc is actually used as an example in the gcc documentation and for x86-64 something like "=a"(tickl),"=d"(tickh) should be used. Instead of worrying about this we can just use the builtin. Change-Id: Ied720de0861ff9231a4a4cdf85b75945fe478056 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34108 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Jeff Muizelaar <jmuizelaar@mozilla.com>
-
- 11 Jul, 2019 2 commits
-
-
Nicolas Capens authored
The regular C++ operator new calls the installed new-handler on out-of-memory, which by default throws std::bad_alloc when exception handling is enabled, or aborts when not. Under no circumstance is null returned. Furthermore, LLVM installs a new-handler itself, which also ends up aborting the program. Using the std::nothrow version of new does not work because it still calls the new-handler. Installing our own non-fatal new-handler is also futile because the new operator will re-attempt allocation. Setting the new-handler to nullptr will cause the nothrow version of new to return null on out-of-memory. However, this still overrides any new handler which the application may have installed, or, can be overridden by the application again at any point. Instead just use legacy malloc(), which is guaranteed to never throw and returns null on failure. This is already checked for by vk::Create() and it reports VK_ERROR_OUT_OF_HOST_MEMORY. Bug: b/137093675 Change-Id: I6c9ccf738cfd21af9e52382d6e7755071d613d39 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34028 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Alexis Hetu authored
Using a non SRGB format with VK_COLOR_SPACE_SRGB_NONLINEAR_KHR yields a resulting image in the wrong color space. Making sure a surface format where format and color space are both SRGB fixes the issue. Bug b/137088174 Change-Id: I934e6b60afe5f65d22832162e48aecef773627e8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34048Tested-by:
Alexis Hétu <sugoi@google.com> Presubmit-Ready: Alexis Hétu <sugoi@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
- 10 Jul, 2019 3 commits
-
-
Ben Clayton authored
Documentation: http://llvm.org/doxygen/structllvm_1_1EarlyCSEPass.html Bug: b/135609394 Change-Id: Ie7c6a99be46832797c3871b00fee33dea979f207 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33951 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
Remove all the explicit config passing to each of the functions. Bug: b/137167988 Change-Id: Ie8ea956d2365f1901d75b0d10c9e649485d78bf4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33769Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
rr::Config holds the full reactor configuration state. rr::Config::Edit holds edits on a config, which can be applied on top of the current defaults. Default configurations are updated atomically, preventing modifications to the default state from tearing. Bug: b/137167988 Change-Id: Ib05f2cfc31ab22fb9a891a267fffe33c18691028 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33768 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 08 Jul, 2019 1 commit
-
-
Chris Forbes authored
This will halve the size of the input and output arrays used to communicate with the shader. This is likely to have been already cleaned up by llvm, but better to not make the mess to start with. Bug: b/125909515 Change-Id: I960647f808b722fe8ad38ff716df1461e1eae4ef Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33788Tested-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 05 Jul, 2019 6 commits
-
-
SwiftShader Regression Bot authored
Change-Id: I8c7b60b08c983802b659910180ec093c8e605c21 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33808 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
No other fields in this class are prefixed with 'current' and it's in a class named State, so rename to make consistent. Bug: b/126126820 Change-Id: I8eb26546141d1c11beb9acf57883d3d0835847b2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33354Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
getType(), getObject() and getFunction() are only internally used, make them private. Minor refactoring related to spirv function inlining. Bug: b/133213304 Change-Id: I75f9f5488a8485161d534b56eb6530c2946bf49e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33353Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Function holds all the blocks used by the function. Moved various function-specific methods from SpirvShader to this new Function inner class. This change is currently a pure-refactor (no change in behavior), but is required for function inlining in SpirvShader. Bug: b/133213304 Change-Id: I50c7ecca8ce518d8df054c2461410c0acd4e1f52 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33352 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
These are only used during SpirvShader::emit(), and will require separate namespacing when functions are inlined. Bug: b/133213304 Change-Id: I8cf6cd76af35984f0f24109665a991492158bf16 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33351 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
GenericValue is only used by SpirvShader so move it as a private inner class of SpirvShader. Part of the foundations of much larger refactoring required for function inlining in SpirvShader. Bug: b/133213304 Change-Id: I75484c3d036b82f3bc6a735034a7c1b04f05f600 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33350Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
- 04 Jul, 2019 14 commits
-
-
Nicolas Capens authored
Bug chromium:980816 Change-Id: Ic4393668f82316e475baa5e753d891dfb1e30572 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33728 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Ben Clayton authored
May unlock features that are not exposed by march. Change-Id: I4f10dfc93f75eab502824ec155daa9fbbb3d3d55 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33773Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Experiments show substantial performance gains. Bug: b/135609394 Change-Id: I62a6b9dd292cafe92aa5558a84c460594b51197c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33772Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Alexis Hetu authored
Fixed R8G8_SRGB and R8G8B8_SRGB in the Blitter. Enabled R8G8_SRGB tests to make sure the fix is correct. Change-Id: Ibe7addd3f635f353abb09e0391a9a30d20392fbf Tests: dEQP-VK.*r8g8_srgb* Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33530 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Ben Clayton authored
Let's just initialize these to zero, and let the optimizer remove redundant assignments. Bug: b/136149446 Change-Id: Ia776bae4433f78f5a66b16f275e728a70dd4e18d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33468Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
Ben Clayton authored
If robustness is disabled, don't bother zeroing disabled lanes. Gives the LLVM optimizer & backend some more wiggle room. Bug: b/135609394 Change-Id: I425eba2b48601a35dc40aa8ca071e6e61f35024f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33708 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
Bug: b/135609394 Change-Id: Ic566f2ef6d66e31b434d29b23aafd954a05958a4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33709Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
Replace the old 'runOptimizations' flag on Nucleus::acquireRoutine() and Nucleus::acquireCoroutine() with a new OptimizationLevel enumerator. runOptimizations was always true, and there is already the rr::optimization extern to control the optimization passes performed. All Function and Coroutines are now passed the new vk::ReactorOptimizationLevel. This will be changed to a non-Default value in another CL. Bug: b/135609394 Change-Id: I1154da05d413b18a471a3818fbb03f356a3d0e6c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33482Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Split the scattered LLVM global variables into 3 new classes: • JITGlobals is a singleton that holds all the immutable machine specific information for the host device. • JITBuilder holds all the LLVM state for building routines. • JITRoutine is a rr::Routine that holds a LLVM JIT session, compiler and object layer as each routine may require different target machine settings and no Reactor routine directly links against another. This reduce all the global varibles to down to one - 'jit' a JITBuilder. In theory, this can be marked as TLS to remove the global reactor mutex lock. These change also make it possible to specify per-function JIT optimization settings (implemented in a follow-up change). Change-Id: If4c90de444830f398eb79081fd349f313a8d3bd7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33481Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
dEQP-VK.synchronization.internally_synchronized_objects.pipeline_cache_compute When the wind is blowing in the right direction, this test can exceed the per-test 2GB sandbox memory limit, causing a flaky out-of-memory crash. Bug: b/133127573 Change-Id: Ie403d91738c05258639be077aa31ec36d92d109e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33688Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Change-Id: I3833a203ae7635845ea3b8ceb5e323565a92be18 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33487 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Bug: b/132353920 Change-Id: Ic7950ea29be6fd0dc7712813c10cdd2dfab73b90 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33548Reviewed-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Change-Id: Ieaec8e9dd2017803d862ce8bcdc6b00582b7d45b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33486 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Change-Id: I6247e0b5eef4639527ea15e7c5af115e5954a342 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33485 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 03 Jul, 2019 2 commits
-
-
Alexis Hetu authored
- Removed twoSidedStencil, which was always true when stencil is enabled - Removed unused enums and functions - Removed custom new/delete operators - Used VkFrontFace type for frontFace Bug b/132280877 Change-Id: I440d5e910e50de0ac8049d3a56848fa8d2de3493 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33531 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Deleted Thread.hpp and replaced AtomicInt with std::atomic<int>. Should be noop. Note: AtomicInt's operator++(int) and operator--(int) were Post-increment operators implemented as Pre-increment operators, so expressions <AtomicInt object>++ have been replaced with ++<std::atomic object> (same for decrement operators). Bug b/129403963 Change-Id: I907b8c91581fed4b76647327f316b87369c6c82f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33668Tested-by:Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 02 Jul, 2019 4 commits
-
-
Nicolas Capens authored
The Vulkan device's robustBufferAccess feature determines whether accesses to buffers must be bounds-checked against the range of the buffer descriptor. The spec states that "Some features, such as robustBufferAccess, may incur a run-time performance cost. Application writers should carefully consider the implications of enabling all supported features." Hence in many cases applications will leave the feature disabled to ensure maximum performance. Bug: b/131224163 Change-Id: I69e150d5043f0118db8a4b2751b24b5d87bccd75 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33389 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Nicolas Capens authored
This was causing the dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.workgroup.* tests to read out of bounds when robust buffer access is disabled. Bug: b/136561217 Change-Id: I4891f5cd531e99b3dd87b4b84ae545ba47355875 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33528Reviewed-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
For sequential, fully-in-bound vectors: * Loads can safely be a regular vector load. We mask just to keep behavior consistent with rr::MaskedLoad and rr::Gather. * Stores of non-atomics can be implemented as a read-modify-write. These optimizations have drastic performance improvements on architectures where there are no masked-read and masked-write instructions. Bug: b/135609394 Change-Id: I552cc38f4aeae73f8db079a0a11da6a8db857710 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33628Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
SwiftShader Regression Bot authored
Change-Id: I5e007143e62f5fea83d0294332a690ef0d58a52e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33608 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 28 Jun, 2019 4 commits
-
-
Alexis Hetu authored
The PipelineCache class now contains members for caching programs and shaders, which allows significant speedups when using it to prevent recompiling the same shaders over and over again. For now, each PipelineCache object contains its own cache and the cache is not shared between PipelineCache objects. It remains to be seen if SwiftShader would benefit from always caching shaders and programs in a global cache. Notes: - Merging 2 PipelineCache objects was also implemented - Added a few "const" where appropriate IMPORTANT NOTE: This cl DOES NOT allow pipeline caches to be saved and loaded through the pipeline cache data. Bug b/123588002 Change-Id: I95b183033c03e114d69d4432e5831e26be477033 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33428Tested-by:Alexis Hétu <sugoi@google.com> Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
For compile time indices, we can do some basic sanity checking. Change-Id: I9ae4ea5bbf106c4653cbf9bbe6776a5a188b4289 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33470Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Dramatically speeds up builds when switching build flags. Change-Id: I661d18458db69f6663381c252b06b3ed96f3a5c6 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33472Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Sean Risser authored
Made the following changes: * Changed our multi-line strings to use C++11 raw string literals * Added argument-less macros for checking if GL or EGL had an error. * Made checkCompileFails return the error log, in case a test wants to ensure a specific failure is reported. * Made some more tests use the new MakeShader function. Bug chromium:977665 Change-Id: I5a410d88449d1349806215bd21bb8c2b6d7acc56 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33268 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Sean Risser <srisser@google.com>
-