From d7f1dc146e024ee947dd0941e37a40abb6cdae39 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sun, 4 Sep 2022 19:58:01 +0200 Subject: [PATCH] LibGL: Calculate maximum log2 of texture size --- Userland/Libraries/LibGL/Tex/Texture2D.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGL/Tex/Texture2D.h b/Userland/Libraries/LibGL/Tex/Texture2D.h index 0a886fa3a6..cd8e5f42b0 100644 --- a/Userland/Libraries/LibGL/Tex/Texture2D.h +++ b/Userland/Libraries/LibGL/Tex/Texture2D.h @@ -11,11 +11,11 @@ #include "Texture.h" #include +#include #include #include #include #include -#include namespace GL { @@ -23,7 +23,7 @@ class Texture2D final : public Texture { public: // FIXME: These shouldn't really belong here, they're context specific. static constexpr u16 MAX_TEXTURE_SIZE = 2048; - static constexpr u8 LOG2_MAX_TEXTURE_SIZE = 11; + static constexpr u8 LOG2_MAX_TEXTURE_SIZE = AK::log2(MAX_TEXTURE_SIZE); virtual bool is_texture_2d() const override { return true; }