This is an archive of the discontinued LLVM Phabricator instance.

[RenderScript] New commands to save/load RS allocations to file.
ClosedPublic

Authored by EwanCrawford on Oct 20 2015, 9:51 AM.

Details

Summary

Patch adds command 'language renderscript allocation save' to store the contents of an allocation in a binary file.
And 'language renderscript allocation load' to restore an allocation with the saved data from a binary file.

Binary file format contains a header FileHeader with meta information preceding the raw data.

Diff Detail

Repository
rL LLVM

Event Timeline

EwanCrawford retitled this revision from to [RenderScript] New commands to save/load RS allocations to file. .
EwanCrawford updated this object.
EwanCrawford added reviewers: clayborg, jingham.
EwanCrawford set the repository for this revision to rL LLVM.
EwanCrawford added subscribers: lldb-commits, domipheus.
clayborg accepted this revision.Oct 20 2015, 10:26 AM
clayborg edited edge metadata.

Looks good. Going forward there is no real need to review any new commands that only exist in the renderscript source files or plug-ins. If you change any code outside of the the renderscript we should review, else feel free to commit as you need to.

This revision is now accepted and ready to land.Oct 20 2015, 10:26 AM
This revision was automatically updated to reflect the committed changes.
labath added a subscriber: labath.Oct 21 2015, 3:21 AM

Hi,

you seem to have an out-of-bounds access here:

/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp:1629:5:
warning: array index 3 is past the end of the array (which contains 3
elements) [-Warray-bounds]

head.dims[3] = static_cast<uint32_t>(alloc->dimension.get()->dim_3);
^         ~

/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp:190:9:
note: array 'dims' declared here

uint32_t dims[3];      // Dimensions

Thanks for spotting, comitted a quick fix