mesa: Fix clang build error w/ util_blitter_get_color_format_for_zs()
PATCH 1/2 mesa: Fix clang build error w/ util_blitter_get_color_format_for_zs()
Building with clang, I'm seeing
u_blitter.h:627:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
The util_blitter_get_color_format_for_zs() asserts for any unhandled types, so we do not expect to reach the end of the function here.
But provide a dummy return with an explicit assert above to ensure we don't hit it with any future changes to the logic.
--- src/gallium/auxiliary/util/u_blitter.h | 3 +++ 1 file changed, 3 insertions(+)
src/gallium/auxiliary/util/u_blitter.h +3 -0
@@ -624,6 +624,9 @@ util_blitter_get_color_format_for_zs(enum pipe_format format)default :assert (0 ); } +assert (0 ); +/*XXX NEVER GET HERE*/ +return PIPE_FORMAT_R32G32_UINT ; }#ifdef __cplusplus
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 mesa: Add ir3/ir3_nir_imul.c generation to Android.mk
With current master we're seeing build failures with AOSP:
error: undefined symbol: ir3_nir_lower_imul
This is due to the ir3_nir_imul.c file not being generated in the Android.mk files.
This patch simply adds it to the Android build, after which thigns build and boot ok on db410c.
--- src/freedreno/Makefile.sources | 3 ++- src/gallium/drivers/freedreno/Android.gen.mk | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-)
src/freedreno/Makefile.sources +2 -1
@@ -48,7 +48,8 @@ ir3_SOURCES := \ ir3/ir3_sun.c ir3_GENERATED_FILES := \ - ir3/ir3_nir_trig.c + ir3/ir3_nir_trig.c \ + ir3/ir3_nir_imul.c registers_FILES := \ registers/a2xx.xml.h \
src/gallium/drivers/freedreno/Android.gen.mk +7 -0
@@ -28,11 +28,18 @@ ir3_nir_trig_deps := \ $(MESA_TOP)/src/freedreno/ir3/ir3_nir_trig.py \ $(MESA_TOP)/src/compiler/nir/nir_algebraic.py +ir3_nir_imul_deps := \ + $(MESA_TOP)/src/freedreno/ir3/ir3_nir_imul.py + intermediates := $(call local-generated-sources-dir) $(intermediates)/ir3/ir3_nir_trig.c: $(ir3_nir_trig_deps) @mkdir -p $(dir $@) $(hide) $(MESA_PYTHON2) $< -p $(MESA_TOP)/src/compiler/nir > $@ +$(intermediates)/ir3/ir3_nir_imul.c: $(ir3_nir_imul_deps) + @mkdir -p $(dir $@) + $(hide) $(MESA_PYTHON2) $< -p $(MESA_TOP)/src/compiler/nir > $@ + LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \ $(ir3_GENERATED_FILES))
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] mesa: Add ir3/ir3_nir_imul.c generation to Android.mk
Quoted 10 lines · John Stultz
With current master we're seeing build failures with AOSP:
error: undefined symbol:ir3_nir_lower_imulThis is due to the
ir3_nir_imul.cfile not being generated in the Android.mk files.This patch simply adds it to the Android build, after which thigns build and boot ok on db410c.
Quoted 8 lines
Cc Rob Clark <[email protected]>Cc Emil Velikov <[email protected]>Cc Amit Pundir <[email protected]>Cc Sumit Semwal <[email protected]>Cc Alistair Strachan <[email protected]>Cc Greg Hartman <[email protected]>Cc Tapani Pälli <[email protected]>Signed-off-by John Stultz <[email protected]>
Quoted 45 lines
--- src/freedreno/Makefile.sources | 3 ++- src/gallium/drivers/freedreno/Android.gen.mk | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-)src/freedreno/Makefile.sources +2
-1@@ -48,7 +48,8 @@ ir3_SOURCES := \ ir3/ir3_sun.c ir3_GENERATED_FILES := \ - ir3/ir3_nir_trig.c + ir3/ir3_nir_trig.c \ + ir3/ir3_nir_imul.c registers_FILES := \ registers/a2xx.xml.h \src/gallium/drivers/freedreno/Android.gen.mk +7
-1@@ -28,11 +28,18 @@ ir3_nir_trig_deps := \ $(MESA_TOP)/src/freedreno/ir3/ir3_nir_trig.py \ $(MESA_TOP)/src/compiler/nir/nir_algebraic.py +ir3_nir_imul_deps := \ + $(MESA_TOP)/src/freedreno/ir3/ir3_nir_imul.py + intermediates := $(call local-generated-sources-dir) $(intermediates)/ir3/ir3_nir_trig.c: $(ir3_nir_trig_deps) @mkdir -p $(dir $@) $(hide) $(MESA_PYTHON2) $< -p $(MESA_TOP)/src/compiler/nir > $@ +$(intermediates)/ir3/ir3_nir_imul.c: $(ir3_nir_imul_deps) + @mkdir -p $(dir $@) + $(hide) $(MESA_PYTHON2) $< -p $(MESA_TOP)/src/compiler/nir > $@ + LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \ $(ir3_GENERATED_FILES)) --2.17.1
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thanks for the notice. I had already had a fix for this, but forgot to push it. It's pushed now.
Marek
Quoted 43 lines · John Stultz
Building with clang, I'm seeing
u_blitter.h:627:1: error: control may reach end of non-void function
[-Werror,-Wreturn-type]The
util_blitter_get_color_format_for_zs()asserts for any unhandled types, so we do not expect to reach the end of the function here.But provide a dummy return with an explicit assert above to ensure we don't hit it with any future changes to the logic.
Cc Rob Clark <[email protected]>Cc Emil Velikov <[email protected]>Cc Amit Pundir <[email protected]>Cc Sumit Semwal <[email protected]>Cc Alistair Strachan <[email protected]>Cc Greg Hartman <[email protected]>Cc Tapani Pälli <[email protected]>Cc Marek Olšák <[email protected]>Signed-off-by John Stultz <[email protected]>--- src/gallium/auxiliary/util/u_blitter.h | 3 +++ 1 file changed, 3 insertions(+)src/gallium/auxiliary/util/u_blitter.h +3
-0@@ -624,6 +624,9 @@ util_blitter_get_color_format_for_zs(enum pipe_format format)default :assert (0 ); } +assert (0 ); +/*XXX NEVER GET HERE*/ +return PIPE_FORMAT_R32G32_UINT ; }#ifdef
__cplusplus
--
2.17.1
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel