blob: 6c3e7ffec9ae83dfeb853bfd36163c8a295b2ac9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#include "rs_core.rsh"
#include "rs_structs.h"
/**
* Sampler
*/
extern rs_sampler_value __attribute__((overloadable))
rsSamplerGetMinification(rs_sampler s) {
Sampler_t *prog = (Sampler_t *)s.p;
if (prog == NULL) {
return RS_SAMPLER_INVALID;
}
return prog->mHal.state.minFilter;
}
extern rs_sampler_value __attribute__((overloadable))
rsSamplerGetMagnification(rs_sampler s) {
Sampler_t *prog = (Sampler_t *)s.p;
if (prog == NULL) {
return RS_SAMPLER_INVALID;
}
return prog->mHal.state.magFilter;
}
extern rs_sampler_value __attribute__((overloadable))
rsSamplerGetWrapS(rs_sampler s) {
Sampler_t *prog = (Sampler_t *)s.p;
if (prog == NULL) {
return RS_SAMPLER_INVALID;
}
return prog->mHal.state.wrapS;
}
extern rs_sampler_value __attribute__((overloadable))
rsSamplerGetWrapT(rs_sampler s) {
Sampler_t *prog = (Sampler_t *)s.p;
if (prog == NULL) {
return RS_SAMPLER_INVALID;
}
return prog->mHal.state.wrapT;
}
extern float __attribute__((overloadable))
rsSamplerGetAnisotropy(rs_sampler s) {
Sampler_t *prog = (Sampler_t *)s.p;
if (prog == NULL) {
return 0.0f;
}
return prog->mHal.state.aniso;
}
|