venus: silence compiler warnings

Silence warnings in release builds.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11166>
This commit is contained in:
Chia-I Wu 2021-06-03 09:10:36 -07:00 committed by Marge Bot
parent a8e75bb73c
commit 551d7032df
6 changed files with 13 additions and 11 deletions

View file

@ -368,7 +368,7 @@ vn_cmd_begin_render_pass(struct vn_command_buffer *cmd,
/* find fb attachments */
const VkImageView *views;
uint32_t view_count;
ASSERTED uint32_t view_count;
if (fb->image_view_count) {
views = fb->image_views;
view_count = fb->image_view_count;

View file

@ -1468,7 +1468,6 @@ vn_physical_device_get_native_extensions(
exts->KHR_swapchain = true;
exts->KHR_swapchain_mutable_format = true;
#endif
}
static void

View file

@ -371,7 +371,8 @@ vn_GetDeviceMemoryOpaqueCaptureAddress(
VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo *pInfo)
{
struct vn_device *dev = vn_device_from_handle(device);
struct vn_device_memory *mem = vn_device_memory_from_handle(pInfo->memory);
ASSERTED struct vn_device_memory *mem =
vn_device_memory_from_handle(pInfo->memory);
assert(!mem->base_memory);
return vn_call_vkGetDeviceMemoryOpaqueCaptureAddress(dev->instance, device,
@ -455,7 +456,8 @@ vn_GetDeviceMemoryCommitment(VkDevice device,
VkDeviceSize *pCommittedMemoryInBytes)
{
struct vn_device *dev = vn_device_from_handle(device);
struct vn_device_memory *mem = vn_device_memory_from_handle(memory);
ASSERTED struct vn_device_memory *mem =
vn_device_memory_from_handle(memory);
assert(!mem->base_memory);
vn_call_vkGetDeviceMemoryCommitment(dev->instance, device, memory,

View file

@ -787,7 +787,7 @@ vn_GetSemaphoreCounterValue(VkDevice device,
{
struct vn_device *dev = vn_device_from_handle(device);
struct vn_semaphore *sem = vn_semaphore_from_handle(semaphore);
struct vn_sync_payload *payload = sem->payload;
ASSERTED struct vn_sync_payload *payload = sem->payload;
assert(payload->type == VN_SYNC_TYPE_DEVICE_ONLY);
return vn_call_vkGetSemaphoreCounterValue(dev->instance, device, semaphore,
@ -815,7 +815,7 @@ vn_find_first_signaled_semaphore(VkDevice device,
uint32_t count)
{
for (uint32_t i = 0; i < count; i++) {
uint64_t val;
uint64_t val = 0;
VkResult result =
vn_GetSemaphoreCounterValue(device, semaphores[i], &val);
if (result != VK_SUCCESS || val >= values[i])
@ -832,7 +832,7 @@ vn_remove_signaled_semaphores(VkDevice device,
{
uint32_t cur = 0;
for (uint32_t i = 0; i < *count; i++) {
uint64_t val;
uint64_t val = 0;
VkResult result =
vn_GetSemaphoreCounterValue(device, semaphores[i], &val);
if (result != VK_SUCCESS)

View file

@ -297,7 +297,7 @@ static inline struct vn_renderer_shmem *
vn_renderer_shmem_ref(struct vn_renderer *renderer,
struct vn_renderer_shmem *shmem)
{
const int old =
ASSERTED const int old =
atomic_fetch_add_explicit(&shmem->refcount, 1, memory_order_relaxed);
assert(old >= 1);
@ -365,7 +365,7 @@ vn_renderer_bo_create_from_dma_buf(struct vn_renderer *renderer,
static inline struct vn_renderer_bo *
vn_renderer_bo_ref(struct vn_renderer *renderer, struct vn_renderer_bo *bo)
{
const int old =
ASSERTED const int old =
atomic_fetch_add_explicit(&bo->refcount, 1, memory_order_relaxed);
assert(old >= 1);

View file

@ -667,7 +667,7 @@ virtgpu_ioctl_gem_close(struct virtgpu *gpu, uint32_t gem_handle)
.handle = gem_handle,
};
const int ret = virtgpu_ioctl(gpu, DRM_IOCTL_GEM_CLOSE, &args);
ASSERTED const int ret = virtgpu_ioctl(gpu, DRM_IOCTL_GEM_CLOSE, &args);
assert(!ret);
}
@ -741,7 +741,8 @@ virtgpu_ioctl_syncobj_destroy(struct virtgpu *gpu, uint32_t syncobj_handle)
.handle = syncobj_handle,
};
const int ret = virtgpu_ioctl(gpu, DRM_IOCTL_SYNCOBJ_DESTROY, &args);
ASSERTED const int ret =
virtgpu_ioctl(gpu, DRM_IOCTL_SYNCOBJ_DESTROY, &args);
assert(!ret);
}