Преглед на файлове

LibGL: Calculate maximum log2 of texture size

Jelle Raaijmakers преди 2 години
родител
ревизия
d7f1dc146e
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      Userland/Libraries/LibGL/Tex/Texture2D.h

+ 2 - 2
Userland/Libraries/LibGL/Tex/Texture2D.h

@@ -11,11 +11,11 @@
 #include "Texture.h"
 
 #include <AK/Array.h>
+#include <AK/IntegralMath.h>
 #include <LibGL/GL/gl.h>
 #include <LibGL/Tex/MipMap.h>
 #include <LibGL/Tex/Sampler2D.h>
 #include <LibGPU/ImageDataLayout.h>
-#include <LibGfx/Vector3.h>
 
 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; }