* \param format the format to test
* \param type one of PIPE_TEXTURE, PIPE_SURFACE
*/
-static boolean
+static bool
softpipe_is_format_supported( struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
format_desc = util_format_description(format);
if (!format_desc)
- return FALSE;
+ return false;
if (sample_count > 1)
- return FALSE;
+ return false;
if (bind & (PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT |
PIPE_BIND_SHARED)) {
if(!winsys->is_displaytarget_format_supported(winsys, bind, format))
- return FALSE;
+ return false;
}
if (bind & PIPE_BIND_RENDER_TARGET) {
if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS)
- return FALSE;
+ return false;
/*
* Although possible, it is unnatural to render into compressed or YUV
*/
if (format_desc->block.width != 1 ||
format_desc->block.height != 1)
- return FALSE;
+ return false;
}
if (bind & PIPE_BIND_DEPTH_STENCIL) {
if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
- return FALSE;
+ return false;
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC ||
format_desc->layout == UTIL_FORMAT_LAYOUT_ATC) {
/* Software decoding is not hooked up. */
- return FALSE;
+ return false;
}
if ((bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW)) &&
* PIPE_FORMAT_R8G8B8X8_UNORM, for example, which will not work
* (different bpp).
*/
- return FALSE;
+ return false;
}
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC &&
format != PIPE_FORMAT_ETC1_RGB8)
- return FALSE;
+ return false;
/*
* All other operations (sampling, transfer, etc).
/*
* Everything else should be supported by u_format.
*/
- return TRUE;
+ return true;
}