diff options
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_gpu_info.c | 4 | ||||
-rw-r--r-- | src/amd/common/ac_surface.c | 2 | ||||
-rw-r--r-- | src/amd/vulkan/radv_formats.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index 73fc36203c1..f93ef4cbade 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -333,8 +333,8 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev, } info->has_virtual_memory = true; - assert(util_is_power_of_two(dma.available_rings + 1)); - assert(util_is_power_of_two(compute.available_rings + 1)); + assert(util_is_power_of_two_or_zero(dma.available_rings + 1)); + assert(util_is_power_of_two_or_zero(compute.available_rings + 1)); info->num_sdma_rings = util_bitcount(dma.available_rings); info->num_compute_rings = util_bitcount(compute.available_rings); diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 81882576baf..1e1641daeec 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -275,7 +275,7 @@ static int gfx6_compute_level(ADDR_HANDLE addrlib, AddrSurfInfoIn->bpp) { unsigned alignment = 256 / (AddrSurfInfoIn->bpp / 8); - assert(util_is_power_of_two(AddrSurfInfoIn->bpp)); + assert(util_is_power_of_two_or_zero(AddrSurfInfoIn->bpp)); AddrSurfInfoIn->width = align(AddrSurfInfoIn->width, alignment); } diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index efb1d78790a..1bafe09e77f 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -638,13 +638,13 @@ radv_physical_device_get_format_properties(struct radv_physical_device *physical tiled |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT; } } - if (tiled && util_is_power_of_two(vk_format_get_blocksize(format)) && !scaled) { + if (tiled && util_is_power_of_two_or_zero(vk_format_get_blocksize(format)) && !scaled) { tiled |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR; } } - if (linear && util_is_power_of_two(vk_format_get_blocksize(format)) && !scaled) { + if (linear && util_is_power_of_two_or_zero(vk_format_get_blocksize(format)) && !scaled) { linear |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR | VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR; } |