From 5d0fc6d8c15e4c71af698c598545b304aade2bc3 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Wed, 29 Nov 2023 12:58:11 +0100 Subject: [PATCH] cogl: Remove unused COGL_PIXEL_FORMAT_DEPTH_32 It's not depth-renderable or required to be supported and we don't use it anyway, so just get rid of it. Part-of: --- cogl/cogl/cogl-bitmap-conversion.c | 1 - cogl/cogl/cogl-bitmap-packing.h | 2 -- cogl/cogl/cogl-pixel-format.c | 7 ------- cogl/cogl/cogl-pixel-format.h | 1 - cogl/cogl/driver/gl/gl/cogl-driver-gl.c | 5 ----- cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c | 1 - cogl/cogl/driver/gl/gles/cogl-driver-gles.c | 5 ----- cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c | 1 - 8 files changed, 23 deletions(-) diff --git a/cogl/cogl/cogl-bitmap-conversion.c b/cogl/cogl/cogl-bitmap-conversion.c index 230aec693..646f340fa 100644 --- a/cogl/cogl/cogl-bitmap-conversion.c +++ b/cogl/cogl/cogl-bitmap-conversion.c @@ -319,7 +319,6 @@ _cogl_bitmap_needs_short_temp_buffer (CoglPixelFormat format) case COGL_PIXEL_FORMAT_R_16: case COGL_PIXEL_FORMAT_RG_1616: case COGL_PIXEL_FORMAT_DEPTH_16: - case COGL_PIXEL_FORMAT_DEPTH_32: case COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8: case COGL_PIXEL_FORMAT_ANY: case COGL_PIXEL_FORMAT_YUV: diff --git a/cogl/cogl/cogl-bitmap-packing.h b/cogl/cogl/cogl-bitmap-packing.h index a488d11c7..5ff88c3b6 100644 --- a/cogl/cogl/cogl-bitmap-packing.h +++ b/cogl/cogl/cogl-bitmap-packing.h @@ -539,7 +539,6 @@ G_PASTE (_cogl_unpack_, component_size) (CoglPixelFormat format, case COGL_PIXEL_FORMAT_R_16: case COGL_PIXEL_FORMAT_RG_1616: case COGL_PIXEL_FORMAT_DEPTH_16: - case COGL_PIXEL_FORMAT_DEPTH_32: case COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8: case COGL_PIXEL_FORMAT_ANY: case COGL_PIXEL_FORMAT_YUV: @@ -1042,7 +1041,6 @@ G_PASTE (_cogl_pack_, component_size) (CoglPixelFormat format, case COGL_PIXEL_FORMAT_R_16: case COGL_PIXEL_FORMAT_RG_1616: case COGL_PIXEL_FORMAT_DEPTH_16: - case COGL_PIXEL_FORMAT_DEPTH_32: case COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8: case COGL_PIXEL_FORMAT_ANY: case COGL_PIXEL_FORMAT_YUV: diff --git a/cogl/cogl/cogl-pixel-format.c b/cogl/cogl/cogl-pixel-format.c index a22fa6bae..53fafbd59 100644 --- a/cogl/cogl/cogl-pixel-format.c +++ b/cogl/cogl/cogl-pixel-format.c @@ -392,13 +392,6 @@ static const CoglPixelFormatInfo format_info_table[] = { .aligned = 1, .bpp = { 2 }, }, - { - .cogl_format = COGL_PIXEL_FORMAT_DEPTH_32, - .format_str = "DEPTH_32", - .n_planes = 1, - .aligned = 1, - .bpp = { 4 }, - }, { .cogl_format = COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8, .format_str = "DEPTH_24_STENCIL_8", diff --git a/cogl/cogl/cogl-pixel-format.h b/cogl/cogl/cogl-pixel-format.h index d5519c005..9e3338c5f 100644 --- a/cogl/cogl/cogl-pixel-format.h +++ b/cogl/cogl/cogl-pixel-format.h @@ -267,7 +267,6 @@ typedef enum /*< prefix=COGL_PIXEL_FORMAT >*/ COGL_PIXEL_FORMAT_ABGR_FP_16161616_PRE = (11 | COGL_A_BIT | COGL_PREMULT_BIT | COGL_BGR_BIT | COGL_AFIRST_BIT), COGL_PIXEL_FORMAT_DEPTH_16 = (9 | COGL_DEPTH_BIT), - COGL_PIXEL_FORMAT_DEPTH_32 = (3 | COGL_DEPTH_BIT), COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8 = (3 | COGL_DEPTH_BIT | COGL_STENCIL_BIT) } CoglPixelFormat; diff --git a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c index 7d2f8f4bc..c662b7b7a 100644 --- a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c +++ b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c @@ -288,11 +288,6 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context, glformat = GL_DEPTH_COMPONENT; gltype = GL_UNSIGNED_SHORT; break; - case COGL_PIXEL_FORMAT_DEPTH_32: - glintformat = GL_DEPTH_COMPONENT32; - glformat = GL_DEPTH_COMPONENT; - gltype = GL_UNSIGNED_INT; - break; case COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8: glintformat = GL_DEPTH_STENCIL; diff --git a/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c index 35169c79d..efedeb1bd 100644 --- a/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c +++ b/cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c @@ -442,7 +442,6 @@ _cogl_texture_driver_upload_supported (CoglContext *ctx, case COGL_PIXEL_FORMAT_R_16: case COGL_PIXEL_FORMAT_RG_1616: case COGL_PIXEL_FORMAT_DEPTH_16: - case COGL_PIXEL_FORMAT_DEPTH_32: case COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8: case COGL_PIXEL_FORMAT_ANY: case COGL_PIXEL_FORMAT_YUV: diff --git a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c index 3f05ce730..f6dcca24f 100644 --- a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c +++ b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c @@ -244,11 +244,6 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context, glformat = GL_DEPTH_COMPONENT; gltype = GL_UNSIGNED_SHORT; break; - case COGL_PIXEL_FORMAT_DEPTH_32: - glintformat = GL_DEPTH_COMPONENT; - glformat = GL_DEPTH_COMPONENT; - gltype = GL_UNSIGNED_INT; - break; case COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8: glintformat = GL_DEPTH_STENCIL; diff --git a/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c b/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c index 9017adc9c..795217d87 100644 --- a/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c +++ b/cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c @@ -508,7 +508,6 @@ _cogl_texture_driver_upload_supported (CoglContext *ctx, case COGL_PIXEL_FORMAT_R_16: case COGL_PIXEL_FORMAT_RG_1616: case COGL_PIXEL_FORMAT_DEPTH_16: - case COGL_PIXEL_FORMAT_DEPTH_32: case COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8: case COGL_PIXEL_FORMAT_ANY: case COGL_PIXEL_FORMAT_YUV: