Mesa (master): radv: Remove redundant format check.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 17 20:11:10 UTC 2018


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

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Mon Jul 30 15:43:19 2018 +0200

radv: Remove redundant format check.

The switch directly after the check has a default case that returns
NULL too, so the effective return value is not changed. Also this
check is wrong once we start dealing with formats introduced by an
extension (e.g. YUV formats).

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

---

 src/amd/vulkan/vk_format_table.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/amd/vulkan/vk_format_table.py b/src/amd/vulkan/vk_format_table.py
index 604aac8fa7..44c3439e9f 100644
--- a/src/amd/vulkan/vk_format_table.py
+++ b/src/amd/vulkan/vk_format_table.py
@@ -146,10 +146,6 @@ def write_format_table(formats):
     print("const struct vk_format_description *")
     print("vk_format_description(VkFormat format)")
     print("{")
-    print("   if (format > VK_FORMAT_END_RANGE) {")
-    print("      return NULL;")
-    print("   }")
-    print()
     print("   switch (format) {")
     for format in formats:
         print("   case %s:" % format.name)




More information about the mesa-commit mailing list