mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 00:50:36 +02:00
glsl: Use accessors for ir_variable::warn_extension
The payoff for this will come in the next patch. No change Valgrind massif results for a trimmed apitrace of dota2. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
parent
1012e95a40
commit
baf5a75664
3 changed files with 30 additions and 7 deletions
|
|
@ -908,14 +908,14 @@ builtin_variable_generator::generate_fs_special_vars()
|
|||
ir_variable *const var =
|
||||
add_output(FRAG_RESULT_STENCIL, int_t, "gl_FragStencilRefARB");
|
||||
if (state->ARB_shader_stencil_export_warn)
|
||||
var->warn_extension = "GL_ARB_shader_stencil_export";
|
||||
var->enable_extension_warning("GL_ARB_shader_stencil_export");
|
||||
}
|
||||
|
||||
if (state->AMD_shader_stencil_export_enable) {
|
||||
ir_variable *const var =
|
||||
add_output(FRAG_RESULT_STENCIL, int_t, "gl_FragStencilRefAMD");
|
||||
if (state->AMD_shader_stencil_export_warn)
|
||||
var->warn_extension = "GL_AMD_shader_stencil_export";
|
||||
var->enable_extension_warning("GL_AMD_shader_stencil_export");
|
||||
}
|
||||
|
||||
if (state->ARB_sample_shading_enable) {
|
||||
|
|
|
|||
|
|
@ -1617,6 +1617,17 @@ ir_variable::determine_interpolation_mode(bool flat_shade)
|
|||
return INTERP_QUALIFIER_SMOOTH;
|
||||
}
|
||||
|
||||
void
|
||||
ir_variable::enable_extension_warning(const char *extension)
|
||||
{
|
||||
this->warn_extension = extension;
|
||||
}
|
||||
|
||||
const char *
|
||||
ir_variable::get_extension_warning() const
|
||||
{
|
||||
return this->warn_extension;
|
||||
}
|
||||
|
||||
ir_function_signature::ir_function_signature(const glsl_type *return_type,
|
||||
builtin_available_predicate b)
|
||||
|
|
|
|||
|
|
@ -526,6 +526,18 @@ public:
|
|||
return this->interface_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable emitting extension warnings for this variable
|
||||
*/
|
||||
void enable_extension_warning(const char *extension);
|
||||
|
||||
/**
|
||||
* Get the extension warning string for this variable
|
||||
*
|
||||
* If warnings are not enabled, \c NULL is returned.
|
||||
*/
|
||||
const char *get_extension_warning() const;
|
||||
|
||||
/**
|
||||
* Declared type of the variable
|
||||
*/
|
||||
|
|
@ -782,11 +794,6 @@ public:
|
|||
ir_state_slot *state_slots; /**< State descriptors. */
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
* Emit a warning if this variable is accessed.
|
||||
*/
|
||||
const char *warn_extension;
|
||||
|
||||
/**
|
||||
* Value assigned in the initializer of a variable declared "const"
|
||||
*/
|
||||
|
|
@ -810,6 +817,11 @@ private:
|
|||
* \sa ir_variable::location
|
||||
*/
|
||||
const glsl_type *interface_type;
|
||||
|
||||
/**
|
||||
* Emit a warning if this variable is accessed.
|
||||
*/
|
||||
const char *warn_extension;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue