st/mesa: don't expect pipe_screen::nir_options to be NULL for supported shaders

All drivers set non-NULL where needed I think.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36094>
This commit is contained in:
Marek Olšák
2025-07-12 14:49:55 -04:00
committed by Marge Bot
parent c1a939ca11
commit 613b58e88f
+5 -7
View File
@@ -204,14 +204,12 @@ void st_init_limits(struct pipe_screen *screen,
struct gl_shader_compiler_options *options =
&c->ShaderCompilerOptions[stage];
struct gl_program_constants *pc = &c->Program[stage];
options->NirOptions =
screen->nir_options[stage] ? screen->nir_options[stage] :
&nir_to_tgsi_compiler_options;
if (sh == PIPE_SHADER_COMPUTE) {
if (!screen->caps.compute)
continue;
}
if (!screen->nir_options[stage] ||
(sh == PIPE_SHADER_COMPUTE && !screen->caps.compute))
continue;
options->NirOptions = screen->nir_options[stage];
pc->MaxTextureImageUnits =
_min(screen->shader_caps[sh].max_texture_samplers,