summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c26
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c24
2 files changed, 24 insertions, 26 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index 6a88c277aa6..fa16ed94e8d 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -48,29 +48,6 @@
/**
- * Query format support for creating a texture, drawing surface, etc.
- * \param format the format to test
- * \param type one of PIPE_TEXTURE, PIPE_SURFACE
- */
-static boolean
-softpipe_is_format_supported( struct pipe_context *pipe,
- enum pipe_format format, uint type )
-{
- switch (type) {
- case PIPE_TEXTURE:
- /* softpipe supports all texture formats */
- return TRUE;
- case PIPE_SURFACE:
- /* softpipe supports all (off-screen) surface formats */
- return TRUE;
- default:
- assert(0);
- return FALSE;
- }
-}
-
-
-/**
* Map any drawing surfaces which aren't already mapped
*/
void
@@ -163,9 +140,6 @@ softpipe_create( struct pipe_screen *screen,
softpipe->pipe.screen = screen;
softpipe->pipe.destroy = softpipe_destroy;
- /* queries */
- softpipe->pipe.is_format_supported = softpipe_is_format_supported;
-
/* state setters */
softpipe->pipe.create_blend_state = softpipe_create_blend_state;
softpipe->pipe.bind_blend_state = softpipe_bind_blend_state;
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index cc3b9625805..1850a1ced33 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -107,6 +107,29 @@ softpipe_get_paramf(struct pipe_screen *screen, int param)
}
+/**
+ * Query format support for creating a texture, drawing surface, etc.
+ * \param format the format to test
+ * \param type one of PIPE_TEXTURE, PIPE_SURFACE
+ */
+static boolean
+softpipe_is_format_supported( struct pipe_screen *screen,
+ enum pipe_format format, uint type )
+{
+ switch (type) {
+ case PIPE_TEXTURE:
+ /* softpipe supports all texture formats */
+ return TRUE;
+ case PIPE_SURFACE:
+ /* softpipe supports all (off-screen) surface formats */
+ return TRUE;
+ default:
+ assert(0);
+ return FALSE;
+ }
+}
+
+
static void
softpipe_destroy_screen( struct pipe_screen *screen )
{
@@ -134,6 +157,7 @@ softpipe_create_screen(struct pipe_winsys *winsys)
screen->get_vendor = softpipe_get_vendor;
screen->get_param = softpipe_get_param;
screen->get_paramf = softpipe_get_paramf;
+ screen->is_format_supported = softpipe_is_format_supported;
softpipe_init_screen_texture_funcs(screen);