[Mesa-dev] [PATCH] radeonsi: don't print a warning for unhandled registers returned by LLVM

Marek Olšák maraeo at gmail.com
Tue Jan 12 10:44:58 PST 2016


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).
---
 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;
 		}
 	}
 }
-- 
2.1.4



More information about the mesa-dev mailing list