All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support
@ 2017-03-26 16:28 Romain Naour
  2017-03-26 16:28 ` [Buildroot] [PATCH 2/5] package/mesa3d: add libvdpau optional dependency Romain Naour
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Romain Naour @ 2017-03-26 16:28 UTC (permalink / raw)
  To: buildroot

While testing on a PC target with an HD6310 graphic card, the
OpenGL support was in "compat profile" mode (i.e OpenGL 2.1).

Extended renderer info (GLX_MESA_query_renderer):
    Vendor: X.Org (0x1002)
    Device: AMD PALM (DRM 2.49.0 / 4.10.4) (0x9802)
    Version: 17.0.2
    Accelerated: yes
    Video memory: 256MB
    Unified memory: no
    Preferred profile: compat (0x2)
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD PALM (DRM 2.49.0 / 4.10.4)
OpenGL version string: 2.1 Mesa 17.0.2
OpenGL shading language version string: 1.30

OpenGL ES profile version string: OpenGL ES 2.0 Mesa 17.0.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16

It turn out that texture float support was missing...

Extended renderer info (GLX_MESA_query_renderer):
    Vendor: X.Org (0x1002)
    Device: AMD PALM (DRM 2.49.0 / 4.10.4) (0x9802)
    Version: 17.0.2
    Accelerated: yes
    Video memory: 256MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD PALM (DRM 2.49.0 / 4.10.4)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.0.2
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 17.0.2
OpenGL shading language version string: 1.30
OpenGL context flags: (none)

Add a new option to let the user disable this feature if
it doesn't comply to the SGI license.
Add docs/patents.txt to MESA3D_LICENSE_FILES

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
---
NOTE: --enable-texture-float is always enabled in the masa package
in Fedora:
http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/tree/mesa.spec?h=f25#n418
---
 package/mesa3d/Config.in | 18 ++++++++++++++++++
 package/mesa3d/mesa3d.mk |  7 +++++++
 2 files changed, 25 insertions(+)

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 2b085ab..b743df3 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -194,6 +194,24 @@ config BR2_PACKAGE_MESA3D_OPENGL_ES
 	  Use the Khronos OpenGL ES APIs. This is commonly used on embedded
 	  systems and represents a subset of the OpenGL API.
 
+config BR2_PACKAGE_MESA3D_OPENGL_TEXTURE_FLOAT
+	bool "OpenGL texture float (patented format)"
+	help
+	  GL_ARB_texture_float is required to enable GLX core profile
+	  (OpenGL3.x) otherwise the compat profile is used (OpenGL2.1).
+
+	  The source code to implement ARB_texture_float extension is
+	  included and can be toggled on at compile time, for those who
+	  purchased a license from SGI, or are in a country where the
+	  patent does not apply, etc.
+
+	  Please consult docs/patents.txt with your lawyer before
+	  building Mesa.
+
+	  If unsure, say N.
+
+	  http://www.google.com/patents/about?id=mIIOAAAAEBAJ&dq=6650327
+
 endif # BR2_PACKAGE_MESA3D_DRIVER
 
 config BR2_PACKAGE_PROVIDES_LIBGL
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 07f43bb..57e83ca 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -183,6 +183,13 @@ else
 MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2
 endif
 
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_TEXTURE_FLOAT),y)
+MESA3D_CONF_OPTS += --enable-texture-float
+MESA3D_LICENSE_FILES += docs/patents.txt
+else
+MESA3D_CONF_OPTS += --disable-texture-float
+endif
+
 ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
 MESA3D_CONF_OPTS += --enable-lmsensors
 MESA3D_DEPENDENCIES += lm-sensors
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 2/5] package/mesa3d: add libvdpau optional dependency
  2017-03-26 16:28 [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Romain Naour
@ 2017-03-26 16:28 ` Romain Naour
  2017-04-01 13:56   ` Thomas Petazzoni
  2017-03-26 16:28 ` [Buildroot] [PATCH 3/5] package/meda3d: add xlib_libXvMC " Romain Naour
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Romain Naour @ 2017-03-26 16:28 UTC (permalink / raw)
  To: buildroot

If libvdpau package is build before mesa3d, it will be detected and
enabled by the configure script.

Handle libvdpau in mesa3d for consistency.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/mesa3d/mesa3d.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 57e83ca..caaf03a 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -190,6 +190,13 @@ else
 MESA3D_CONF_OPTS += --disable-texture-float
 endif
 
+ifeq ($(BR2_PACKAGE_LIBVDPAU),y)
+MESA3D_DEPENDENCIES += libvdpau
+MESA3D_CONF_OPTS += --enable-vdpau
+else
+MESA3D_CONF_OPTS += --disable-vdpau
+endif
+
 ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
 MESA3D_CONF_OPTS += --enable-lmsensors
 MESA3D_DEPENDENCIES += lm-sensors
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 3/5] package/meda3d: add xlib_libXvMC optional dependency
  2017-03-26 16:28 [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Romain Naour
  2017-03-26 16:28 ` [Buildroot] [PATCH 2/5] package/mesa3d: add libvdpau optional dependency Romain Naour
@ 2017-03-26 16:28 ` Romain Naour
  2017-04-01 13:57   ` Thomas Petazzoni
  2017-03-26 16:28 ` [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm Romain Naour
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Romain Naour @ 2017-03-26 16:28 UTC (permalink / raw)
  To: buildroot

If xlib_libXvMC package is build before mesa3d, it will be detected and
enabled by the configure script.

Handle xlib_libXvMC in mesa3d for consistency.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/mesa3d/mesa3d.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index caaf03a..f6a7151 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -190,6 +190,13 @@ else
 MESA3D_CONF_OPTS += --disable-texture-float
 endif
 
+ifeq ($(BR2_PACKAGE_XLIB_LIBXVMC),y)
+MESA3D_DEPENDENCIES += xlib_libXvMC
+MESA3D_CONF_OPTS += --enable-xvmc
+else
+MESA3D_CONF_OPTS += --disable-xvmc
+endif
+
 ifeq ($(BR2_PACKAGE_LIBVDPAU),y)
 MESA3D_DEPENDENCIES += libvdpau
 MESA3D_CONF_OPTS += --enable-vdpau
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm
  2017-03-26 16:28 [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Romain Naour
  2017-03-26 16:28 ` [Buildroot] [PATCH 2/5] package/mesa3d: add libvdpau optional dependency Romain Naour
  2017-03-26 16:28 ` [Buildroot] [PATCH 3/5] package/meda3d: add xlib_libXvMC " Romain Naour
@ 2017-03-26 16:28 ` Romain Naour
  2017-03-29  4:41   ` Bernd Kuhls
  2017-04-01 13:59   ` Thomas Petazzoni
  2017-03-26 16:28 ` [Buildroot] [PATCH 5/5] package/mesa3d: enable gallium extra hud Romain Naour
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 17+ messages in thread
From: Romain Naour @ 2017-03-26 16:28 UTC (permalink / raw)
  To: buildroot

assembly are enabled by default on supported plaforms even while
crosscompiling if host == target:

checking whether to enable assembly... yes, x86_64

It was also disabled in the mesa package in Fedora since 7.6 [1].

[1] http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/commit/?id=629c8726

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/mesa3d/mesa3d.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index f6a7151..1c83ad2 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -22,6 +22,9 @@ MESA3D_DEPENDENCIES = \
 	expat \
 	libdrm
 
+# Disable assembly usage.
+MESA3D_CONF_OPTS = --disable-asm
+
 # The Sourcery MIPS toolchain has a special (non-upstream) feature to
 # have "compact exception handling", which unfortunately breaks with
 # mesa3d, so we disable it here by passing -mno-compact-eh.
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 5/5] package/mesa3d: enable gallium extra hud
  2017-03-26 16:28 [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Romain Naour
                   ` (2 preceding siblings ...)
  2017-03-26 16:28 ` [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm Romain Naour
@ 2017-03-26 16:28 ` Romain Naour
  2017-03-28 17:49 ` [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Bernd Kuhls
  2017-04-01 13:56 ` Thomas Petazzoni
  5 siblings, 0 replies; 17+ messages in thread
From: Romain Naour @ 2017-03-26 16:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/mesa3d/mesa3d.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 1c83ad2..e780dfb 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -88,11 +88,13 @@ MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL)   += intel
 
 ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
 MESA3D_CONF_OPTS += \
-	--without-gallium-drivers
+	--without-gallium-drivers \
+	--disable-gallium-extra-hud
 else
 MESA3D_CONF_OPTS += \
 	--enable-shared-glapi \
-	--with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y))
+	--with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y)) \
+	--enable-gallium-extra-hud
 endif
 
 ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support
  2017-03-26 16:28 [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Romain Naour
                   ` (3 preceding siblings ...)
  2017-03-26 16:28 ` [Buildroot] [PATCH 5/5] package/mesa3d: enable gallium extra hud Romain Naour
@ 2017-03-28 17:49 ` Bernd Kuhls
  2017-03-28 20:38   ` Romain Naour
  2017-04-01 13:56 ` Thomas Petazzoni
  5 siblings, 1 reply; 17+ messages in thread
From: Bernd Kuhls @ 2017-03-28 17:49 UTC (permalink / raw)
  To: buildroot

Am Sun, 26 Mar 2017 18:28:49 +0200 schrieb Romain Naour:

> OpenGL version string: 2.1 Mesa 17.0.2
> It turn out that texture float support was missing...
> OpenGL version string: 3.0 Mesa 17.0.2
[...]
> +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_TEXTURE_FLOAT),y)
> +MESA3D_CONF_OPTS += --enable-texture-float
> +MESA3D_LICENSE_FILES += docs/patents.txt
> +else
> +MESA3D_CONF_OPTS += --disable-texture-float
> +endif

Hi,

wondering why Kodi already prints

NOTICE: GL_VERSION = 3.0 Mesa 17.0.2

during startup on my system without your patch and 
BR2_PACKAGE_MESA3D_DRI_DRIVER_I965=y I investigated its changes and 
compiled this defconfig (snipped non-mesa3d options):

BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_I915=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_I965=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON=y
BR2_PACKAGE_MESA3D_OSMESA=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_XORG7=y

with
BR2_PACKAGE_MESA3D_OPENGL_TEXTURE_FLOAT=y

and without your patch.

The directory output/target/usr/lib/dri/ contains these files, I added a 
note when the filesize changed due to --enable-texture-float:

i915_dri.so
i965_dri.so
kms_swrast_dri.so	(changed)
nouveau_dri.so		(changed, same as kms_swrast_dri.so)
nouveau_vieux_dri.so
r600_dri.so		(changed, same as kms_swrast_dri.so)
radeon_dri.so
swrast_dri.so		(changed, same as kms_swrast_dri.so)
virtio_gpu_dri.so	(changed, same as kms_swrast_dri.so)
vmwgfx_dri.so		(changed, same as kms_swrast_dri.so)

libGL.so/libEGL.so/libGLES*.so stayed unchanged.

Afaics the reason why the Intel drivers are unaffected could be this line 
of code where texture float support is always enabled:

https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/i965/
intel_extensions.c?h=17.0#n83

Other parts of the mesa3d contain #ifdef, like this:
https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/main/extensions.c?
h=17.0#n134

I am not familiar with the internal structures of mesa3d beyond my 
observations, maybe you should add a note to Config.in that your 
configure option does not affect all drivers.

Regards, Bernd

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support
  2017-03-28 17:49 ` [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Bernd Kuhls
@ 2017-03-28 20:38   ` Romain Naour
  2017-03-29  4:41     ` Bernd Kuhls
  0 siblings, 1 reply; 17+ messages in thread
From: Romain Naour @ 2017-03-28 20:38 UTC (permalink / raw)
  To: buildroot

Hi Bernd, All

Le 28/03/2017 ? 19:49, Bernd Kuhls a ?crit :
> Am Sun, 26 Mar 2017 18:28:49 +0200 schrieb Romain Naour:
> 
>> OpenGL version string: 2.1 Mesa 17.0.2
>> It turn out that texture float support was missing...
>> OpenGL version string: 3.0 Mesa 17.0.2
> [...]
>> +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_TEXTURE_FLOAT),y)
>> +MESA3D_CONF_OPTS += --enable-texture-float
>> +MESA3D_LICENSE_FILES += docs/patents.txt
>> +else
>> +MESA3D_CONF_OPTS += --disable-texture-float
>> +endif
> 
> Hi,
> 
> wondering why Kodi already prints
> 
> NOTICE: GL_VERSION = 3.0 Mesa 17.0.2
> 
> during startup on my system without your patch and 
> BR2_PACKAGE_MESA3D_DRI_DRIVER_I965=y I investigated its changes and 
> compiled this defconfig (snipped non-mesa3d options):
> 
> BR2_PACKAGE_MESA3D=y
> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU=y
> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600=y
> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA=y
> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
> BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
> BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
> BR2_PACKAGE_MESA3D_DRI_DRIVER_I915=y
> BR2_PACKAGE_MESA3D_DRI_DRIVER_I965=y
> BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU=y
> BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON=y
> BR2_PACKAGE_MESA3D_OSMESA=y
> BR2_PACKAGE_MESA3D_OPENGL_ES=y
> BR2_PACKAGE_XORG7=y
> 
> with
> BR2_PACKAGE_MESA3D_OPENGL_TEXTURE_FLOAT=y
> 
> and without your patch.
> 
> The directory output/target/usr/lib/dri/ contains these files, I added a 
> note when the filesize changed due to --enable-texture-float:
> 
> i915_dri.so
> i965_dri.so
> kms_swrast_dri.so	(changed)
> nouveau_dri.so		(changed, same as kms_swrast_dri.so)
> nouveau_vieux_dri.so
> r600_dri.so		(changed, same as kms_swrast_dri.so)
> radeon_dri.so
> swrast_dri.so		(changed, same as kms_swrast_dri.so)
> virtio_gpu_dri.so	(changed, same as kms_swrast_dri.so)
> vmwgfx_dri.so		(changed, same as kms_swrast_dri.so)

Good catch :)

> 
> libGL.so/libEGL.so/libGLES*.so stayed unchanged.
> 
> Afaics the reason why the Intel drivers are unaffected could be this line 
> of code where texture float support is always enabled:
> 
> https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/i965/
> intel_extensions.c?h=17.0#n83
> 
> Other parts of the mesa3d contain #ifdef, like this:
> https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/main/extensions.c?
> h=17.0#n134

Indeed, I saw the ifdef TEXTURE_FLOAT_ENABLED in mesa/main/extensions.c while
checking what --enable-texture-float was doing, but I didn't noticed that it was
always enabled for Intel devices...

It's seems a bug in mesa/drivers/dri/i965/intel_extensions.c which is not
affected by this option...

> 
> I am not familiar with the internal structures of mesa3d beyond my 
> observations, maybe you should add a note to Config.in that your 
> configure option does not affect all drivers.

Me too, I spent several hours searching why OpenGL was in compat mode with the
system produced by Buildroot... I tested the same target with Fedora and noticed
that OpenGL 3.3 was enabled.

Ok, I'll add a note about this.

Do you have any comment on the following patches of this series ?

Best regards,
Romain

> 
> Regards, Bernd
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm
  2017-03-26 16:28 ` [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm Romain Naour
@ 2017-03-29  4:41   ` Bernd Kuhls
  2017-03-29 21:28     ` Romain Naour
  2017-04-01 13:59   ` Thomas Petazzoni
  1 sibling, 1 reply; 17+ messages in thread
From: Bernd Kuhls @ 2017-03-29  4:41 UTC (permalink / raw)
  To: buildroot

Am Sun, 26 Mar 2017 18:28:52 +0200 schrieb Romain Naour:

> assembly are enabled by default on supported plaforms even while
> crosscompiling if host == target:
> 
> checking whether to enable assembly... yes, x86_64
> 
> It was also disabled in the mesa package in Fedora since 7.6 [1].
> 
> [1] http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/commit/?id=629c8726

Hi,

I am unsure about this patch, why shouldn't we use asm code when 
crosscompiling for host == target CPU?
Fedora disabled it due to problems with selinux, Gentoo did something 
similar: https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/mesa/
mesa-17.0.2.ebuild#n302.
Debian disabled asm only for x32: https://anonscm.debian.org/git/pkg-xorg/
lib/mesa.git/tree/debian/rules?h=debian-experimental#n111

Regards, Bernd

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support
  2017-03-28 20:38   ` Romain Naour
@ 2017-03-29  4:41     ` Bernd Kuhls
  2017-03-29 21:46       ` Romain Naour
  0 siblings, 1 reply; 17+ messages in thread
From: Bernd Kuhls @ 2017-03-29  4:41 UTC (permalink / raw)
  To: buildroot

Am Tue, 28 Mar 2017 22:38:48 +0200 schrieb Romain Naour:

> Do you have any comment on the following patches of this series ?

Hi,

no, because I am neither using a gallium driver nor libvdpau I can not 
run-time test the changes.

For the asm patch I sent another comment.

Regards, Bernd

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm
  2017-03-29  4:41   ` Bernd Kuhls
@ 2017-03-29 21:28     ` Romain Naour
  2017-03-29 21:35       ` Thomas Petazzoni
  0 siblings, 1 reply; 17+ messages in thread
From: Romain Naour @ 2017-03-29 21:28 UTC (permalink / raw)
  To: buildroot

Hi Bernd, All,

Le 29/03/2017 ? 06:41, Bernd Kuhls a ?crit :
> Am Sun, 26 Mar 2017 18:28:52 +0200 schrieb Romain Naour:
> 
>> assembly are enabled by default on supported plaforms even while
>> crosscompiling if host == target:
>>
>> checking whether to enable assembly... yes, x86_64
>>
>> It was also disabled in the mesa package in Fedora since 7.6 [1].
>>
>> [1] http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/commit/?id=629c8726
> 
> Hi,
> 
> I am unsure about this patch, why shouldn't we use asm code when 
> crosscompiling for host == target CPU?

To be honest I don't really have an issue with assembly being enabled for my use
case. But there is an issue when you want a reproducible build with the same
defconfig build on a x86 and x86_64 host.

Let see what other think.

Best regards,
Romain

> Fedora disabled it due to problems with selinux, Gentoo did something 
> similar: https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/mesa/
> mesa-17.0.2.ebuild#n302.
> Debian disabled asm only for x32: https://anonscm.debian.org/git/pkg-xorg/
> lib/mesa.git/tree/debian/rules?h=debian-experimental#n111
> 
> Regards, Bernd
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm
  2017-03-29 21:28     ` Romain Naour
@ 2017-03-29 21:35       ` Thomas Petazzoni
  2017-03-29 21:55         ` Romain Naour
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2017-03-29 21:35 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 29 Mar 2017 23:28:56 +0200, Romain Naour wrote:

> Le 29/03/2017 ? 06:41, Bernd Kuhls a ?crit :
> > Am Sun, 26 Mar 2017 18:28:52 +0200 schrieb Romain Naour:
> >   
> >> assembly are enabled by default on supported plaforms even while
> >> crosscompiling if host == target:
> >>
> >> checking whether to enable assembly... yes, x86_64
> >>
> >> It was also disabled in the mesa package in Fedora since 7.6 [1].
> >>
> >> [1] http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/commit/?id=629c8726  
> > 
> > Hi,
> > 
> > I am unsure about this patch, why shouldn't we use asm code when 
> > crosscompiling for host == target CPU?  
> 
> To be honest I don't really have an issue with assembly being enabled for my use
> case. But there is an issue when you want a reproducible build with the same
> defconfig build on a x86 and x86_64 host.

For which architectures is the assembly code available? We should
forcefully enable it for those architectures.

I agree with Romain that we shouldn't depend on something that looks at
the architecture of the host machine to decide if a feature for the
target should be enabled or not.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support
  2017-03-29  4:41     ` Bernd Kuhls
@ 2017-03-29 21:46       ` Romain Naour
  0 siblings, 0 replies; 17+ messages in thread
From: Romain Naour @ 2017-03-29 21:46 UTC (permalink / raw)
  To: buildroot

Hi Bernd, All,

Le 29/03/2017 ? 06:41, Bernd Kuhls a ?crit :
> Am Tue, 28 Mar 2017 22:38:48 +0200 schrieb Romain Naour:
> 
>> Do you have any comment on the following patches of this series ?
> 
> Hi,
> 
> no, because I am neither using a gallium driver nor libvdpau I can not 
> run-time test the changes.

Since you're the mesa3d developer in Buildroot, I believe a review from you
would be enough to help maintainers to merge these patches.

I'm not asking you to do a runtime test ;-)

> 
> For the asm patch I sent another comment.

Thanks!

Best regards,
Romain

> 
> Regards, Bernd
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm
  2017-03-29 21:35       ` Thomas Petazzoni
@ 2017-03-29 21:55         ` Romain Naour
  0 siblings, 0 replies; 17+ messages in thread
From: Romain Naour @ 2017-03-29 21:55 UTC (permalink / raw)
  To: buildroot

Hi Thomas, Bernd, All,

Le 29/03/2017 ? 23:35, Thomas Petazzoni a ?crit :
> Hello,
> 
> On Wed, 29 Mar 2017 23:28:56 +0200, Romain Naour wrote:
> 
>> Le 29/03/2017 ? 06:41, Bernd Kuhls a ?crit :
>>> Am Sun, 26 Mar 2017 18:28:52 +0200 schrieb Romain Naour:
>>>   
>>>> assembly are enabled by default on supported plaforms even while
>>>> crosscompiling if host == target:
>>>>
>>>> checking whether to enable assembly... yes, x86_64
>>>>
>>>> It was also disabled in the mesa package in Fedora since 7.6 [1].
>>>>
>>>> [1] http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/commit/?id=629c8726  
>>>
>>> Hi,
>>>
>>> I am unsure about this patch, why shouldn't we use asm code when 
>>> crosscompiling for host == target CPU?  
>>
>> To be honest I don't really have an issue with assembly being enabled for my use
>> case. But there is an issue when you want a reproducible build with the same
>> defconfig build on a x86 and x86_64 host.
> 
> For which architectures is the assembly code available? We should
> forcefully enable it for those architectures.

Assembly code is available for x86, x86_64/amd64 and sparc (see configure.ac).

The issue while cross-compiling is when assembly are enabled, the build system
build and run a small tool called gen_matypes on the host.

"disable if cross compiling on x86/x86_64 since we must run gen_matypes"

So it allow to enable assembly code while cross-compiling only when the host =
target.

> 
> I agree with Romain that we shouldn't depend on something that looks at
> the architecture of the host machine to decide if a feature for the
> target should be enabled or not.

I believe we don't have the choice... we need to disable it.

Best regards,
Romain

> 
> Thomas
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support
  2017-03-26 16:28 [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Romain Naour
                   ` (4 preceding siblings ...)
  2017-03-28 17:49 ` [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Bernd Kuhls
@ 2017-04-01 13:56 ` Thomas Petazzoni
  5 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2017-04-01 13:56 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 26 Mar 2017 18:28:49 +0200, Romain Naour wrote:
> While testing on a PC target with an HD6310 graphic card, the
> OpenGL support was in "compat profile" mode (i.e OpenGL 2.1).
> 
> Extended renderer info (GLX_MESA_query_renderer):
>     Vendor: X.Org (0x1002)
>     Device: AMD PALM (DRM 2.49.0 / 4.10.4) (0x9802)
>     Version: 17.0.2
>     Accelerated: yes
>     Video memory: 256MB
>     Unified memory: no
>     Preferred profile: compat (0x2)
>     Max core profile version: 0.0
>     Max compat profile version: 2.1
>     Max GLES1 profile version: 1.1
>     Max GLES[23] profile version: 2.0
> OpenGL vendor string: X.Org
> OpenGL renderer string: Gallium 0.4 on AMD PALM (DRM 2.49.0 / 4.10.4)
> OpenGL version string: 2.1 Mesa 17.0.2
> OpenGL shading language version string: 1.30
> 
> OpenGL ES profile version string: OpenGL ES 2.0 Mesa 17.0.2
> OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
> 
> It turn out that texture float support was missing...
> 
> Extended renderer info (GLX_MESA_query_renderer):
>     Vendor: X.Org (0x1002)
>     Device: AMD PALM (DRM 2.49.0 / 4.10.4) (0x9802)
>     Version: 17.0.2
>     Accelerated: yes
>     Video memory: 256MB
>     Unified memory: no
>     Preferred profile: core (0x1)
>     Max core profile version: 3.3
>     Max compat profile version: 3.0
>     Max GLES1 profile version: 1.1
>     Max GLES[23] profile version: 3.0
> OpenGL vendor string: X.Org
> OpenGL renderer string: Gallium 0.4 on AMD PALM (DRM 2.49.0 / 4.10.4)
> OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.0.2
> OpenGL core profile shading language version string: 3.30
> OpenGL core profile context flags: (none)
> OpenGL core profile profile mask: core profile
> 
> OpenGL version string: 3.0 Mesa 17.0.2
> OpenGL shading language version string: 1.30
> OpenGL context flags: (none)
> 
> Add a new option to let the user disable this feature if
> it doesn't comply to the SGI license.
> Add docs/patents.txt to MESA3D_LICENSE_FILES
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> NOTE: --enable-texture-float is always enabled in the masa package
> in Fedora:
> http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/tree/mesa.spec?h=f25#n418
> ---
>  package/mesa3d/Config.in | 18 ++++++++++++++++++
>  package/mesa3d/mesa3d.mk |  7 +++++++
>  2 files changed, 25 insertions(+)

Applied to master, after:

 - Rewrapping the Config.in help text

 - Adding a note that the option doesn't affect all drivers, as per the
   discussion with Bernd.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 2/5] package/mesa3d: add libvdpau optional dependency
  2017-03-26 16:28 ` [Buildroot] [PATCH 2/5] package/mesa3d: add libvdpau optional dependency Romain Naour
@ 2017-04-01 13:56   ` Thomas Petazzoni
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2017-04-01 13:56 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 26 Mar 2017 18:28:50 +0200, Romain Naour wrote:
> If libvdpau package is build before mesa3d, it will be detected and
> enabled by the configure script.
> 
> Handle libvdpau in mesa3d for consistency.
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/mesa3d/mesa3d.mk | 7 +++++++
>  1 file changed, 7 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 3/5] package/meda3d: add xlib_libXvMC optional dependency
  2017-03-26 16:28 ` [Buildroot] [PATCH 3/5] package/meda3d: add xlib_libXvMC " Romain Naour
@ 2017-04-01 13:57   ` Thomas Petazzoni
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2017-04-01 13:57 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 26 Mar 2017 18:28:51 +0200, Romain Naour wrote:
> If xlib_libXvMC package is build before mesa3d, it will be detected and
> enabled by the configure script.
> 
> Handle xlib_libXvMC in mesa3d for consistency.
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/mesa3d/mesa3d.mk | 7 +++++++
>  1 file changed, 7 insertions(+)

Applied to master, thanks. There was a typo in the commit title, but I
saw it right after pushing, so too late.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm
  2017-03-26 16:28 ` [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm Romain Naour
  2017-03-29  4:41   ` Bernd Kuhls
@ 2017-04-01 13:59   ` Thomas Petazzoni
  1 sibling, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2017-04-01 13:59 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 26 Mar 2017 18:28:52 +0200, Romain Naour wrote:
> assembly are enabled by default on supported plaforms even while
> crosscompiling if host == target:
> 
> checking whether to enable assembly... yes, x86_64
> 
> It was also disabled in the mesa package in Fedora since 7.6 [1].
> 
> [1] http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/commit/?id=629c8726
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/mesa3d/mesa3d.mk | 3 +++
>  1 file changed, 3 insertions(+)

Applied to master, thanks. However, it would be good if you could take
this issue with upstream Mesa.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-04-01 13:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-26 16:28 [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Romain Naour
2017-03-26 16:28 ` [Buildroot] [PATCH 2/5] package/mesa3d: add libvdpau optional dependency Romain Naour
2017-04-01 13:56   ` Thomas Petazzoni
2017-03-26 16:28 ` [Buildroot] [PATCH 3/5] package/meda3d: add xlib_libXvMC " Romain Naour
2017-04-01 13:57   ` Thomas Petazzoni
2017-03-26 16:28 ` [Buildroot] [PATCH 4/5] package/mesa3d: explicitely disable asm Romain Naour
2017-03-29  4:41   ` Bernd Kuhls
2017-03-29 21:28     ` Romain Naour
2017-03-29 21:35       ` Thomas Petazzoni
2017-03-29 21:55         ` Romain Naour
2017-04-01 13:59   ` Thomas Petazzoni
2017-03-26 16:28 ` [Buildroot] [PATCH 5/5] package/mesa3d: enable gallium extra hud Romain Naour
2017-03-28 17:49 ` [Buildroot] [PATCH 1/5] package/mesa3d: allow to enable OpenGL texture float support Bernd Kuhls
2017-03-28 20:38   ` Romain Naour
2017-03-29  4:41     ` Bernd Kuhls
2017-03-29 21:46       ` Romain Naour
2017-04-01 13:56 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.