Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] mesa: potentially enable texture float for gallium
@ 2017-05-26 21:22 Trevor Woerner
  2017-05-29 23:25 ` Richard Purdie
  0 siblings, 1 reply; 10+ messages in thread
From: Trevor Woerner @ 2017-05-26 21:22 UTC (permalink / raw)
  To: openembedded-core

Somewhere along the path from OpenGL ES 2.0 to OpenGL ES 3.0 are some
algorithms that are encumbered by patents. These algorithms are enabled with
mesa's --enable-texture-float configure flag. However, if hardware
acceleration is being used and the hardware supports --enable-texture-float,
it means the hardware vendor has paid for the patents.

This patch will add --enable-texture-float for any hardware-backed gallium
mesa driver. In other words, if you are only using the software backup
(swrast) you'll need to enable this flag if you know what you're doing (which
assumes you are complying with the patent). Otherwise we enable this flag so
the software can take full advantage of the hardware.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 447fd6d0df..7ea3a88b9f 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -64,7 +64,7 @@ GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALL
 GALLIUMDRIVERS_append_x86 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
 GALLIUMDRIVERS_append_x86-64 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
 # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
-PACKAGECONFIG[gallium]      = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
+PACKAGECONFIG[gallium] = "${@'' if '${GALLIUMDRIVERS}'.strip() == 'swrast' else '--enable-texture-float'} --with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
 MESA_LLVM_RELEASE ?= "3.3"
 PACKAGECONFIG[gallium-llvm] = "--enable-gallium-llvm --enable-llvm-shared-libs, --disable-gallium-llvm, llvm${MESA_LLVM_RELEASE} \
                                ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
-- 
2.13.0



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

end of thread, other threads:[~2017-05-31 16:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-26 21:22 [PATCH] mesa: potentially enable texture float for gallium Trevor Woerner
2017-05-29 23:25 ` Richard Purdie
2017-05-30  5:28   ` Trevor Woerner
2017-05-30  7:47     ` Richard Purdie
2017-05-30 15:27       ` Trevor Woerner
2017-05-30 15:44         ` Richard Purdie
2017-05-30 16:00           ` Trevor Woerner
2017-05-30 16:19             ` Richard Purdie
2017-05-31  7:15               ` Jussi Kukkonen
2017-05-31 16:03                 ` Trevor Woerner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox