blob: 39782de60456533ad357672a8c54e7ac7323afdf [file] [log] [blame]
Alex Sakhartchouk4a048eb2012-03-20 14:07:34 -07001#include "rs_core.rsh"
2#include "rs_graphics.rsh"
Alex Sakhartchoukff522552012-03-21 10:52:59 -07003#include "rs_structs.h"
Alex Sakhartchouk4a048eb2012-03-20 14:07:34 -07004
5/**
6* Sampler
7*/
8extern rs_sampler_value __attribute__((overloadable))
Alex Sakhartchoukff522552012-03-21 10:52:59 -07009 rsSamplerGetMinification(rs_sampler s) {
Alex Sakhartchouk4a048eb2012-03-20 14:07:34 -070010 Sampler_t *prog = (Sampler_t *)s.p;
11 if (prog == NULL) {
12 return RS_SAMPLER_INVALID;
13 }
14 return prog->mHal.state.minFilter;
15}
16
17extern rs_sampler_value __attribute__((overloadable))
Alex Sakhartchoukff522552012-03-21 10:52:59 -070018 rsSamplerGetMagnification(rs_sampler s) {
Alex Sakhartchouk4a048eb2012-03-20 14:07:34 -070019 Sampler_t *prog = (Sampler_t *)s.p;
20 if (prog == NULL) {
21 return RS_SAMPLER_INVALID;
22 }
23 return prog->mHal.state.magFilter;
24}
25
26extern rs_sampler_value __attribute__((overloadable))
Alex Sakhartchoukff522552012-03-21 10:52:59 -070027 rsSamplerGetWrapS(rs_sampler s) {
Alex Sakhartchouk4a048eb2012-03-20 14:07:34 -070028 Sampler_t *prog = (Sampler_t *)s.p;
29 if (prog == NULL) {
30 return RS_SAMPLER_INVALID;
31 }
32 return prog->mHal.state.wrapS;
33}
34
35extern rs_sampler_value __attribute__((overloadable))
Alex Sakhartchoukff522552012-03-21 10:52:59 -070036 rsSamplerGetWrapT(rs_sampler s) {
Alex Sakhartchouk4a048eb2012-03-20 14:07:34 -070037 Sampler_t *prog = (Sampler_t *)s.p;
38 if (prog == NULL) {
39 return RS_SAMPLER_INVALID;
40 }
41 return prog->mHal.state.wrapT;
42}
43
44extern float __attribute__((overloadable))
Alex Sakhartchoukff522552012-03-21 10:52:59 -070045 rsSamplerGetAnisotropy(rs_sampler s) {
Alex Sakhartchouk4a048eb2012-03-20 14:07:34 -070046 Sampler_t *prog = (Sampler_t *)s.p;
47 if (prog == NULL) {
48 return 0.0f;
49 }
50 return prog->mHal.state.aniso;
51}