Knobs¶
OpenSWR has a number of environment variables which control its operation, in addition to the normal Mesa and gallium controls.
-
KNOB_ENABLE_ASSERT_DIALOGS
Type: bool, Default: true¶
Use dialogs when asserts fire. Asserts are only enabled in debug builds
-
KNOB_SINGLE_THREADED
Type: bool, Default: false¶
If enabled will perform all rendering on the API thread. This is useful mainly for debugging purposes.
-
KNOB_DUMP_SHADER_IR
Type: bool, Default: false¶
Dumps shader LLVM IR at various stages of jit compilation.
-
KNOB_USE_GENERIC_STORETILE
Type: bool, Default: false¶
Always use generic function for performing StoreTile. Will be slightly slower than using optimized (jitted) path
-
KNOB_FAST_CLEAR
Type: bool, Default: true¶
Replace 3D primitive execute with a SWRClearRT operation and defer clear execution to first backend op on hottile, or hottile store
-
KNOB_MAX_NUMA_NODES
Type: uint32_t, Default: 0¶
Maximum # 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
-
KNOB_MAX_CORES_PER_NUMA_NODE
Type: uint32_t, Default: 0¶
Maximum # 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
-
KNOB_MAX_THREADS_PER_CORE
Type: uint32_t, Default: 1¶
Maximum # 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
-
KNOB_MAX_WORKER_THREADS
Type: uint32_t, Default: 0¶
Maximum 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.
-
KNOB_BUCKETS_START_FRAME
Type: uint32_t, Default: 1200¶
Frame from when to start saving buckets data. NOTE: KNOB_ENABLE_RDTSC must be enabled in core/knobs.h for this to have an effect.
-
KNOB_BUCKETS_END_FRAME
Type: uint32_t, Default: 1400¶
Frame at which to stop saving buckets data. NOTE: KNOB_ENABLE_RDTSC must be enabled in core/knobs.h for this to have an effect.
-
KNOB_WORKER_SPIN_LOOP_COUNT
Type: uint32_t, Default: 5000¶
Number of spin-loop iterations worker threads will perform before going to sleep when waiting for work
-
KNOB_MAX_DRAWS_IN_FLIGHT
Type: uint32_t, Default: 160¶
Maximum number of draws outstanding before API thread blocks.
-
KNOB_MAX_PRIMS_PER_DRAW
Type: uint32_t, Default: 2040¶
Maximum primitives in a single Draw(). Larger primitives are split into smaller Draw calls. Should be a multiple of (3 * vectorWidth).
-
KNOB_MAX_TESS_PRIMS_PER_DRAW
Type: uint32_t, Default: 16¶
Maximum primitives in a single Draw() with tessellation enabled. Larger primitives are split into smaller Draw calls. Should be a multiple of (vectorWidth).
-
KNOB_MAX_FRAC_ODD_TESS_FACTOR
Type: float, Default: 63.0f¶
(DEBUG) Maximum tessellation factor for fractional-odd partitioning.
-
KNOB_MAX_FRAC_EVEN_TESS_FACTOR
Type: float, Default: 64.0f¶
(DEBUG) Maximum tessellation factor for fractional-even partitioning.
-
KNOB_MAX_INTEGER_TESS_FACTOR
Type: uint32_t, Default: 64¶
(DEBUG) Maximum tessellation factor for integer partitioning.
-
KNOB_BUCKETS_ENABLE_THREADVIZ
Type: bool, Default: false¶
Enable threadviz output.
-
KNOB_TOSS_DRAW
Type: bool, Default: false¶
Disable per-draw/dispatch execution
-
KNOB_TOSS_QUEUE_FE
Type: bool, Default: false¶
Stop per-draw execution at worker FE NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h
-
KNOB_TOSS_FETCH
Type: bool, Default: false¶
Stop per-draw execution at vertex fetch NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h
-
KNOB_TOSS_IA
Type: bool, Default: false¶
Stop per-draw execution at input assembler NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h
-
KNOB_TOSS_VS
Type: bool, Default: false¶
Stop per-draw execution at vertex shader NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h
-
KNOB_TOSS_SETUP_TRIS
Type: bool, Default: false¶
Stop per-draw execution at primitive setup NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h
-
KNOB_TOSS_BIN_TRIS
Type: bool, Default: false¶
Stop per-draw execution at primitive binning NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h
-
KNOB_TOSS_RS
Type: bool, Default: false¶
Stop per-draw execution at rasterizer NOTE: Requires KNOB_ENABLE_TOSS_POINTS to be enabled in core/knobs.h