- 18 Feb, 2021 1 commit
-
-
SwiftShader Regression Bot authored
Reactor backend: Subzero Change-Id: I9c575df6ff7bfc61350140655fa3398d4bafab60 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52848 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 17 Feb, 2021 3 commits
-
-
Alexis Hetu authored
When using push constants, we end up having dynamic offsets on the input parameter of the interpolation functions, so we need to be able to handle this case. Since this is for push constants, we assume that all dynamic offsets will be the same, for simplicity. Bug: b/171415086 Change-Id: I5de1720e383c234c9392421d507a66e6d7ba2445 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52930 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Commit-Queue: Alexis Hétu <sugoi@google.com>
-
Adlai Holler authored
The Skia GPU MSAN bot runs >9 hours with this option set and had to be disabled. We'd like to get test MSAN coverage for the rest of Skia GPU and turn the bot back on, but need this option. Change-Id: I1536912e9cfe35c294e750fcd4a1f515209989bc Bug: b/155148722 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52908 Presubmit-Ready: Adlai Holler <adlai@google.com> Tested-by:
Adlai Holler <adlai@google.com> Commit-Queue: Adlai Holler <adlai@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alistair Delva authored
Using a memfd name to annotate swiftshader_jit allocations is quite clever, but it doesn't work on Android because memfds can be shared and so writing to mappings of them promotes CoW/shared, which is classified by selinux as 'execmod' permission. Android prohibits 'execmod' permission for new app processes, because this is usually a sign the app relies on shared text relocations, which are insecure. In this case, that isn't actually happening, but we are subject to the same blanket ban :) Fortunately, Android has a longtime non-upstreamed prctl() to allow private mappings to be named as well, PR_SET_VMA_ANON_NAME. As this isn't generally available for Linux, wrap it in checks for __ANDROID__. This enables the naming without tripping the 'execmod' permission check. Bug: b/171498948 Bug: b/174801963 Change-Id: Ic4375bc4407e21ecdafb42a7cec651dc3b2ad13e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52669Reviewed-by:
Jason Macnak <natsu@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Presubmit-Ready: Jason Macnak <natsu@google.com> Tested-by:
Jason Macnak <natsu@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Commit-Queue: Jason Macnak <natsu@google.com>
-
- 16 Feb, 2021 5 commits
-
-
Gavin Mak authored
Bug: chromium:1113033 Change-Id: If878e7dfc9b2e1c54f7926f9d1a9af56c5bb5515 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52548 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
-
Antonio Maiorano authored
[XLA:CPU] Remove uses of deprecated CreateAlignedLoad/Store builders These are being removed in https://github.com/llvm/llvm-project/commit/f515ca8995ce3695c6e92d83ffca2012dc753bb3 Upstreaming original change made by Alexander Kornienko (alexfh@google.com) Bug: none Change-Id: I1b1553308cc40c7e99508fb5e3999e16049a8884 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52868 Presubmit-Ready: Antonio Maiorano <amaiorano@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
-
Alexis Hetu authored
This cl enables the sampleRateShading feature. New test failures caused by enabling sampleRateShading: Tests: dEQP-VK.glsl.builtin_var.fragdepth.* List of affected tests now passing: Tests: dEQP-VK.glsl.builtin_var.fragcoord_msaa.* Tests: dEQP-VK.pipeline.multisample.min_sample_shading.*.samples_4.* Tests: dEQP-VK.pipeline.multisample.mixed_count.* Tests: dEQP-VK.pipeline.multisample.variable_rate.* Tests: dEQP-VK.pipeline.multisample_interpolation.*.samples_4 Tests: dEQP-VK.pipeline.multisample_interpolation.sample_interpolate_at_single_sample.*.samples_1 Tests: dEQP-VK.pipeline.multisample_shader_builtin.*.samples_4 Tests: dEQP-VK.pipeline.multisample_shader_builtin.write_sample_mask.* Tests: dEQP-VK.renderpass.suballocation.sampleread.numsamples_4.* Tests: dEQP-VK.renderpass2.suballocation.sampleread.numsamples_4.* Bug: b/171415086 Change-Id: I1aa50cff9e2fada482ceef594c59641c7243b563 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51469 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Commit-Queue: Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Antonio Maiorano authored
We explicitly call Driver::unload, but so does the dtor. We just needed to clear the dll member after unloading. Bug: b/177624844 Change-Id: If587df197c2e6242892e41e715885a92167730a7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52752 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Antonio Maiorano authored
I implemented this extension as part of swiftshader-cl/51589 but had not exposed it as a supported extension. This worked fine when loading SwiftShader directly, but I need to now load it via the loader. Bug: b/176981107 Change-Id: I494be7154b04186e51ee380e16b60b88ff9c9d30 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52751Tested-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Result: Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
-
- 12 Feb, 2021 2 commits
-
-
Sean Risser authored
Vulkan 1.2 added VkPhysicalDeviceVulkan11Properties, which allows users to query support for several other device properties all together. We can use templated static functions to make sure these properties are only ever set in one place, similar to what we do for device features. The only struct this doesn't work for is VkPhysicalDeviceSubgroupProperties, because the names in that struct and the Vulkan11 struct differ. So the Vulkan11 struct manually copies the data from the getProperties(*) function for the subgroup properties. Bug: b/176248217 Change-Id: I30e9e05ecbdb9a40fc3a59df6bd9b8ab9022c9fc Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51388Tested-by:
Sean Risser <srisser@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Commit-Queue: Sean Risser <srisser@google.com>
-
Alexis Hetu authored
This cl adds an implementation for: - GLSLstd450InterpolateAtCentroid - GLSLstd450InterpolateAtSample - GLSLstd450InterpolateAtOffset These functions essentially replicate the behavior of regular interpolants in the fragment shader processing. A specific extra difficulty encountered here is detecting which kind of pointer offset we are dealing with. Pointer offsets might be caused by [] operators being used on a vector or on an array (possibly an array of vectors). This distinction is important as it impacts what interpolant offsets point to. Note that there's missing coverage in dEQP-VK for interpolant arrays and this was caught with SwANGLE tests (a dEQP-VK issue will be logged shortly). Another issue was dealing with dynamic interpolant offsets, which was solved by looping over all of them and combining all plane equations into one before performing the interpolation. Bug: b/171415086 Change-Id: Id7c4c931918ba172d00da84655051445b110d3a9 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51737 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Commit-Queue: Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 10 Feb, 2021 6 commits
-
-
Nicolas Capens authored
Load and store instructions, as well as intrinsics which access memory, can now shared the same methods for accessing the memory address and data operands. Note that while this change introduces the potential for non-load/store instructions to have their operands accessed through getLoadAddress(), getStoreAddress(), or getData(), that risk isn't any greater than using the wrong getSrc() index, and would stick out as a mistake much more clearly. The advantage this change brings is that we no longer have to remember where the address and data operands are stored in sub-vector load/store intrinsics. In addition, there are no more overly verbose casts, and their cost is eliminated. Bug: b/179497998 Change-Id: I0d9208555e00b0d3053f7d3baca241fef2b8cbeb Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52531 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
Nicolas Capens authored
There were InstLoad::getSourceAddress() and InstStore::getAddr() methods, which aren't very clear and consistently named. This change replaces them with getLoadAddress() and getStoreAddress(), respectively. This will also enable moving these methods to the Inst class to make them available for SubVectorLoad and SubVectorStore intrinsics. While these methods don't make sense for other instructions, note that Inst::getSrc() already provides access to all operands and has to be used with knowledge of the operand meaning and layout. So this only provides a name to these operands, and it would stick out as a sore thumb if used incorrectly. Bug: b/179497998 Change-Id: I86b1201b8a1c611682f4f91541bdb49e17ef71a8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52530 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
It is no longer derived from InstCall, and doesn't take a Target parameter which could be a symbol to a function which implements the intrinsic. Note one can still emit actual Call instructions if a function call is needed. Since the previous change which removed the Target parameter we can no longer decide between implementing an intrinsic as inline instructions or a function call at the Subzero level, but we can still do that at the Reactor level which has its own concept of intrinsics. This change also removes mentions of intrinsics representing function calls. It also removes code related to PNaCl-specific LLVM intrinsics, including the ability to look up intrinsics by name. The addArg(), getArg(), and getNumArgs() methods, adopted from InstCall (but no longer inherited from it), are kept for now due to risk of replacing the ones for InstCall objects, while the confusion caused by keeping the function-related "arg" term is deemed low. Bug: b/179497998 Change-Id: I293f039853abff6f5bebda1b714774205bdec846 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52608 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
It is no longer used now that profiling support at the Subzero level is eliminated. This change adjusts all of the uses of getSrc() on intrinsics to obtain the correct operand, but does not yet make simplifications based on having them align with load/store instructions. Bug: b/179497998 Change-Id: I93705eaa1b7626184f612ab3a9755048004e531f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52529 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>
-
Nicolas Capens authored
We're never used this functionality, and shouldn't have a need for it. Profiling information can be collected at the Reactor level or using a profiler like VTune. This functionality was the only thing using the `Target` parameter of `InstIntrinsicCall`, which get in the way for aligning the parameters of load- and store-like intrinsics with regular `InstLoad` and `InstStore`. Bug: b/179497998 Change-Id: I5a0ad5ee8e0101f0879a97a1ea01e3efc5bebbe4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52528 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>
-
Nicolas Capens authored
The legacy OpenGL ES implementation is deprecated in favor of SwANGLE, and we haven't touched the GLES code in many months. These CI tests consume valuable time, and tend to be flaky due to exhausting the number of X handles. We still have our 'daily' test runs to provide detection of regressions, so they can be safely removed from the CI test runs. Note that this change can also be (temporarily) reverted as part of a new change which could use CI testing of dEQP-GLES. Bug: b/153322216 Change-Id: I52cd2b89c04c95de486d85118edef6460ba82925 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52532 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
- 09 Feb, 2021 4 commits
-
-
Nicolas Capens authored
Google Benchmark by default only measures time spent in the main thread. Since our Vulkan queue implementation executes command buffers on a separate thread, this can lead to very little "CPU" time being reported. Use MeasureProcessCPUTime() instead to use the total CPU usage of the process by all the threads: https://github.com/google/benchmark#cpu-timers Bug: b/177624844 Change-Id: I071cd31095a83a5afec51120fb78e42decda2083 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52628Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Commit-Queue: Nicolas Capens <nicolascapens@google.com>
-
Jason Macnak authored
... to allow rolling SwiftShader for Android. external/swiftshader/third_party/llvm-10.0/llvm/lib/Support/ ManagedStatic.cpp:21:30: error: unused variable 'ManagedStaticMutex' external/swiftshader/third_party/llvm-10.0/llvm/lib/Support/ ManagedStatic.cpp:22:24: error: unused variable 'mutex_init_flag' Bug: b/171498948 Test: build inside Android repo Change-Id: Idc3ab2ef4de759c14499454f5d841b750124686b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52648 Presubmit-Ready: Jason Macnak <natsu@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Jason Macnak <natsu@google.com> Commit-Queue: Jason Macnak <natsu@google.com>
-
Jason Macnak authored
This reverts commit 3e9b79ff. Reason for revert: Android does not allow CoW mappings to be EXEC because it assumes they are text relocations (when selinux enforcing Change-Id: I1227a2caa18bdad1a46873e4ec420a83cb21821b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52630 Presubmit-Ready: Jason Macnak <natsu@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Commit-Queue: Jason Macnak <natsu@google.com> Tested-by:
Jason Macnak <natsu@google.com>
-
Antonio Maiorano authored
On Linux-based machines, a shared library's path may be resolved in multiple ways, such as from LD_LIBRARY_PATH. For these OSes, use dlopen to see if it exists. Note that trying to create a vk::DynamicLoader with an invalid path throws an exception, and enabling exceptions is not always possible, so we want to detect the error case beforehand. Bug: b/177624844 Change-Id: I5f27cfe485afbac0e4f6bda14eed2809669c2510 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52629Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com> Presubmit-Ready: Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
-
- 08 Feb, 2021 1 commit
-
-
Antonio Maiorano authored
This change moves the VulkanBenchmark and DrawBenchmark classes to VulkanWrapper so that they can be used from other unit tests -- namely, vk-unittests. In doing so, it became clear that using these as base classes wasn't great for writing googletests, as text fixtures are classes themselves, and this resulted in messy multiple inheritance. So I modified the two classes to use callback registration instead of virtual functions. Apart from reworking existing tests (e.g. see TriangleBenchmark.cpp), I also added a new DrawTests.cpp to vk-unittests with a unit test to make sure we don't crash when leaving out "gl_Position", a bug that sugoi@ fixed in swiftshader-cl/51808. This is a good example of how easy it can be to write such unit tests now. List of changes: * Moved VulkanBenchmark and DrawBenchmark to VulkanWrapper, and renamed VulkanTester and DrawTester respectively. * ClearImageBenchmark refactored to aggregate a VulkanTester. This is an example where using a class is fine as we can still use the testers via aggregation. * TriangleBenchmark tests refactored to use DrawTester and register callbacks. * Moved compute tests to a ComputeTests.cpp. * Moved the other tests to BasicTests.cpp. * Added DrawTests.cpp with new DrawTests.VertexShaderNoPositionOutput test. * CMake: add VulkanWrapper target for unittests as well as benchmarks. * CMake: change FOLDER to better organize the tests and benchmarks for VS. Bug: b/176981107 Change-Id: Ib1a0b85b3df787d2e39da08930414f9a14954a73 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52348 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
-
- 05 Feb, 2021 4 commits
-
-
Antonio Maiorano authored
Use the constexpr constructor for _MSC_VER >= 1925, otherwise ManagedStatic will have a dynamic initializer, which depending on init order, results in the Ptr field being overwritten with 0. This eventually leads to multiple instances of the same ManagedStatic instance in the StaticList, and asserts when double destroying during llvm_shutdown. I reported this bug [here](https://bugs.llvm.org/show_bug.cgi?id=49027), and learned that this bug had already been fixed in upstream LLVM. Note that llvm_subzero already has a similar change, though for _MSC_VER >= 1920. According to the LLVM comment, the VC++ compiler up until 1925 may still emit a dynamic initializer for a constexpr constructor, but I suppose we never ran into that for Subzero, so I'll leave this as is. Bug: b/175782868 Change-Id: Ice3944f67e496aa94f1a7ed7502b49e763d702b4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52508 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
-
Nicolas Capens authored
The LLVM JIT fails loudly when attempting to parse this command line option when targeting non-x86 CPUs. Bug: b/157555596 Change-Id: Ic5ddccbdbc86c2f03ded5f4004369ece0100c031 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52488 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
Nicolas Capens authored
Fuzzing tests generate shaders with large arrays or very high numbers of local variables, which can cause stack overflow. We need to limit the allowable stack memory usage of generated routines. Note this change does not yet gracefully deal with routines which exceed this limit. They will cause a null pointer dereference instead of a stack overflow. The default stack size limit of 1 MiB at the Subzero level is to ensure we catch cases of excessive stack sizes even in the case no explicit limit was set. At the Reactor level we reduce it to 512 KiB to prevent actual stack overflow for a 1 MiB stack, assuming some earlier calls might want to use the stack. Also, our legacy 'ASM' compiler for GLSL allocates 4096 'registers' of 4 components for 128-bit SIMD, which already requires 256 KiB. Bug: b/157555596 Change-Id: I474285eecc786496edffbaef29719ca0cdf03f7d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52329 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Commit-Queue: Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Fuzzing tests generate shaders with large arrays or very high numbers of local variables, which can cause stack overflow. We need to limit the allowable stack memory usage of generated routines. Note this change does not yet gracefully deal with routines which exceed this limit. They will cause a null pointer dereference instead of a stack overflow. The 512 KiB stack size limit is chosen to prevent actual stack overflow for a 1 MiB stack, assuming some earlier calls might want to use the stack. Also, our legacy 'ASM' compiler for GLSL allocates 4096 'registers' of 4 components for 128-bit SIMD, which already requires 256 KiB. Bug: b/157555596 Change-Id: I25c57420f6d2af323ce98faf515feca0aa834a4a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51548 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Commit-Queue: Nicolas Capens <nicolascapens@google.com>
-
- 03 Feb, 2021 1 commit
-
-
Yilong Li authored
This fixes the following issues when cross compiling SwiftShader for arm64 macOS using CMake: - Sets architecture based on CMAKE_OSX_ARCHITECTURES settings. - Add missing dependency to LLVM. - Add a workaround for assembly file compilation on macOS in marl. Bug: fix build Test: cmake .. -DCMAKE_OSX_ARCHITECTURES=arm64 Change-Id: I8abba9e39907d8f4d59f51c57f09cd55d4edc148 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51890 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Yilong Li <liyl@google.com> Commit-Queue: Yilong Li <liyl@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 01 Feb, 2021 3 commits
-
-
Nicolas Capens authored
These SPIR-V execution modes can be used to optimize early depth test, but are currently ignored, which is fine from a correctness point of view. We need to handle these execution modes because they can appear in any shader, without the implementation having to support using them for optimizations. Also, we can keep the SpirvShader::Modes fields that correspond to them for debugging purposes (e.g. an application might incorrectly rely on early depth test optimization to happen). Bug: b/177915067 Change-Id: I851fdfbcdde5be6287bc4ee689fdbd6549e2900f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51908 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Googler authored
VectorType::getNumElements() will be removed in LLVM 12. Only FixedVectorType will support this method. Cast to the latter where appropriate. Since LLVM 10 does not support FixedVectorType, treat it as an alias for the legacy VectorType implementation. Bug: b/354893276 Change-Id: Ie8160478819ff1c1bcd7fbe4425d2264869770e9 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52308Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
-
Nicolas Capens authored
Clang produces: "error: code will never be executed [-Werror,-Wunreachable-code]" For code following an unconditional `break`. But it hints that: "note: silence by adding parentheses to mark code as explicitly dead" Hence the dead code can follow an "if((true)) break;" without producing the warning/error. Note that in this instance we could have just removed the dead code, but I wanted to make it clear that this is an example of an unfinished Reactor function. Bug: b/178929463 Change-Id: I1ea4dac91877fcede189d09e3953568b2813129e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52288Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
- 31 Jan, 2021 1 commit
-
-
Yilong Li authored
Currently, VkImages with VK_IMAGE_TILING_OPTIMAL tiling actually also have a linear texel layout in our current implementation, thus it can be sampled or used as blit source. And we would like to add support to sampling features for linear images when calling vkGetPhysicalDeviceImageFormatProperties() to query image format properties. Exceptions include images with compressed formats and images created to be used as cube maps. This will unblock SwiftShader users like AEMU/FEMU from sampling host-visible memory shared between guest processes. Bug: b/171299814 Bug: fuchsia:54153 Bug: fuchsia:68365 Test: dEQP-VK.* Change-Id: Id9019fc9d9239fc85d0d2b086d4efd468844d254 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49108 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Commit-Queue: Yilong Li <liyl@google.com> Tested-by:
Yilong Li <liyl@google.com>
-
- 30 Jan, 2021 2 commits
-
-
Nicolas Capens authored
Previously each constant would cause new memory to be allocated. This change makes us search through the existing constants to check if a suitable one already exists. Bug: b/178661423 Change-Id: I1315c80f019ff51e96245238100aa672d5e74930 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52229 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Commit-Queue: Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
This enables generating multiple functions within the same scope, as excercised by the Trampoline unit test. Also adds a unit test for functions which are never finalized (useful for when a code path is not supported and we want to fall back to a C++ implementation). Also adds a unit test for the common pattern of deriving from Function<> and using Reactor variables as members. Bug: b/177999324 Change-Id: I269946e9c8a791eab84ff756c9c588ca8ce26337 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51988Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
- 29 Jan, 2021 2 commits
-
-
Antonio Maiorano authored
LLVM has a known leak, which is addressed by this patch: https://reviews.llvm.org/. With this patch, and making sure that llvm::shutdown() is called, AppVerifier on Windows, and LSAN on Linux, report no more load/unload leaks. Bug: b/175782868 Bug: chromium:972686 Bug: angleproject:5377 Change-Id: If34a00c3a4b845604445f22bdb5889f51bb5a1d6 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52168 Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Nicolas Capens authored
Naming 'anonymous' mmap memory, which we use for Reactor's executable memory, enables profilers to attribute JIT-compiled routine execution to SwiftShader. Also suppress a GCC warning about not using the result of ftruncate(). Bug: b/174801963 Bug: b/178614275 Change-Id: Iac4938f332f0e75a9b1d995c83f0cbaaf3532651 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52228Tested-by:
Nicolas Capens <nicolascapens@google.com> Commit-Queue: Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
-
- 28 Jan, 2021 5 commits
-
-
Nicolas Capens authored
Naming 'anonymous' mmap memory, which we use for Reactor's executable memory, enables profilers to attribute JIT-compiled routine execution to SwiftShader. Also rename `swiftshader_reactor_private_config` to `swiftshader_llvm_reactor_private_config` to clarify that it is only used for building Reactor with the LLVM backend. Bug: b/174801963 Change-Id: I4a6cb471b00f8403978870fd0be4608ee2798e54 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52208 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>
-
Nicolas Capens authored
This change restricts the effect of REACTOR_ANONYMOUS_MMAP_NAME to platforms which define the __linux__ macro, since this feature makes use of mmap(), syscall(), and posix_memalign(). Note Android is considered Linux. Bug: b/174801963 Change-Id: Id194aca837b2c9c23f5c7419c926bc2872b77d1b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52209 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>
-
Alexis Hetu authored
This cl adds a new utility function to count the number of components used by an input. Bug: b/171415086 Change-Id: I348959ccd8945d2f336384cf7d905d3140231e4e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51736 Commit-Queue: Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
The sampleRateShading feature adds new builtins variables which have to be supported: BuiltInSampleId and BuiltInSamplePosition. This cl sets the values for these builtins properly and turns on per sample rendering where either of these is persent in the shader. Bug: b/171415086 Change-Id: I959e80722493d12213be349019a0cc3a108a7596 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51735Tested-by:
Alexis Hétu <sugoi@google.com> Commit-Queue: Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
When the shader contains interpolation instruction, interpolation related data needs to be stored in the routine in order to be able to perform the interpolation operations in the middle of running the spirv shader. Bug: b/171415086 Change-Id: I08fc6befdca1df92fa50326d9047926ac3417aa5 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51734Tested-by:
Alexis Hétu <sugoi@google.com> Commit-Queue: Alexis Hétu <sugoi@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-