mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 16:10:09 +01:00
imagination: Re-format using clang-format
No manual changes here, this is simply running $ ninja -C build/ clang-format Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Acked-by: Simon Perretta <simon.perretta@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37222>
This commit is contained in:
parent
81df517553
commit
48be3799b3
19 changed files with 50 additions and 53 deletions
|
|
@ -87,7 +87,7 @@
|
|||
* #pvr_get_packed_bvnc() and #PVR_BVNC_PACK()
|
||||
*/
|
||||
#define PVR_BVNC_UNPACK_B(bvnc) \
|
||||
((uint16_t)(((bvnc)&PVR_BVNC_PACK_MASK_B) >> PVR_BVNC_PACK_SHIFT_B))
|
||||
((uint16_t)(((bvnc) & PVR_BVNC_PACK_MASK_B) >> PVR_BVNC_PACK_SHIFT_B))
|
||||
|
||||
/**
|
||||
* Unpacks V value (version ID) from packed BVNC.
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
* #pvr_get_packed_bvnc() and #PVR_BVNC_PACK()
|
||||
*/
|
||||
#define PVR_BVNC_UNPACK_V(bvnc) \
|
||||
((uint16_t)(((bvnc)&PVR_BVNC_PACK_MASK_V) >> PVR_BVNC_PACK_SHIFT_V))
|
||||
((uint16_t)(((bvnc) & PVR_BVNC_PACK_MASK_V) >> PVR_BVNC_PACK_SHIFT_V))
|
||||
|
||||
/**
|
||||
* Unpacks N value (number of scalable units) from packed BVNC.
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
* #pvr_get_packed_bvnc() and #PVR_BVNC_PACK()
|
||||
*/
|
||||
#define PVR_BVNC_UNPACK_N(bvnc) \
|
||||
((uint16_t)(((bvnc)&PVR_BVNC_PACK_MASK_N) >> PVR_BVNC_PACK_SHIFT_N))
|
||||
((uint16_t)(((bvnc) & PVR_BVNC_PACK_MASK_N) >> PVR_BVNC_PACK_SHIFT_N))
|
||||
|
||||
/**
|
||||
* Unpacks C value (config ID) from packed BVNC.
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
* #pvr_get_packed_bvnc() and #PVR_BVNC_PACK()
|
||||
*/
|
||||
#define PVR_BVNC_UNPACK_C(bvnc) \
|
||||
((uint16_t)(((bvnc)&PVR_BVNC_PACK_MASK_C) >> PVR_BVNC_PACK_SHIFT_C))
|
||||
((uint16_t)(((bvnc) & PVR_BVNC_PACK_MASK_C) >> PVR_BVNC_PACK_SHIFT_C))
|
||||
|
||||
/**
|
||||
* Tests whether a physical device has a given feature.
|
||||
|
|
|
|||
|
|
@ -353,9 +353,9 @@ static inline bool pvr_dump_buffer_truncate(struct pvr_dump_buffer_ctx *ctx,
|
|||
return true;
|
||||
}
|
||||
|
||||
static inline const void *restrict
|
||||
pvr_dump_buffer_peek(struct pvr_dump_buffer_ctx *const restrict ctx,
|
||||
const uint64_t nr_bytes)
|
||||
static inline const void *restrict pvr_dump_buffer_peek(
|
||||
struct pvr_dump_buffer_ctx *const restrict ctx,
|
||||
const uint64_t nr_bytes)
|
||||
{
|
||||
if (!ctx->base.ok || !pvr_dump_ctx_require_top(&ctx->base))
|
||||
return NULL;
|
||||
|
|
@ -368,9 +368,9 @@ pvr_dump_buffer_peek(struct pvr_dump_buffer_ctx *const restrict ctx,
|
|||
return ctx->ptr;
|
||||
}
|
||||
|
||||
static inline const void *restrict
|
||||
pvr_dump_buffer_take(struct pvr_dump_buffer_ctx *const restrict ctx,
|
||||
const uint64_t nr_bytes)
|
||||
static inline const void *restrict pvr_dump_buffer_take(
|
||||
struct pvr_dump_buffer_ctx *const restrict ctx,
|
||||
const uint64_t nr_bytes)
|
||||
{
|
||||
const void *const ptr = pvr_dump_buffer_peek(ctx, nr_bytes);
|
||||
|
||||
|
|
|
|||
|
|
@ -92,8 +92,9 @@ __pvr_uint_unpack(uint64_t packed, uint32_t start, uint32_t end)
|
|||
return (packed >> start) & mask;
|
||||
}
|
||||
|
||||
static inline __attribute__((always_inline)) uint64_t
|
||||
__pvr_sint(int64_t v, uint32_t start, uint32_t end)
|
||||
static inline __attribute__((always_inline)) uint64_t __pvr_sint(int64_t v,
|
||||
uint32_t start,
|
||||
uint32_t end)
|
||||
{
|
||||
const int width = end - start + 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#include "util/macros.h"
|
||||
|
||||
#define H32(X) (uint32_t)((((X) >> 32U) & 0xFFFFFFFFUL))
|
||||
#define L32(X) (uint32_t)(((X)&0xFFFFFFFFUL))
|
||||
#define L32(X) (uint32_t)(((X) & 0xFFFFFFFFUL))
|
||||
|
||||
/*****************************************************************************
|
||||
Macro definitions
|
||||
|
|
|
|||
|
|
@ -674,8 +674,7 @@ static VkResult pvr_setup_texture_state_words(
|
|||
|
||||
pvr_csb_pack (&descriptor->sampler.words[1],
|
||||
TEXSTATE_SAMPLER_WORD1,
|
||||
sampler) {
|
||||
}
|
||||
sampler) {}
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
|
@ -1087,7 +1086,7 @@ static void pvr_setup_pbe_state(
|
|||
break;
|
||||
}
|
||||
|
||||
#define PVR_DEC_IF_NOT_ZERO(_v) (((_v) > 0) ? (_v)-1 : 0)
|
||||
#define PVR_DEC_IF_NOT_ZERO(_v) (((_v) > 0) ? (_v) - 1 : 0)
|
||||
|
||||
render_params.min_x_clip = MAX2(0, render_area->offset.x);
|
||||
render_params.min_y_clip = MAX2(0, render_area->offset.y);
|
||||
|
|
@ -3896,8 +3895,7 @@ static VkResult pvr_setup_descriptor_mappings(
|
|||
|
||||
pvr_csb_pack (&point_sampler_words[1],
|
||||
TEXSTATE_SAMPLER_WORD1,
|
||||
sampler) {
|
||||
}
|
||||
sampler) {}
|
||||
|
||||
struct pvr_suballoc_bo *point_sampler_bo;
|
||||
result = pvr_cmd_buffer_upload_general(cmd_buffer,
|
||||
|
|
@ -3932,8 +3930,7 @@ static VkResult pvr_setup_descriptor_mappings(
|
|||
|
||||
pvr_csb_pack (&ia_sampler_words[1],
|
||||
TEXSTATE_SAMPLER_WORD1,
|
||||
sampler) {
|
||||
}
|
||||
sampler) {}
|
||||
|
||||
struct pvr_suballoc_bo *ia_sampler_bo;
|
||||
result = pvr_cmd_buffer_upload_general(cmd_buffer,
|
||||
|
|
|
|||
|
|
@ -3350,8 +3350,7 @@ VkResult pvr_CreateSampler(VkDevice _device,
|
|||
word.non_normalized_coords = true;
|
||||
}
|
||||
|
||||
pvr_csb_pack (&sampler->descriptor.words[1], TEXSTATE_SAMPLER_WORD1, word) {
|
||||
}
|
||||
pvr_csb_pack (&sampler->descriptor.words[1], TEXSTATE_SAMPLER_WORD1, word) {}
|
||||
|
||||
/* Setup gather sampler. */
|
||||
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ struct pvr_renderpass_hwsetup_subpass {
|
|||
struct {
|
||||
enum pvr_renderpass_hwsetup_input_access type;
|
||||
uint32_t on_chip_rt;
|
||||
} * input_access;
|
||||
} *input_access;
|
||||
|
||||
uint8_t output_register_mask;
|
||||
bool has_stencil_self_dep;
|
||||
|
|
|
|||
|
|
@ -120,8 +120,7 @@ pvr_submit_info_stream_init(struct pvr_compute_ctx *ctx,
|
|||
}
|
||||
|
||||
if (PVR_HAS_FEATURE(dev_info, tpu_dm_global_registers)) {
|
||||
pvr_csb_pack (stream_ptr, CR_TPU_TAG_CDM_CTRL, value) {
|
||||
}
|
||||
pvr_csb_pack (stream_ptr, CR_TPU_TAG_CDM_CTRL, value) {}
|
||||
stream_ptr += pvr_cmd_length(CR_TPU_TAG_CDM_CTRL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@
|
|||
#define ROGUE_NUM_SHADER_STATE_BUFFERS 2U
|
||||
|
||||
/* TODO: Add reset framework support. */
|
||||
struct pvr_reset_cmd {
|
||||
};
|
||||
struct pvr_reset_cmd {};
|
||||
|
||||
struct rogue_sr_programs {
|
||||
struct pvr_bo *store_load_state_bo;
|
||||
|
|
|
|||
|
|
@ -991,8 +991,7 @@ pvr_spm_init_bgobj_state(struct pvr_device *device,
|
|||
sampler.dadjust = ROGUE_TEXSTATE_DADJUST_ZERO_UINT;
|
||||
}
|
||||
|
||||
pvr_csb_pack (&descriptor->words[1], TEXSTATE_SAMPLER_WORD1, sampler) {
|
||||
}
|
||||
pvr_csb_pack (&descriptor->words[1], TEXSTATE_SAMPLER_WORD1, sampler) {}
|
||||
|
||||
/* Even if we might have 8 output regs we can only pack and write 4 dwords
|
||||
* using R32G32B32A32_UINT.
|
||||
|
|
|
|||
|
|
@ -54,10 +54,13 @@ struct pvr_transfer_frag_store_entry_data {
|
|||
struct pvr_tq_frag_sh_reg_layout sh_reg_layout;
|
||||
};
|
||||
|
||||
#define to_pvr_entry_data(_entry) \
|
||||
_Generic((_entry), \
|
||||
struct hash_entry *: (struct pvr_transfer_frag_store_entry_data *)((_entry)->data), \
|
||||
const struct hash_entry *: (const struct pvr_transfer_frag_store_entry_data *)((_entry)->data))
|
||||
#define to_pvr_entry_data(_entry) \
|
||||
_Generic((_entry), \
|
||||
struct hash_entry *: (struct pvr_transfer_frag_store_entry_data \
|
||||
*)((_entry)->data), \
|
||||
const struct hash_entry *: ( \
|
||||
const struct pvr_transfer_frag_store_entry_data *)((_entry) \
|
||||
->data))
|
||||
|
||||
VkResult pvr_transfer_frag_store_init(struct pvr_device *device,
|
||||
struct pvr_transfer_frag_store *store)
|
||||
|
|
@ -122,10 +125,10 @@ static uint32_t pvr_transfer_frag_shader_key(
|
|||
hash |= layer->sample;
|
||||
|
||||
shift_hash(hash, 1U);
|
||||
hash |= (uint32_t) false;
|
||||
hash |= (uint32_t)false;
|
||||
|
||||
shift_hash(hash, 1U);
|
||||
hash |= (uint32_t) false;
|
||||
hash |= (uint32_t)false;
|
||||
|
||||
shift_hash(hash, pixel_src_bits);
|
||||
hash |= (uint32_t)layer->pbe_format;
|
||||
|
|
|
|||
|
|
@ -1207,7 +1207,8 @@ pco_shader *pvr_uscgen_loadop(pco_ctx *ctx, struct pvr_load_op *load_op)
|
|||
};
|
||||
|
||||
nir_intrinsic_instr *smp = pco_emit_nir_smp(&b, ¶ms);
|
||||
nir_def *smp_data = nir_channels(&b, &smp->def, nir_component_mask(chans));
|
||||
nir_def *smp_data =
|
||||
nir_channels(&b, &smp->def, nir_component_mask(chans));
|
||||
|
||||
nir_store_output(&b,
|
||||
smp_data,
|
||||
|
|
|
|||
|
|
@ -42,8 +42,7 @@ pco_shader *pvr_usc_eot(pco_ctx *ctx,
|
|||
const struct pvr_device_info *dev_info);
|
||||
|
||||
/* Transfer queue shader generation. */
|
||||
struct pvr_tq_props {
|
||||
};
|
||||
struct pvr_tq_props {};
|
||||
|
||||
pco_shader *pvr_usc_tq(pco_ctx *ctx, struct pvr_tq_props *props);
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ VkResult pvr_QueuePresentKHR(VkQueue _queue,
|
|||
VkResult result;
|
||||
|
||||
result = wsi_common_queue_present(&queue->device->pdevice->wsi_device,
|
||||
&queue->vk, pPresentInfo);
|
||||
&queue->vk,
|
||||
pPresentInfo);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
|
|
|
|||
|
|
@ -2220,8 +2220,8 @@ static const struct pvr_shader_factory_info spm_load_4X_2_regs_info = {
|
|||
static const uint8_t spm_load_4X_4_regs_shader_code[8] = { 0 };
|
||||
|
||||
static const struct pvr_shader_factory_info spm_load_4X_4_regs_info = {
|
||||
0, 0, 0, 0, 0, 0, spm_load_4X_4_regs_shader_code, 0, 0, NULL,
|
||||
0, 0, NULL, 0, NULL, 0, 4
|
||||
0, 0, 0, 0, 0, 0, spm_load_4X_4_regs_shader_code, 0, 0, NULL, 0,
|
||||
0, NULL, 0, NULL, 0, 4
|
||||
};
|
||||
|
||||
static const uint8_t spm_load_4X_1_buffers_shader_code[8] = { 0 };
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ static VkResult pvr_drm_override_quirks(struct pvr_drm_winsys *drm_ws,
|
|||
.pointer = (__u64)&query,
|
||||
};
|
||||
|
||||
/* clang-format off */
|
||||
/* clang-format off */
|
||||
#define PVR_QUIRKS(x) \
|
||||
x(48545) \
|
||||
x(49927) \
|
||||
|
|
@ -253,7 +253,7 @@ static VkResult pvr_drm_override_enhancements(struct pvr_drm_winsys *drm_ws,
|
|||
if (result != VK_SUCCESS)
|
||||
goto out_free_enhancements;
|
||||
|
||||
/* clang-format off */
|
||||
/* clang-format off */
|
||||
#define PVR_ENHANCEMENT_SET(number) \
|
||||
dev_info->enhancements.has_ern##number = \
|
||||
pvr_u32_in_array((uint32_t *)query.enhancements, query.count, number)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ struct pvr_drm_winsys {
|
|||
*/
|
||||
struct u_rwlock dmabuf_bo_lock;
|
||||
|
||||
|
||||
/* This array holds all our 'struct pvr_drm_winsys_bo' allocations. We use
|
||||
* this so we can add a refcount to our BOs and check if a particular BO was
|
||||
* already allocated in this device using its GEM handle. This is necessary
|
||||
|
|
|
|||
|
|
@ -121,9 +121,9 @@ static void pvr_drm_buffer_release(struct pvr_drm_winsys_bo *drm_bo)
|
|||
* so we don't want to free the BO pointer, instead we want to reset it
|
||||
* to 0, to signal that array entry as being free.
|
||||
*
|
||||
* We must do the reset before we actually free the BO in the kernel, since
|
||||
* otherwise there is a chance the application creates another BO in a
|
||||
* different thread and gets the same array entry, causing a race.
|
||||
* We must do the reset before we actually free the BO in the kernel,
|
||||
* since otherwise there is a chance the application creates another BO in
|
||||
* a different thread and gets the same array entry, causing a race.
|
||||
*/
|
||||
memset(drm_bo, 0, sizeof(*drm_bo));
|
||||
|
||||
|
|
@ -180,10 +180,10 @@ static uint64_t pvr_drm_get_alloc_flags(uint32_t ws_flags)
|
|||
}
|
||||
|
||||
static inline struct pvr_drm_winsys_bo *
|
||||
pvr_drm_winsys_lookup_bo(struct pvr_drm_winsys *drm_ws,
|
||||
uint32_t handle)
|
||||
pvr_drm_winsys_lookup_bo(struct pvr_drm_winsys *drm_ws, uint32_t handle)
|
||||
{
|
||||
return (struct pvr_drm_winsys_bo *) util_sparse_array_get(&drm_ws->bo_map, handle);
|
||||
return (struct pvr_drm_winsys_bo *)util_sparse_array_get(&drm_ws->bo_map,
|
||||
handle);
|
||||
}
|
||||
|
||||
VkResult pvr_drm_winsys_buffer_create(struct pvr_winsys *ws,
|
||||
|
|
|
|||
|
|
@ -141,9 +141,9 @@
|
|||
#define PVR_SRV_VERSION_MAJ 1U
|
||||
#define PVR_SRV_VERSION_MIN 17U
|
||||
|
||||
#define PVR_SRV_VERSION \
|
||||
(((uint32_t)((uint32_t)(PVR_SRV_VERSION_MAJ)&0xFFFFU) << 16U) | \
|
||||
(((PVR_SRV_VERSION_MIN)&0xFFFFU) << 0U))
|
||||
#define PVR_SRV_VERSION \
|
||||
(((uint32_t)((uint32_t)(PVR_SRV_VERSION_MAJ) & 0xFFFFU) << 16U) | \
|
||||
(((PVR_SRV_VERSION_MIN) & 0xFFFFU) << 0U))
|
||||
|
||||
#define PVR_SRV_VERSION_BUILD 6256262
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue