History log of /frameworks/rs/rsov/compiler/RSSPIRVWriter.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
28faded3432d20cc2e9b9e58b4706031bd6ea9c9 22-Feb-2017 Yang Ni <yangni@google.com> Added support for global variables

Bug: 30964317

Pass necessary metadata about global variables--i.e., offsets of each
global variable in the synthesized global buffer--from the compiler to
the driver. This metadata is encoded as an OpString in the generated
SPIR-V code. The driver also creates the global buffer to store all
global variables.

Added support for sharing globals between invokes and kernels. rs2spirv
also does global variable access to global buffer field access
transformation for the CPU code, so that CPU and GPU access the same
global buffer resident in shared memory assuming the same data layout.

Added in the compiler support to handle global variable intializers,
and contantant expressions.

Removed capability Address, since Vulkan validation rules disallow it.
Converted OpInBoundsPtrAccessChain into OpInBoundsAccessChain, since the
former requires capability Address. OpInBoundsPtrAccessChain
instructions get generated for accesses to global variables, which are
now fields in the global buffer.

Added an RSoV test for global variables. Adjusted lit tests to check
the new OpString.

This CL is limited to non-allocation global variables, as global
rs_allocations are handled in separate CLs.

This CL does not handle constant globals either, which will be dealt
with in followup CLs.

Test: lit tests and RSoVTest

Change-Id: Ia8f44c4ffa22046a72a58a26942ced595b3f5f53
/frameworks/rs/rsov/compiler/RSSPIRVWriter.h
56813de7a00f872fad490b1b3fe5ab1b620c1be5 28-Mar-2017 I-Jui (Ray) Sung <ijsung@google.com> Fix RSoV compiler regression

c/299496/ revised the protocol between bcc and bcinfo; bcc now injects
some metadata into the module which is in turn parsed by the
bcinfo::MetadataExtractor(Module *) constructor. Since RSoV uses bcinfo
on non-bcc-processed bitcodes, those missing data caused the constructor
to fail.

This CL uses a different MetadataExtractor constructor so that all the
required information are passed to the MetadataExtractor via full bitcode.

Bug: 30964317
Bug: 36657118
Test: RSoV LIT test, RSoVTest on Angler
Change-Id: I9b423ad8d0bcab5d261e595c10d4676486ec4b3b
/frameworks/rs/rsov/compiler/RSSPIRVWriter.h
7974fc03e11f3a8dd40f794f3b33b4889483090c 09-Feb-2017 Rahul Chaudhry <rahulchaudhry@google.com> frameworks/rs: fix typos and clang-tidy warnings

This change fixes a few typos and clang tidy warnings related to the
"llvm-namespace-comment" checks.

Bug: 26936282
Test: WITH_TIDY=1 WITH_TIDY_CHECKS="llvm-namespace-comment" mm
Change-Id: Ic65182e5b4999fbd48d6a8ad7172e4bfeeb541f4
/frameworks/rs/rsov/compiler/RSSPIRVWriter.h
669e475f679d20502ff90923ad0ff2aae2558f12 30-Jan-2017 Yang Ni <yangni@google.com> Cleanup of "Linking" related code

Bug: 30964317

Moved all "linking" related code into the LinkerModule.cpp and .h.
RSSPRIVWriter.cpp does not contain any linking related code any
more.

Also moved the call to linker out of the convertLLVMToSPIRV()
function, since it has nothing to do with LLVM to SPIRV conversion.
Put it into the main() function of the rs2spirv tool.

Moved OpInBoudsPtrAccessChaing translation out of FixMain(), and
rename FixMain() to InlineKernelToWrapper().

This CL does not add or remove any functionality, but simply does
a cleanup that moves code around.

Test: lit tests and RSoVTest on angler

Change-Id: I52ade393c77460748e2b2808c52d849456d3f0ed
/frameworks/rs/rsov/compiler/RSSPIRVWriter.h
6749f541c20e86f5deb6fd421ed5849ef43c275c 08-Nov-2016 Yang Ni <yangni@google.com> Initial backend compiler for RSoV

Bug: 30964317

This compiler compiles RenderScript LLVM bitcode into SPIR-V.

This was done by Jakub Kuderski as part of his 2016 summer internship
at Google.

Test: build

Change-Id: I395cdab2b97451b9e0a9b866af2d112ead73ab72
/frameworks/rs/rsov/compiler/RSSPIRVWriter.h