aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/sw
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2014-11-17 16:58:23 +0100
committerEmil Velikov <[email protected]>2014-11-18 02:02:53 +0000
commit8314315dff9d06257a17881052def017032eec7f (patch)
tree28b9a79d32428d6f452dc1c2491c582c8ff57bf6 /src/gallium/winsys/sw
parent259ec77db9027ddc33b290010167c712c925a82d (diff)
winsys/sw/wrapper: implement is_displaytarget_format_supported for swrast
Acked-by: Jose Fonseca <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
Diffstat (limited to 'src/gallium/winsys/sw')
-rw-r--r--src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
index e552ac24352..a6bf4985e1e 100644
--- a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
+++ b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
@@ -85,6 +85,19 @@ wrapper_sw_displaytarget(struct sw_displaytarget *dt)
static boolean
+wsw_is_dt_format_supported(struct sw_winsys *ws,
+ unsigned tex_usage,
+ enum pipe_format format)
+{
+ struct wrapper_sw_winsys *wsw = wrapper_sw_winsys(ws);
+
+ return wsw->screen->is_format_supported(wsw->screen, format,
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_RENDER_TARGET |
+ PIPE_BIND_DISPLAY_TARGET);
+}
+
+static boolean
wsw_dt_get_stride(struct wrapper_sw_displaytarget *wdt, unsigned *stride)
{
struct pipe_context *pipe = wdt->winsys->pipe;
@@ -276,6 +289,7 @@ wrapper_sw_winsys_wrap_pipe_screen(struct pipe_screen *screen)
if (!wsw)
goto err;
+ wsw->base.is_displaytarget_format_supported = wsw_is_dt_format_supported;
wsw->base.displaytarget_create = wsw_dt_create;
wsw->base.displaytarget_from_handle = wsw_dt_from_handle;
wsw->base.displaytarget_get_handle = wsw_dt_get_handle;