blob: 0e014dcc807fca50638e5ad9e9b63c946096c15b [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 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