gallium/util: remove dummy function util_format_is_supported
authorMarek Olšák <marek.olsak@amd.com>
Mon, 25 Jun 2018 16:34:39 +0000 (12:34 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 29 Jun 2018 19:31:49 +0000 (15:31 -0400)
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
16 files changed:
src/gallium/auxiliary/util/u_format.c
src/gallium/auxiliary/util/u_format.h
src/gallium/drivers/freedreno/a2xx/fd2_screen.c
src/gallium/drivers/freedreno/a3xx/fd3_screen.c
src/gallium/drivers/freedreno/a4xx/fd4_screen.c
src/gallium/drivers/freedreno/a5xx/fd5_screen.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/nouveau/nv30/nv30_screen.c
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/v3d/v3d_screen.c
src/gallium/drivers/vc4/vc4_screen.c

index e0325e9c534974b15c6553bb21daa6c82f23f386..1dd724d9b8418350671b93364bf527642545fbd7 100644 (file)
@@ -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
index e497b4b3375a577710098b1fbc2bc2032d255aec..f421222f85460a0ed054998a1633850496831d50 100644 (file)
@@ -717,13 +717,6 @@ boolean
 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.
  *
index c2a60c683f86f4f34b021c9f8323c6b44bfbe74d..4fdf6914ab264b0c0a4ad287f5baea0ca2b3755c 100644 (file)
@@ -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;
index 998ec7a0bdbaa076b73ac0e85294bc0550c75436..366f07ef34b75d2a81cabd57e276e380fe1fa827 100644 (file)
@@ -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;
index 1b81f8db2f354154ed5990e826e22a2356d031bb..30124e4485d6b90abc7673575562340f1331a7a9 100644 (file)
@@ -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;
index 6f614751f4609158dcff268600ddad87b06bbe38..f441b0cc29f6a09e16feb37226fac70a13a65a45 100644 (file)
@@ -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;
index d917048e2b9b74b7f59b5afac99062c8a405ea80..a03840a3aa48a23f566f3cd5585656d36c705598 100644 (file)
@@ -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;
 
index 95de832f6c71c001b4f5ecf25fc5ef93ad880b7c..155ddeef65ec61d4466350e4f0641cdecf09a58f 100644 (file)
@@ -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;
 
index 3a3c43b7749e562d9a739d3df078945bcd461d43..44a1a8a9374bdfb6bfef993c0fcac80d077ea2eb 100644 (file)
@@ -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)
index 02890c71652b12a7e8b219deb27a0a4830f6bdea..a217f9e1665df2e87207054a6b69ace28c909425 100644 (file)
@@ -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;
index 793b0ba8d89105ef5fe6972c96db95dacfcf3683..3331a6e90ffd6808c4c68b9ed70b6c09ebd3b0d1 100644 (file)
@@ -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:
index a484f0078aa1f6f11255e6dea9a84021f2fe0bce..629385075b20e2248f352d92f8521073369a5707 100644 (file)
@@ -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;
index 2c3a5ab44229c8fb72a8d3ea6d1ce3cc2fd9511c..d241d27d1b9735a5f21397dd30cba70829a1f585 100644 (file)
@@ -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;
index a27b244c834591973dc33d78d7b816ea36fabc4c..1214f446fc146b5caccf4709b1ecc88748cb0f91 100644 (file)
@@ -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;
index 2eba557a64fe74480984f3b7737e2ffede7b69c0..c0f70d0a92e1e1ffcaa0958b1e18672b5cbdd998 100644 (file)
@@ -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;
         }
 
index 527ebeb2f48c5c01cfcc70957acf6a6d04dc646a..17776fa4d9b08746e5d75ca6fa25232be9826bc2 100644 (file)
@@ -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;
         }