diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-04-10 10:30:14 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-04-10 13:26:35 +0100 |
commit | 87b04ce59b3ed26988b54ca182fab2e9dce03c38 (patch) | |
tree | b35934f2fea09275872629d4289853d83b6d32bb /src/gallium/state_trackers/wgl/shared/stw_pixelformat.c | |
parent | 3f2420e2e07b7ae0d2feec81178f998a1e46d631 (diff) |
wgl: Move pixel format information into device structure.
Diffstat (limited to 'src/gallium/state_trackers/wgl/shared/stw_pixelformat.c')
-rw-r--r-- | src/gallium/state_trackers/wgl/shared/stw_pixelformat.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c index 92f668433f..68291bd4bb 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c +++ b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c @@ -26,16 +26,12 @@ **************************************************************************/ #include "util/u_debug.h" + +#include "stw_device.h" #include "stw_pixelformat.h" #include "stw_public.h" #include "stw_tls.h" -#define STW_MAX_PIXELFORMATS 16 - -static struct stw_pixelformat_info stw_pixelformats[STW_MAX_PIXELFORMATS]; -static uint stw_pixelformat_count = 0; -static uint stw_pixelformat_extended_count = 0; - static void stw_add_standard_pixelformats( @@ -94,35 +90,35 @@ stw_add_standard_pixelformats( void stw_pixelformat_init( void ) { - struct stw_pixelformat_info *pf = stw_pixelformats; + struct stw_pixelformat_info *pf = stw_dev->pixelformats; stw_add_standard_pixelformats( &pf, 0 ); - stw_pixelformat_count = pf - stw_pixelformats; + stw_dev->pixelformat_count = pf - stw_dev->pixelformats; stw_add_standard_pixelformats( &pf, STW_PF_FLAG_MULTISAMPLED ); - stw_pixelformat_extended_count = pf - stw_pixelformats; + stw_dev->pixelformat_extended_count = pf - stw_dev->pixelformats; - assert( stw_pixelformat_extended_count <= STW_MAX_PIXELFORMATS ); + assert( stw_dev->pixelformat_extended_count <= STW_MAX_PIXELFORMATS ); } uint stw_pixelformat_get_count( void ) { - return stw_pixelformat_count; + return stw_dev->pixelformat_count; } uint stw_pixelformat_get_extended_count( void ) { - return stw_pixelformat_extended_count; + return stw_dev->pixelformat_extended_count; } const struct stw_pixelformat_info * stw_pixelformat_get_info( uint index ) { - assert( index < stw_pixelformat_extended_count ); + assert( index < stw_dev->pixelformat_extended_count ); - return &stw_pixelformats[index]; + return &stw_dev->pixelformats[index]; } |