c2f647a6c790cb1f4c86e50506c53cd912e725f6 |
|
04-Mar-2017 |
I-Jui (Ray) Sung <ijsung@google.com> |
Compiler and runtime support for global allocation metadata On the compiler side, enumerate used global allocations, assign each used global allocation a unique ID, and record the mapping in an OpString in the result SPIR-V code. The ID is the index of the metadata for the global allocation. On the runtime side, added a new RSoVBuffer for metadata, and with code marshaling them for the kernel according to the mapping reported by the compiler. SPIRIT is linked against the driver for extracting metadata out of the SPIR-V module. Added a new testcase for global allocation metadata in RSoVTest. Bug: 30964317 Test: RSoVTest on Angler, RSoV LIT Tests Change-Id: I66b3cfa8b66ee2b60b984320900dbe2dc3d15f21
/frameworks/rs/rsov/driver/rsovScript.cpp
|
700e68883c4324c15b380ff6724249f39d4f498c |
|
06-Mar-2017 |
I-Jui (Ray) Sung <ijsung@google.com> |
Rename unused fields of RS base object handle in 64-bits Fields other than the first one (p) in RS_BASE_OBJECT are set in some part of existing RS runtime, but is not used at all. However, removing them is not desirable as size of RS_BASE_OBJECT is really part of the ABI and thus if we change it, we are creating a new ABI variant here, which is not always desirable. For example, consider a library that contains compiled scripts and assuming we pass allocation handles between the library and other user codes, changes to handle size only in user code would break the compatibility on things like array of rs_allocations. Thus, to keep ABI compatibility the unused fields r, v1, v2 are renamed. Also they are now assigned zero consistently. These field however are not copied consistently in the current runtime, and are not expected so anyways. Bug: 35043722 Test: mm, CTS and RSTest on Angler Change-Id: I426fad8e07bf445b6d8625bd23c689acaee26322
/frameworks/rs/rsov/driver/rsovScript.cpp
|
a456a6e0672896ef7b8d312d8013208ae4086ab2 |
|
21-Feb-2017 |
I-Jui (Ray) Sung <ijsung@google.com> |
Move Vulkan buffer details out of RSoVAllocation Bug: 30964317 Small refactoring of RSoVAllocation class. The Vulkan-specific implementation of buffers now goes to RSoVBuffer. Test: RSoVTest on Angler Change-Id: I7457de1e1c9424435a73cb8c9dbb837180f7fc42
/frameworks/rs/rsov/driver/rsovScript.cpp
|
bf22a8ab4f46a98ee37f95fc0402744132cc3ed2 |
|
07-Feb-2017 |
Yang Ni <yangni@google.com> |
Rewrite rs2spirv using spirit Bug: 30964317 Rewrote the wrapper generation and builtin/runtime function translation passes in rs2spirv using spirit. Also added support for about a dozen more floating-point builtin math functions. Added support for new-style root kernel with lit test. Added check for old-style kernels with lit test. Updated existing lit tests since generated code are slightly different, mostly on temp names. Added SPIR-V validation to all lit tests. Updated the RSoV driver to work with the new spirit-based compiler. The entry point is now named entry_<kernel name>. Fixed an issue with multi-input kernel, so that the type count is correctly set. Minor cleanup to destroy descriptor sets after a kernel launch and to remove an outdated comment. Test: lit tests and RSoVTest Change-Id: I07b5957667892e532dcbc2da98ed38fe783af5e9
/frameworks/rs/rsov/driver/rsovScript.cpp
|
a075ad49dd56f25efebb5402bcc263766421b0c8 |
|
13-Jan-2017 |
I-Jui (Ray) Sung <ijsung@google.com> |
Runtime support for mapping kernels with multiple input allocations Updated RSoV runtime to set Vulkan GLSL bindings for kernels with more than one input allocations at kernel launch time. Added a RSoVTest test case based on foreach_multi of RSTest. Test: RSoVTest and RSoV LIT tests Bug: 30964317 Change-Id: Id3edfda0ef4344d85c4b59aa6df184882597b659
/frameworks/rs/rsov/driver/rsovScript.cpp
|
30dfb1368d0a3440cfedc882c27cc236d799f77c |
|
06-Jan-2017 |
Yang Ni <yangni@google.com> |
Fallback to CPU execution if RSoV compilation fails Bug: 30964317 With a few additional changes: * Cleaned up the RSoV script initialization code to get rid of memory leaks; * Updated the RSoVAllocation destructor to destroy the buffer but not the uninitialized image. * Updated allocation initialization code to correctly calculate allocation size when rows are not aligned to the default minimum alignment (16 bytes). * Added a utility function to check if a script is completely backed by CPU, and updated the CPU context lookup callback function to use this utility to correctly return a CPU driver-specific script for a HAL script. Test: RSoVTest and RsTest Change-Id: If85b8f01bde3190a9397aaedce8b9808d09716e6
/frameworks/rs/rsov/driver/rsovScript.cpp
|
d051d08a0100fe0a801ce2496b72cf6d97a76903 |
|
10-Jan-2017 |
I-Jui (Ray) Sung <ijsung@google.com> |
Multiple argument support for the RSoV compiler Generated SPIR-V wrapper now contains localized decorations and buffer declarations for kernel arguments. Also updated kernel wrapper generation so that now the boilerplate code loads all input buffers as well. Renumbered GLSL binding for allocations in the runtime accordingly. Added a LIT test. Test: RSoV lit tests, RSoVTest Change-Id: I8f59245f832fcbda0651ed230cda9df7b664ca35
/frameworks/rs/rsov/driver/rsovScript.cpp
|
f15ce3de10aa8edf30d9c2dca60237a3d24eddcc |
|
06-Dec-2016 |
Yang Ni <yangni@google.com> |
Allocation implementation using buffers Bug: 30964317 Test: lit tests and RSoVTest Change-Id: Ib7be067638c781c989a2723072c4eae865bfe515
/frameworks/rs/rsov/driver/rsovScript.cpp
|
ffa85366645c163dd529644ba5b8950c4c588d20 |
|
13-Dec-2016 |
I-Jui (Ray) Sung <ijsung@google.com> |
Initial multi-kernel support This change adds multi-kernel support, with localized kernel function types, argument types and OpEntryPoints. Also emit type and metadata for each kernel. OpEntryPoints now have the string literals of RS kernel names. Some SPIR-V names are still shared, notably the global_invocation_id. This doesn't seem to affect correctness per our current tests. On the device side, the RSoV driver has been updated to use actual kernel names instead of hardcoded "main". Also added testcases in both LIT and RSoVTest. Test: RSoV LIT Tests, RSoVTest on angler Change-Id: I09936e69d9f19d21c5727430cb19414b508496bd
/frameworks/rs/rsov/driver/rsovScript.cpp
|
75f0d3110b04346b901771f96ce15cdbe907278f |
|
11-Nov-2016 |
Yang Ni <yangni@google.com> |
Initial driver for RSoV (RenderScript over Vulkan/SPIR-V) Bug: 30964317 Supports the following: * Allocations of 32-bit integers and floating point numbers and vectors * Single-input single-output kernels * Co-existence of RSoV scripts and CPU intrinsics Added default .clang-format for driver code using Google C++ code style. The RSoV driver is loaded, if and only if the property debug.rs.rsov is set to non-zero. Test: RSTest and CTS with debug.rs.rsov set to 0; and RSoVTest with debug.rs.rsov set to 1. Change-Id: If63370a502d499e8fc5f4bbd2e90ce84b167c331
/frameworks/rs/rsov/driver/rsovScript.cpp
|