From 248ac8921e755c4c2d8f788dc5eb72881e9056b0 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 18 May 2023 14:36:43 -0700 Subject: [PATCH] mesa: Simplify st_get_nir_compiler_options(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since b167203cfe07 ("mesa/st: Always generate NIR from GLSL, and use nir_to_tgsi for TGSI drivers."), it's always set in the context. Reviewed-by: Alyssa Rosenzweig Acked-by: Marek Olšák Part-of: --- src/mesa/state_tracker/st_context.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index daf0161..6f430ed 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -68,7 +68,6 @@ #include "util/hash_table.h" #include "cso_cache/cso_context.h" #include "compiler/glsl/glsl_parser_extras.h" -#include "nir/nir_to_tgsi.h" DEBUG_GET_ONCE_BOOL_OPTION(mesa_mvp_dp4, "MESA_MVP_DP4", FALSE) @@ -1033,14 +1032,5 @@ st_destroy_context(struct st_context *st) const struct nir_shader_compiler_options * st_get_nir_compiler_options(struct st_context *st, gl_shader_stage stage) { - const struct nir_shader_compiler_options *options = - st->ctx->Const.ShaderCompilerOptions[stage].NirOptions; - - if (options) { - return options; - } else { - return nir_to_tgsi_get_compiler_options(st->screen, - PIPE_SHADER_IR_NIR, - pipe_shader_type_from_mesa(stage)); - } + return st->ctx->Const.ShaderCompilerOptions[stage].NirOptions; } -- 2.7.4