diff options
author | 2012-03-22 10:50:55 -0700 | |
---|---|---|
committer | 2012-03-22 10:50:55 -0700 | |
commit | 043f5ced1bf82d8cf2df82a92a655afd26534df4 (patch) | |
tree | 37380b95f9da620f6502675898a9a24402cc731e | |
parent | b09aaeca0841fa053e0f70b7a6ff45ad475d32e1 (diff) |
More rearrangement and renaming.
Change-Id: Ia922c5bff1734a29b786ba95065f81c8dedf90cd
-rw-r--r-- | libs/rs/scriptc/rs_core.rsh | 6 | ||||
-rw-r--r-- | libs/rs/scriptc/rs_graphics.rsh | 5 | ||||
-rw-r--r-- | libs/rs/scriptc/rs_mesh.rsh | 10 | ||||
-rw-r--r-- | libs/rs/scriptc/rs_program.rsh | 22 | ||||
-rw-r--r-- | tests/RenderScriptTests/tests/src/com/android/rs/test/mesh.rs | 26 | ||||
-rw-r--r-- | tests/RenderScriptTests/tests/src/com/android/rs/test/program_raster.rs | 8 | ||||
-rw-r--r-- | tests/RenderScriptTests/tests/src/com/android/rs/test/program_store.rs | 178 |
7 files changed, 127 insertions, 128 deletions
diff --git a/libs/rs/scriptc/rs_core.rsh b/libs/rs/scriptc/rs_core.rsh index 5b99976256be..5072e1872b7b 100644 --- a/libs/rs/scriptc/rs_core.rsh +++ b/libs/rs/scriptc/rs_core.rsh @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 The Android Open Source Project + * Copyright (C) 2011-2012 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,16 +33,12 @@ #include "rs_debug.rsh" #include "rs_element.rsh" #include "rs_math.rsh" -#include "rs_mesh.rsh" #include "rs_matrix.rsh" #include "rs_object.rsh" -#include "rs_program.rsh" #include "rs_quaternion.rsh" #include "rs_sampler.rsh" #include "rs_time.rsh" - - /** * Send a message back to the client. Will not block and returns true * if the message was sendable and false if the fifo was full. diff --git a/libs/rs/scriptc/rs_graphics.rsh b/libs/rs/scriptc/rs_graphics.rsh index 80491ee893a9..44ee99f4f01e 100644 --- a/libs/rs/scriptc/rs_graphics.rsh +++ b/libs/rs/scriptc/rs_graphics.rsh @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 The Android Open Source Project + * Copyright (C) 2011-2012 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,9 @@ #ifndef __RS_GRAPHICS_RSH__ #define __RS_GRAPHICS_RSH__ +#include "rs_mesh.rsh" +#include "rs_program.rsh" + #if (defined(RS_VERSION) && (RS_VERSION >= 14)) /** * Set the color target used for all subsequent rendering calls diff --git a/libs/rs/scriptc/rs_mesh.rsh b/libs/rs/scriptc/rs_mesh.rsh index 88f229bf21b6..b606c1c0d86a 100644 --- a/libs/rs/scriptc/rs_mesh.rsh +++ b/libs/rs/scriptc/rs_mesh.rsh @@ -54,7 +54,7 @@ * data */ extern uint32_t __attribute__((overloadable)) - rsMeshGetVertexAllocationCount(rs_mesh m); + rsgMeshGetVertexAllocationCount(rs_mesh m); /** * @param m mesh to get data from @@ -63,7 +63,7 @@ extern uint32_t __attribute__((overloadable)) * containing index data */ extern uint32_t __attribute__((overloadable)) - rsMeshGetPrimitiveCount(rs_mesh m); + rsgMeshGetPrimitiveCount(rs_mesh m); /** * @param m mesh to get data from @@ -71,7 +71,7 @@ extern uint32_t __attribute__((overloadable)) * @return allocation containing vertex data */ extern rs_allocation __attribute__((overloadable)) - rsMeshGetVertexAllocation(rs_mesh m, uint32_t index); + rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index); /** * @param m mesh to get data from @@ -79,7 +79,7 @@ extern rs_allocation __attribute__((overloadable)) * @return allocation containing index data */ extern rs_allocation __attribute__((overloadable)) - rsMeshGetIndexAllocation(rs_mesh m, uint32_t index); + rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index); /** * @param m mesh to get data from @@ -87,7 +87,7 @@ extern rs_allocation __attribute__((overloadable)) * @return primitive describing how the mesh is rendered */ extern rs_primitive __attribute__((overloadable)) - rsMeshGetPrimitive(rs_mesh m, uint32_t index); + rsgMeshGetPrimitive(rs_mesh m, uint32_t index); #endif // __RS_MESH_RSH__ diff --git a/libs/rs/scriptc/rs_program.rsh b/libs/rs/scriptc/rs_program.rsh index 8c5268052e1d..7434a77a6ca7 100644 --- a/libs/rs/scriptc/rs_program.rsh +++ b/libs/rs/scriptc/rs_program.rsh @@ -55,7 +55,7 @@ * @param ps */ extern rs_depth_func __attribute__((overloadable)) - rsProgramStoreGetDepthFunc(rs_program_store ps); + rsgProgramStoreGetDepthFunc(rs_program_store ps); /** * @hide @@ -64,7 +64,7 @@ extern rs_depth_func __attribute__((overloadable)) * @param ps */ extern bool __attribute__((overloadable)) - rsProgramStoreGetDepthMask(rs_program_store ps); + rsgProgramStoreGetDepthMask(rs_program_store ps); /** * @hide * Get program store red component color mask @@ -72,7 +72,7 @@ extern bool __attribute__((overloadable)) * @param ps */ extern bool __attribute__((overloadable)) - rsProgramStoreGetColorMaskR(rs_program_store ps); + rsgProgramStoreGetColorMaskR(rs_program_store ps); /** * @hide @@ -81,7 +81,7 @@ extern bool __attribute__((overloadable)) * @param ps */ extern bool __attribute__((overloadable)) - rsProgramStoreGetColorMaskG(rs_program_store ps); + rsgProgramStoreGetColorMaskG(rs_program_store ps); /** * @hide @@ -90,7 +90,7 @@ extern bool __attribute__((overloadable)) * @param ps */ extern bool __attribute__((overloadable)) - rsProgramStoreGetColorMaskB(rs_program_store ps); + rsgProgramStoreGetColorMaskB(rs_program_store ps); /** * @hide @@ -99,7 +99,7 @@ extern bool __attribute__((overloadable)) * @param ps */ extern bool __attribute__((overloadable)) - rsProgramStoreGetColorMaskA(rs_program_store ps); + rsgProgramStoreGetColorMaskA(rs_program_store ps); /** * @hide @@ -108,7 +108,7 @@ extern bool __attribute__((overloadable)) * @param ps */ extern rs_blend_src_func __attribute__((overloadable)) - rsProgramStoreGetBlendSrcFunc(rs_program_store ps); + rsgProgramStoreGetBlendSrcFunc(rs_program_store ps); /** * @hide @@ -117,7 +117,7 @@ extern rs_blend_src_func __attribute__((overloadable)) * @param ps */ extern rs_blend_dst_func __attribute__((overloadable)) - rsProgramStoreGetBlendDstFunc(rs_program_store ps); + rsgProgramStoreGetBlendDstFunc(rs_program_store ps); /** * @hide @@ -126,7 +126,7 @@ extern rs_blend_dst_func __attribute__((overloadable)) * @param ps */ extern bool __attribute__((overloadable)) - rsProgramStoreGetDitherEnabled(rs_program_store ps); + rsgProgramStoreGetDitherEnabled(rs_program_store ps); /** * @hide @@ -135,7 +135,7 @@ extern bool __attribute__((overloadable)) * @param pr */ extern bool __attribute__((overloadable)) - rsProgramRasterGetPointSpriteEnabled(rs_program_raster pr); + rsgProgramRasterGetPointSpriteEnabled(rs_program_raster pr); /** * @hide @@ -144,7 +144,7 @@ extern bool __attribute__((overloadable)) * @param pr */ extern rs_cull_mode __attribute__((overloadable)) - rsProgramRasterGetCullMode(rs_program_raster pr); + rsgProgramRasterGetCullMode(rs_program_raster pr); 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); |