asahi/lib: use #pragma once

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
Alyssa Rosenzweig 2024-02-07 23:18:08 -04:00 committed by Marge Bot
parent a296e7ec3a
commit 3333c2cdeb
15 changed files with 17 additions and 60 deletions

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __AGX_BO_H
#define __AGX_BO_H
#pragma once
#include <stdbool.h>
#include <stddef.h>
@ -131,5 +130,3 @@ struct agx_bo *agx_bo_cache_fetch(struct agx_device *dev, size_t size,
size_t align, uint32_t flags,
const bool dontwait);
void agx_bo_cache_evict_all(struct agx_device *dev);
#endif

View file

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __AGX_DEVICE_H
#define __AGX_DEVICE_H
#pragma once
#include "util/simple_mtx.h"
#include "util/sparse_array.h"
@ -152,5 +151,3 @@ agx_gpu_time_to_ns(struct agx_device *dev, uint64_t gpu_time)
{
return (gpu_time * NSEC_PER_SEC) / dev->params.timer_frequency_hz;
}
#endif

View file

@ -4,8 +4,7 @@
*
*/
#ifndef __AGX_FORMATS_H_
#define __AGX_FORMATS_H_
#pragma once
#include "util/format/u_format.h"
@ -29,5 +28,3 @@ struct agx_border_packed;
void agx_pack_border(struct agx_border_packed *out, const uint32_t in[4],
enum pipe_format format);
#endif

View file

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __AGX_HELPERS_H
#define __AGX_HELPERS_H
#pragma once
#include <stdbool.h>
#include "asahi/compiler/agx_compile.h"
@ -157,5 +156,3 @@ agx_translate_shade_model(struct agx_varyings_fs *fs, unsigned binding,
return AGX_SHADE_MODEL_FLAT_VERTEX_0;
}
}
#endif

View file

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __AGX_IO_H
#define __AGX_IO_H
#pragma once
#include <stdbool.h>
#include "agx_bo.h"
@ -272,5 +271,3 @@ struct agx_map_entry {
} __attribute__((packed));
uint64_t agx_get_global_id(struct agx_device *dev);
#endif

View file

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __AGX_META_H
#define __AGX_META_H
#pragma once
#include "asahi/compiler/agx_compile.h"
#include "agx_tilebuffer.h"
@ -43,5 +42,3 @@ struct agx_meta_shader *agx_get_meta_shader(struct agx_meta_cache *cache,
void agx_meta_init(struct agx_meta_cache *cache, struct agx_device *dev);
void agx_meta_cleanup(struct agx_meta_cache *cache);
#endif

View file

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __AGX_NIR_FORMAT_HELPERS_H
#define __AGX_NIR_FORMAT_HELPERS_H
#pragma once
#include "util/format/u_formats.h"
#include "nir_builder.h"
@ -28,5 +27,3 @@ nir_sign_extend_if_sint(nir_builder *b, nir_def *x, enum pipe_format format)
return nir_format_sign_extend_ivec(b, x, bits);
}
#endif

View file

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __AGX_NIR_LOWER_GS_H
#define __AGX_NIR_LOWER_GS_H
#pragma once
#include <stdbool.h>
#include <stdint.h>
@ -63,5 +62,3 @@ bool agx_nir_lower_tes(struct nir_shader *tes, const struct nir_shader *libagx);
uint64_t agx_tcs_per_vertex_outputs(const struct nir_shader *nir);
unsigned agx_tcs_output_stride(const struct nir_shader *nir);
#endif

View file

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __AGX_NIR_LOWER_VBO_H
#define __AGX_NIR_LOWER_VBO_H
#pragma once
#include <stdbool.h>
#include <stdint.h>
@ -37,5 +36,3 @@ bool agx_vbo_supports_format(enum pipe_format format);
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View file

@ -2,8 +2,8 @@
* Copyright 2022 Alyssa Rosenzweig
* SPDX-License-Identifier: MIT
*/
#ifndef AGX_PPP_H
#define AGX_PPP_H
#pragma once
#include "asahi/lib/agx_pack.h"
#include "pool.h"
@ -132,5 +132,3 @@ agx_ppp_fini(uint8_t **out, struct agx_ppp_update *ppp)
*out += AGX_PPP_STATE_LENGTH;
}
#endif

View file

@ -2,8 +2,8 @@
* Copyright 2023 Asahi Lina
* SPDX-License-Identifier: MIT
*/
#ifndef AGX_SCRATCH_H
#define AGX_SCRATCH_H
#pragma once
#include "agx_device.h"
#include <agx_pack.h>
@ -39,5 +39,3 @@ void agx_scratch_debug_post(struct agx_scratch *scratch);
uint32_t agx_scratch_get_bucket(uint32_t dwords);
void agx_scratch_alloc(struct agx_scratch *scratch, uint32_t dwords,
size_t subgroups);
#endif

View file

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __AGX_TILEBUFFER_H
#define __AGX_TILEBUFFER_H
#pragma once
#include <assert.h>
#include <stdbool.h>
@ -128,5 +127,3 @@ bool agx_tilebuffer_supports_mask(struct agx_tilebuffer_layout *tib,
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View file

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#ifndef AGX_USC_H
#define AGX_USC_H
#pragma once
#include "asahi/lib/agx_pack.h"
#include "asahi/lib/pool.h"
@ -100,5 +99,3 @@ agx_usc_shared_none(struct agx_usc_builder *b)
cfg.bytes_per_threadgroup = 65536;
}
}
#endif

View file

@ -5,8 +5,7 @@
*
*/
#ifndef __AGX_DECODE_H__
#define __AGX_DECODE_H__
#pragma once
#include <sys/types.h>
#include "agx_bo.h"
@ -37,5 +36,3 @@ void libagxdecode_vdm(uint64_t addr, const char *label, bool verbose);
void libagxdecode_cdm(uint64_t addr, const char *label, bool verbose);
void libagxdecode_usc(uint64_t addr, const char *label, bool verbose);
void libagxdecode_shutdown(void);
#endif /* __AGX_DECODE_H__ */

View file

@ -4,8 +4,7 @@
*
*/
#ifndef __AGX_POOL_H__
#define __AGX_POOL_H__
#pragma once
#include <stddef.h>
#include "asahi/lib/agx_pack.h"
@ -118,5 +117,3 @@ agx_pool_alloc_descs(struct agx_pool *pool,
#define agx_pool_alloc_desc_aggregate(pool, ...) \
agx_pool_alloc_descs(pool, AGX_DESC_AGGREGATE(__VA_ARGS__))
#endif