#define GALLIVM_DEBUG_GC (1 << 4)
#define GALLIVM_DEBUG_DUMP_BC (1 << 5)
-#define GALLIVM_PERF_NO_BRILINEAR (1 << 0)
-#define GALLIVM_PERF_NO_RHO_APPROX (1 << 1)
-#define GALLIVM_PERF_NO_QUAD_LOD (1 << 2)
-#define GALLIVM_PERF_NO_OPT (1 << 3)
+#define GALLIVM_PERF_NO_BRILINEAR (1 << 0)
+#define GALLIVM_PERF_NO_RHO_APPROX (1 << 1)
+#define GALLIVM_PERF_NO_QUAD_LOD (1 << 2)
+#define GALLIVM_PERF_NO_OPT (1 << 3)
+#define GALLIVM_PERF_NO_AOS_SAMPLING (1 << 4)
#ifdef __cplusplus
extern "C" {
{ "no_brilinear", GALLIVM_PERF_NO_BRILINEAR, "disable brilinear optimization" },
{ "no_rho_approx", GALLIVM_PERF_NO_RHO_APPROX, "disable rho_approx optimization" },
{ "no_quad_lod", GALLIVM_PERF_NO_QUAD_LOD, "disable quad_lod optimization" },
+ { "no_aos_sampling", GALLIVM_PERF_NO_AOS_SAMPLING, "disable aos sampling optimization" },
{ "nopt", GALLIVM_PERF_NO_OPT, "disable optimization passes to speed up shader compilation" },
{ "no_filter_hacks", GALLIVM_PERF_NO_BRILINEAR | GALLIVM_PERF_NO_RHO_APPROX |
GALLIVM_PERF_NO_QUAD_LOD, "disable filter optimization hacks" },
use_aos &= bld.num_lods <= num_quads ||
derived_sampler_state.min_img_filter ==
derived_sampler_state.mag_img_filter;
+
+ if(gallivm_perf & GALLIVM_PERF_NO_AOS_SAMPLING) {
+ use_aos = 0;
+ }
+
if (dims > 1) {
use_aos &= lp_is_simple_wrap_mode(derived_sampler_state.wrap_t);
if (dims > 2) {