[Mesa-dev] [PATCH] mesa: Fix _mesa_uint_array_min_max linker error.

Timothy Arceri t_arceri at yahoo.com.au
Fri Nov 14 13:50:33 PST 2014


On Fri, 2014-11-14 at 22:14 +0330, Siavash Eliasi wrote:
> You are right. Any suggestions on how to fix this build failure?
> 

Using this would fix it but the optimisation would be disabled on clang.
Not sure how many people are concerned about this, I don't use clang
myself.

[1]
http://lists.freedesktop.org/archives/mesa-dev/2014-November/070387.html

> On 11/14/2014 10:10 PM, Ilia Mirkin wrote:
> > And disables the optimization unless you're building with a -march
> > that has sse4.1... thus defeating the purpose of doing it this way.
> >
> > On Fri, Nov 14, 2014 at 1:23 PM, Siavash Eliasi <siavashserver at gmail.com> wrote:
> >> Fixes build process failure when providing -mno-sse4.1 CFLAGS:
> >> vbo_exec_array.c:(.text+0x9bb): undefined reference to
> >> `_mesa_uint_array_min_max'

How annoying. I seems the intel driver for one doesn't support building
like this anyway. I'll say it again, it seems bad to stop the majority
of user accessing optimisations because of an one odd build setup.

> >>
> >> Similar bug:
> >> https://bugs.freedesktop.org/show_bug.cgi?id=71547
> >> ---
> >>   src/mesa/vbo/vbo_exec_array.c | 2 ++
> >>   1 file changed, 2 insertions(+)
> >>
> >> diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
> >> index e623b36..6362dd4 100644
> >> --- a/src/mesa/vbo/vbo_exec_array.c
> >> +++ b/src/mesa/vbo/vbo_exec_array.c
> >> @@ -121,12 +121,14 @@ vbo_get_minmax_index(struct gl_context *ctx,
> >>            }
> >>         }
> >>         else {
> >> +#ifdef __SSE4_1__
> >>   #if defined(USE_SSE41)
> >>            if (cpu_has_sse4_1) {
> >>               _mesa_uint_array_min_max(ui_indices, &min_ui, &max_ui, count);
> >>            }
> >>            else
> >>   #endif
> >> +#endif
> >>               for (i = 0; i < count; i++) {
> >>                  if (ui_indices[i] > max_ui) max_ui = ui_indices[i];
> >>                  if (ui_indices[i] < min_ui) min_ui = ui_indices[i];
> >> --
> >> 2.1.3
> >>
> >> _______________________________________________
> >> mesa-dev mailing list
> >> mesa-dev at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-dev mailing list