From 6fd8b9b550713302566bb4c28e49c219870ccfec Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 8 Dec 2009 15:30:10 +0100 Subject: Remove remaining pipe format utility functions. Depricate pf_type(), pf_size_*(), pf_layout() and pf_exp2(). Map depricated PIPE_FORMAT_TYPE to new UTIL_FORMAT_ values: UNKNOWN = TYPE_VOID UNORM = TYPE_UNSIGNED + LAYOUT_ARITH SNORM = TYPE_SIGNED + LAYOUT_ARITH FIXED = TYPE_FIXED FLOAT = TYPE_FLOAT USCALED = TYPE_UNSIGNED + LAYOUT_ARRAY SSCALED = TYPE_SIGNED + LAYOUT_ARRAY SRGB = TYPE_COLORSPACE_SRGB --- src/gallium/state_trackers/wgl/stw_framebuffer.c | 4 +--- src/gallium/state_trackers/wgl/stw_pixelformat.c | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src/gallium/state_trackers/wgl') diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c index 5c3444777a..3d029f9174 100644 --- a/src/gallium/state_trackers/wgl/stw_framebuffer.c +++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c @@ -268,9 +268,7 @@ stw_framebuffer_allocate( enum pipe_format colorFormat, depthFormat, stencilFormat; colorFormat = pfi->color_format; - - assert(pf_layout( pfi->depth_stencil_format ) == PIPE_FORMAT_LAYOUT_RGBAZS ); - + if(util_format_get_component_bits(pfi->depth_stencil_format, UTIL_FORMAT_COLORSPACE_ZS, 0)) depthFormat = pfi->depth_stencil_format; else diff --git a/src/gallium/state_trackers/wgl/stw_pixelformat.c b/src/gallium/state_trackers/wgl/stw_pixelformat.c index 5ac833ced6..54cc361412 100644 --- a/src/gallium/state_trackers/wgl/stw_pixelformat.c +++ b/src/gallium/state_trackers/wgl/stw_pixelformat.c @@ -133,12 +133,10 @@ stw_pixelformat_add( if(stw_dev->pixelformat_extended_count >= STW_MAX_PIXELFORMATS) return; - assert(pf_layout( color->format ) == PIPE_FORMAT_LAYOUT_RGBAZS ); assert(util_format_get_component_bits(color->format, UTIL_FORMAT_COLORSPACE_RGB, 0) == color->bits.red); assert(util_format_get_component_bits(color->format, UTIL_FORMAT_COLORSPACE_RGB, 1) == color->bits.green); assert(util_format_get_component_bits(color->format, UTIL_FORMAT_COLORSPACE_RGB, 2) == color->bits.blue); assert(util_format_get_component_bits(color->format, UTIL_FORMAT_COLORSPACE_RGB, 3) == color->bits.alpha); - assert(pf_layout( depth->format ) == PIPE_FORMAT_LAYOUT_RGBAZS ); assert(util_format_get_component_bits(depth->format, UTIL_FORMAT_COLORSPACE_ZS, 0) == depth->bits.depth); assert(util_format_get_component_bits(depth->format, UTIL_FORMAT_COLORSPACE_ZS, 1) == depth->bits.stencil); -- cgit v1.2.3