aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_log.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2020-03-31 08:31:00 -0700
committerMarge Bot <[email protected]>2020-04-01 00:51:09 +0000
commit59754409cc6e9c9e8f9f82a4a523e7370c373a07 (patch)
tree1ebed5b8c65db62d6d7bce72eca379080198c4a7 /src/gallium/drivers/freedreno/freedreno_log.c
parentb097e326b8b066d3697c79aec2c6c32c453757f9 (diff)
freedreno/log: fix build error
It seems some versions of gcc are less clever about const initializers: ``` ../src/gallium/drivers/freedreno/freedreno_log.c:58:33: error: initializer element is not constant const unsigned msgs_per_chunk = bo_size / sizeof(uint64_t); ^~~~~~~ ``` See https://gitlab.freedesktop.org/mesa/mesa/-/issues/2713 Signed-off-by: Rob Clark <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4390> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4390>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_log.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_log.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_log.c b/src/gallium/drivers/freedreno/freedreno_log.c
index c1fe4da8142..8eb1966aabf 100644
--- a/src/gallium/drivers/freedreno/freedreno_log.c
+++ b/src/gallium/drivers/freedreno/freedreno_log.c
@@ -54,8 +54,10 @@
* for profiling at that level.
*/
-const unsigned bo_size = 0x1000;
-const unsigned msgs_per_chunk = bo_size / sizeof(uint64_t);
+enum {
+ bo_size = 0x1000,
+ msgs_per_chunk = bo_size / sizeof(uint64_t),
+};
struct fd_log_chunk {
struct list_head node;