desc->block.bits == 32;
}
-boolean
-util_format_is_supported(enum pipe_format format, unsigned bind)
-{
- if (format >= PIPE_FORMAT_COUNT) {
- return FALSE;
- }
-
- (void)bind;
-
- return TRUE;
-}
-
-
/**
* Calculates the MRD for the depth format. MRD is used in depth bias
* for UNORM and unbound depth buffers. When the depth buffer is floating
const struct util_format_description *dst_desc);
/**
- * Whether the format is supported by Gallium for the given bindings.
- * This covers S3TC textures and floating-point render targets.
- */
-boolean
-util_format_is_supported(enum pipe_format format, unsigned bind);
-
-/**
* Whether this format is a rgab8 variant.
*
* That is, any format that matches the
unsigned retval = 0;
if ((target >= PIPE_MAX_TEXTURE_TYPES) ||
- (sample_count > 1) || /* TODO add MSAA */
- !util_format_is_supported(format, usage)) {
+ (sample_count > 1)) { /* TODO add MSAA */
DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x",
util_format_name(format), target, sample_count, usage);
return FALSE;
unsigned retval = 0;
if ((target >= PIPE_MAX_TEXTURE_TYPES) ||
- (sample_count > 1) || /* TODO add MSAA */
- !util_format_is_supported(format, usage)) {
+ (sample_count > 1)) { /* TODO add MSAA */
DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x",
util_format_name(format), target, sample_count, usage);
return FALSE;
unsigned retval = 0;
if ((target >= PIPE_MAX_TEXTURE_TYPES) ||
- (sample_count > 1) || /* TODO add MSAA */
- !util_format_is_supported(format, usage)) {
+ (sample_count > 1)) { /* TODO add MSAA */
DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x",
util_format_name(format), target, sample_count, usage);
return FALSE;
unsigned retval = 0;
if ((target >= PIPE_MAX_TEXTURE_TYPES) ||
- !valid_sample_count(sample_count) ||
- !util_format_is_supported(format, usage)) {
+ !valid_sample_count(sample_count)) {
DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x",
util_format_name(format), target, sample_count, usage);
return FALSE;
const enum pipe_format *list;
uint i;
- if (!util_format_is_supported(format, tex_usage))
- return FALSE;
-
if (sample_count > 1)
return FALSE;
if (!(0x00000017 & (1 << sample_count)))
return false;
- if (!util_format_is_supported(format, bindings)) {
- return false;
- }
-
/* shared is always supported */
bindings &= ~PIPE_BIND_SHARED;
if (sample_count == 8 && util_format_get_blocksizebits(format) >= 128)
return false;
- if (!util_format_is_supported(format, bindings))
- return false;
-
switch (format) {
case PIPE_FORMAT_Z16_UNORM:
if (nv50_screen(pscreen)->tesla->oclass < NVA0_3D_CLASS)
if (format == PIPE_FORMAT_NONE && bindings & PIPE_BIND_RENDER_TARGET)
return true;
- if (!util_format_is_supported(format, bindings))
- return false;
-
if ((bindings & PIPE_BIND_SAMPLER_VIEW) && (target != PIPE_BUFFER))
if (util_format_get_blocksizebits(format) == 3 * 32)
return false;
format == PIPE_FORMAT_R16G16B16X16_FLOAT;
const struct util_format_description *desc;
- if (!util_format_is_supported(format, usage))
- return FALSE;
-
/* Check multisampling support. */
switch (sample_count) {
case 0:
return FALSE;
}
- if (!util_format_is_supported(format, usage))
- return FALSE;
-
if (sample_count > 1) {
if (!rscreen->has_msaa)
return FALSE;
return FALSE;
}
- if (!util_format_is_supported(format, usage))
- return FALSE;
-
if (sample_count > 1) {
if (!rscreen->has_msaa)
return FALSE;
return false;
}
- if (!util_format_is_supported(format, usage))
- return false;
-
if (sample_count > 1) {
if (!screen->get_param(screen, PIPE_CAP_TEXTURE_MULTISAMPLE))
return false;
if (sample_count > 1 && sample_count != VC5_MAX_SAMPLES)
return FALSE;
- if ((target >= PIPE_MAX_TEXTURE_TYPES) ||
- !util_format_is_supported(format, usage)) {
+ if (target >= PIPE_MAX_TEXTURE_TYPES) {
return FALSE;
}
if (sample_count > 1 && sample_count != VC4_MAX_SAMPLES)
return FALSE;
- if ((target >= PIPE_MAX_TEXTURE_TYPES) ||
- !util_format_is_supported(format, usage)) {
+ if (target >= PIPE_MAX_TEXTURE_TYPES) {
return FALSE;
}