[Mesa-dev] [PATCH] radeonsi: don't print a warning for unhandled registers returned by LLVM
Michel Dänzer
michel at daenzer.net
Tue Jan 12 19:25:44 PST 2016
On 13.01.2016 03:44, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> We don't want apps to flood stderr. New LLVM + old Mesa is a perfectly
> valid combination (if it doesn't fail to build, of course).
Actually it's not, in general. Maybe you're thinking of stable LLVM
point releases adding new config registers? If so, that should be
clarified in the commit log.
> src/gallium/drivers/radeonsi/si_shader.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index 0534788..9a6bd4d 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -3728,6 +3728,7 @@ void si_shader_binary_read_config(struct radeon_shader_binary *binary,
> for (i = 0; i < binary->config_size_per_symbol; i+= 8) {
> unsigned reg = util_le32_to_cpu(*(uint32_t*)(config + i));
> unsigned value = util_le32_to_cpu(*(uint32_t*)(config + i + 4));
> +
> switch (reg) {
> case R_00B028_SPI_SHADER_PGM_RSRC1_PS:
> case R_00B128_SPI_SHADER_PGM_RSRC1_VS:
> @@ -3754,10 +3755,6 @@ void si_shader_binary_read_config(struct radeon_shader_binary *binary,
> conf->scratch_bytes_per_wave =
> G_00B860_WAVESIZE(value) * 256 * 4 * 1;
> break;
> - default:
> - fprintf(stderr, "Warning: Compiler emitted unknown "
> - "config register: 0x%x\n", reg);
> - break;
> }
Might it make sense to print this only once?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the mesa-dev
mailing list