dzn: Annotate sometimes-unused variables.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17340>
This commit is contained in:
Jesse Natalie 2022-06-30 20:49:43 -07:00 committed by Marge Bot
parent bfbcd966f3
commit f47e42fdba
5 changed files with 11 additions and 11 deletions

View File

@ -1819,7 +1819,7 @@ dzn_descriptor_set_copy(const VkCopyDescriptorSet *pDescriptorCopy)
copied_count < pDescriptorCopy->descriptorCount) {
VkDescriptorType src_type =
dzn_descriptor_set_ptr_get_vk_type(src_set->layout, &src_ptr);
VkDescriptorType dst_type =
ASSERTED VkDescriptorType dst_type =
dzn_descriptor_set_ptr_get_vk_type(dst_set->layout, &dst_ptr);
assert(src_type == dst_type);
@ -1928,7 +1928,7 @@ dzn_descriptor_update_template_create(struct dzn_device *device,
info->pDescriptorUpdateEntries[e].dstBinding,
info->pDescriptorUpdateEntries[e].dstArrayElement);
uint32_t desc_count = info->pDescriptorUpdateEntries[e].descriptorCount;
VkDescriptorType type = info->pDescriptorUpdateEntries[e].descriptorType;
ASSERTED VkDescriptorType type = info->pDescriptorUpdateEntries[e].descriptorType;
uint32_t d = 0;
while (dzn_descriptor_set_ptr_is_valid(&ptr) && d < desc_count) {

View File

@ -596,7 +596,7 @@ dzn_physical_device_get_format_support(struct dzn_physical_device *pdev,
};
ID3D12Device2 *dev = dzn_physical_device_get_d3d12_dev(pdev);
HRESULT hres =
ASSERTED HRESULT hres =
ID3D12Device1_CheckFeatureSupport(dev, D3D12_FEATURE_FORMAT_SUPPORT,
&dfmt_info, sizeof(dfmt_info));
assert(!FAILED(hres));
@ -2194,7 +2194,7 @@ dzn_device_memory_create(struct dzn_device *device,
vk_foreach_struct_const(ext, pAllocateInfo->pNext) {
switch (ext->sType) {
case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: {
const VkExportMemoryAllocateInfo *exp =
UNUSED const VkExportMemoryAllocateInfo *exp =
(const VkExportMemoryAllocateInfo *)ext;
// TODO: support export

View File

@ -690,7 +690,7 @@ dzn_BindImageMemory2(VkDevice dev,
case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: {
const VkBindImageMemorySwapchainInfoKHR *swapchain_info =
(const VkBindImageMemorySwapchainInfoKHR *) s;
struct dzn_image *swapchain_image =
ASSERTED struct dzn_image *swapchain_image =
dzn_swapchain_get_image(device,
swapchain_info->swapchain,
swapchain_info->imageIndex);
@ -1144,7 +1144,7 @@ dzn_image_view_init(struct dzn_device *device,
VK_FROM_HANDLE(dzn_image, image, pCreateInfo->image);
const VkImageSubresourceRange *range = &pCreateInfo->subresourceRange;
uint32_t layer_count = dzn_get_layer_count(image, range);
ASSERTED uint32_t layer_count = dzn_get_layer_count(image, range);
vk_image_view_init(&device->vk, &iview->vk, false, pCreateInfo);

View File

@ -45,7 +45,7 @@ dzn_meta_compile_shader(struct dzn_device *device, nir_shader *nir,
struct nir_to_dxil_options opts = { .environment = DXIL_ENVIRONMENT_VULKAN };
struct blob dxil_blob;
bool ret = nir_to_dxil(nir, &opts, &dxil_blob);
ASSERTED bool ret = nir_to_dxil(nir, &opts, &dxil_blob);
assert(ret);
char *err = NULL;

View File

@ -1521,7 +1521,7 @@ dzn_pipeline_init(struct dzn_pipeline *pipeline,
memcpy(pipeline->sets, layout->sets, sizeof(pipeline->sets));
vk_object_base_init(&device->vk, &pipeline->base, VK_OBJECT_TYPE_PIPELINE);
uint32_t max_streamsz =
ASSERTED uint32_t max_streamsz =
type == VK_PIPELINE_BIND_POINT_GRAPHICS ?
MAX_GFX_PIPELINE_STATE_STREAM_SIZE :
MAX_COMPUTE_PIPELINE_STATE_STREAM_SIZE;
@ -1853,9 +1853,9 @@ dzn_graphics_pipeline_get_state(struct dzn_graphics_pipeline *pipeline,
}
}
HRESULT hres = ID3D12Device2_CreatePipelineState(device->dev, &stream_desc,
&IID_ID3D12PipelineState,
(void**)(&variant->state));
ASSERTED HRESULT hres = ID3D12Device2_CreatePipelineState(device->dev, &stream_desc,
&IID_ID3D12PipelineState,
(void**)(&variant->state));
assert(!FAILED(hres));
he = _mesa_hash_table_insert(pipeline->variants, &variant->key, variant);
assert(he);