diff options
author | Michal Krol <[email protected]> | 2007-10-28 17:19:39 +0000 |
---|---|---|
committer | Michal Krol <[email protected]> | 2007-10-28 17:34:39 +0000 |
commit | 3c8121967224f91bfcd5431b4069d66eecbc5952 (patch) | |
tree | 0f02118d163e144074dc4e5cafd21fdfbcb2f7ee /src/mesa/drivers/x11/xm_surface.c | |
parent | b85cd7b70096cf7c922aed56ae8255fb4b8f0709 (diff) |
Replace supported_formats with is_format_supported interface.
The old supported_formats interface returned a list of formats
supported by a pipe/winsys implementation. This was reasonable
when gallium had a fixed list of predefined format.
Now things has changed and the definition of PIPE_FORMAT is
more flexible.
The new shiny is_format_supported interface gets PIPE_FORMAT
as an argument and returns a boolean whether this particular
format is supported.
Diffstat (limited to 'src/mesa/drivers/x11/xm_surface.c')
-rw-r--r-- | src/mesa/drivers/x11/xm_surface.c | 18 |
1 files changed, 8 insertions, 10 deletions
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; } |