[Mesa-dev] [PATCH 1/2] radeonsi: add Polaris12 support (v3)
Andreas Boll
andreas.boll.dev at gmail.com
Tue Dec 20 11:49:53 UTC 2016
2016-12-19 23:45 GMT+01:00 Alex Deucher <alexdeucher at gmail.com>:
> From: Junwei Zhang <Jerry.Zhang at amd.com>
>
> v2: use gfxip names for llvm 4.0+
> v3: use tonga for llvm <= 3.8
>
> Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
> Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
> Acked-by: Christian König <christian.koenig at amd.com>
> ---
snip
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
> index 0b5c6dc..e0b914c 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.c
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c
> @@ -755,6 +755,7 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen)
> case CHIP_FIJI: return "AMD FIJI";
> case CHIP_POLARIS10: return "AMD POLARIS10";
> case CHIP_POLARIS11: return "AMD POLARIS11";
> + case CHIP_POLARIS12: return "AMD POLARIS12";
> case CHIP_STONEY: return "AMD STONEY";
> default: return "AMD unknown";
> }
> @@ -889,9 +890,11 @@ const char *r600_get_llvm_processor_name(enum radeon_family family)
> #if HAVE_LLVM <= 0x0308
> case CHIP_POLARIS10: return "tonga";
> case CHIP_POLARIS11: return "tonga";
> + case CHIP_POLARIS12: return "tonga";
> #else
> case CHIP_POLARIS10: return "polaris10";
> case CHIP_POLARIS11: return "polaris11";
> + case CHIP_POLARIS12: return "polaris11";
> #endif
You've dropped the processor name for LLVM 4.0+.
I guess that wasn't intended.
Something like this should work:
#if HAVE_LLVM <= 0x0308
// return processor names for LLVM <= 3.8
#elif HAVE_LLVM == 0x0309
// return processor names for LLVM 3.9
#else
// return processor names for LLVM > 3.9
#endif
Andreas
> default: return "";
> }
More information about the mesa-dev
mailing list