glsl: Let cache_test build when the shader cache is not enabled
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Tested-by: Aaron Watry <awatry@gmail.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
bool error = false;
|
bool error = false;
|
||||||
|
|
||||||
|
#ifdef ENABLE_SHADER_CACHE
|
||||||
void
|
void
|
||||||
_mesa_warning(void *ctx, const char *fmt, ...);
|
_mesa_warning(void *ctx, const char *fmt, ...);
|
||||||
|
|
||||||
@@ -397,10 +398,12 @@ test_put_key_and_get_key(void)
|
|||||||
|
|
||||||
cache_destroy(cache);
|
cache_destroy(cache);
|
||||||
}
|
}
|
||||||
|
#endif /* ENABLE_SHADER_CACHE */
|
||||||
|
|
||||||
int
|
int
|
||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_SHADER_CACHE
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
test_cache_create();
|
test_cache_create();
|
||||||
@@ -411,6 +414,7 @@ main(void)
|
|||||||
|
|
||||||
err = rmrf_local(CACHE_TEST_TMP);
|
err = rmrf_local(CACHE_TEST_TMP);
|
||||||
expect_equal(err, 0, "Removing " CACHE_TEST_TMP " again");
|
expect_equal(err, 0, "Removing " CACHE_TEST_TMP " again");
|
||||||
|
#endif /* ENABLE_SHADER_CACHE */
|
||||||
|
|
||||||
return error ? 1 : 0;
|
return error ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user