Loading libs/rs/rsProgramRaster.h +16 −9 Original line number Original line Diff line number Diff line Loading @@ -24,17 +24,16 @@ namespace android { namespace renderscript { namespace renderscript { class ProgramRasterState; class ProgramRasterState; /***************************************************************************** * CAUTION * * Any layout changes for this class may require a corresponding change to be * made to frameworks/compile/libbcc/lib/ScriptCRT/rs_core.c, which contains * a partial copy of the information below. * *****************************************************************************/ class ProgramRaster : public ProgramBase { class ProgramRaster : public ProgramBase { public: public: virtual void setup(const Context *, ProgramRasterState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_RASTER; } static ProgramRaster *createFromStream(Context *rsc, IStream *stream); static ObjectBaseRef<ProgramRaster> getProgramRaster(Context *rsc, bool pointSprite, RsCullMode cull); struct Hal { struct Hal { mutable void *drv; mutable void *drv; Loading @@ -46,6 +45,14 @@ public: }; }; Hal mHal; Hal mHal; virtual void setup(const Context *, ProgramRasterState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_RASTER; } static ProgramRaster *createFromStream(Context *rsc, IStream *stream); static ObjectBaseRef<ProgramRaster> getProgramRaster(Context *rsc, bool pointSprite, RsCullMode cull); protected: protected: virtual void preDestroy() const; virtual void preDestroy() const; virtual ~ProgramRaster(); virtual ~ProgramRaster(); Loading libs/rs/rsProgramStore.h +20 −15 Original line number Original line Diff line number Diff line Loading @@ -25,23 +25,16 @@ namespace android { namespace renderscript { namespace renderscript { class ProgramStoreState; class ProgramStoreState; /***************************************************************************** * CAUTION * * Any layout changes for this class may require a corresponding change to be * made to frameworks/compile/libbcc/lib/ScriptCRT/rs_core.c, which contains * a partial copy of the information below. * *****************************************************************************/ class ProgramStore : public ProgramBase { class ProgramStore : public ProgramBase { public: public: virtual void setup(const Context *, ProgramStoreState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_STORE; } static ProgramStore *createFromStream(Context *rsc, IStream *stream); static ObjectBaseRef<ProgramStore> getProgramStore(Context *, bool colorMaskR, bool colorMaskG, bool colorMaskB, bool colorMaskA, bool depthMask, bool ditherEnable, RsBlendSrcFunc srcFunc, RsBlendDstFunc destFunc, RsDepthFunc depthFunc); void init(); struct Hal { struct Hal { mutable void *drv; mutable void *drv; Loading @@ -64,6 +57,18 @@ public: }; }; Hal mHal; Hal mHal; virtual void setup(const Context *, ProgramStoreState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_STORE; } static ProgramStore *createFromStream(Context *rsc, IStream *stream); static ObjectBaseRef<ProgramStore> getProgramStore(Context *, bool colorMaskR, bool colorMaskG, bool colorMaskB, bool colorMaskA, bool depthMask, bool ditherEnable, RsBlendSrcFunc srcFunc, RsBlendDstFunc destFunc, RsDepthFunc depthFunc); void init(); protected: protected: virtual void preDestroy() const; virtual void preDestroy() const; virtual ~ProgramStore(); virtual ~ProgramStore(); Loading libs/rs/rsSampler.h +22 −15 Original line number Original line Diff line number Diff line Loading @@ -27,23 +27,16 @@ namespace renderscript { const static uint32_t RS_MAX_SAMPLER_SLOT = 16; const static uint32_t RS_MAX_SAMPLER_SLOT = 16; class SamplerState; class SamplerState; /***************************************************************************** * CAUTION * * Any layout changes for this class may require a corresponding change to be * made to frameworks/compile/libbcc/lib/ScriptCRT/rs_core.c, which contains * a partial copy of the information below. * *****************************************************************************/ class Sampler : public ObjectBase { class Sampler : public ObjectBase { public: public: static ObjectBaseRef<Sampler> getSampler(Context *, RsSamplerValue magFilter, RsSamplerValue minFilter, RsSamplerValue wrapS, RsSamplerValue wrapT, RsSamplerValue wrapR, float aniso = 1.0f); void bindToContext(SamplerState *, uint32_t slot); void unbindFromContext(SamplerState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_SAMPLER; } static Sampler *createFromStream(Context *rsc, IStream *stream); struct Hal { struct Hal { mutable void *drv; mutable void *drv; Loading @@ -59,6 +52,20 @@ public: }; }; Hal mHal; Hal mHal; static ObjectBaseRef<Sampler> getSampler(Context *, RsSamplerValue magFilter, RsSamplerValue minFilter, RsSamplerValue wrapS, RsSamplerValue wrapT, RsSamplerValue wrapR, float aniso = 1.0f); void bindToContext(SamplerState *, uint32_t slot); void unbindFromContext(SamplerState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_SAMPLER; } static Sampler *createFromStream(Context *rsc, IStream *stream); protected: protected: int32_t mBoundSlot; int32_t mBoundSlot; Loading libs/rs/scriptc/rs_graphics.rsh +194 −0 Original line number Original line Diff line number Diff line Loading @@ -23,6 +23,55 @@ #ifndef __RS_GRAPHICS_RSH__ #ifndef __RS_GRAPHICS_RSH__ #define __RS_GRAPHICS_RSH__ #define __RS_GRAPHICS_RSH__ // These are API 15 once it get official typedef enum { RS_DEPTH_FUNC_ALWAYS, RS_DEPTH_FUNC_LESS, RS_DEPTH_FUNC_LEQUAL, RS_DEPTH_FUNC_GREATER, RS_DEPTH_FUNC_GEQUAL, RS_DEPTH_FUNC_EQUAL, RS_DEPTH_FUNC_NOTEQUAL } rs_depth_func; typedef enum { RS_BLEND_SRC_ZERO, // 0 RS_BLEND_SRC_ONE, // 1 RS_BLEND_SRC_DST_COLOR, // 2 RS_BLEND_SRC_ONE_MINUS_DST_COLOR, // 3 RS_BLEND_SRC_SRC_ALPHA, // 4 RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA, // 5 RS_BLEND_SRC_DST_ALPHA, // 6 RS_BLEND_SRC_ONE_MINUS_DST_ALPHA, // 7 RS_BLEND_SRC_SRC_ALPHA_SATURATE // 8 } rs_blend_src_func; typedef enum { RS_BLEND_DST_ZERO, // 0 RS_BLEND_DST_ONE, // 1 RS_BLEND_DST_SRC_COLOR, // 2 RS_BLEND_DST_ONE_MINUS_SRC_COLOR, // 3 RS_BLEND_DST_SRC_ALPHA, // 4 RS_BLEND_DST_ONE_MINUS_SRC_ALPHA, // 5 RS_BLEND_DST_DST_ALPHA, // 6 RS_BLEND_DST_ONE_MINUS_DST_ALPHA // 7 } rs_blend_dst_func; typedef enum { RS_CULL_BACK, RS_CULL_FRONT, RS_CULL_NONE } rs_cull_mode; typedef enum { RS_SAMPLER_NEAREST, RS_SAMPLER_LINEAR, RS_SAMPLER_LINEAR_MIP_LINEAR, RS_SAMPLER_WRAP, RS_SAMPLER_CLAMP, RS_SAMPLER_LINEAR_MIP_NEAREST, } rs_sampler_value; #if (defined(RS_VERSION) && (RS_VERSION >= 14)) #if (defined(RS_VERSION) && (RS_VERSION >= 14)) /** /** * Set the color target used for all subsequent rendering calls * Set the color target used for all subsequent rendering calls Loading Loading @@ -83,6 +132,88 @@ extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) rsgBindProgramStore(rs_program_store ps); rsgBindProgramStore(rs_program_store ps); /** * @hide * Get program store depth function * * @param ps */ extern rs_depth_func __attribute__((overloadable)) rsgProgramStoreGetDepthFunc(rs_program_store ps); /** * @hide * Get program store depth mask * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetDepthMask(rs_program_store ps); /** * @hide * Get program store red component color mask * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetColorMaskR(rs_program_store ps); /** * @hide * Get program store green component color mask * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetColorMaskG(rs_program_store ps); /** * @hide * Get program store blur component color mask * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetColorMaskB(rs_program_store ps); /** * @hide * Get program store alpha component color mask * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetColorMaskA(rs_program_store ps); /** * @hide * Get program store blend source function * * @param ps */ extern rs_blend_src_func __attribute__((overloadable)) rsgProgramStoreGetBlendSrcFunc(rs_program_store ps); /** * @hide * Get program store blend destination function * * @param ps */ extern rs_blend_dst_func __attribute__((overloadable)) rsgProgramStoreGetBlendDstFunc(rs_program_store ps); /** * @hide * Get program store dither state * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetDitherEnabled(rs_program_store ps); /** /** * Bind a new ProgramVertex to the rendering context. * Bind a new ProgramVertex to the rendering context. * * Loading @@ -99,6 +230,24 @@ extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) rsgBindProgramRaster(rs_program_raster pr); rsgBindProgramRaster(rs_program_raster pr); /** * @hide * Get program raster point sprite state * * @param pr */ extern bool __attribute__((overloadable)) rsgProgramRasterGetPointSpriteEnabled(rs_program_raster pr); /** * @hide * Get program raster cull mode * * @param pr */ extern rs_cull_mode __attribute__((overloadable)) rsgProgramRasterGetCullMode(rs_program_raster pr); /** /** * Bind a new Sampler object to a ProgramFragment. The sampler will * Bind a new Sampler object to a ProgramFragment. The sampler will * operate on the texture bound at the matching slot. * operate on the texture bound at the matching slot. Loading @@ -108,6 +257,51 @@ extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) rsgBindSampler(rs_program_fragment, uint slot, rs_sampler); rsgBindSampler(rs_program_fragment, uint slot, rs_sampler); /** * @hide * Get sampler minification value * * @param pr */ extern rs_sampler_value __attribute__((overloadable)) rsgSamplerGetMinification(rs_sampler s); /** * @hide * Get sampler magnification value * * @param pr */ extern rs_sampler_value __attribute__((overloadable)) rsgSamplerGetMagnification(rs_sampler s); /** * @hide * Get sampler wrap S value * * @param pr */ extern rs_sampler_value __attribute__((overloadable)) rsgSamplerGetWrapS(rs_sampler s); /** * @hide * Get sampler wrap T value * * @param pr */ extern rs_sampler_value __attribute__((overloadable)) rsgSamplerGetWrapT(rs_sampler s); /** * @hide * Get sampler anisotropy * * @param pr */ extern float __attribute__((overloadable)) rsgSamplerGetAnisotropy(rs_sampler s); /** /** * Bind a new Allocation object to a ProgramFragment. The * Bind a new Allocation object to a ProgramFragment. The * Allocation must be a valid texture for the Program. The sampling * Allocation must be a valid texture for the Program. The sampling Loading tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,9 @@ public class RSTestCore { unitTests = new ArrayList<UnitTest>(); unitTests = new ArrayList<UnitTest>(); unitTests.add(new UT_sampler(this, mRes, mCtx)); unitTests.add(new UT_program_store(this, mRes, mCtx)); unitTests.add(new UT_program_raster(this, mRes, mCtx)); unitTests.add(new UT_primitives(this, mRes, mCtx)); unitTests.add(new UT_primitives(this, mRes, mCtx)); unitTests.add(new UT_vector(this, mRes, mCtx)); unitTests.add(new UT_vector(this, mRes, mCtx)); unitTests.add(new UT_rsdebug(this, mRes, mCtx)); unitTests.add(new UT_rsdebug(this, mRes, mCtx)); Loading Loading
libs/rs/rsProgramRaster.h +16 −9 Original line number Original line Diff line number Diff line Loading @@ -24,17 +24,16 @@ namespace android { namespace renderscript { namespace renderscript { class ProgramRasterState; class ProgramRasterState; /***************************************************************************** * CAUTION * * Any layout changes for this class may require a corresponding change to be * made to frameworks/compile/libbcc/lib/ScriptCRT/rs_core.c, which contains * a partial copy of the information below. * *****************************************************************************/ class ProgramRaster : public ProgramBase { class ProgramRaster : public ProgramBase { public: public: virtual void setup(const Context *, ProgramRasterState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_RASTER; } static ProgramRaster *createFromStream(Context *rsc, IStream *stream); static ObjectBaseRef<ProgramRaster> getProgramRaster(Context *rsc, bool pointSprite, RsCullMode cull); struct Hal { struct Hal { mutable void *drv; mutable void *drv; Loading @@ -46,6 +45,14 @@ public: }; }; Hal mHal; Hal mHal; virtual void setup(const Context *, ProgramRasterState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_RASTER; } static ProgramRaster *createFromStream(Context *rsc, IStream *stream); static ObjectBaseRef<ProgramRaster> getProgramRaster(Context *rsc, bool pointSprite, RsCullMode cull); protected: protected: virtual void preDestroy() const; virtual void preDestroy() const; virtual ~ProgramRaster(); virtual ~ProgramRaster(); Loading
libs/rs/rsProgramStore.h +20 −15 Original line number Original line Diff line number Diff line Loading @@ -25,23 +25,16 @@ namespace android { namespace renderscript { namespace renderscript { class ProgramStoreState; class ProgramStoreState; /***************************************************************************** * CAUTION * * Any layout changes for this class may require a corresponding change to be * made to frameworks/compile/libbcc/lib/ScriptCRT/rs_core.c, which contains * a partial copy of the information below. * *****************************************************************************/ class ProgramStore : public ProgramBase { class ProgramStore : public ProgramBase { public: public: virtual void setup(const Context *, ProgramStoreState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_STORE; } static ProgramStore *createFromStream(Context *rsc, IStream *stream); static ObjectBaseRef<ProgramStore> getProgramStore(Context *, bool colorMaskR, bool colorMaskG, bool colorMaskB, bool colorMaskA, bool depthMask, bool ditherEnable, RsBlendSrcFunc srcFunc, RsBlendDstFunc destFunc, RsDepthFunc depthFunc); void init(); struct Hal { struct Hal { mutable void *drv; mutable void *drv; Loading @@ -64,6 +57,18 @@ public: }; }; Hal mHal; Hal mHal; virtual void setup(const Context *, ProgramStoreState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_PROGRAM_STORE; } static ProgramStore *createFromStream(Context *rsc, IStream *stream); static ObjectBaseRef<ProgramStore> getProgramStore(Context *, bool colorMaskR, bool colorMaskG, bool colorMaskB, bool colorMaskA, bool depthMask, bool ditherEnable, RsBlendSrcFunc srcFunc, RsBlendDstFunc destFunc, RsDepthFunc depthFunc); void init(); protected: protected: virtual void preDestroy() const; virtual void preDestroy() const; virtual ~ProgramStore(); virtual ~ProgramStore(); Loading
libs/rs/rsSampler.h +22 −15 Original line number Original line Diff line number Diff line Loading @@ -27,23 +27,16 @@ namespace renderscript { const static uint32_t RS_MAX_SAMPLER_SLOT = 16; const static uint32_t RS_MAX_SAMPLER_SLOT = 16; class SamplerState; class SamplerState; /***************************************************************************** * CAUTION * * Any layout changes for this class may require a corresponding change to be * made to frameworks/compile/libbcc/lib/ScriptCRT/rs_core.c, which contains * a partial copy of the information below. * *****************************************************************************/ class Sampler : public ObjectBase { class Sampler : public ObjectBase { public: public: static ObjectBaseRef<Sampler> getSampler(Context *, RsSamplerValue magFilter, RsSamplerValue minFilter, RsSamplerValue wrapS, RsSamplerValue wrapT, RsSamplerValue wrapR, float aniso = 1.0f); void bindToContext(SamplerState *, uint32_t slot); void unbindFromContext(SamplerState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_SAMPLER; } static Sampler *createFromStream(Context *rsc, IStream *stream); struct Hal { struct Hal { mutable void *drv; mutable void *drv; Loading @@ -59,6 +52,20 @@ public: }; }; Hal mHal; Hal mHal; static ObjectBaseRef<Sampler> getSampler(Context *, RsSamplerValue magFilter, RsSamplerValue minFilter, RsSamplerValue wrapS, RsSamplerValue wrapT, RsSamplerValue wrapR, float aniso = 1.0f); void bindToContext(SamplerState *, uint32_t slot); void unbindFromContext(SamplerState *); virtual void serialize(OStream *stream) const; virtual RsA3DClassID getClassId() const { return RS_A3D_CLASS_ID_SAMPLER; } static Sampler *createFromStream(Context *rsc, IStream *stream); protected: protected: int32_t mBoundSlot; int32_t mBoundSlot; Loading
libs/rs/scriptc/rs_graphics.rsh +194 −0 Original line number Original line Diff line number Diff line Loading @@ -23,6 +23,55 @@ #ifndef __RS_GRAPHICS_RSH__ #ifndef __RS_GRAPHICS_RSH__ #define __RS_GRAPHICS_RSH__ #define __RS_GRAPHICS_RSH__ // These are API 15 once it get official typedef enum { RS_DEPTH_FUNC_ALWAYS, RS_DEPTH_FUNC_LESS, RS_DEPTH_FUNC_LEQUAL, RS_DEPTH_FUNC_GREATER, RS_DEPTH_FUNC_GEQUAL, RS_DEPTH_FUNC_EQUAL, RS_DEPTH_FUNC_NOTEQUAL } rs_depth_func; typedef enum { RS_BLEND_SRC_ZERO, // 0 RS_BLEND_SRC_ONE, // 1 RS_BLEND_SRC_DST_COLOR, // 2 RS_BLEND_SRC_ONE_MINUS_DST_COLOR, // 3 RS_BLEND_SRC_SRC_ALPHA, // 4 RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA, // 5 RS_BLEND_SRC_DST_ALPHA, // 6 RS_BLEND_SRC_ONE_MINUS_DST_ALPHA, // 7 RS_BLEND_SRC_SRC_ALPHA_SATURATE // 8 } rs_blend_src_func; typedef enum { RS_BLEND_DST_ZERO, // 0 RS_BLEND_DST_ONE, // 1 RS_BLEND_DST_SRC_COLOR, // 2 RS_BLEND_DST_ONE_MINUS_SRC_COLOR, // 3 RS_BLEND_DST_SRC_ALPHA, // 4 RS_BLEND_DST_ONE_MINUS_SRC_ALPHA, // 5 RS_BLEND_DST_DST_ALPHA, // 6 RS_BLEND_DST_ONE_MINUS_DST_ALPHA // 7 } rs_blend_dst_func; typedef enum { RS_CULL_BACK, RS_CULL_FRONT, RS_CULL_NONE } rs_cull_mode; typedef enum { RS_SAMPLER_NEAREST, RS_SAMPLER_LINEAR, RS_SAMPLER_LINEAR_MIP_LINEAR, RS_SAMPLER_WRAP, RS_SAMPLER_CLAMP, RS_SAMPLER_LINEAR_MIP_NEAREST, } rs_sampler_value; #if (defined(RS_VERSION) && (RS_VERSION >= 14)) #if (defined(RS_VERSION) && (RS_VERSION >= 14)) /** /** * Set the color target used for all subsequent rendering calls * Set the color target used for all subsequent rendering calls Loading Loading @@ -83,6 +132,88 @@ extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) rsgBindProgramStore(rs_program_store ps); rsgBindProgramStore(rs_program_store ps); /** * @hide * Get program store depth function * * @param ps */ extern rs_depth_func __attribute__((overloadable)) rsgProgramStoreGetDepthFunc(rs_program_store ps); /** * @hide * Get program store depth mask * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetDepthMask(rs_program_store ps); /** * @hide * Get program store red component color mask * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetColorMaskR(rs_program_store ps); /** * @hide * Get program store green component color mask * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetColorMaskG(rs_program_store ps); /** * @hide * Get program store blur component color mask * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetColorMaskB(rs_program_store ps); /** * @hide * Get program store alpha component color mask * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetColorMaskA(rs_program_store ps); /** * @hide * Get program store blend source function * * @param ps */ extern rs_blend_src_func __attribute__((overloadable)) rsgProgramStoreGetBlendSrcFunc(rs_program_store ps); /** * @hide * Get program store blend destination function * * @param ps */ extern rs_blend_dst_func __attribute__((overloadable)) rsgProgramStoreGetBlendDstFunc(rs_program_store ps); /** * @hide * Get program store dither state * * @param ps */ extern bool __attribute__((overloadable)) rsgProgramStoreGetDitherEnabled(rs_program_store ps); /** /** * Bind a new ProgramVertex to the rendering context. * Bind a new ProgramVertex to the rendering context. * * Loading @@ -99,6 +230,24 @@ extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) rsgBindProgramRaster(rs_program_raster pr); rsgBindProgramRaster(rs_program_raster pr); /** * @hide * Get program raster point sprite state * * @param pr */ extern bool __attribute__((overloadable)) rsgProgramRasterGetPointSpriteEnabled(rs_program_raster pr); /** * @hide * Get program raster cull mode * * @param pr */ extern rs_cull_mode __attribute__((overloadable)) rsgProgramRasterGetCullMode(rs_program_raster pr); /** /** * Bind a new Sampler object to a ProgramFragment. The sampler will * Bind a new Sampler object to a ProgramFragment. The sampler will * operate on the texture bound at the matching slot. * operate on the texture bound at the matching slot. Loading @@ -108,6 +257,51 @@ extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) extern void __attribute__((overloadable)) rsgBindSampler(rs_program_fragment, uint slot, rs_sampler); rsgBindSampler(rs_program_fragment, uint slot, rs_sampler); /** * @hide * Get sampler minification value * * @param pr */ extern rs_sampler_value __attribute__((overloadable)) rsgSamplerGetMinification(rs_sampler s); /** * @hide * Get sampler magnification value * * @param pr */ extern rs_sampler_value __attribute__((overloadable)) rsgSamplerGetMagnification(rs_sampler s); /** * @hide * Get sampler wrap S value * * @param pr */ extern rs_sampler_value __attribute__((overloadable)) rsgSamplerGetWrapS(rs_sampler s); /** * @hide * Get sampler wrap T value * * @param pr */ extern rs_sampler_value __attribute__((overloadable)) rsgSamplerGetWrapT(rs_sampler s); /** * @hide * Get sampler anisotropy * * @param pr */ extern float __attribute__((overloadable)) rsgSamplerGetAnisotropy(rs_sampler s); /** /** * Bind a new Allocation object to a ProgramFragment. The * Bind a new Allocation object to a ProgramFragment. The * Allocation must be a valid texture for the Program. The sampling * Allocation must be a valid texture for the Program. The sampling Loading
tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,9 @@ public class RSTestCore { unitTests = new ArrayList<UnitTest>(); unitTests = new ArrayList<UnitTest>(); unitTests.add(new UT_sampler(this, mRes, mCtx)); unitTests.add(new UT_program_store(this, mRes, mCtx)); unitTests.add(new UT_program_raster(this, mRes, mCtx)); unitTests.add(new UT_primitives(this, mRes, mCtx)); unitTests.add(new UT_primitives(this, mRes, mCtx)); unitTests.add(new UT_vector(this, mRes, mCtx)); unitTests.add(new UT_vector(this, mRes, mCtx)); unitTests.add(new UT_rsdebug(this, mRes, mCtx)); unitTests.add(new UT_rsdebug(this, mRes, mCtx)); Loading