Mesa (master): radeonsi: don't declare pointers to static strings

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 13 00:40:13 UTC 2019


Module: Mesa
Branch: master
Commit: 16bee0e5f6a70e959be27c253c4be130bb034030
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=16bee0e5f6a70e959be27c253c4be130bb034030

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Thu Dec  6 12:43:44 2018 +0100

radeonsi: don't declare pointers to static strings

The compiler should be able to optimize them away, but still. There's
no point in declaring those as pointers, and if the compiler *doesn't*
optimize them away, they add unnecessary load-time relocations.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/drivers/radeonsi/si_shader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 21b2819c857..ad965a11750 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -38,10 +38,10 @@
 
 #include "compiler/nir/nir.h"
 
-static const char *scratch_rsrc_dword0_symbol =
+static const char scratch_rsrc_dword0_symbol[] =
 	"SCRATCH_RSRC_DWORD0";
 
-static const char *scratch_rsrc_dword1_symbol =
+static const char scratch_rsrc_dword1_symbol[] =
 	"SCRATCH_RSRC_DWORD1";
 
 struct si_shader_output_values




More information about the mesa-commit mailing list