From 4c99e3ae78ed3524d188f00b558f803a943aaa00 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 15 Jan 2015 08:06:05 -0800 Subject: [PATCH] util: Move main/set to util/hash_set Reviewed-by: Matt Turner Reviewed-by: Eric Anholt --- src/glsl/nir/nir.h | 2 +- src/mesa/Makefile.sources | 2 -- src/mesa/drivers/dri/i965/intel_fbo.c | 2 +- src/mesa/main/shared.c | 2 +- src/mesa/main/syncobj.c | 2 +- src/mesa/main/vdpau.c | 2 +- src/util/Makefile.sources | 2 ++ src/{mesa/main => util}/set.c | 3 +-- src/{mesa/main => util}/set.h | 0 9 files changed, 8 insertions(+), 9 deletions(-) rename src/{mesa/main => util}/set.c (99%) rename src/{mesa/main => util}/set.h (100%) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 1faeb02156c..d5fa0e32623 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -28,10 +28,10 @@ #pragma once #include "util/hash_table.h" -#include "main/set.h" #include "../list.h" #include "GL/gl.h" /* GLenum */ #include "util/ralloc.h" +#include "util/set.h" #include "main/mtypes.h" #include "main/bitset.h" #include "nir_types.h" diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources index 2e321f3433c..a91f78cc34e 100644 --- a/src/mesa/Makefile.sources +++ b/src/mesa/Makefile.sources @@ -174,8 +174,6 @@ MAIN_FILES = \ $(SRCDIR)main/samplerobj.h \ $(SRCDIR)main/scissor.c \ $(SRCDIR)main/scissor.h \ - $(SRCDIR)main/set.c \ - $(SRCDIR)main/set.h \ $(SRCDIR)main/shaderapi.c \ $(SRCDIR)main/shaderapi.h \ $(SRCDIR)main/shaderimage.c \ diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index 37ac613fa34..77d128200d9 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -36,9 +36,9 @@ #include "main/context.h" #include "main/teximage.h" #include "main/image.h" -#include "main/set.h" #include "main/condrender.h" #include "util/hash_table.h" +#include "util/set.h" #include "swrast/swrast.h" #include "drivers/common/meta.h" diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c index f74a8232f43..2389c13159e 100644 --- a/src/mesa/main/shared.c +++ b/src/mesa/main/shared.c @@ -36,12 +36,12 @@ #include "program/program.h" #include "dlist.h" #include "samplerobj.h" -#include "set.h" #include "shaderapi.h" #include "shaderobj.h" #include "syncobj.h" #include "util/hash_table.h" +#include "util/set.h" /** * Allocate and initialize a shared context state structure. diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index 225399eda3b..8832775ebb8 100644 --- a/src/mesa/main/syncobj.c +++ b/src/mesa/main/syncobj.c @@ -63,8 +63,8 @@ #include "get.h" #include "dispatch.h" #include "mtypes.h" -#include "set.h" #include "util/hash_table.h" +#include "util/set.h" #include "syncobj.h" diff --git a/src/mesa/main/vdpau.c b/src/mesa/main/vdpau.c index fd7561c3db6..89d731b6e74 100644 --- a/src/mesa/main/vdpau.c +++ b/src/mesa/main/vdpau.c @@ -33,9 +33,9 @@ #include #include "util/hash_table.h" +#include "util/set.h" #include "context.h" #include "glformats.h" -#include "set.h" #include "texobj.h" #include "teximage.h" #include "vdpau.h" diff --git a/src/util/Makefile.sources b/src/util/Makefile.sources index 5f87fc32a82..154677aa47d 100644 --- a/src/util/Makefile.sources +++ b/src/util/Makefile.sources @@ -9,6 +9,8 @@ MESA_UTIL_FILES := \ register_allocate.h \ rgtc.c \ rgtc.h \ + set.c \ + set.h \ strtod.cpp \ strtod.h \ texcompress_rgtc_tmp.h \ diff --git a/src/mesa/main/set.c b/src/util/set.c similarity index 99% rename from src/mesa/main/set.c rename to src/util/set.c index 52c1dabd82b..3f4a4acb2ce 100644 --- a/src/mesa/main/set.c +++ b/src/util/set.c @@ -35,8 +35,8 @@ #include #include "macros.h" +#include "ralloc.h" #include "set.h" -#include "util/ralloc.h" /* * From Knuth -- a good choice for hash/rehash values is p, p-2 where @@ -343,4 +343,3 @@ _mesa_set_random_entry(struct set *ht, return NULL; } - diff --git a/src/mesa/main/set.h b/src/util/set.h similarity index 100% rename from src/mesa/main/set.h rename to src/util/set.h -- 2.30.2