diff options
author | verena beckham <verena@codeplay.com> | 2015-05-22 16:47:53 +0100 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2015-07-16 19:45:09 -0700 |
commit | c9659ea3a2d8462354737d51bf6a3865a56fb4d4 (patch) | |
tree | 50cac83bcece29b930fecb35a7a201af2dcb5b17 /rs/java | |
parent | 2fccb66debb6fb26ba6072ccc83ed56d45cc55fb (diff) |
Add a flag to the API to specify -O0 on the bcc command line.
Add a flag CREATE_FLAG_OPT_LEVEL_0 to set the optimization level to 0 when calling bcc.
This will result in an object file that is easier to debug.
Change-Id: I0384dca098fa0d9ae0f2e02e798da9de342c1122
Signed-off-by: verena beckham <verena@codeplay.com>
Diffstat (limited to 'rs/java')
-rw-r--r-- | rs/java/android/renderscript/RenderScript.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index 0505a4bb78f8..0f4dced98bd2 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -96,6 +96,14 @@ public class RenderScript { */ public static final int CREATE_FLAG_WAIT_FOR_ATTACH = 0x0008; + /** + * @hide + * Context creation flag which specifies that optimization level 0 is + * passed to the device compiler upon execution of the RenderScript kernel. + * The default optimization level is 3. + */ + public static final int CREATE_FLAG_OPT_LEVEL_0 = 0x0010; + /* * Detect the bitness of the VM to allow FieldPacker to do the right thing. */ @@ -1350,7 +1358,8 @@ public class RenderScript { return null; } - if ((flags & ~(CREATE_FLAG_LOW_LATENCY | CREATE_FLAG_LOW_POWER | CREATE_FLAG_WAIT_FOR_ATTACH)) != 0) { + if ((flags & ~(CREATE_FLAG_LOW_LATENCY | CREATE_FLAG_LOW_POWER | + CREATE_FLAG_WAIT_FOR_ATTACH | CREATE_FLAG_OPT_LEVEL_0)) != 0) { throw new RSIllegalArgumentException("Invalid flags passed."); } |