summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2017-06-11 15:43:50 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 15:08:32 +0100
commit545f976943be554508d332dbd36d7e42511b775c (patch)
tree1abd02bbcab4dc54f959d79308acfd5834f3d4a8 /meta/recipes-graphics/mesa/files
parentbaeafe6dcca69a81357c8e7c3a239bf5d4fffc2c (diff)
downloadpoky-545f976943be554508d332dbd36d7e42511b775c.tar.gz
mesa.inc: enable texture float for gallium
Following the lead from Fedora (as suggested by Rob Clark) always enable --enable-texture-float for all gallium drivers, but then modify the code to not enable it, at runtime, where the implementation isn't backed by hardware. The patch comes from unpacking fedora-25's mesa-17.0.5-3.fc25.src.rpm from https://dl.fedoraproject.org/pub/fedora/linux/updates/25/SRPMS/m/ 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. Note that with this solution, non-hardware gallium drivers (e.g. swrast) can't --enable-texture-float, which might cause issues with some piglit tests. This solution was discussed and agreed-to on the mailing list: http://lists.openembedded.org/pipermail/openembedded-core/2017-May/137233.html (From OE-Core rev: 6fd63e24a1c6ac901edb393c9db8e245189a83e2) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa/files')
-rw-r--r--meta/recipes-graphics/mesa/files/0002-hardware-gloat.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0002-hardware-gloat.patch b/meta/recipes-graphics/mesa/files/0002-hardware-gloat.patch
new file mode 100644
index 0000000000..0e014dcc80
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0002-hardware-gloat.patch
@@ -0,0 +1,51 @@
1From 00bcd599310dc7fce4fe336ffd85902429051a0c Mon Sep 17 00:00:00 2001
2From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
3Date: Sun, 20 Mar 2016 13:27:04 +0100
4Subject: [PATCH 2/4] hardware gloat
5
6Upstream-Status: Inappropriate [not author]
7Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8---
9 src/gallium/drivers/llvmpipe/lp_screen.c | 7 +++++++
10 src/gallium/drivers/softpipe/sp_screen.c | 7 +++++++
11 2 files changed, 14 insertions(+)
12
13diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
14index 4f61de8..3b0ec77 100644
15--- a/src/gallium/drivers/llvmpipe/lp_screen.c
16+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
17@@ -411,6 +411,13 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
18 if (!format_desc)
19 return FALSE;
20
21+ if ((bind & PIPE_BIND_RENDER_TARGET) &&
22+ format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
23+ format != PIPE_FORMAT_R11G11B10_FLOAT &&
24+ util_format_is_float(format)) {
25+ return FALSE;
26+ }
27+
28 assert(target == PIPE_BUFFER ||
29 target == PIPE_TEXTURE_1D ||
30 target == PIPE_TEXTURE_1D_ARRAY ||
31diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
32index 031602b..c279120 100644
33--- a/src/gallium/drivers/softpipe/sp_screen.c
34+++ b/src/gallium/drivers/softpipe/sp_screen.c
35@@ -358,6 +358,13 @@ softpipe_is_format_supported( struct pipe_screen *screen,
36 if (!format_desc)
37 return FALSE;
38
39+ if ((bind & PIPE_BIND_RENDER_TARGET) &&
40+ format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
41+ format != PIPE_FORMAT_R11G11B10_FLOAT &&
42+ util_format_is_float(format)) {
43+ return FALSE;
44+ }
45+
46 if (sample_count > 1)
47 return FALSE;
48
49--
502.7.4
51