Add no_aos_sampling GALLIVM_PERF option
This forces using general sampling and should improve precision and performance in some cases.
This commit is contained in:
parent
ad6dc13fc7
commit
829f278ad0
|
@ -43,10 +43,11 @@
|
|||
#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" {
|
||||
|
|
|
@ -65,6 +65,7 @@ static const struct debug_named_value lp_bld_perf_flags[] = {
|
|||
{ "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" },
|
||||
|
|
|
@ -3112,6 +3112,11 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue