[Mesa-dev] [PATCH] glsl: Let cache_test build when the shader cache is not enabled

Aaron Watry awatry at gmail.com
Fri Oct 7 02:14:52 UTC 2016


Thanks for this.

This at least lets me build a 32-bit mesa on 64-bit host again by disabling
the cache.

Tested-by: Aaron Watry <awatry at gmail.com>

Tim: Just FYI, I get test failures for 32-bit builds on my x86-64 host.
With this patch, it no longer segfaults at least, just fails tests. If you
need more info, I can dig a bit.  I do get a bunch of warnings when
building cache_test.c, so some of those could be responsible... haven't
looked into it yet.

--Aaron

On Wed, Oct 5, 2016 at 3:22 PM, Ian Romanick <idr at freedesktop.org> wrote:

> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Cc: Timothy Arceri <timothy.arceri at collabora.com>
> ---
>  src/compiler/glsl/tests/cache_test.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/compiler/glsl/tests/cache_test.c
> b/src/compiler/glsl/tests/cache_test.c
> index 1b0403c..724dfcd 100644
> --- a/src/compiler/glsl/tests/cache_test.c
> +++ b/src/compiler/glsl/tests/cache_test.c
> @@ -36,6 +36,7 @@
>
>  bool error = false;
>
> +#ifdef ENABLE_SHADER_CACHE
>  void
>  _mesa_warning(void *ctx, const char *fmt, ...);
>
> @@ -397,10 +398,12 @@ test_put_key_and_get_key(void)
>
>     cache_destroy(cache);
>  }
> +#endif /* ENABLE_SHADER_CACHE */
>
>  int
>  main(void)
>  {
> +#ifdef ENABLE_SHADER_CACHE
>     int err;
>
>     test_cache_create();
> @@ -411,6 +414,7 @@ main(void)
>
>     err = rmrf_local(CACHE_TEST_TMP);
>     expect_equal(err, 0, "Removing " CACHE_TEST_TMP " again");
> +#endif /* ENABLE_SHADER_CACHE */
>
>     return error ? 1 : 0;
>  }
> --
> 2.5.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161006/ad7c28af/attachment-0001.html>


More information about the mesa-dev mailing list