summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir.c
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2015-09-24 00:54:52 -0400
committerConnor Abbott <cwabbott0@gmail.com>2015-10-09 10:13:27 -0400
commit20d6d812dc9d35cb082142ac6c9744971692797e (patch)
tree759625fbb78de7c57a09518fa1560709fc6f233e /src/glsl/nir/nir.c
parentda361acd1c899d533caec6cae5a336f6ab35e076 (diff)
downloadexternal_mesa3d-20d6d812dc9d35cb082142ac6c9744971692797e.zip
external_mesa3d-20d6d812dc9d35cb082142ac6c9744971692797e.tar.gz
external_mesa3d-20d6d812dc9d35cb082142ac6c9744971692797e.tar.bz2
nir: split out instruction comparison functions
Right now nir_instrs_equal() is tied pretty tightly to CSE, but we're going to introduce the idea of an instruction set and tie it to that instead. In anticipation of that, move this into its own file where we'll add the rest of the instruction set implementation later. v2: Rebase on texture support. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Diffstat (limited to 'src/glsl/nir/nir.c')
-rw-r--r--src/glsl/nir/nir.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
index c8fc428..8367088 100644
--- a/src/glsl/nir/nir.c
+++ b/src/glsl/nir/nir.c
@@ -1109,33 +1109,6 @@ nir_src_is_dynamically_uniform(nir_src src)
return false;
}
-bool
-nir_srcs_equal(nir_src src1, nir_src src2)
-{
- if (src1.is_ssa) {
- if (src2.is_ssa) {
- return src1.ssa == src2.ssa;
- } else {
- return false;
- }
- } else {
- if (src2.is_ssa) {
- return false;
- } else {
- if ((src1.reg.indirect == NULL) != (src2.reg.indirect == NULL))
- return false;
-
- if (src1.reg.indirect) {
- if (!nir_srcs_equal(*src1.reg.indirect, *src2.reg.indirect))
- return false;
- }
-
- return src1.reg.reg == src2.reg.reg &&
- src1.reg.base_offset == src2.reg.base_offset;
- }
- }
-}
-
static void
src_remove_all_uses(nir_src *src)
{