summaryrefslogtreecommitdiffstats
path: root/src/glsl/tests
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-02-24 23:39:14 -0800
committerJason Ekstrand <jason.ekstrand@intel.com>2014-08-04 11:06:58 -0700
commit1e0da6233be6e5fb0143615d5e3d3642ddb7964f (patch)
treeb33478332a051d4d587009cc8a76b71c5210bdc6 /src/glsl/tests
parentdcc29c18b4affd0a69202a822ffe77d94594f98b (diff)
downloadexternal_mesa3d-1e0da6233be6e5fb0143615d5e3d3642ddb7964f.zip
external_mesa3d-1e0da6233be6e5fb0143615d5e3d3642ddb7964f.tar.gz
external_mesa3d-1e0da6233be6e5fb0143615d5e3d3642ddb7964f.tar.bz2
util: Move ralloc to a new src/util directory.
For a long time, we've wanted a place to put utility code which isn't directly tied to Mesa or Gallium internals. This patch creates a new src/util directory for exactly that purpose, and builds the contents as libmesautil.la. ralloc seemed like a good first candidate. These days, it's directly used by mesa/main, i965, i915, and r300g, so keeping it in src/glsl didn't make much sense. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> v2 (Jason Ekstrand): More realloc uses and some scons fixes Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/glsl/tests')
-rw-r--r--src/glsl/tests/builtin_variable_test.cpp1
-rw-r--r--src/glsl/tests/copy_constant_to_storage_tests.cpp2
-rw-r--r--src/glsl/tests/general_ir_test.cpp1
-rw-r--r--src/glsl/tests/invalidate_locations_test.cpp2
-rw-r--r--src/glsl/tests/ralloc_test.cpp38
-rw-r--r--src/glsl/tests/sampler_types_test.cpp1
-rw-r--r--src/glsl/tests/set_uniform_initializer_tests.cpp2
-rw-r--r--src/glsl/tests/uniform_initializer_utils.cpp2
-rw-r--r--src/glsl/tests/varyings_test.cpp2
9 files changed, 5 insertions, 46 deletions
diff --git a/src/glsl/tests/builtin_variable_test.cpp b/src/glsl/tests/builtin_variable_test.cpp
index 5076f8c..11e384a 100644
--- a/src/glsl/tests/builtin_variable_test.cpp
+++ b/src/glsl/tests/builtin_variable_test.cpp
@@ -25,7 +25,6 @@
#include "main/compiler.h"
#include "main/mtypes.h"
#include "main/macros.h"
-#include "ralloc.h"
#include "ir.h"
#include "glsl_parser_extras.h"
#include "glsl_symbol_table.h"
diff --git a/src/glsl/tests/copy_constant_to_storage_tests.cpp b/src/glsl/tests/copy_constant_to_storage_tests.cpp
index 6ab2084..65a9d50 100644
--- a/src/glsl/tests/copy_constant_to_storage_tests.cpp
+++ b/src/glsl/tests/copy_constant_to_storage_tests.cpp
@@ -24,7 +24,7 @@
#include "main/compiler.h"
#include "main/mtypes.h"
#include "main/macros.h"
-#include "ralloc.h"
+#include "util/ralloc.h"
#include "uniform_initializer_utils.h"
namespace linker {
diff --git a/src/glsl/tests/general_ir_test.cpp b/src/glsl/tests/general_ir_test.cpp
index 862fa19..882642d 100644
--- a/src/glsl/tests/general_ir_test.cpp
+++ b/src/glsl/tests/general_ir_test.cpp
@@ -24,7 +24,6 @@
#include "main/compiler.h"
#include "main/mtypes.h"
#include "main/macros.h"
-#include "ralloc.h"
#include "ir.h"
TEST(ir_variable_constructor, interface)
diff --git a/src/glsl/tests/invalidate_locations_test.cpp b/src/glsl/tests/invalidate_locations_test.cpp
index 997592f..ba94d7e 100644
--- a/src/glsl/tests/invalidate_locations_test.cpp
+++ b/src/glsl/tests/invalidate_locations_test.cpp
@@ -24,7 +24,7 @@
#include "main/compiler.h"
#include "main/mtypes.h"
#include "main/macros.h"
-#include "ralloc.h"
+#include "util/ralloc.h"
#include "ir.h"
#include "linker.h"
diff --git a/src/glsl/tests/ralloc_test.cpp b/src/glsl/tests/ralloc_test.cpp
deleted file mode 100644
index c0a870a..0000000
--- a/src/glsl/tests/ralloc_test.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright © 2012 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-#include <gtest/gtest.h>
-#include <string.h>
-
-#include "ralloc.h"
-
-/**
- * \name Basic functionality
- */
-/*@{*/
-TEST(ralloc_test, null_parent)
-{
- void *mem_ctx = ralloc_context(NULL);
-
- EXPECT_EQ(NULL, ralloc_parent(mem_ctx));
-}
-/*@}*/
diff --git a/src/glsl/tests/sampler_types_test.cpp b/src/glsl/tests/sampler_types_test.cpp
index 86d329a..04dd65e 100644
--- a/src/glsl/tests/sampler_types_test.cpp
+++ b/src/glsl/tests/sampler_types_test.cpp
@@ -24,7 +24,6 @@
#include "main/compiler.h"
#include "main/mtypes.h"
#include "main/macros.h"
-#include "ralloc.h"
#include "ir.h"
/**
diff --git a/src/glsl/tests/set_uniform_initializer_tests.cpp b/src/glsl/tests/set_uniform_initializer_tests.cpp
index be202b3..1d4169b 100644
--- a/src/glsl/tests/set_uniform_initializer_tests.cpp
+++ b/src/glsl/tests/set_uniform_initializer_tests.cpp
@@ -24,7 +24,7 @@
#include "main/compiler.h"
#include "main/mtypes.h"
#include "main/macros.h"
-#include "ralloc.h"
+#include "util/ralloc.h"
#include "uniform_initializer_utils.h"
namespace linker {
diff --git a/src/glsl/tests/uniform_initializer_utils.cpp b/src/glsl/tests/uniform_initializer_utils.cpp
index 5e86c24..c61ef0d 100644
--- a/src/glsl/tests/uniform_initializer_utils.cpp
+++ b/src/glsl/tests/uniform_initializer_utils.cpp
@@ -23,7 +23,7 @@
#include <gtest/gtest.h>
#include "main/mtypes.h"
#include "main/macros.h"
-#include "ralloc.h"
+#include "util/ralloc.h"
#include "uniform_initializer_utils.h"
#include <stdio.h>
diff --git a/src/glsl/tests/varyings_test.cpp b/src/glsl/tests/varyings_test.cpp
index 662fc0e..4573529 100644
--- a/src/glsl/tests/varyings_test.cpp
+++ b/src/glsl/tests/varyings_test.cpp
@@ -24,7 +24,7 @@
#include "main/compiler.h"
#include "main/mtypes.h"
#include "main/macros.h"
-#include "ralloc.h"
+#include "util/ralloc.h"
#include "ir.h"
#include "program/hash_table.h"