diff options
author | Marek Olšák <[email protected]> | 2018-06-25 12:34:39 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-06-29 15:31:49 -0400 |
commit | ea8b55b49f2a2dd155fc0acb2fdd92795d5c548f (patch) | |
tree | 7939668507ee3fa496f42c8be0431f32f63ae3e5 | |
parent | 82bf8a6a820bb7dd78dd3e2fa8965329da6f866e (diff) |
gallium/util: remove dummy function util_format_is_supported
Reviewed-by: Eric Engestrom <[email protected]>
-rw-r--r-- | src/gallium/auxiliary/util/u_format.c | 13 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_format.h | 7 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a5xx/fd5_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_screen.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_screen.c | 3 |
16 files changed, 6 insertions, 57 deletions
diff --git a/src/gallium/auxiliary/util/u_format.c b/src/gallium/auxiliary/util/u_format.c index e0325e9c534..1dd724d9b84 100644 --- a/src/gallium/auxiliary/util/u_format.c +++ b/src/gallium/auxiliary/util/u_format.c @@ -235,19 +235,6 @@ util_format_is_subsampled_422(enum pipe_format format) 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 diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h index e497b4b3375..f421222f854 100644 --- a/src/gallium/auxiliary/util/u_format.h +++ b/src/gallium/auxiliary/util/u_format.h @@ -718,13 +718,6 @@ util_is_format_compatible(const struct util_format_description *src_desc, 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 diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_screen.c b/src/gallium/drivers/freedreno/a2xx/fd2_screen.c index c2a60c683f8..4fdf6914ab2 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_screen.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_screen.c @@ -43,8 +43,7 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen, 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; diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_screen.c b/src/gallium/drivers/freedreno/a3xx/fd3_screen.c index 998ec7a0bdb..366f07ef34b 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_screen.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_screen.c @@ -44,8 +44,7 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen, 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; diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c index 1b81f8db2f3..30124e4485d 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_screen.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_screen.c @@ -44,8 +44,7 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen, 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; diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_screen.c b/src/gallium/drivers/freedreno/a5xx/fd5_screen.c index 6f614751f46..f441b0cc29f 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_screen.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_screen.c @@ -59,8 +59,7 @@ fd5_screen_is_format_supported(struct pipe_screen *pscreen, 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; diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index d917048e2b9..a03840a3aa4 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -513,9 +513,6 @@ i915_is_format_supported(struct pipe_screen *screen, const enum pipe_format *list; uint i; - if (!util_format_is_supported(format, tex_usage)) - return FALSE; - if (sample_count > 1) return FALSE; diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index 95de832f6c7..155ddeef65e 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -422,10 +422,6 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen, if (!(0x00000017 & (1 << sample_count))) return false; - if (!util_format_is_supported(format, bindings)) { - return false; - } - /* shared is always supported */ bindings &= ~PIPE_BIND_SHARED; diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 3a3c43b7749..44a1a8a9374 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -55,9 +55,6 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen, 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) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 02890c71652..a217f9e1665 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -57,9 +57,6 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen, 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; diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 793b0ba8d89..3331a6e90ff 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -615,9 +615,6 @@ static boolean r300_is_format_supported(struct pipe_screen* screen, 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: diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index a484f0078aa..629385075b2 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -253,9 +253,6 @@ boolean evergreen_is_format_supported(struct pipe_screen *screen, return FALSE; } - if (!util_format_is_supported(format, usage)) - return FALSE; - if (sample_count > 1) { if (!rscreen->has_msaa) return FALSE; diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 2c3a5ab4422..d241d27d1b9 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -172,9 +172,6 @@ boolean r600_is_format_supported(struct pipe_screen *screen, return FALSE; } - if (!util_format_is_supported(format, usage)) - return FALSE; - if (sample_count > 1) { if (!rscreen->has_msaa) return FALSE; diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index a27b244c834..1214f446fc1 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2142,9 +2142,6 @@ static boolean si_is_format_supported(struct pipe_screen *screen, 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; diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index 2eba557a64f..c0f70d0a92e 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -446,8 +446,7 @@ v3d_screen_is_format_supported(struct pipe_screen *pscreen, 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; } diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index 527ebeb2f48..17776fa4d9b 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -486,8 +486,7 @@ vc4_screen_is_format_supported(struct pipe_screen *pscreen, 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; } |