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

2014-11-15 Thread Siavash Eliasi


On 11/15/2014 01:20 AM, Timothy Arceri wrote:

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



Unfortunately I'm not familiar with autoconf, but I think the magic 
should happen at configure.ac. I think USE_SSE41 macro should only 
defined when: 1. SSE4.1 is not permanently disabled (-mno-sse4.1) and 2. 
target compiler supports generating SSE4.1 code.

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2014-11-14 Thread Siavash Eliasi
Fixes build process failure when providing -mno-sse4.1 CFLAGS:
vbo_exec_array.c:(.text+0x9bb): undefined reference to
`_mesa_uint_array_min_max'

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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2014-11-14 Thread Ilia Mirkin
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 siavashser...@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'

 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@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2014-11-14 Thread Siavash Eliasi

You are right. Any suggestions on how to fix this build failure?

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 siavashser...@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'

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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2014-11-14 Thread Timothy Arceri
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 siavashser...@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@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/mesa-dev
 
 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev