nir: move gl_nir_opt_access from glsl directory

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Marek Olšák
2019-09-27 16:43:31 -04:00
parent dd4cc56ebd
commit 3340c066a1
7 changed files with 6 additions and 9 deletions

View File

@@ -35,7 +35,6 @@ LIBGLSL_FILES = \
glsl/gl_nir_link_xfb.c \
glsl/gl_nir_linker.c \
glsl/gl_nir_linker.h \
glsl/gl_nir_opt_access.c \
glsl/gl_nir.h \
glsl/glsl_parser_extras.cpp \
glsl/glsl_parser_extras.h \
@@ -288,6 +287,7 @@ NIR_FILES = \
nir/nir_metadata.c \
nir/nir_move_vec_src_uses_to_dest.c \
nir/nir_normalize_cubemap_coords.c \
nir/nir_opt_access.c \
nir/nir_opt_combine_stores.c \
nir/nir_opt_comparison_pre.c \
nir/nir_opt_conditional_discard.c \

View File

@@ -44,8 +44,6 @@ bool gl_nir_lower_samplers_as_deref(nir_shader *shader,
bool gl_nir_lower_buffers(nir_shader *shader,
const struct gl_shader_program *shader_program);
bool gl_nir_opt_access(nir_shader *shader);
#ifdef __cplusplus
}
#endif

View File

@@ -85,7 +85,6 @@ files_libglsl = files(
'gl_nir_link_xfb.c',
'gl_nir_linker.c',
'gl_nir_linker.h',
'gl_nir_opt_access.c',
'gl_nir.h',
'glsl_parser_extras.cpp',
'glsl_parser_extras.h',

View File

@@ -170,6 +170,7 @@ files_libnir = files(
'nir_metadata.c',
'nir_move_vec_src_uses_to_dest.c',
'nir_normalize_cubemap_coords.c',
'nir_opt_access.c',
'nir_opt_combine_stores.c',
'nir_opt_comparison_pre.c',
'nir_opt_conditional_discard.c',

View File

@@ -4027,6 +4027,7 @@ bool nir_opt_comparison_pre_impl(nir_function_impl *impl);
bool nir_opt_comparison_pre(nir_shader *shader);
bool nir_opt_access(nir_shader *shader);
bool nir_opt_algebraic(nir_shader *shader);
bool nir_opt_algebraic_before_ffma(nir_shader *shader);
bool nir_opt_algebraic_late(nir_shader *shader);

View File

@@ -21,8 +21,7 @@
* IN THE SOFTWARE.
*/
#include "nir/nir.h"
#include "gl_nir.h"
#include "nir.h"
/* This pass optimizes GL access qualifiers. So far it does two things:
*
@@ -291,7 +290,7 @@ opt_access_impl(struct access_state *state,
}
bool
gl_nir_opt_access(nir_shader *shader)
nir_opt_access(nir_shader *shader)
{
struct access_state state = {
.vars_written = _mesa_pointer_set_create(NULL),
@@ -334,4 +333,3 @@ gl_nir_opt_access(nir_shader *shader)
_mesa_set_destroy(state.vars_written, NULL);
return progress;
}

View File

@@ -301,7 +301,7 @@ st_nir_opts(nir_shader *nir, bool scalar)
lower_flrp = 0;
}
NIR_PASS(progress, nir, gl_nir_opt_access);
NIR_PASS(progress, nir, nir_opt_access);
NIR_PASS(progress, nir, nir_opt_undef);
NIR_PASS(progress, nir, nir_opt_conditional_discard);