diff --git a/src/video_core/rasterizer_cache/rasterizer_cache.cpp b/src/video_core/rasterizer_cache/rasterizer_cache.cpp index 0be54679e..a8a0eec86 100644 --- a/src/video_core/rasterizer_cache/rasterizer_cache.cpp +++ b/src/video_core/rasterizer_cache/rasterizer_cache.cpp @@ -1,37 +1,19 @@ -// Copyright 2015 Citra Emulator Project +// Copyright 2022 Citra Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include #include -#include -#include "common/alignment.h" -#include "common/bit_field.h" #include "common/logging/log.h" -#include "common/math_util.h" #include "common/microprofile.h" #include "common/scope_exit.h" #include "common/texture.h" -#include "common/vector_math.h" #include "core/core.h" -#include "core/custom_tex_cache.h" #include "core/hle/kernel/process.h" -#include "core/settings.h" #include "video_core/pica_state.h" -#include "video_core/renderer_opengl/gl_format_reinterpreter.h" #include "video_core/rasterizer_cache/morton_swizzle.h" #include "video_core/rasterizer_cache/rasterizer_cache.h" +#include "video_core/renderer_opengl/gl_format_reinterpreter.h" #include "video_core/renderer_opengl/gl_state.h" #include "video_core/renderer_opengl/texture_downloader_es.h" #include "video_core/renderer_opengl/texture_filters/texture_filterer.h" @@ -64,7 +46,7 @@ OGLTexture RasterizerCacheOpenGL::AllocateSurfaceTexture(const FormatTuple& form if (GL_ARB_texture_storage) { // Allocate all possible mipmap levels upfront - const GLsizei levels = std::log2(std::max(width, height)) + 1; + const GLsizei levels = static_cast(std::log2(std::max(width, height))) + 1; glTexStorage2D(GL_TEXTURE_2D, levels, format_tuple.internal_format, width, height); } else { glTexImage2D(GL_TEXTURE_2D, 0, format_tuple.internal_format, width, height, 0, @@ -93,7 +75,7 @@ static void AllocateTextureCube(GLuint texture, const FormatTuple& format_tuple, glActiveTexture(TextureUnits::TextureCube.Enum()); if (GL_ARB_texture_storage) { // Allocate all possible mipmap levels in case the game uses them later - const GLsizei levels = std::log2(width) + 1; + const GLsizei levels = static_cast(std::log2(width)) + 1; glTexStorage2D(GL_TEXTURE_CUBE_MAP, levels, format_tuple.internal_format, width, width); } else { for (auto faces : { diff --git a/src/video_core/rasterizer_cache/rasterizer_cache.h b/src/video_core/rasterizer_cache/rasterizer_cache.h index d5f20ce92..b95262674 100644 --- a/src/video_core/rasterizer_cache/rasterizer_cache.h +++ b/src/video_core/rasterizer_cache/rasterizer_cache.h @@ -1,31 +1,10 @@ -// Copyright 2015 Citra Emulator Project +// Copyright 2022 Citra Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. #pragma once - -#include -#include -#include -#include -#include -#include -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-local-typedefs" -#endif -#include -#include -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif #include -#include -#include #include "common/assert.h" -#include "common/common_funcs.h" -#include "common/common_types.h" -#include "common/math_util.h" #include "core/custom_tex_cache.h" #include "video_core/rasterizer_cache/rasterizer_cache_utils.h" #include "video_core/rasterizer_cache/surface_params.h" diff --git a/src/video_core/rasterizer_cache/rasterizer_cache_types.h b/src/video_core/rasterizer_cache/rasterizer_cache_types.h index 1074a50ac..698f6ec7f 100644 --- a/src/video_core/rasterizer_cache/rasterizer_cache_types.h +++ b/src/video_core/rasterizer_cache/rasterizer_cache_types.h @@ -5,6 +5,7 @@ #pragma once #include #include +#include #include #include #include "common/common_types.h" @@ -12,7 +13,7 @@ namespace OpenGL { -class CachedSurface; +struct CachedSurface; using Surface = std::shared_ptr; // Declare rasterizer interval types diff --git a/src/video_core/rasterizer_cache/surface_params.cpp b/src/video_core/rasterizer_cache/surface_params.cpp index fae3b4106..d5fb3ecdb 100644 --- a/src/video_core/rasterizer_cache/surface_params.cpp +++ b/src/video_core/rasterizer_cache/surface_params.cpp @@ -1,4 +1,4 @@ -// Copyright 2020 Citra Emulator Project +// Copyright 2022 Citra Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. diff --git a/src/video_core/rasterizer_cache/surface_params.h b/src/video_core/rasterizer_cache/surface_params.h index 0d26ad9a5..23fbad4d2 100644 --- a/src/video_core/rasterizer_cache/surface_params.h +++ b/src/video_core/rasterizer_cache/surface_params.h @@ -1,4 +1,4 @@ -// Copyright 2020 Citra Emulator Project +// Copyright 2022 Citra Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included.