17ec681f3SmrgKnobs 27ec681f3Smrg===== 37ec681f3Smrg 47ec681f3SmrgOpenSWR has a number of environment variables which control its 57ec681f3Smrgoperation, in addition to the normal Mesa and gallium controls. 67ec681f3Smrg 77ec681f3Smrg.. envvar:: KNOB_ENABLE_ASSERT_DIALOGS <bool> (true) 87ec681f3Smrg 97ec681f3SmrgUse dialogs when asserts fire. Asserts are only enabled in debug builds 107ec681f3Smrg 117ec681f3Smrg.. envvar:: KNOB_SINGLE_THREADED <bool> (false) 127ec681f3Smrg 137ec681f3SmrgIf enabled will perform all rendering on the API thread. This is useful mainly for debugging purposes. 147ec681f3Smrg 157ec681f3Smrg.. envvar:: KNOB_DUMP_SHADER_IR <bool> (false) 167ec681f3Smrg 177ec681f3SmrgDumps shader LLVM IR at various stages of jit compilation. 187ec681f3Smrg 197ec681f3Smrg.. envvar:: KNOB_USE_GENERIC_STORETILE <bool> (false) 207ec681f3Smrg 217ec681f3SmrgAlways use generic function for performing StoreTile. Will be slightly slower than using optimized (jitted) path 227ec681f3Smrg 237ec681f3Smrg.. envvar:: KNOB_FAST_CLEAR <bool> (true) 247ec681f3Smrg 257ec681f3SmrgReplace 3D primitive execute with a SWRClearRT operation and defer clear execution to first backend op on hottile, or hottile store 267ec681f3Smrg 277ec681f3Smrg.. envvar:: KNOB_MAX_NUMA_NODES <uint32_t> (0) 287ec681f3Smrg 297ec681f3SmrgMaximum # 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 307ec681f3Smrg 317ec681f3Smrg.. envvar:: KNOB_MAX_CORES_PER_NUMA_NODE <uint32_t> (0) 327ec681f3Smrg 337ec681f3SmrgMaximum # 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 347ec681f3Smrg 357ec681f3Smrg.. envvar:: KNOB_MAX_THREADS_PER_CORE <uint32_t> (1) 367ec681f3Smrg 377ec681f3SmrgMaximum # 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 387ec681f3Smrg 397ec681f3Smrg.. envvar:: KNOB_MAX_WORKER_THREADS <uint32_t> (0) 407ec681f3Smrg 417ec681f3SmrgMaximum 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. 427ec681f3Smrg 437ec681f3Smrg.. envvar:: KNOB_BUCKETS_START_FRAME <uint32_t> (1200) 447ec681f3Smrg 457ec681f3SmrgFrame from when to start saving buckets data. NOTE: KNOB_ENABLE_RDTSC must be enabled in core/knobs.h for this to have an effect. 467ec681f3Smrg 477ec681f3Smrg.. envvar:: KNOB_BUCKETS_END_FRAME <uint32_t> (1400) 487ec681f3Smrg 497ec681f3SmrgFrame at which to stop saving buckets data. NOTE: KNOB_ENABLE_RDTSC must be enabled in core/knobs.h for this to have an effect. 507ec681f3Smrg 517ec681f3Smrg.. envvar:: KNOB_WORKER_SPIN_LOOP_COUNT <uint32_t> (5000) 527ec681f3Smrg 537ec681f3SmrgNumber of spin-loop iterations worker threads will perform before going to sleep when waiting for work 547ec681f3Smrg 557ec681f3Smrg.. envvar:: KNOB_MAX_DRAWS_IN_FLIGHT <uint32_t> (160) 567ec681f3Smrg 577ec681f3SmrgMaximum number of draws outstanding before API thread blocks. 587ec681f3Smrg 597ec681f3Smrg.. envvar:: KNOB_MAX_PRIMS_PER_DRAW <uint32_t> (2040) 607ec681f3Smrg 617ec681f3SmrgMaximum primitives in a single Draw(). Larger primitives are split into smaller Draw calls. Should be a multiple of (3 * vectorWidth). 627ec681f3Smrg 637ec681f3Smrg.. envvar:: KNOB_MAX_TESS_PRIMS_PER_DRAW <uint32_t> (16) 647ec681f3Smrg 657ec681f3SmrgMaximum primitives in a single Draw() with tessellation enabled. Larger primitives are split into smaller Draw calls. Should be a multiple of (vectorWidth). 667ec681f3Smrg 677ec681f3Smrg.. envvar:: KNOB_MAX_FRAC_ODD_TESS_FACTOR <float> (63.0f) 687ec681f3Smrg 697ec681f3Smrg(DEBUG) Maximum tessellation factor for fractional-odd partitioning. 707ec681f3Smrg 717ec681f3Smrg.. envvar:: KNOB_MAX_FRAC_EVEN_TESS_FACTOR <float> (64.0f) 727ec681f3Smrg 737ec681f3Smrg(DEBUG) Maximum tessellation factor for fractional-even partitioning. 747ec681f3Smrg 757ec681f3Smrg.. envvar:: KNOB_MAX_INTEGER_TESS_FACTOR <uint32_t> (64) 767ec681f3Smrg 777ec681f3Smrg(DEBUG) Maximum tessellation factor for integer partitioning. 787ec681f3Smrg 797ec681f3Smrg.. envvar:: KNOB_BUCKETS_ENABLE_THREADVIZ <bool> (false) 807ec681f3Smrg 817ec681f3SmrgEnable threadviz output. 827ec681f3Smrg 837ec681f3Smrg.. envvar:: KNOB_TOSS_DRAW <bool> (false) 847ec681f3Smrg 857ec681f3SmrgDisable per-draw/dispatch execution 867ec681f3Smrg 877ec681f3Smrg.. envvar:: KNOB_TOSS_QUEUE_FE <bool> (false) 887ec681f3Smrg 897ec681f3SmrgStop per-draw execution at worker FE NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 907ec681f3Smrg 917ec681f3Smrg.. envvar:: KNOB_TOSS_FETCH <bool> (false) 927ec681f3Smrg 937ec681f3SmrgStop per-draw execution at vertex fetch NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 947ec681f3Smrg 957ec681f3Smrg.. envvar:: KNOB_TOSS_IA <bool> (false) 967ec681f3Smrg 977ec681f3SmrgStop per-draw execution at input assembler NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 987ec681f3Smrg 997ec681f3Smrg.. envvar:: KNOB_TOSS_VS <bool> (false) 1007ec681f3Smrg 1017ec681f3SmrgStop per-draw execution at vertex shader NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 1027ec681f3Smrg 1037ec681f3Smrg.. envvar:: KNOB_TOSS_SETUP_TRIS <bool> (false) 1047ec681f3Smrg 1057ec681f3SmrgStop per-draw execution at primitive setup NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 1067ec681f3Smrg 1077ec681f3Smrg.. envvar:: KNOB_TOSS_BIN_TRIS <bool> (false) 1087ec681f3Smrg 1097ec681f3SmrgStop per-draw execution at primitive binning NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 1107ec681f3Smrg 1117ec681f3Smrg.. envvar:: KNOB_TOSS_RS <bool> (false) 1127ec681f3Smrg 1137ec681f3SmrgStop per-draw execution at rasterizer NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h 1147ec681f3Smrg 115