glsl: Remove unused "instructions" parameter.
I think was used long ago, when we actually read the builtins into the shader's instruction stream directly, rather than creating a separate shader and linking the two. It doesn't seem to serve any purpose now.
This commit is contained in:
@@ -60,7 +60,7 @@ void
|
|||||||
_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state)
|
_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state)
|
||||||
{
|
{
|
||||||
_mesa_glsl_initialize_variables(instructions, state);
|
_mesa_glsl_initialize_variables(instructions, state);
|
||||||
_mesa_glsl_initialize_functions(instructions, state);
|
_mesa_glsl_initialize_functions(state);
|
||||||
|
|
||||||
state->symbols->language_version = state->language_version;
|
state->symbols->language_version = state->language_version;
|
||||||
|
|
||||||
|
@@ -13523,7 +13523,6 @@ _mesa_glsl_release_functions(void)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_mesa_read_profile(struct _mesa_glsl_parse_state *state,
|
_mesa_read_profile(struct _mesa_glsl_parse_state *state,
|
||||||
exec_list *instructions,
|
|
||||||
int profile_index,
|
int profile_index,
|
||||||
const char *prototypes,
|
const char *prototypes,
|
||||||
const char **functions,
|
const char **functions,
|
||||||
@@ -13542,8 +13541,7 @@ _mesa_read_profile(struct _mesa_glsl_parse_state *state,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_mesa_glsl_initialize_functions(exec_list *instructions,
|
_mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
|
||||||
struct _mesa_glsl_parse_state *state)
|
|
||||||
{
|
{
|
||||||
if (builtin_mem_ctx == NULL) {
|
if (builtin_mem_ctx == NULL) {
|
||||||
builtin_mem_ctx = talloc_init("GLSL built-in functions");
|
builtin_mem_ctx = talloc_init("GLSL built-in functions");
|
||||||
@@ -13553,84 +13551,84 @@ _mesa_glsl_initialize_functions(exec_list *instructions,
|
|||||||
state->num_builtins_to_link = 0;
|
state->num_builtins_to_link = 0;
|
||||||
|
|
||||||
if (state->target == fragment_shader && state->language_version == 100) {
|
if (state->target == fragment_shader && state->language_version == 100) {
|
||||||
_mesa_read_profile(state, instructions, 0,
|
_mesa_read_profile(state, 0,
|
||||||
prototypes_for_100_frag,
|
prototypes_for_100_frag,
|
||||||
functions_for_100_frag,
|
functions_for_100_frag,
|
||||||
Elements(functions_for_100_frag));
|
Elements(functions_for_100_frag));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == vertex_shader && state->language_version == 100) {
|
if (state->target == vertex_shader && state->language_version == 100) {
|
||||||
_mesa_read_profile(state, instructions, 1,
|
_mesa_read_profile(state, 1,
|
||||||
prototypes_for_100_vert,
|
prototypes_for_100_vert,
|
||||||
functions_for_100_vert,
|
functions_for_100_vert,
|
||||||
Elements(functions_for_100_vert));
|
Elements(functions_for_100_vert));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == fragment_shader && state->language_version == 110) {
|
if (state->target == fragment_shader && state->language_version == 110) {
|
||||||
_mesa_read_profile(state, instructions, 2,
|
_mesa_read_profile(state, 2,
|
||||||
prototypes_for_110_frag,
|
prototypes_for_110_frag,
|
||||||
functions_for_110_frag,
|
functions_for_110_frag,
|
||||||
Elements(functions_for_110_frag));
|
Elements(functions_for_110_frag));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == vertex_shader && state->language_version == 110) {
|
if (state->target == vertex_shader && state->language_version == 110) {
|
||||||
_mesa_read_profile(state, instructions, 3,
|
_mesa_read_profile(state, 3,
|
||||||
prototypes_for_110_vert,
|
prototypes_for_110_vert,
|
||||||
functions_for_110_vert,
|
functions_for_110_vert,
|
||||||
Elements(functions_for_110_vert));
|
Elements(functions_for_110_vert));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == fragment_shader && state->language_version == 120) {
|
if (state->target == fragment_shader && state->language_version == 120) {
|
||||||
_mesa_read_profile(state, instructions, 4,
|
_mesa_read_profile(state, 4,
|
||||||
prototypes_for_120_frag,
|
prototypes_for_120_frag,
|
||||||
functions_for_120_frag,
|
functions_for_120_frag,
|
||||||
Elements(functions_for_120_frag));
|
Elements(functions_for_120_frag));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == vertex_shader && state->language_version == 120) {
|
if (state->target == vertex_shader && state->language_version == 120) {
|
||||||
_mesa_read_profile(state, instructions, 5,
|
_mesa_read_profile(state, 5,
|
||||||
prototypes_for_120_vert,
|
prototypes_for_120_vert,
|
||||||
functions_for_120_vert,
|
functions_for_120_vert,
|
||||||
Elements(functions_for_120_vert));
|
Elements(functions_for_120_vert));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == fragment_shader && state->language_version == 130) {
|
if (state->target == fragment_shader && state->language_version == 130) {
|
||||||
_mesa_read_profile(state, instructions, 6,
|
_mesa_read_profile(state, 6,
|
||||||
prototypes_for_130_frag,
|
prototypes_for_130_frag,
|
||||||
functions_for_130_frag,
|
functions_for_130_frag,
|
||||||
Elements(functions_for_130_frag));
|
Elements(functions_for_130_frag));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == vertex_shader && state->language_version == 130) {
|
if (state->target == vertex_shader && state->language_version == 130) {
|
||||||
_mesa_read_profile(state, instructions, 7,
|
_mesa_read_profile(state, 7,
|
||||||
prototypes_for_130_vert,
|
prototypes_for_130_vert,
|
||||||
functions_for_130_vert,
|
functions_for_130_vert,
|
||||||
Elements(functions_for_130_vert));
|
Elements(functions_for_130_vert));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == fragment_shader && state->ARB_texture_rectangle_enable) {
|
if (state->target == fragment_shader && state->ARB_texture_rectangle_enable) {
|
||||||
_mesa_read_profile(state, instructions, 8,
|
_mesa_read_profile(state, 8,
|
||||||
prototypes_for_ARB_texture_rectangle_frag,
|
prototypes_for_ARB_texture_rectangle_frag,
|
||||||
functions_for_ARB_texture_rectangle_frag,
|
functions_for_ARB_texture_rectangle_frag,
|
||||||
Elements(functions_for_ARB_texture_rectangle_frag));
|
Elements(functions_for_ARB_texture_rectangle_frag));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == vertex_shader && state->ARB_texture_rectangle_enable) {
|
if (state->target == vertex_shader && state->ARB_texture_rectangle_enable) {
|
||||||
_mesa_read_profile(state, instructions, 9,
|
_mesa_read_profile(state, 9,
|
||||||
prototypes_for_ARB_texture_rectangle_vert,
|
prototypes_for_ARB_texture_rectangle_vert,
|
||||||
functions_for_ARB_texture_rectangle_vert,
|
functions_for_ARB_texture_rectangle_vert,
|
||||||
Elements(functions_for_ARB_texture_rectangle_vert));
|
Elements(functions_for_ARB_texture_rectangle_vert));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == fragment_shader && state->EXT_texture_array_enable) {
|
if (state->target == fragment_shader && state->EXT_texture_array_enable) {
|
||||||
_mesa_read_profile(state, instructions, 10,
|
_mesa_read_profile(state, 10,
|
||||||
prototypes_for_EXT_texture_array_frag,
|
prototypes_for_EXT_texture_array_frag,
|
||||||
functions_for_EXT_texture_array_frag,
|
functions_for_EXT_texture_array_frag,
|
||||||
Elements(functions_for_EXT_texture_array_frag));
|
Elements(functions_for_EXT_texture_array_frag));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->target == vertex_shader && state->EXT_texture_array_enable) {
|
if (state->target == vertex_shader && state->EXT_texture_array_enable) {
|
||||||
_mesa_read_profile(state, instructions, 11,
|
_mesa_read_profile(state, 11,
|
||||||
prototypes_for_EXT_texture_array_vert,
|
prototypes_for_EXT_texture_array_vert,
|
||||||
functions_for_EXT_texture_array_vert,
|
functions_for_EXT_texture_array_vert,
|
||||||
Elements(functions_for_EXT_texture_array_vert));
|
Elements(functions_for_EXT_texture_array_vert));
|
||||||
|
@@ -200,7 +200,6 @@ _mesa_glsl_release_functions(void)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_mesa_read_profile(struct _mesa_glsl_parse_state *state,
|
_mesa_read_profile(struct _mesa_glsl_parse_state *state,
|
||||||
exec_list *instructions,
|
|
||||||
int profile_index,
|
int profile_index,
|
||||||
const char *prototypes,
|
const char *prototypes,
|
||||||
const char **functions,
|
const char **functions,
|
||||||
@@ -219,8 +218,7 @@ _mesa_read_profile(struct _mesa_glsl_parse_state *state,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_mesa_glsl_initialize_functions(exec_list *instructions,
|
_mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
|
||||||
struct _mesa_glsl_parse_state *state)
|
|
||||||
{
|
{
|
||||||
if (builtin_mem_ctx == NULL) {
|
if (builtin_mem_ctx == NULL) {
|
||||||
builtin_mem_ctx = talloc_init("GLSL built-in functions");
|
builtin_mem_ctx = talloc_init("GLSL built-in functions");
|
||||||
@@ -244,7 +242,7 @@ _mesa_glsl_initialize_functions(exec_list *instructions,
|
|||||||
check += 'state->' + version + '_enable'
|
check += 'state->' + version + '_enable'
|
||||||
|
|
||||||
print ' if (' + check + ') {'
|
print ' if (' + check + ') {'
|
||||||
print ' _mesa_read_profile(state, instructions, %d,' % i
|
print ' _mesa_read_profile(state, %d,' % i
|
||||||
print ' prototypes_for_' + profile + ','
|
print ' prototypes_for_' + profile + ','
|
||||||
print ' functions_for_' + profile + ','
|
print ' functions_for_' + profile + ','
|
||||||
print ' Elements(functions_for_' + profile + '));'
|
print ' Elements(functions_for_' + profile + '));'
|
||||||
|
@@ -1582,8 +1582,7 @@ _mesa_glsl_initialize_variables(exec_list *instructions,
|
|||||||
struct _mesa_glsl_parse_state *state);
|
struct _mesa_glsl_parse_state *state);
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
_mesa_glsl_initialize_functions(exec_list *instructions,
|
_mesa_glsl_initialize_functions(_mesa_glsl_parse_state *state);
|
||||||
struct _mesa_glsl_parse_state *state);
|
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
_mesa_glsl_release_functions(void);
|
_mesa_glsl_release_functions(void);
|
||||||
|
Reference in New Issue
Block a user