diff options
Diffstat (limited to 'tests')
3 files changed, 11 insertions, 0 deletions
diff --git a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java index 39aa1ee..05e36a7 100644 --- a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java +++ b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java @@ -105,6 +105,13 @@ public abstract class ShaderParam extends SceneGraphBase { mRsFieldItem = new ScriptField_ShaderParam_s.Item(); mRsFieldItem.transformTimestamp = 0; + if (mParamName != null) { + mRsFieldItem.paramName = SceneManager.getCachedAlloc(mParamName); + if (mRsFieldItem.paramName == null) { + mRsFieldItem.paramName = SceneManager.getStringAsAllocation(rs, mParamName); + SceneManager.cacheAlloc(mParamName, mRsFieldItem.paramName); + } + } initLocalData(rs); return mRsFieldItem; } diff --git a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/params.rsh b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/params.rsh index 3e61971..d1ef120 100644 --- a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/params.rsh +++ b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/params.rsh @@ -23,6 +23,9 @@ static void debugParam(SgShaderParam *p, uint8_t *constantBuffer, const SgCamera *currentCam) { rsDebug("____________ Param bufferOffset", p->bufferOffset); rsDebug("Param Type ", p->type); + if (rsIsObject(p->paramName)) { + printName(p->paramName); + } uint8_t *dataPtr = constantBuffer + p->bufferOffset; const SgTransform *pTransform = NULL; diff --git a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/scenegraph_objects.rsh b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/scenegraph_objects.rsh index 9a5224b..393ae36 100644 --- a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/scenegraph_objects.rsh +++ b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/scenegraph_objects.rsh @@ -179,6 +179,7 @@ typedef struct ShaderParam_s { float4 float_value; // Use one param type to handle all vector types for now uint32_t float_vecSize; + rs_allocation paramName; rs_allocation camera; rs_allocation light; rs_allocation transform; |