History log of /frameworks/rs/rsov/compiler/GlobalAllocPass.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/compiler/GlobalAllocPass.cpp
7f8c490e872221221cbfe213c99d1104c483c3a4 01-Mar-2017 I-Jui (Ray) Sung <ijsung@google.com> Handle global allocations for 64-bit targets

On 64-bit targets global allocations are not promoted to registers and take
memcpys instead when accessed, so the analysis in global allocation LLVM
pass is extended to handle that case. A new LIT testcase is added.

This CL also removed global allocation declarations from LLVM IR to
prevent them from showing in the result SPIR-V code, which otherwise
may crash certain Vulkan drivers.

Bug: 30964317
Test: RSoVTest, RSoV lit tests
Change-Id: Id8531781599130c152816d7eb551999458c075e2
/frameworks/rs/rsov/compiler/GlobalAllocPass.cpp
c7b3a43821ccf0f2b13840246e1895744799cf6b 01-Mar-2017 Yang Ni <yangni@google.com> Clean up rs2spirv code

Bug: 30964317

Moved tests/globals/getdimx.ll and rewrite_getdim.ll into tests/rs_allocation.

Removed unneeded #include's, and adjusted #include order.

Removed print-as-words command-line option.

Removed some dead code.

Test: lit tests and RSoVTest

Change-Id: I263987597b8c1ec7aa5593157580aa3ad65861a1
/frameworks/rs/rsov/compiler/GlobalAllocPass.cpp
9d73d08c545462e706ef6951952acff94c37605a 23-Feb-2017 I-Jui (Ray) Sung <ijsung@google.com> LLVM and SPIRIT transformations for global allocations

This is the initial compiler-side transformations for global allocation
support.

Added an LLVM pass to lower rsAllocationDimX calls for later SPIRIT
passes. References to alllocations in those calls are lowered into some
unique ID representing allocations of a module.

Also added a SPIRIT pass to transform lowered accessor
(rsAllocationGetDimX) in previous pass to SPIR-V load instructions from
the metadata buffer.

Generate global allocation metadata, necessary SPIR-V decorations and
declarations in the wrapper generation stage for the generated load
instrutions.

Bug: 30964317
Test: RSoV lit tests, SPIRIT unit tests
Change-Id: I00846c255bd76e77c89a16de0e553acc5f73bbfe
/frameworks/rs/rsov/compiler/GlobalAllocPass.cpp