panfrost: Remove useless check
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 17 Feb 2021 04:02:11 +0000 (23:02 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Feb 2021 21:48:22 +0000 (21:48 +0000)
Already checked in format_supported (only difference being cube map
arrays but the extension isn't advertised yet anyway due to missing
geometry shaders.)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>

src/gallium/drivers/panfrost/pan_resource.c

index 990ed28..4aaa15e 100644 (file)
@@ -716,21 +716,6 @@ panfrost_resource_create_with_modifier(struct pipe_screen *screen,
 {
         struct panfrost_device *dev = pan_device(screen);
 
-        /* Make sure we're familiar */
-        switch (template->target) {
-        case PIPE_BUFFER:
-        case PIPE_TEXTURE_1D:
-        case PIPE_TEXTURE_2D:
-        case PIPE_TEXTURE_3D:
-        case PIPE_TEXTURE_CUBE:
-        case PIPE_TEXTURE_RECT:
-        case PIPE_TEXTURE_1D_ARRAY:
-        case PIPE_TEXTURE_2D_ARRAY:
-                break;
-        default:
-                unreachable("Unknown texture target\n");
-        }
-
         if (dev->ro && (template->bind &
             (PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT | PIPE_BIND_SHARED)))
                 return panfrost_create_scanout_res(screen, template, modifier);