- 15 Oct, 2020 2 commits
-
-
Antonio Maiorano authored
Bug: b/120208871 Change-Id: If777ca4d4df189b1b7fd67ffe572044c8d0508c0 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49008 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Eric Holk authored
We were hitting an assert in the assembler due to an instruction that had not been properly legalized. Now we ensure that mul instructions take at most one immediate. It is not clear why these instructions were not removed by upstream optimizations. This is possibly a result of values only being known at link time but somehow missed by LTO. This CL includes some minor cleanup as well: * Running lit tests does not actually require the Subzero runtime, so that is removed from the dependencies list. * Removes unused capture clauses that were causing warnings treated as errors on newer compilers. Reviewed-on: https://chromium-review.googlesource.com/896962Reviewed-by:
Jim Stichnoth <stichnot@chromium.org> Reviewed-by:
Karl Schimpf <kschimpf@chromium.org> Signed-off-by:
Antonio Maiorano <amaiorano@google.com> Bug: b/120208871 Change-Id: Ibf33b6961ee99311ca18c7179c56df28af6faf17 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49068 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 14 Oct, 2020 3 commits
-
-
Jason Macnak authored
This reverts commit e72c6099. Reason for revert: try again after internal minigbm branch updated. Change-Id: I80e47b0d8d58e4f9f2ecdf0cbb2852b913014aaf Bug: b/141698760 Test: m (inside Android repo) Change-Id: I80e47b0d8d58e4f9f2ecdf0cbb2852b913014aaf Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49268 Presubmit-Ready: Jason Macnak <natsu@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Jason Macnak <natsu@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Alexis Hetu authored
Ever since vk::destroy calls the object destructor, we can have std objects in our vulkan objects, rather than std object pointers, which allows us to allocate them using the provided allocator, rather than having to use DEVICE_MEMORY. I'm unsure whether there was an actual memory leak here or if ASAN was detecting something that wasn't there, but this cl cleans up std object allocation and fixes whatever ASAN was detecting. With this change, the fuzzer run now completes without issue. Bug: chromium:1107112 Change-Id: Ib78451639131eb518e2bf8d63ba70b930aba2216 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48328 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Makes stepping around inlined functions less jumpy. Fixes: b/170650010 Change-Id: Ie7b003722e3dee523a39bedf4dc42f1c0b05a041 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49228 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 11 Oct, 2020 1 commit
-
-
Jason Macnak authored
This reverts commit 139f5c35. Reason for revert: build breakages Bug: b/141698760 Change-Id: I145e532fe1dc873c83a4971bc9714b785eea38fe Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49188Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Jason Macnak <natsu@google.com>
-
- 10 Oct, 2020 2 commits
-
-
SwiftShader Regression Bot authored
Reactor backend: Subzero Change-Id: I997d746216a7b1b6179db34c841ccec60aab5c02 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48888 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Jason Macnak authored
Bug: b/141698760 Test: m (inside Android repo) Change-Id: I29038001da0e122d66d634c47127139a3d33a16d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49169 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Trevor Black <vantablack@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Jason Macnak <natsu@google.com>
-
- 09 Oct, 2020 4 commits
-
-
Nicolas Capens authored
We were simply adding the constant depth bias to the z coordinate, instead of interpreting it as relative to the minimum resolvable difference. In the legacy OpenGL ES code stack we're multiplying it by 2^-23, but this assumes a 32-bit floating-point depth format, while Vulkan must also support 16-bit integer depth, and doesn't take the exponent of the z values of the polygon into account. This change fixes the issue for both integer depth formats, which have a constant minimum resolvable difference, and floating-point depth formats, where the maximum exponent of the z values is used to determine the minimum resolvable difference per polygon. The viewport's depth range transform was corrected to be performed before the depth bias offset. Also the depth bias clamp operation was corrected to be performed only on the bias value, not the polygon's z value for vertex 0. We were also converting scalars to vectors a bit earlier than necessary, so this was refactored to happen later to simplify the calculations. The bias is added per fragment, after z interpolation, instead of being added to the 'C' factor of the plane equation. That's because we compute 'y * B + C' per row, and then add 'x * A' per fragment. When the bias is included in 'C', the additions cause loss of precision greater than the minimum resolvable difference, and dEQP-GLES3.functional.polygon_offset fails because it uses a 'units' depth bias of 1. Note this change is intentionally unoptimized, to serve as a spec- compliant reference implementation. dEQP has poor test coverage for this functionality so we need to start off with something that is easy to reference against the spec. Bug: b/139341727 Fixes: b/160463658 Change-Id: Ief1dd609d8ac974e76b1b785a924b09b448297a2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48629 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
Nicolas Capens authored
Vulkan never clamps interpolants, except for depth values (specifically for fixed-point formats, and for floating-point formats when the unrestricted depth extension is not enabled). This change moves the clamping operation out of interpolate(), which makes it easier to see depth clamping being performed when necessary, and will facilitate changes in applying depth bias. Bug: b/139341727 Change-Id: I8cef29d63fef00308ef2f813b4feb687c83baa86 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49148 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Sean Risser <srisser@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
``` template<typename T, std::size_t N> void store(const rr::RValue<rr::Pointer<rr::Byte>> &ptr, const std::array<T, N> &val) ``` was completely broken as it was using `sizeof(T)` for element offsets. All uses of this overload use Reactor values for T, and so `sizeof(T)` evaluates to the size of the compiler type, not the runtime data type. Also remove the useless `for(int i = 0; i < N; i++)` in `buildGlobal()`. This iterator isn't used, so we're just doing the same calls to `put()` `N` times. Bug: b/170383642 Change-Id: I9ba9efce07e886087124118122de56a4d31c5503 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49129 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
DXC is producing duplicate definitions for local variables. Give more context in the `ASSERT()` so it's easier to diagnose whats going wrong. Bug: b/170378370 Change-Id: Ic8c8f24a6dbd8ce23e04eb4f0265363b44bc174c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49128 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 08 Oct, 2020 1 commit
-
-
Ben Clayton authored
`debug::LocalVariable` expects the parent scope to contain a `debug::LexicalScope`. If it doesn't, then the variable is never registered, and doesn't show up in the watch windows. DXC emits `DebugLocalVariable`s for parameters, with the parent scope set to the immediate function, with no lexical block. To make parameters show up, make `debug::Function` inherit from `debug::LexicalBlock`. This makes all the existing logic that uses `debug::find<debug::LexicalBlock>()` work for both `DebugLexicalBlock` and `DebugFunction` scope types. Fixes: b/170320768 Change-Id: I296353eae9bb7f04bc649174b9f33a29d1dcc6e7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49088 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 07 Oct, 2020 1 commit
-
-
Nicolas Capens authored
We now deal with NaN and Inf results from the cube map face projection in the SamplerCore:address() method by clamping to the [0.0, 1.0) range, so we can just let the pathological division-by-zero cases happen and not spend more cycles on preventing it. Bug: b/169802633 Change-Id: I329420415f6e3b913d912b357758f92f8e0ee7f4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48828 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
- 06 Oct, 2020 3 commits
-
-
Sean Risser authored
A WARN was mistakenly used when logging the unsupported extension structs in getPhysicalDeviceFeatures2. Bug: b/169966461 Change-Id: I9923c46ae83e6eb4ba70b76d401221fcf45c5734 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48989 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Sean Risser <srisser@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Sean Risser authored
Update the following functions to their 1.2 core names: * vkCreateRenderPass2KHR --> vkCreateRenderPass2 * vkCmdBeginRenderPass2KHR --> vkCmdBeginRenderPass2 * vkCmdEndRenderPass2KHR --> vkCmdEndRenderPass2 * vkCmdNextSubpass2KHR --> vkCmdNextSubpass2 Also remove redundant code in vkCreateRenderPass and vkCreateRenderPass2. Bug: b/169593400 Change-Id: I8a5ac34e694fa29796c132fb2be0d5a06fad2912 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48988 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Sean Risser <srisser@google.com>
-
Yiwei Zhang authored
Includes VK_EXT_device_memory_report definitions. https://github.com/KhronosGroup/Vulkan-Headers revision 94ff600cc8623a2fd270cc14b14def3fca12ffaf tag v1.2.156 This change also restores vulkan_fuchsia_extras.h include. Bug: b/158094132 Test: build Change-Id: Ibead6e76556adfa9fb5d4610f0a67020b707ffe3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49048 Presubmit-Ready: Yiwei Zhang <zzyiwei@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
David Turner <digit@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Yiwei Zhang <zzyiwei@google.com>
-
- 05 Oct, 2020 4 commits
-
-
Ben Clayton authored
* changes: Update Marl to f1c446ccd Squashed 'third_party/marl/' changes from d29553a3730..f1c446ccdc0
-
Nicolas Capens authored
Reduce the number of OpenGL and EGL tests to 16, to avoid exceeding the maximum number of X clients. Also make the attempts to open an X display back off exponentially instead of linearly. Bug: b/153322216 Change-Id: Ifb91d9b892dc4b5f6d26f369f2bece454b0bae87 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48969Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Wrapped in a `if(NOT DEFINED SWIFTSHADER_LOGGING_LEVEL)` so that it can be controlled by a parent project with a simple `set()`, much like `option_if_not_defined()`. Bug: b/169966461 Change-Id: I53a072289e6eac589e7640970045174076492774 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48948 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Changes: 1fd23dd Add license checker config and kokoro presubmit 1e5ec3e Change dap::integer backing type to int64_t 7b02b9f Add dap::initialize() and terminate() functions c9630a9 TypeOf: Move Move TypeInfos to anon namespace ed0af8f Add lots more tests for dap::any. 9d3f5c8 clang: Enable -Weverything, fix all warnings bb3dbcd Update DAP protocol to 1.41.0 f0c28f9 Fix moves of any when value isInBuffer 2f607e0 Fix deadlock closing socket on another thread 9003ee5 Socket: Use the RWMutex to fix TSAN error 53a62fd Add dap::RWMutex. A read / write mutex. 78dd3ab CMake: Handle building fuzzer with sanitizers 13c9e7d Implement timeouts for dap::Socket::connect 261d62d Remove unnecessary virtual inheritance aeb6614 json_serializer: Disable exceptions 773f0df Add support for fuzzing cppdap cc93ba9 Add the ability to derive message types from one another. c918748 Fix short reads in ContentReader::buffer() ad9b458 Fix `dap::Socket::read()` when `recv()` errors 9e31344 Kokoro Ubuntu: Switch to docker image 4bc690c Update DAP protocol to Version 1.40 Bug: b/145351270 Change-Id: I33bef298d558a3b4a484d5efc317494d4dc26c96 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48949 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 02 Oct, 2020 5 commits
-
-
Nicolas Capens authored
Previously we had to click on the Gerrit comment posted by Regres to unfold the single-line snippet into the full comment, to check whether any regressions occured. This change makes "--- No change in test results ---" come first so we can see at a glance without opening the full comment that no regressions have occured, or be informed about changes in test results. Change-Id: Ia4d9bbb0f1db81df943c009af91fc43c9b71ade7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48928Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
Trevor David Black authored
Bug: b/141698760 Change-Id: I8d3895b2ee79a0ba71f20917ae1edc83dd19dab8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48508Reviewed-by:
Trevor Black <vantablack@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: Trevor Black <vantablack@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Presubmit-Ready: Trevor Black <vantablack@google.com> Tested-by:
Trevor Black <vantablack@google.com>
-
Ben Clayton authored
Notable changes: * Fixed instances of bugprone-move-forwarding-reference. See: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48868 chromium:1134310 * Fiber stack size can now be configured. * Only public API symbols are now exported, allowing for creation of shared libraries / dlls. Changes: f1c446ccdc0 Fix instances of bugprone-move-forwarding-reference 8719a54cbe0 Kokoro: Get tar directories around the right way! 3a21f30c54e Kokoro: Package build artifacts into a .tar 57da063f48f Kokoro: Fix line continuation in release.bat ecaa2602da1 Kokoro: Rename release script names 787cf0686d2 Kokoro: Add release configs 3ce8637191a Kokoro: Test ucontext fibers on linux. 62f0a0f9e39 osfiber_ucontext: Fix memory leak & warning 20dc482b9a0 CMake: Add flag for ucontext fibers 3815666523e Kokoro: Fix define_artifacts.regex f51513856b6 Kokoro: Add define_artifacts action d2d77650ec1 CMake: Put marl-benchmarks in a named FOLDER 95e505a3071 Fix markdown lint warnings in README.md 71d86a2bc04 Kokoro: Add config for continuous + so builds 5f897319c18 Reduce scheduler fiber stack size for tests bc65ef5ebe5 Scheduler: Make the fiber stack size configurable b61e279881c Remove deprecated scheduler [gs]etters 1a28daf0d89 Add license checker config and kokoro presubmit 3448974c1b0 Add marl::DAG - a AoT declarative task graph 9e77dcdd5a4 Kokoro: Migrate to new Windows VM instance ac517aa6784 Fix schedule() with function arguments 834e558a138 Add missing include to export.h 1e8acb5695e MSVC build fixes. 84f047c114c Migrate from VERSION to CHANGES.md 0a1012317ab Annotate all public API inlines with MARL_NO_EXPORT 3689793cb1d Only notify one fiber in ConditionVariable::notify_one() 596e172322d CMake: Use -fvisibility=hidden by default 1d51df92c71 Disable by default deprecated scheduler [gs]etters 45be9b24830 README: Add FreeBSD and iOS to the list of OSes 4d68ade048a Export DLL public symbols for building marl as dll 1efb1e70228 Kokoro: Add configs for Android Commands: ./third_party/update-marl.sh --squash Bug: b/140546382 Bug: chromium:1134310 Change-Id: I48e99f1100d9a1e92a2b34c5764b5c604a1f2fe8
-
Ben Clayton authored
f1c446ccdc0 Fix instances of bugprone-move-forwarding-reference 8719a54cbe0 Kokoro: Get tar directories around the right way! 3a21f30c54e Kokoro: Package build artifacts into a .tar 57da063f48f Kokoro: Fix line continuation in release.bat ecaa2602da1 Kokoro: Rename release script names 787cf0686d2 Kokoro: Add release configs 3ce8637191a Kokoro: Test ucontext fibers on linux. 62f0a0f9e39 osfiber_ucontext: Fix memory leak & warning 20dc482b9a0 CMake: Add flag for ucontext fibers 3815666523e Kokoro: Fix define_artifacts.regex f51513856b6 Kokoro: Add define_artifacts action d2d77650ec1 CMake: Put marl-benchmarks in a named FOLDER 95e505a3071 Fix markdown lint warnings in README.md 71d86a2bc04 Kokoro: Add config for continuous + so builds 5f897319c18 Reduce scheduler fiber stack size for tests bc65ef5ebe5 Scheduler: Make the fiber stack size configurable b61e279881c Remove deprecated scheduler [gs]etters 1a28daf0d89 Add license checker config and kokoro presubmit 3448974c1b0 Add marl::DAG - a AoT declarative task graph 9e77dcdd5a4 Kokoro: Migrate to new Windows VM instance ac517aa6784 Fix schedule() with function arguments 834e558a138 Add missing include to export.h 1e8acb5695e MSVC build fixes. 84f047c114c Migrate from VERSION to CHANGES.md 0a1012317ab Annotate all public API inlines with MARL_NO_EXPORT 3689793cb1d Only notify one fiber in ConditionVariable::notify_one() 596e172322d CMake: Use -fvisibility=hidden by default 1d51df92c71 Disable by default deprecated scheduler [gs]etters 45be9b24830 README: Add FreeBSD and iOS to the list of OSes 4d68ade048a Export DLL public symbols for building marl as dll 1efb1e70228 Kokoro: Add configs for Android git-subtree-dir: third_party/marl git-subtree-split: f1c446ccdc0c611d1aeec4a6266a77693ae48c92
-
Yiwei Zhang authored
Bug: b/159763893 Change-Id: I9c662b726ccd77d8974cefb8bacfee8994f8c7b1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48829 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Trevor Black <vantablack@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Yiwei Zhang <zzyiwei@google.com>
-
- 01 Oct, 2020 2 commits
-
-
SwiftShader Regression Bot authored
Reactor backend: Subzero Change-Id: Ief5908c0dcd93d218c9be0c13bb7a3991f74ab7a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48468 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
While cube face coordinates are nominally already in the [0.0, 1.0] range due to the projection of the sampling coordinates onto the cube face, the projection doesn't result in such normalized cube face coordinates for Inf and NaN values in the sampling coordinates. This change causes us to always clamp, matching the legacy OpenGL ES code now. Bug: b/132981873 Change-Id: Ib89d032ed4c5945f115269a4e8989aa03e52a6b5 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48788 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
- 30 Sep, 2020 3 commits
-
-
Nicolas Capens authored
Only with X11 does eglCreatePlatformWindowSurface take a pointer to a window handle instead of a handle value directly. Since eglCreateWindowSurface delegates to CreatePlatformWindowSurface, it must take the address of the window handle. Bug: b/168821209 Change-Id: I69c7bf3315a871c2cd806a736fd73606cac34ad2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48789Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Caramelli <caramelli.devel@gmail.com>
-
Antonio Maiorano authored
Add missing comma, introduced in 9c14bda0 Bug: none Change-Id: Iffbe771b6c6af408c2c809e9beef694543554aa4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48748Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Antonio Maiorano authored
With this change, we can now select implementations of most transcendentals from either the "emulated" or "optimal" namespaces. The emulated versions generally call the math.h standard function on each component for vector types, while the optimal versions typically implement some approximation in Reactor to produce vectorized code. Most of the optimal versions were taken directly from ShaderCore.cpp, except for ASin, for which I implemented an 8-term approximation. The new versions are faster, and pass all deqp precision tests. Here's a table of benchmarks that show the performance improvements that were made. Note that Asin and Acos now take a Precision parameter for Full and Relaxed precision: Before After rr_Sin 48.6 ns 10.6 ns rr_Cos 67.1 ns 9.62 ns rr_Tan 75.5 ns 19.4 ns rr_Asin_fullp 24.2 ns 23.0 ns rr_Asin_relaxedp N/A 9.31 ns rr_Acos_fullp 14.3 ns 6.35 ns rr_Acos_relaxedp N/A 4.56 ns rr_Atan 66.8 ns 12.9 ns rr_Sinh 79.7 ns 11.5 ns rr_Cosh 80.1 ns 11.5 ns rr_Tanh 62.9 ns 12.1 ns rr_Asinh 104 ns 9.44 ns rr_Acosh 14.4 ns 10.2 ns rr_Atanh 170 ns 9.81 ns rr_Atan2 73.5 ns 22.8 ns rr_Pow 87.9 ns 16.3 ns rr_Exp 40.2 ns 5.72 ns rr_Log 44.0 ns 7.35 ns rr_Exp2 101 ns 5.38 ns rr_Log2 106 ns 9.24 ns Bug: b/147818976 Change-Id: I791893bd9f005dbbae4770fb474de338a04845be Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48588 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:Nicolas Capens <nicolascapens@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
- 29 Sep, 2020 9 commits
-
-
Nicolas Caramelli authored
Bug: b/168821209 Change-Id: I1892581045ec37abc4060cf4de2c45cb2fb6208a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48568 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Caramelli <caramelli.devel@gmail.com>
-
Nicolas Caramelli authored
Bug: b/162574690 Change-Id: I825af0494737ec9090da9580dfd876db88e3c289 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/47368 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Caramelli <caramelli.devel@gmail.com>
-
Sean Risser authored
Under normal operations, a framebuffer is created with each VkImageView it will need to use. This extension allows users to specify a flag that tells the driver to wait until render pass begin time. The user must also request this feature during device creation, this behavior is not enabled by default. Bug: b/167223759 Tests: dEQP-VK.imageless_framebuffer.* Change-Id: I2be5cec4d8174e20372eb9e148a05034dd338341 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48488Tested-by:
Sean Risser <srisser@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
This is a major reworking of the way the debugger is implemented. Instead of generating shader code that is continually driving `vk::dbg` state, the debugger now: * Maintains a full shadow copy of all Intermediate values (SSA) * Only calls out to C++ whenever a trap is set * Only constructs and updates the `vk::dbg` state when a trap is hit The main goal of this reworking is to properly support OpenCL.Debug.100's DebugValue instructions that may use deref expressions (See https://www.khronos.org/registry/spir-v/specs/unified1/OpenCL.DebugInfo.100.html#_debug_operations_a_id_operation_a) These are remarkably hard to implement without having everything backed with real memory. The resulting reimplementation is: * Much, much faster (>1000x faster for sample apps I've tried). Only ~2x slower than non-debug enabled SwiftShader now. * Uses much less runtime memory. * Much cleaner, removing a load of template magic for setting variable state that was extremely hard to follow * More thoroughly commented, explaining each component and method. Bug: b/145351270 Change-Id: I1b48e9defae095109ebfaf90dfb7c7e22d335816 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48729Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Implement `operator<()`, `std::hash<>` Bug: b/145351270 Change-Id: I9ebcfccd3a1da36dc9286f6ed6d50c73c8c3bac3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48698 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
Ben Clayton authored
Non-power of two vector types were previously not supported as they would be misaligned. Use a `constexpr` function to ensure the `alignas` is rounded to the next POT. While the memory layout for vec3 will be identical to a vec4, this allows us to specialize templates to distinguish between `vec3` and `vec4`. This is used by the debugger to display `vec3` locals without showing an undefined `w` component. Bug: b/145351270 Change-Id: I61f61e42e69d367b1a625c262be970994b287433 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48708Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
All 3 issues listed have now been fixed. It is safe to reenable this. Fixes: b/147726513 Change-Id: Ie76b77cc67f0ab74f45c73da1a998bce5dffd4fa Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48728Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Useful for lazily building a new `File` if it hasn't been registered already. Also assign the file to the location of a new frame. This is a sensible default to have. Bug: b/145351270 Change-Id: I7c0abff22a0010923428ff5ed0760d6ae63b0c6b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48697 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
Ben Clayton authored
Change `windowSpacePosition` from c-array to `std::array`. Other invocation state fields use `std::array`, and this simplifies some template logic in the new debugger implementation. Add / fix comments in `SpirvShaderControlFlow.cpp`. Also add a missing call to `dbgEndEmitInstruction()`. This is typically invoked by `SpirvShader::EmitInstruction()`, but the special handling of `OpPhi` in `EmitLoop()` previously skipped this. Bug: b/145351270 Change-Id: Id6463d5e157b28ef61ce8fc48644bcbc97a2aa55 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48696Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-