mesa: Simplify st_get_nir_compiler_options().

Since b167203cfe ("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 <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>
This commit is contained in:
Emma Anholt 2023-05-18 14:36:43 -07:00 committed by Marge Bot
parent c52d1acb42
commit 248ac8921e

View file

@ -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;
}