diff options
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_surface.c | 18 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xmesaP.h | 4 |
3 files changed, 11 insertions, 13 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 1d2b93d100b..4b31447bbd5 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1616,7 +1616,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) #if 0 mesaCtx->st->pipe->surface_alloc = xmesa_surface_alloc; #endif - mesaCtx->st->pipe->supported_formats = xmesa_supported_formats; + mesaCtx->st->pipe->is_format_supported = xmesa_is_format_supported; mesaCtx->st->pipe->get_tile_rgba = xmesa_get_tile_rgba; mesaCtx->st->pipe->put_tile_rgba = xmesa_put_tile_rgba; diff --git a/src/mesa/drivers/x11/xm_surface.c b/src/mesa/drivers/x11/xm_surface.c index dbbf26e33ff..5533158ece0 100644 --- a/src/mesa/drivers/x11/xm_surface.c +++ b/src/mesa/drivers/x11/xm_surface.c @@ -195,18 +195,16 @@ xmesa_surface_alloc(struct pipe_context *pipe, GLuint pipeFormat) } -const GLuint * -xmesa_supported_formats(struct pipe_context *pipe, GLuint *numFormats) +boolean +xmesa_is_format_supported(struct pipe_context *pipe, uint format) { - static const GLuint formats[] = { - PIPE_FORMAT_U_A8_R8_G8_B8, - PIPE_FORMAT_S_R16_G16_B16_A16, - PIPE_FORMAT_S8_Z24 + switch( format ) { + case PIPE_FORMAT_U_A8_R8_G8_B8: + case PIPE_FORMAT_S_R16_G16_B16_A16: + case PIPE_FORMAT_S8_Z24: + return TRUE; }; - - *numFormats = sizeof(formats) / sizeof(formats[0]); - - return formats; + return FALSE; } diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 8af95504fb6..4709d633942 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -618,8 +618,8 @@ xmesa_surface_alloc(struct pipe_context *pipe, GLuint format); extern struct pipe_surface * xmesa_new_color_surface(struct pipe_context *pipe, GLuint format); -extern const uint * -xmesa_supported_formats(struct pipe_context *pipe, uint *numFormats); +extern boolean +xmesa_is_format_supported(struct pipe_context *pipe, uint format); extern void xmesa_get_tile_rgba(struct pipe_context *pipe, struct pipe_surface *ps, |