aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-09-27 16:43:31 -0400
committerMarek Olšák <[email protected]>2019-10-10 15:49:18 -0400
commit3340c066a17735c0214dfde3df396799bd4275ef (patch)
treeddc259c5e78f17799645be37f9b03bb7a75f2b68 /src
parentdd4cc56ebd05074848b1817493f5058e0c1cd9e9 (diff)
nir: move gl_nir_opt_access from glsl directory
Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/Makefile.sources2
-rw-r--r--src/compiler/glsl/gl_nir.h2
-rw-r--r--src/compiler/glsl/meson.build1
-rw-r--r--src/compiler/nir/meson.build1
-rw-r--r--src/compiler/nir/nir.h1
-rw-r--r--src/compiler/nir/nir_opt_access.c (renamed from src/compiler/glsl/gl_nir_opt_access.c)6
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp2
7 files changed, 6 insertions, 9 deletions
diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources
index bc49e00525a..b6429366b05 100644
--- a/src/compiler/Makefile.sources
+++ b/src/compiler/Makefile.sources
@@ -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 \
diff --git a/src/compiler/glsl/gl_nir.h b/src/compiler/glsl/gl_nir.h
index 9907f732ed7..5a5e5d28747 100644
--- a/src/compiler/glsl/gl_nir.h
+++ b/src/compiler/glsl/gl_nir.h
@@ -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
diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
index f43c5eb4995..658256149fc 100644
--- a/src/compiler/glsl/meson.build
+++ b/src/compiler/glsl/meson.build
@@ -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',
diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build
index ab4db9a8b0d..d18c683eb0c 100644
--- a/src/compiler/nir/meson.build
+++ b/src/compiler/nir/meson.build
@@ -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',
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 191bf53e555..90b91390a64 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -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);
diff --git a/src/compiler/glsl/gl_nir_opt_access.c b/src/compiler/nir/nir_opt_access.c
index cfd7f392897..ec316a8947e 100644
--- a/src/compiler/glsl/gl_nir_opt_access.c
+++ b/src/compiler/nir/nir_opt_access.c
@@ -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;
}
-
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index d658a648b15..6472550e134 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -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);