From ea2f88a48346c36df883b3f7c15cb4d621346ff3 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sun, 30 Apr 2023 17:07:16 +0200 Subject: [PATCH] LibGL: Implement support for the `GL_RGB5_A1` internal image format We already support this in all other logic and in LibSoftGPU, I just forgot to add this constant to this list. --- Userland/Libraries/LibGL/Image.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGL/Image.cpp b/Userland/Libraries/LibGL/Image.cpp index 98435c8686..10bd763720 100644 --- a/Userland/Libraries/LibGL/Image.cpp +++ b/Userland/Libraries/LibGL/Image.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Jelle Raaijmakers + * Copyright (c) 2022-2023, Jelle Raaijmakers * * SPDX-License-Identifier: BSD-2-Clause */ @@ -281,6 +281,7 @@ GPU::PixelFormat pixel_format_for_internal_format(GLenum internal_format) case GL_RGBA: case GL_RGBA2: case GL_RGBA4: + case GL_RGB5_A1: case GL_RGBA8: case GL_RGB10_A2: case GL_RGBA12: @@ -288,6 +289,8 @@ GPU::PixelFormat pixel_format_for_internal_format(GLenum internal_format) case GL_COMPRESSED_RGBA: return GPU::PixelFormat::RGBA; } + + dbgln("{}({:#x}): unsupported internal format", __FUNCTION__, internal_format); VERIFY_NOT_REACHED(); }