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>
/* 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;
exts->KHR_swapchain = true;
exts->KHR_swapchain_mutable_format = true;
#endif
-
}
static void
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,
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,
{
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,
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])
{
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)
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);
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);
.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);
}
.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);
}