Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-swiftshader: List of commits

external/swiftshader


RSS
Rev. Time Author
81e08df q-x86 2020-04-15 12:13:18 Alexis Hetu

Fix fragments depth values not being clamped

According to the Vulkan 1.2 spec:
"For fixed-point depth buffers, fragment depth values are
always limited to the range [0,1] by clamping after depth
bias addition is performed. Fragment depth values are
clamped even when the depth buffer uses a floating-point
representation."

So, unless the VK_EXT_depth_range_unrestricted extension
is enabled, clamping should always occur.

Bug: b/152634772
Change-Id: I2aee2aeb91efed7399580689fc0ffc0634b2f487
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43869
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>

9418b51 2020-04-15 04:46:53 Antonio Maiorano

CMake: split out Vulkan sources into separate CMakeLists

Add CMakeLists.txt to the following folders under src that create the
following targets:

Device -> vk_device
Pipeline -> vk_pipeline
WSI -> vk_wsi
System -> vk_system
Vulkan -> vk_swiftshader

Dependencies (by folder):

System --> n/a
Pipeline --> System Device* Vulkan*
WSI --> System Pipeline Vulkan*
Device --> System Pipeline Vulkan*
Vulkan --> Device Pipeline WSI System

* = dependency by include directory only (should fix this in the future)

Also make system-unittests and system-benchmarks depend on vk_system
rather than build part of System source files.

Bug: b/145758253
Change-Id: I9cce59ca90d91601696f6195326b5fd7dde517d5
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43690
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>

efca565 2020-04-15 02:42:20 Ben Clayton

Device: Rename RoutineCacheT to RoutineCache

`RoutineCache` was not used, remove it.
Rename `RoutineCacheT` to the now unused name `RoutineCache`.

Bug: b/126126820
Change-Id: I656c1727446754b2063033806634678b14485b6f
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43816
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>

bc2af94 2020-04-15 02:41:45 Ben Clayton

Device: Don't inherit [Vertex,Setup,Pixel]Processor.

Prefer composition over inheritance.
Makes it clear that the virtual destructors on these processors are unnecessary.

Bug: b/126126820
Change-Id: I062c06191ec1cdfb81f2a2773a976bf5c596e658
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43817
Tested-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>

e52e2db 2020-04-14 21:38:49 David 'Digit' Turner

[vulkan] Implement VK_FUCHSIA_external_memory extension.

This implements external memory using a Zircon VMO handle
that can be transferred between Fuchsia processes easily.

Bug: b/140419396
Change-Id: I81cecec35b218eb22f3318ddec7b790b89e5ce09
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/36168
Tested-by: David Turner <digit@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>

20220a0 2020-04-14 18:43:47 Nicolas Capens

Reuse Store logic for Modf and Frexp output parameters

The Modf and Frexp instructions from the GLSL.std.450 extended SPIR-V
instruction set take a pointer argument to write one of their results
to. This makes them the only arithmetic instructions which need to know
how to explicitly access memory.

This change replaces the partial duplication of store logic with a call
to the underlying implementation of OpStore. To support storing
intermediate values not associated with SPIR-V objects, the Operand
class can now also wrap an independent Intermediate instance.

Bug: b/153641251
Change-Id: Iebab43640b45ed6c27a77576168481d1a27158b6
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43728
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>

0b77aa5 2020-04-14 18:43:47 Nicolas Capens

Separate Operand store logic from EmitStore()

The new Store() helper function can store Operand instances independent
from SPIR-V instructions. This allows reuse of this logic for other
instructions that need to store to memory, like Modf and Frexp.

Bug: b/153641251
Change-Id: I453bb7cd24ba26b9a23d73568dc3374a52a36073
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43695
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>

2f4b603 2020-04-14 18:43:47 Nicolas Capens

Only store component count in Operand

The Operand class is a low-level abstraction of rvalues and constants.
It should not carry the SPIR-V type ID. We only need the size in
components.

Bug: b/129000021
Change-Id: I6cb3ed6341b1ccf5ef759075d7410ba447617c8b
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43693
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>

ff9f9b5 2020-04-14 18:43:47 Nicolas Capens

Rename size/sizeInComponents to componentCount

Bug: b/129000021
Change-Id: I36401de649eb53474ca74acb069351ce37f7529f
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43828
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>

7118675 2020-04-14 10:16:06 Nicolas Capens

Use the type and result ID helpers

Avoid directly accessing SPIR-V instruction words. The helper methods
provide self-explanatory semantics so we can eliminate local variables
to store these IDs.

Bug: b/129000021
Change-Id: Ie42782d53b9c24014b6a1b1f51b82085b6c2ebef
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43694
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>

72f089c 2020-04-14 10:16:06 Nicolas Capens

Obtain type ID from instruction

The defining instruction already contains the type ID.

Bug: b/129000021
Change-Id: I0b29fda73964f5f4a73181a61a0f30cd1c47f404
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43692
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>

78cc4f4 2020-04-14 10:16:06 Nicolas Capens

Add helper methods for obtaining type and result ID

For instructions which define objects, the type ID and result ID are
always the second and third SPIR-V instruction word, respectively.

Bug: b/129000021
Change-Id: I6879251732860b80e1f7780d9078ad7bc9751b4c
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43691
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>

9d2fd9c 2020-04-12 01:07:02 Ben Clayton

LLVMReactor: Replace deprecated CreateCall overload

This has been removed in LLVM master.

Bug: b/152339534
Change-Id: I613bae6c31944457bd52278228e33af6f85cce97
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43810
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>

d371793 2020-04-11 03:39:25 David 'Digit' Turner

[cmake] Add support for CMAKE_SYSTEM_NAME == "Fuchsia"

This patch modifies the CMakeLists.txt file and a few sources
in order to build the SwiftShader Vulkan ICD for Fuchsia with
CMake.

Note that building EGL/GLES_CM/GLESv2 and tests is not supported,
and should be explicitly disabled when configuring the build,
e.g.:

mkdir build-fuchsia && build-fuchsia
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=.../FuchsiaSdkToolchain.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DSWIFTSHADER_BUILD_TESTS=0 \
-DSWIFTSHADER_BUILD_EGL=0 \
-DSWIFTSHADER_BUILD_GLES_CM=0 \
-DSWIFTSHADER_BUILD_GLESv2=0 \
<other-cmake-options>

make # or ninja

NOTE: This should not affect the build for other platforms!

This will make it easier to conditionally add Fuchsia-specific
sources to the build (see discussion on b/144687651 for details).

The BUILD.gn file will still be maintained in parallel for
Fuchsia-specific changes.

NOTE: As of now, the Fuchsia SDK doesn't provide a way for
third-party code to access the framebuffer directly.

Instead, client code should rely on Vulkan presentation
surfaces or higher-level APIs provided by the compositor
that are still in flux / unstable. Hence this will appear
in a future CL.

Bug: b/143122483
Bug: b/144687651
Change-Id: Ica3b98f5a8eb1370287e2bb4ff22ef938aaa4b49
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38488
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: David Turner <digit@google.com>

e6f65d9 2020-04-10 02:52:05 Nicolas Capens

Rename GenericValue to Operand

Bug: b/129000021
Change-Id: I0000fc5e65bde87e9037400002db37cb6d50960d
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43688
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>

491555c 2020-04-10 00:38:29 Ben Clayton

CMake: Fix linux build with SWIFTSHADER_BUILD_PVR

The targets `libGLESv2` and `libEGL` are no longer public to the root cmake list.
Just move these copy ops into the subdirectory cmake rules without the PVR condition - the copy is cheap enough to do whether we're building PVR or not.

Bug: b/145758253
Change-Id: Ic28331e3797c78e4910332fce934c06c132c3aa8
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43710
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Ben Clayton <bclayton@google.com>

6480643 2020-04-09 23:38:47 Ben Clayton

Vulkan/Debug: Fix clang-10 warning

It correctly points out that despite `Type() = default;`, there's non-assigned const fields, so there's no way to generate a default constructor.

Bug: b/145351270
Change-Id: I1c680982d960df278b5fcca5b29e837a4c82b70d
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43709
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Ben Clayton <bclayton@google.com>

cf8b658 2020-04-09 23:38:47 Ben Clayton

third_party/cppdap: Roll forward to 4dcca577

Changes:
de7dffa Socket: Use SO_REUSEADDR, disable SO_LINGER
9a9d46f Fix bad usage of std::move
3e6cfd6 CMake: Make the cppdap target's include directory public
4abe43c optional: Remove the value() method that returns non-const-ref.
ced82a0 examples: Change stdin and stdout to binary mode
96b25aa src/io.cpp: Fix uninitialized variable.
93b8610 examples: Suffix package exe with .exe on Windows
cdc19ac Serialization: Correctly encode structs with no fields
3a10d4c Format all source files
8633aba Add clang-format-all.sh to format all project sources
1be9bb6 launch.json - fix name of unittests to launch
d19d8f8 Address #7 nits and fix compiler warning (#9)
73d697e Fix Response type info, make response 'body' field optional
eab43f3 net::Server: Fix onError parameter default.

Bug: b/145351270
Change-Id: I6a7767f8b763e8029571d65aa5446f5043ad83ac
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43708
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Ben Clayton <bclayton@google.com>

5c883d3 2020-04-09 20:36:12 Corentin Wallez

Clamp _SNORM formats to -1.0

Following the Vulkan 1.1 specification Section 2.9.1. "Conversion from
Normalized Fixed-Point to Floating-Point":

Note that while zero is exactly expressible in this representation, one
value (-128 in the example) is outside the representable range, and must be
clamped before use.

https://www.khronos.org/registry/vulkan/specs/1.1/html/vkspec.html#fundamentals-fixedfpconv

Bug: dawn:283
Change-Id: Id548c6d67132ac36f33bc020954c5511de624ffc
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43648
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Corentin Wallez <cwallez@google.com>

3cfa8e2 2020-04-09 11:06:08 Alexis Hetu

Remove debug only code limiting the number of primitives

A test in dEQP was failing using SwANGLE in debug.
The test was using a 1200x1200 grid
-> 1,44M squares
-> 2,88M triangles

This was exceeding our hardcoded limit of 1 << 21 (2,097,152).

Removing this code makes the test pass.

Bug: b/152958809
Change-Id: I43fc3c0c9d78378911ab0238a908367ba310c09e
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43668
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>

1cba0a9 2020-04-08 23:44:31 Ben Clayton

Regres: Post coverage results even if the test lists have not changed.

Do this by breaking up the monolithic `runDaily()` function, and combining errors from the new `postDailyResults()` and `postCoverageResults()` functions.

Bug: b/152192800
Change-Id: I031b37fa32d6d05ae1c38dff27a180c809aa4fe1
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43649
Tested-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>

a71aff2 2020-04-08 22:29:16 Antonio Maiorano

CMake: split out all src/OpenGL targets into their own CMakeLists

Added CMakeLists.txt to the following folders that produce the
following targets:

src/OpenGL/common -> libGLESCommon (new)
src/OpenGL/compiler -> GLCompiler
src/OpenGL/libEGL -> libEGL
src/OpenGL/libGLESv2 ->libGLESv2
src/OpenGL/libGLES_CM -> libGLES_CM

Change-Id: I8217918b13b6963d18d1e6f89b4fa9e806bb36db
Bug: b/145758253
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43588
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>

4ce6a88 2020-04-08 22:29:16 Antonio Maiorano

CMake: split out SwiftShader GL deps into separate files

This change add a CMakeLists in each of the following folders, and
creates the following targets:

src/Common -> gl_common
src/Main -> gl_main
src/Renderer -> gl_renderer
src/Shader -> gl_shader

Bug: b/145758253
Change-Id: Ia1f68d0689f80955586235e125e0197da25d692d
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43550
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>

24b5d1a 2020-04-08 22:29:16 Antonio Maiorano

CMake: clean up dependencies

This change makes it so that source/Common and source/Main are only
referenced by the SwiftShader target. This will allow for better
target-based sub CMakeLists.

* Remove SharedLibrary.hpp/cpp from source list of libGLESv2 and
libGLES_CM, as both of these depend on SwiftShader, which already
builds these files.

* Make libEGL depend on SwiftShader, so we can remove
SharedLibrary.hpp/cpp and Main/libX11.hpp/cpp from its
source list.

Bug: b/145758253
Change-Id: If3d8e12cd09fb40d699080c2eeaa8243abe50512
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43528
Tested-by: Antonio Maiorano <amaiorano@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>

dacbf0d 2020-04-08 22:18:16 Ben Clayton

Add SystemBenchmarks.

This benchmarks `sw::LRUCache`, which currently resides in the `src/Device` folder (but will be moved to `src/System`) with 43489.

Bug: b/153338950
Change-Id: I169b6ecb4a35349726a01b1da52472eaef3dfd74
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43492
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>

c155e3b 2020-04-08 22:03:51 Ben Clayton

VkCommandBuffer: Remove static Cast() method

This isn't used.

There's another Cast() declared at vk scope, below VkCommandBuffer that actually is used.

Bug: b/153462569
Change-Id: Id348676c9bb00aa934a972a2833ac6a1d3af54c1
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43575
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Ben Clayton <bclayton@google.com>

63ed0e4 2020-04-08 15:59:50 Ben Clayton

Remove src/Device/Config.cpp

Holds sw::Profiler that is entirely dead code.
There's little here that looks worthy of keeping. Let's remove it.

Bug: b/153462569
Change-Id: I4330781e8ba362461f164f0a52f764d4fe8f4dc4
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43574
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Ben Clayton <bclayton@google.com>

682232b 2020-04-08 15:59:50 Ben Clayton

Kokoro: Check that build files don't reference non-existent files

This is a primitive check to ensure that .bp, .gn and .bazel files don't have source references to missing files.

This can catch a common build breakage.

Fixes: b/153439736
Change-Id: I95621f8775a0e536015d4da9897785935f130884
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43572
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>

ba0c95e 2020-04-08 06:06:47 Ben Clayton

Regres: Fix uncovered calculations after optimizations

The uncovered span calculations were ignoring span groups and inverted spans.
This is now correctly handled by Tree.allSpans().

Bug: b/152192800
Change-Id: I2bd8afa3c956b03b598a3d5297cb775fd19da35d
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43573
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Ben Clayton <bclayton@google.com>

dc23b08 2020-04-08 00:25:43 Ben Clayton

Regres: Optimize coverage processing

This had regressed mostly due to a single thread processing a huge number of `Span.Add()`s.

Optimize for the common case, avoid `Span.Add()` in places where the data is already sorted, don't scan the entire file system for every test run.

Bug: b/152192800
Change-Id: Id183468263e65bfbcf387ec1c978d8b9de547cee
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43570
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Ben Clayton <bclayton@google.com>

Show on old repository browser