summaryrefslogtreecommitdiffstats
path: root/mesa-9.2-hardware-float.patch
blob: f279d9d7bad8b93d799e7fc47700b841cfc39866 (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
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 5ec1df6..a0406fc 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -306,6 +306,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 937035e..2f5e571 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -291,6 +291,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;