aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/tests
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-02-24 23:39:14 -0800
committerJason Ekstrand <[email protected]>2014-08-04 11:06:58 -0700
commit1e0da6233be6e5fb0143615d5e3d3642ddb7964f (patch)
treeb33478332a051d4d587009cc8a76b71c5210bdc6 /src/glsl/tests
parentdcc29c18b4affd0a69202a822ffe77d94594f98b (diff)
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 <[email protected]> v2 (Jason Ekstrand): More realloc uses and some scons fixes Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
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 5076f8c54f4..11e384a0722 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 6ab20841e23..65a9d502d47 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 862fa19abe2..882642d141b 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 997592fc940..ba94d7e3a21 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 c0a870a8104..00000000000
--- 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 86d329a8301..04dd65e6e8d 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 be202b3d57e..1d4169b037a 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 5e86c2432de..c61ef0d71cb 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 662fc0e4076..4573529f619 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"