aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0004-hardware-gloat.patch
blob: b676b078a321fb037d4d53f9e414c1f8f9d994dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 9bc2dad0257b778faf30edd5bc8f5c19ddf27351 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Sun, 20 Mar 2016 13:27:04 +0100
Subject: [PATCH 4/8] hardware gloat
Organization: O.S. Systems Software LTDA.

Upstream-Status: Inappropriate [not author]
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
 src/gallium/drivers/llvmpipe/lp_screen.c | 7 +++++++
 src/gallium/drivers/softpipe/sp_screen.c | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 3f5d0327bf..86808e016b 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -449,6 +449,13 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
    if (!format_desc)
       return FALSE;
 
+   if ((bind & PIPE_BIND_RENDER_TARGET) &&
+       format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
+       format != PIPE_FORMAT_R11G11B10_FLOAT &&
+       util_format_is_float(format)) {
+      return FALSE;
+   }
+
    assert(target == PIPE_BUFFER ||
           target == PIPE_TEXTURE_1D ||
           target == PIPE_TEXTURE_1D_ARRAY ||
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 25f6f74f36..61629ef2ff 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -397,6 +397,13 @@ softpipe_is_format_supported( struct pipe_screen *screen,
    if (!format_desc)
       return FALSE;
 
+   if ((bind & PIPE_BIND_RENDER_TARGET) &&
+       format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
+       format != PIPE_FORMAT_R11G11B10_FLOAT &&
+       util_format_is_float(format)) {
+      return FALSE;
+   }
+
    if (sample_count > 1)
       return FALSE;
 
-- 
2.18.0