1Knobs 2===== 3 4OpenSWR has a number of environment variables which control its 5operation, in addition to the normal Mesa and gallium controls. 6 7.. envvar:: KNOB_ENABLE_ASSERT_DIALOGS <bool> (true) 8 9Use dialogs when asserts fire. Asserts are only enabled in debug builds 10 11.. envvar:: KNOB_SINGLE_THREADED <bool> (false) 12 13If enabled will perform all rendering on the API thread. This is useful mainly for debugging purposes. 14 15.. envvar:: KNOB_DUMP_SHADER_IR <bool> (false) 16 17Dumps shader LLVM IR at various stages of jit compilation. 18 19.. envvar:: KNOB_USE_GENERIC_STORETILE <bool> (false) 20 21Always use generic function for performing StoreTile. Will be slightly slower than using optimized (jitted) path 22 23.. envvar:: KNOB_FAST_CLEAR <bool> (true) 24 25Replace 3D primitive execute with a SWRClearRT operation and defer clear execution to first backend op on hottile, or hottile store 26 27.. envvar:: KNOB_MAX_NUMA_NODES <uint32_t> (0) 28 29Maximum # of NUMA-nodes per system used for worker threads 0 == ALL NUMA-nodes in the system N == Use at most N NUMA-nodes for rendering 30 31.. envvar:: KNOB_MAX_CORES_PER_NUMA_NODE <uint32_t> (0) 32 33Maximum # of cores per NUMA-node used for worker threads. 0 == ALL non-API thread cores per NUMA-node N == Use at most N cores per NUMA-node 34 35.. envvar:: KNOB_MAX_THREADS_PER_CORE <uint32_t> (1) 36 37Maximum # of (hyper)threads per physical core used for worker threads. 0 == ALL hyper-threads per core N == Use at most N hyper-threads per physical core 38 39.. envvar:: KNOB_MAX_WORKER_THREADS <uint32_t> (0) 40 41Maximum worker threads to spawn. IMPORTANT: If this is non-zero, no worker threads will be bound to specific HW threads. They will all be "floating" SW threads. In this case, the above 3 KNOBS will be ignored. 42 43.. envvar:: KNOB_BUCKETS_START_FRAME <uint32_t> (1200) 44 45Frame from when to start saving buckets data. NOTE: KNOB_ENABLE_RDTSC must be enabled in core/knobs.h for this to have an effect. 46 47.. envvar:: KNOB_BUCKETS_END_FRAME <uint32_t> (1400) 48 49Frame at which to stop saving buckets data. NOTE: KNOB_ENABLE_RDTSC must be enabled in core/knobs.h for this to have an effect. 50 51.. envvar:: KNOB_WORKER_SPIN_LOOP_COUNT <uint32_t> (5000) 52 53Number of spin-loop iterations worker threads will perform before going to sleep when waiting for work 54 55.. envvar:: KNOB_MAX_DRAWS_IN_FLIGHT <uint32_t> (160) 56 57Maximum number of draws outstanding before API thread blocks. 58 59.. envvar:: KNOB_MAX_PRIMS_PER_DRAW <uint32_t> (2040) 60 61Maximum primitives in a single Draw(). Larger primitives are split into smaller Draw calls. Should be a multiple of (3 * vectorWidth). 62 63.. envvar:: KNOB_MAX_TESS_PRIMS_PER_DRAW <uint32_t> (16) 64 65Maximum primitives in a single Draw() with tessellation enabled. Larger primitives are split into smaller Draw calls. Should be a multiple of (vectorWidth). 66 67.. envvar:: KNOB_MAX_FRAC_ODD_TESS_FACTOR <float> (63.0f) 68 69(DEBUG) Maximum tessellation factor for fractional-odd partitioning. 70 71.. envvar:: KNOB_MAX_FRAC_EVEN_TESS_FACTOR <float> (64.0f) 72 73(DEBUG) Maximum tessellation factor for fractional-even partitioning. 74 75.. envvar:: KNOB_MAX_INTEGER_TESS_FACTOR <uint32_t> (64) 76 77(DEBUG) Maximum tessellation factor for integer partitioning. 78 79.. envvar:: KNOB_BUCKETS_ENABLE_THREADVIZ <bool> (false) 80 81Enable threadviz output. 82 83.. envvar:: KNOB_TOSS_DRAW <bool> (false) 84 85Disable per-draw/dispatch execution 86 87.. envvar:: KNOB_TOSS_QUEUE_FE <bool> (false) 88 89Stop per-draw execution at worker FE NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 90 91.. envvar:: KNOB_TOSS_FETCH <bool> (false) 92 93Stop per-draw execution at vertex fetch NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 94 95.. envvar:: KNOB_TOSS_IA <bool> (false) 96 97Stop per-draw execution at input assembler NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 98 99.. envvar:: KNOB_TOSS_VS <bool> (false) 100 101Stop per-draw execution at vertex shader NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 102 103.. envvar:: KNOB_TOSS_SETUP_TRIS <bool> (false) 104 105Stop per-draw execution at primitive setup NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 106 107.. envvar:: KNOB_TOSS_BIN_TRIS <bool> (false) 108 109Stop per-draw execution at primitive binning NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 110 111.. envvar:: KNOB_TOSS_RS <bool> (false) 112 113Stop per-draw execution at rasterizer NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 114 115