summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/tests/cache_test.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-05-20 11:06:25 +1000
committerTimothy Arceri <[email protected]>2017-05-23 09:09:43 +1000
commit0bbcfbfc0b35c7fa59441006adb1f69519a7df8f (patch)
treeba4aa3c4990f96b8cf184a5e554b58e0d3c0c57d /src/compiler/glsl/tests/cache_test.c
parentd970f773f4d72814721f6f58a71c307a608ab30d (diff)
util/disk_cache: add new driver_flags param to cache keys
This will be used for things such as adding driver specific environment variables to the key. Allowing us to set environment vars that change the shader and not have the driver ignore them if it finds existing shaders in the cache. Reviewed-by: Eduardo Lima Mitev <[email protected]>
Diffstat (limited to 'src/compiler/glsl/tests/cache_test.c')
-rw-r--r--src/compiler/glsl/tests/cache_test.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/compiler/glsl/tests/cache_test.c b/src/compiler/glsl/tests/cache_test.c
index bec1d240e92..af1b66fb3d4 100644
--- a/src/compiler/glsl/tests/cache_test.c
+++ b/src/compiler/glsl/tests/cache_test.c
@@ -159,7 +159,7 @@ test_disk_cache_create(void)
* MESA_GLSL_CACHE_DISABLE set, that disk_cache_create returns NULL.
*/
setenv("MESA_GLSL_CACHE_DISABLE", "1", 1);
- cache = disk_cache_create("test", "make_check");
+ cache = disk_cache_create("test", "make_check", 0);
expect_null(cache, "disk_cache_create with MESA_GLSL_CACHE_DISABLE set");
unsetenv("MESA_GLSL_CACHE_DISABLE");
@@ -170,19 +170,19 @@ test_disk_cache_create(void)
unsetenv("MESA_GLSL_CACHE_DIR");
unsetenv("XDG_CACHE_HOME");
- cache = disk_cache_create("test", "make_check");
+ cache = disk_cache_create("test", "make_check", 0);
expect_non_null(cache, "disk_cache_create with no environment variables");
disk_cache_destroy(cache);
/* Test with XDG_CACHE_HOME set */
setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1);
- cache = disk_cache_create("test", "make_check");
+ cache = disk_cache_create("test", "make_check", 0);
expect_null(cache, "disk_cache_create with XDG_CACHE_HOME set with"
"a non-existing parent directory");
mkdir(CACHE_TEST_TMP, 0755);
- cache = disk_cache_create("test", "make_check");
+ cache = disk_cache_create("test", "make_check", 0);
expect_non_null(cache, "disk_cache_create with XDG_CACHE_HOME set");
check_directories_created(CACHE_TEST_TMP "/xdg-cache-home/mesa");
@@ -194,12 +194,12 @@ test_disk_cache_create(void)
expect_equal(err, 0, "Removing " CACHE_TEST_TMP);
setenv("MESA_GLSL_CACHE_DIR", CACHE_TEST_TMP "/mesa-glsl-cache-dir", 1);
- cache = disk_cache_create("test", "make_check");
+ cache = disk_cache_create("test", "make_check", 0);
expect_null(cache, "disk_cache_create with MESA_GLSL_CACHE_DIR set with"
"a non-existing parent directory");
mkdir(CACHE_TEST_TMP, 0755);
- cache = disk_cache_create("test", "make_check");
+ cache = disk_cache_create("test", "make_check", 0);
expect_non_null(cache, "disk_cache_create with MESA_GLSL_CACHE_DIR set");
check_directories_created(CACHE_TEST_TMP "/mesa-glsl-cache-dir/mesa");
@@ -256,7 +256,7 @@ test_put_and_get(void)
uint8_t one_KB_key[20], one_MB_key[20];
int count;
- cache = disk_cache_create("test", "make_check");
+ cache = disk_cache_create("test", "make_check", 0);
disk_cache_compute_key(cache, blob, sizeof(blob), blob_key);
@@ -298,7 +298,7 @@ test_put_and_get(void)
disk_cache_destroy(cache);
setenv("MESA_GLSL_CACHE_MAX_SIZE", "1K", 1);
- cache = disk_cache_create("test", "make_check");
+ cache = disk_cache_create("test", "make_check", 0);
one_KB = calloc(1, 1024);
@@ -363,7 +363,7 @@ test_put_and_get(void)
disk_cache_destroy(cache);
setenv("MESA_GLSL_CACHE_MAX_SIZE", "1M", 1);
- cache = disk_cache_create("test", "make_check");
+ cache = disk_cache_create("test", "make_check", 0);
disk_cache_put(cache, blob_key, blob, sizeof(blob));
disk_cache_put(cache, string_key, string, sizeof(string));
@@ -438,7 +438,7 @@ test_put_key_and_get_key(void)
{ 0, 1, 42, 43, 44, 45, 46, 47, 48, 49,
50, 55, 52, 53, 54, 55, 56, 57, 58, 59};
- cache = disk_cache_create("test", "make_check");
+ cache = disk_cache_create("test", "make_check", 0);
/* First test that disk_cache_has_key returns false before disk_cache_put_key */
result = disk_cache_has_key(cache, key_a);