drirc/iris: add drirc to disable threaded context

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38567>
(cherry picked from commit 4daabf76b4)
This commit is contained in:
Tapani Pälli 2025-11-21 08:03:04 +02:00 committed by Eric Engestrom
parent a8388e6eb2
commit 007cefe58b
6 changed files with 12 additions and 1 deletions

View file

@ -3444,7 +3444,7 @@
"description": "drirc/iris: add drirc to disable threaded context",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -8,6 +8,7 @@ DRI_CONF_SECTION_DEBUG
DRI_CONF_LIMIT_TRIG_INPUT_RANGE(false)
DRI_CONF_INTEL_ENABLE_WA_14018912822(false)
DRI_CONF_INTEL_SAMPLER_ROUTE_TO_LSC(false)
DRI_CONF_INTEL_DISABLE_THREADED_CONTEXT(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_PERFORMANCE

View file

@ -405,6 +405,10 @@ iris_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags)
if (flags & PIPE_CONTEXT_COMPUTE_ONLY)
return ctx;
/* Threaded context disabled via drirc. */
if (screen->driconf.disable_threaded_context)
return ctx;
return threaded_context_create(ctx, &screen->transfer_pool,
iris_replace_buffer_storage,
&(struct threaded_context_options){

View file

@ -737,6 +737,8 @@ iris_screen_create(int fd, const struct pipe_screen_config *config)
driQueryOptionb(config->options, "intel_te_distribution");
screen->driconf.generated_indirect_threshold =
driQueryOptioni(config->options, "generated_indirect_threshold");
screen->driconf.disable_threaded_context =
driQueryOptionb(config->options, "intel_disable_threaded_context");
screen->precompile = debug_get_bool_option("shader_precompile", true);

View file

@ -207,6 +207,7 @@ struct iris_screen {
bool enable_vf_distribution;
bool enable_te_distribution;
unsigned generated_indirect_threshold;
bool disable_threaded_context;
} driconf;
/** Does the kernel support various features (KERNEL_HAS_* bitfield)? */

View file

@ -367,6 +367,9 @@
DRI_CONF_OPT_B(intel_sampler_route_to_lsc, def, \
"Intel specific toggle to enable sampler route to LSC")
#define DRI_CONF_INTEL_DISABLE_THREADED_CONTEXT(def) \
DRI_CONF_OPT_B(intel_disable_threaded_context, def, "Disable threaded context")
#define DRI_CONF_VK_REQUIRE_ETC2(def) \
DRI_CONF_OPT_B(vk_require_etc2, def, \
"Implement emulated ETC2 on HW that does not support it")