15a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines#include "rs_core.rsh" 25a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines#include "rs_structs.h" 35a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines 45a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines/** 55a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines* Sampler 65a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines*/ 75a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern rs_sampler_value __attribute__((overloadable)) 85a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines rsSamplerGetMinification(rs_sampler s) { 95a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines Sampler_t *prog = (Sampler_t *)s.p; 105a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines if (prog == NULL) { 115a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines return RS_SAMPLER_INVALID; 125a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines } 135a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines return prog->mHal.state.minFilter; 145a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines} 155a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines 165a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern rs_sampler_value __attribute__((overloadable)) 175a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines rsSamplerGetMagnification(rs_sampler s) { 185a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines Sampler_t *prog = (Sampler_t *)s.p; 195a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines if (prog == NULL) { 205a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines return RS_SAMPLER_INVALID; 215a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines } 225a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines return prog->mHal.state.magFilter; 235a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines} 245a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines 255a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern rs_sampler_value __attribute__((overloadable)) 265a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines rsSamplerGetWrapS(rs_sampler s) { 275a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines Sampler_t *prog = (Sampler_t *)s.p; 285a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines if (prog == NULL) { 295a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines return RS_SAMPLER_INVALID; 305a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines } 315a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines return prog->mHal.state.wrapS; 325a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines} 335a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines 345a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern rs_sampler_value __attribute__((overloadable)) 355a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines rsSamplerGetWrapT(rs_sampler s) { 365a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines Sampler_t *prog = (Sampler_t *)s.p; 375a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines if (prog == NULL) { 385a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines return RS_SAMPLER_INVALID; 395a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines } 405a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines return prog->mHal.state.wrapT; 415a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines} 425a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines 435a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern float __attribute__((overloadable)) 445a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines rsSamplerGetAnisotropy(rs_sampler s) { 455a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines Sampler_t *prog = (Sampler_t *)s.p; 465a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines if (prog == NULL) { 475a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines return 0.0f; 485a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines } 495a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines return prog->mHal.state.aniso; 505a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines} 51