From 018ebeca7254670fa6458e9a4ff904830af8b48d Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 16 Aug 2024 11:11:51 +1000 Subject: [PATCH] glsl: store has implicit conversions bools in gl_shader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want to be able to use these at link time also. Acked-by: Marek Olšák Part-of: --- src/compiler/glsl/glsl_parser_extras.cpp | 3 +++ src/mesa/main/shader_types.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index eceb9a084b1..a9f183031ec 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -2400,6 +2400,9 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader, shader->InfoLog = state->info_log; shader->Version = state->language_version; shader->IsES = state->es_shader; + shader->has_implicit_conversions = state->has_implicit_conversions(); + shader->has_implicit_int_to_uint_conversion = + state->has_implicit_int_to_uint_conversion(); struct gl_shader_compiler_options *options = &ctx->Const.ShaderCompilerOptions[shader->Stage]; diff --git a/src/mesa/main/shader_types.h b/src/mesa/main/shader_types.h index 9d00b7ef296..34e3151f3ba 100644 --- a/src/mesa/main/shader_types.h +++ b/src/mesa/main/shader_types.h @@ -152,6 +152,8 @@ struct gl_shader GLchar *Label; /**< GL_KHR_debug */ GLboolean DeletePending; bool IsES; /**< True if this shader uses GLSL ES */ + bool has_implicit_conversions; + bool has_implicit_int_to_uint_conversion; enum gl_compile_status CompileStatus;