[Mesa-dev] [PATCH 8/8] r600/radeonsi: enable glsl/tgsi on-disk cache

Marc Dietrich marvin24 at gmx.de
Wed Feb 22 13:31:32 UTC 2017


Am Mittwoch, 22. Februar 2017, 04:45:46 CET schrieb Timothy Arceri:
> For gpu generations that use LLVM we create a timestamp string
> containing both the LLVM and Mesa build times, otherwise we just
> use the Mesa build time.
> 
> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
> Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>
> ---
>  src/gallium/drivers/radeon/r600_pipe_common.c | 43
> +++++++++++++++++++++++++++ src/gallium/drivers/radeon/r600_pipe_common.h |
>  3 ++
>  2 files changed, 46 insertions(+)
> 
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c
> b/src/gallium/drivers/radeon/r600_pipe_common.c index 1781584..bae6d6f
> 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.c
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c
> @@ -43,6 +43,10 @@
>  #define HAVE_LLVM 0
>  #endif
> 
> +#if HAVE_LLVM
> +#include <llvm-c/TargetMachine.h>
> +#endif
> +
>  #ifndef MESA_LLVM_VERSION_PATCH
>  #define MESA_LLVM_VERSION_PATCH 0
>  #endif
> @@ -779,6 +783,41 @@ static const char* r600_get_chip_name(struct
> r600_common_screen *rscreen) }
>  }
> 
> +static void r600_disk_cache_create(struct r600_common_screen *rscreen)
> +{
> +	uint32_t mesa_timestamp;
> +	if (disk_cache_get_function_timestamp(r600_disk_cache_create,
> +					      &mesa_timestamp)) {
> +		char *timestamp_str;
> +		int res = -1;
> +		if (rscreen->chip_class < SI) {
> +			res = asprintf(&timestamp_str, "%u",mesa_timestamp);
> +		}
> +#if HAVE_LLVM
> +		else {
> +			uint32_t llvm_timestamp;
> +			if (disk_cache_get_function_timestamp(LLVMInitializeAMDGPUTargetInfo,
> +							      &llvm_timestamp)) {
> +				res = asprintf(&timestamp_str, "%u_%u",
> +					       mesa_timestamp, llvm_timestamp);
> +			}
> +		}
> +#endif


maybe this fails to link later in omx with r600 only compile.

make[4]: Verzeichnis „/usr/src/dri-project/mesa/src/gallium/targets/omx“ wird 
betreten
  CXXLD    libomx_mesa.la
../../../../src/gallium/drivers/radeon/.libs/libradeon.a(r600_pipe_common.o): 
In function `r600_disk_cache_create':
r600_pipe_common.c:(.text+0x2000): undefined reference to 
`LLVMInitializeAMDGPUTargetInfo'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:791: libomx_mesa.la] Fehler 1
make[4]: Verzeichnis „/usr/src/dri-project/mesa/src/gallium/targets/omx“ wird 
verlassen



Marc


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170222/8ff76084/attachment.sig>


More information about the mesa-dev mailing list