From 043f5ced1bf82d8cf2df82a92a655afd26534df4 Mon Sep 17 00:00:00 2001 From: Alex Sakhartchouk Date: Thu, 22 Mar 2012 10:50:55 -0700 Subject: More rearrangement and renaming. Change-Id: Ia922c5bff1734a29b786ba95065f81c8dedf90cd --- .../tests/src/com/android/rs/test/mesh.rs | 26 +-- .../src/com/android/rs/test/program_raster.rs | 8 +- .../tests/src/com/android/rs/test/program_store.rs | 178 ++++++++++----------- 3 files changed, 106 insertions(+), 106 deletions(-) (limited to 'tests/RenderScriptTests') diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/mesh.rs b/tests/RenderScriptTests/tests/src/com/android/rs/test/mesh.rs index 627ab9923c72..1354897a3f60 100644 --- a/tests/RenderScriptTests/tests/src/com/android/rs/test/mesh.rs +++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/mesh.rs @@ -11,29 +11,29 @@ rs_allocation indexAlloc2; static bool test_mesh_getters() { bool failed = false; - _RS_ASSERT(rsMeshGetVertexAllocationCount(mesh) == 2); - _RS_ASSERT(rsMeshGetPrimitiveCount(mesh) == 3); + _RS_ASSERT(rsgMeshGetVertexAllocationCount(mesh) == 2); + _RS_ASSERT(rsgMeshGetPrimitiveCount(mesh) == 3); - rs_allocation meshV0 = rsMeshGetVertexAllocation(mesh, 0); - rs_allocation meshV1 = rsMeshGetVertexAllocation(mesh, 1); - rs_allocation meshV2 = rsMeshGetVertexAllocation(mesh, 2); + rs_allocation meshV0 = rsgMeshGetVertexAllocation(mesh, 0); + rs_allocation meshV1 = rsgMeshGetVertexAllocation(mesh, 1); + rs_allocation meshV2 = rsgMeshGetVertexAllocation(mesh, 2); _RS_ASSERT(meshV0.p == vertexAlloc0.p); _RS_ASSERT(meshV1.p == vertexAlloc1.p); _RS_ASSERT(!rsIsObject(meshV2)); - rs_allocation meshI0 = rsMeshGetIndexAllocation(mesh, 0); - rs_allocation meshI1 = rsMeshGetIndexAllocation(mesh, 1); - rs_allocation meshI2 = rsMeshGetIndexAllocation(mesh, 2); - rs_allocation meshI3 = rsMeshGetIndexAllocation(mesh, 3); + rs_allocation meshI0 = rsgMeshGetIndexAllocation(mesh, 0); + rs_allocation meshI1 = rsgMeshGetIndexAllocation(mesh, 1); + rs_allocation meshI2 = rsgMeshGetIndexAllocation(mesh, 2); + rs_allocation meshI3 = rsgMeshGetIndexAllocation(mesh, 3); _RS_ASSERT(meshI0.p == indexAlloc0.p); _RS_ASSERT(!rsIsObject(meshI1)); _RS_ASSERT(meshI2.p == indexAlloc2.p); _RS_ASSERT(!rsIsObject(meshI3)); - rs_primitive p0 = rsMeshGetPrimitive(mesh, 0); - rs_primitive p1 = rsMeshGetPrimitive(mesh, 1); - rs_primitive p2 = rsMeshGetPrimitive(mesh, 2); - rs_primitive p3 = rsMeshGetPrimitive(mesh, 3); + rs_primitive p0 = rsgMeshGetPrimitive(mesh, 0); + rs_primitive p1 = rsgMeshGetPrimitive(mesh, 1); + rs_primitive p2 = rsgMeshGetPrimitive(mesh, 2); + rs_primitive p3 = rsgMeshGetPrimitive(mesh, 3); _RS_ASSERT(p0 == RS_PRIMITIVE_POINT); _RS_ASSERT(p1 == RS_PRIMITIVE_LINE); diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/program_raster.rs b/tests/RenderScriptTests/tests/src/com/android/rs/test/program_raster.rs index 0eaca4a5d47c..11b8c3060cd4 100644 --- a/tests/RenderScriptTests/tests/src/com/android/rs/test/program_raster.rs +++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/program_raster.rs @@ -7,11 +7,11 @@ rs_program_raster cullMode; static bool test_program_raster_getters() { bool failed = false; - _RS_ASSERT(rsProgramRasterGetPointSpriteEnabled(pointSpriteEnabled) == true); - _RS_ASSERT(rsProgramRasterGetCullMode(pointSpriteEnabled) == RS_CULL_BACK); + _RS_ASSERT(rsgProgramRasterGetPointSpriteEnabled(pointSpriteEnabled) == true); + _RS_ASSERT(rsgProgramRasterGetCullMode(pointSpriteEnabled) == RS_CULL_BACK); - _RS_ASSERT(rsProgramRasterGetPointSpriteEnabled(cullMode) == false); - _RS_ASSERT(rsProgramRasterGetCullMode(cullMode) == RS_CULL_FRONT); + _RS_ASSERT(rsgProgramRasterGetPointSpriteEnabled(cullMode) == false); + _RS_ASSERT(rsgProgramRasterGetCullMode(cullMode) == RS_CULL_FRONT); if (failed) { rsDebug("test_program_raster_getters FAILED", 0); diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/program_store.rs b/tests/RenderScriptTests/tests/src/com/android/rs/test/program_store.rs index 7b47408ab35e..3cd8a208ca66 100644 --- a/tests/RenderScriptTests/tests/src/com/android/rs/test/program_store.rs +++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/program_store.rs @@ -14,95 +14,95 @@ rs_program_store depthFunc; static bool test_program_store_getters() { bool failed = false; - _RS_ASSERT(rsProgramStoreGetDepthFunc(depthFunc) == RS_DEPTH_FUNC_GREATER); - _RS_ASSERT(rsProgramStoreGetDepthMask(depthFunc) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskR(depthFunc) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskG(depthFunc) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskB(depthFunc) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskA(depthFunc) == false); - _RS_ASSERT(rsProgramStoreGetDitherEnabled(depthFunc) == false); - _RS_ASSERT(rsProgramStoreGetBlendSrcFunc(depthFunc) == RS_BLEND_SRC_ZERO); - _RS_ASSERT(rsProgramStoreGetBlendDstFunc(depthFunc) == RS_BLEND_DST_ZERO); - - _RS_ASSERT(rsProgramStoreGetDepthFunc(depthWriteEnable) == RS_DEPTH_FUNC_ALWAYS); - _RS_ASSERT(rsProgramStoreGetDepthMask(depthWriteEnable) == true); - _RS_ASSERT(rsProgramStoreGetColorMaskR(depthWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskG(depthWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskB(depthWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskA(depthWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetDitherEnabled(depthWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetBlendSrcFunc(depthWriteEnable) == RS_BLEND_SRC_ZERO); - _RS_ASSERT(rsProgramStoreGetBlendDstFunc(depthWriteEnable) == RS_BLEND_DST_ZERO); - - _RS_ASSERT(rsProgramStoreGetDepthFunc(colorRWriteEnable) == RS_DEPTH_FUNC_ALWAYS); - _RS_ASSERT(rsProgramStoreGetDepthMask(colorRWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskR(colorRWriteEnable) == true); - _RS_ASSERT(rsProgramStoreGetColorMaskG(colorRWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskB(colorRWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskA(colorRWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetDitherEnabled(colorRWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetBlendSrcFunc(colorRWriteEnable) == RS_BLEND_SRC_ZERO); - _RS_ASSERT(rsProgramStoreGetBlendDstFunc(colorRWriteEnable) == RS_BLEND_DST_ZERO); - - _RS_ASSERT(rsProgramStoreGetDepthFunc(colorGWriteEnable) == RS_DEPTH_FUNC_ALWAYS); - _RS_ASSERT(rsProgramStoreGetDepthMask(colorGWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskR(colorGWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskG(colorGWriteEnable) == true); - _RS_ASSERT(rsProgramStoreGetColorMaskB(colorGWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskA(colorGWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetDitherEnabled(colorGWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetBlendSrcFunc(colorGWriteEnable) == RS_BLEND_SRC_ZERO); - _RS_ASSERT(rsProgramStoreGetBlendDstFunc(colorGWriteEnable) == RS_BLEND_DST_ZERO); - - _RS_ASSERT(rsProgramStoreGetDepthFunc(colorBWriteEnable) == RS_DEPTH_FUNC_ALWAYS); - _RS_ASSERT(rsProgramStoreGetDepthMask(colorBWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskR(colorBWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskG(colorBWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskB(colorBWriteEnable) == true); - _RS_ASSERT(rsProgramStoreGetColorMaskA(colorBWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetDitherEnabled(colorBWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetBlendSrcFunc(colorBWriteEnable) == RS_BLEND_SRC_ZERO); - _RS_ASSERT(rsProgramStoreGetBlendDstFunc(colorBWriteEnable) == RS_BLEND_DST_ZERO); - - _RS_ASSERT(rsProgramStoreGetDepthFunc(colorAWriteEnable) == RS_DEPTH_FUNC_ALWAYS); - _RS_ASSERT(rsProgramStoreGetDepthMask(colorAWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskR(colorAWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskG(colorAWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskB(colorAWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskA(colorAWriteEnable) == true); - _RS_ASSERT(rsProgramStoreGetDitherEnabled(colorAWriteEnable) == false); - _RS_ASSERT(rsProgramStoreGetBlendSrcFunc(colorAWriteEnable) == RS_BLEND_SRC_ZERO); - _RS_ASSERT(rsProgramStoreGetBlendDstFunc(colorAWriteEnable) == RS_BLEND_DST_ZERO); - - _RS_ASSERT(rsProgramStoreGetDepthFunc(ditherEnable) == RS_DEPTH_FUNC_ALWAYS); - _RS_ASSERT(rsProgramStoreGetDepthMask(ditherEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskR(ditherEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskG(ditherEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskB(ditherEnable) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskA(ditherEnable) == false); - _RS_ASSERT(rsProgramStoreGetDitherEnabled(ditherEnable) == true); - _RS_ASSERT(rsProgramStoreGetBlendSrcFunc(ditherEnable) == RS_BLEND_SRC_ZERO); - _RS_ASSERT(rsProgramStoreGetBlendDstFunc(ditherEnable) == RS_BLEND_DST_ZERO); - - _RS_ASSERT(rsProgramStoreGetDepthFunc(blendSrc) == RS_DEPTH_FUNC_ALWAYS); - _RS_ASSERT(rsProgramStoreGetDepthMask(blendSrc) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskR(blendSrc) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskG(blendSrc) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskB(blendSrc) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskA(blendSrc) == false); - _RS_ASSERT(rsProgramStoreGetDitherEnabled(blendSrc) == false); - _RS_ASSERT(rsProgramStoreGetBlendSrcFunc(blendSrc) == RS_BLEND_SRC_DST_COLOR); - _RS_ASSERT(rsProgramStoreGetBlendDstFunc(blendSrc) == RS_BLEND_DST_ZERO); - - _RS_ASSERT(rsProgramStoreGetDepthFunc(blendDst) == RS_DEPTH_FUNC_ALWAYS); - _RS_ASSERT(rsProgramStoreGetDepthMask(blendDst) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskR(blendDst) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskG(blendDst) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskB(blendDst) == false); - _RS_ASSERT(rsProgramStoreGetColorMaskA(blendDst) == false); - _RS_ASSERT(rsProgramStoreGetDitherEnabled(blendDst) == false); - _RS_ASSERT(rsProgramStoreGetBlendSrcFunc(blendDst) == RS_BLEND_SRC_ZERO); - _RS_ASSERT(rsProgramStoreGetBlendDstFunc(blendDst) == RS_BLEND_DST_DST_ALPHA); + _RS_ASSERT(rsgProgramStoreGetDepthFunc(depthFunc) == RS_DEPTH_FUNC_GREATER); + _RS_ASSERT(rsgProgramStoreGetDepthMask(depthFunc) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskR(depthFunc) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskG(depthFunc) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskB(depthFunc) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskA(depthFunc) == false); + _RS_ASSERT(rsgProgramStoreGetDitherEnabled(depthFunc) == false); + _RS_ASSERT(rsgProgramStoreGetBlendSrcFunc(depthFunc) == RS_BLEND_SRC_ZERO); + _RS_ASSERT(rsgProgramStoreGetBlendDstFunc(depthFunc) == RS_BLEND_DST_ZERO); + + _RS_ASSERT(rsgProgramStoreGetDepthFunc(depthWriteEnable) == RS_DEPTH_FUNC_ALWAYS); + _RS_ASSERT(rsgProgramStoreGetDepthMask(depthWriteEnable) == true); + _RS_ASSERT(rsgProgramStoreGetColorMaskR(depthWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskG(depthWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskB(depthWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskA(depthWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetDitherEnabled(depthWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetBlendSrcFunc(depthWriteEnable) == RS_BLEND_SRC_ZERO); + _RS_ASSERT(rsgProgramStoreGetBlendDstFunc(depthWriteEnable) == RS_BLEND_DST_ZERO); + + _RS_ASSERT(rsgProgramStoreGetDepthFunc(colorRWriteEnable) == RS_DEPTH_FUNC_ALWAYS); + _RS_ASSERT(rsgProgramStoreGetDepthMask(colorRWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskR(colorRWriteEnable) == true); + _RS_ASSERT(rsgProgramStoreGetColorMaskG(colorRWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskB(colorRWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskA(colorRWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetDitherEnabled(colorRWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetBlendSrcFunc(colorRWriteEnable) == RS_BLEND_SRC_ZERO); + _RS_ASSERT(rsgProgramStoreGetBlendDstFunc(colorRWriteEnable) == RS_BLEND_DST_ZERO); + + _RS_ASSERT(rsgProgramStoreGetDepthFunc(colorGWriteEnable) == RS_DEPTH_FUNC_ALWAYS); + _RS_ASSERT(rsgProgramStoreGetDepthMask(colorGWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskR(colorGWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskG(colorGWriteEnable) == true); + _RS_ASSERT(rsgProgramStoreGetColorMaskB(colorGWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskA(colorGWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetDitherEnabled(colorGWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetBlendSrcFunc(colorGWriteEnable) == RS_BLEND_SRC_ZERO); + _RS_ASSERT(rsgProgramStoreGetBlendDstFunc(colorGWriteEnable) == RS_BLEND_DST_ZERO); + + _RS_ASSERT(rsgProgramStoreGetDepthFunc(colorBWriteEnable) == RS_DEPTH_FUNC_ALWAYS); + _RS_ASSERT(rsgProgramStoreGetDepthMask(colorBWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskR(colorBWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskG(colorBWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskB(colorBWriteEnable) == true); + _RS_ASSERT(rsgProgramStoreGetColorMaskA(colorBWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetDitherEnabled(colorBWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetBlendSrcFunc(colorBWriteEnable) == RS_BLEND_SRC_ZERO); + _RS_ASSERT(rsgProgramStoreGetBlendDstFunc(colorBWriteEnable) == RS_BLEND_DST_ZERO); + + _RS_ASSERT(rsgProgramStoreGetDepthFunc(colorAWriteEnable) == RS_DEPTH_FUNC_ALWAYS); + _RS_ASSERT(rsgProgramStoreGetDepthMask(colorAWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskR(colorAWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskG(colorAWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskB(colorAWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskA(colorAWriteEnable) == true); + _RS_ASSERT(rsgProgramStoreGetDitherEnabled(colorAWriteEnable) == false); + _RS_ASSERT(rsgProgramStoreGetBlendSrcFunc(colorAWriteEnable) == RS_BLEND_SRC_ZERO); + _RS_ASSERT(rsgProgramStoreGetBlendDstFunc(colorAWriteEnable) == RS_BLEND_DST_ZERO); + + _RS_ASSERT(rsgProgramStoreGetDepthFunc(ditherEnable) == RS_DEPTH_FUNC_ALWAYS); + _RS_ASSERT(rsgProgramStoreGetDepthMask(ditherEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskR(ditherEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskG(ditherEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskB(ditherEnable) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskA(ditherEnable) == false); + _RS_ASSERT(rsgProgramStoreGetDitherEnabled(ditherEnable) == true); + _RS_ASSERT(rsgProgramStoreGetBlendSrcFunc(ditherEnable) == RS_BLEND_SRC_ZERO); + _RS_ASSERT(rsgProgramStoreGetBlendDstFunc(ditherEnable) == RS_BLEND_DST_ZERO); + + _RS_ASSERT(rsgProgramStoreGetDepthFunc(blendSrc) == RS_DEPTH_FUNC_ALWAYS); + _RS_ASSERT(rsgProgramStoreGetDepthMask(blendSrc) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskR(blendSrc) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskG(blendSrc) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskB(blendSrc) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskA(blendSrc) == false); + _RS_ASSERT(rsgProgramStoreGetDitherEnabled(blendSrc) == false); + _RS_ASSERT(rsgProgramStoreGetBlendSrcFunc(blendSrc) == RS_BLEND_SRC_DST_COLOR); + _RS_ASSERT(rsgProgramStoreGetBlendDstFunc(blendSrc) == RS_BLEND_DST_ZERO); + + _RS_ASSERT(rsgProgramStoreGetDepthFunc(blendDst) == RS_DEPTH_FUNC_ALWAYS); + _RS_ASSERT(rsgProgramStoreGetDepthMask(blendDst) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskR(blendDst) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskG(blendDst) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskB(blendDst) == false); + _RS_ASSERT(rsgProgramStoreGetColorMaskA(blendDst) == false); + _RS_ASSERT(rsgProgramStoreGetDitherEnabled(blendDst) == false); + _RS_ASSERT(rsgProgramStoreGetBlendSrcFunc(blendDst) == RS_BLEND_SRC_ZERO); + _RS_ASSERT(rsgProgramStoreGetBlendDstFunc(blendDst) == RS_BLEND_DST_DST_ALPHA); if (failed) { rsDebug("test_program_store_getters FAILED", 0); -- cgit v1.2.3-59-g8ed1b