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

Author: Yonggang Luo <[email protected]>
Date:   Mon Aug  8 00:05:21 2022 +0800

util: Fixes invalid assumption that return non null by function 
util_format_fetch_rgba_func

Fixes: e342081c ("util/format: Assert that formats are valid")
Closes #7020

Signed-off-by: Yonggang Luo <[email protected]>
Reviewed-by: Konstantin Seurer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18024>

---

 src/util/format/u_format_table.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/format/u_format_table.py 
b/src/util/format/u_format_table.py
index cb5d8facf79..5adbb9f9594 100644
--- a/src/util/format/u_format_table.py
+++ b/src/util/format/u_format_table.py
@@ -185,7 +185,7 @@ def write_format_table(formats):
         print()
 
     def generate_function_getter(func):
-        print("ATTRIBUTE_RETURNS_NONNULL util_format_%s_func_ptr" % func)
+        print("util_format_%s_func_ptr" % func)
         print("util_format_%s_func(enum pipe_format format)" % (func))
         print("{")
         print("   assert(format < PIPE_FORMAT_COUNT);")

Reply via email to