Mesa (main): anv: Fix assertion.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 18 11:14:54 UTC 2021


Module: Mesa
Branch: main
Commit: 9eb010ee1e14feeaa43a5b538023b7b4352236e1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9eb010ee1e14feeaa43a5b538023b7b4352236e1

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Sat Oct 16 22:34:25 2021 -0700

anv: Fix assertion.

Fix defect reported by Coverity Scan.

Assign instead of compare (PW.ASSIGN_WHERE_COMPARE_MEANT)
assign_where_compare_meant: use of "=" where "==" may have been intended

Fixes: 35315c68a57 ("anv: Use the common wrapper for GetPhysicalDeviceFormatProperties")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13395>

---

 src/intel/vulkan/anv_formats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index ab29fe76d7d..eabe7c0fb7b 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -930,7 +930,7 @@ void anv_GetPhysicalDeviceFormatProperties2(
    const struct intel_device_info *devinfo = &physical_device->info;
    const struct anv_format *anv_format = anv_get_format(vk_format);
 
-   assert(pFormatProperties->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
+   assert(pFormatProperties->sType == VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
 
    VkFormatFeatureFlags2KHR linear2, optimal2, buffer2;
    linear2 = anv_get_image_format_features2(devinfo, vk_format, anv_format,



More information about the mesa-commit mailing list