rasterizer_cache: Header cleanup and copyright date update

This commit is contained in:
emufan4568 2022-08-20 13:03:09 +03:00
parent f6e3bb54f4
commit 199671301d
5 changed files with 9 additions and 47 deletions

View file

@ -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 <algorithm>
#include <array>
#include <atomic>
#include <bitset>
#include <cmath>
#include <cstring>
#include <iterator>
#include <memory>
#include <optional>
#include <unordered_set>
#include <utility>
#include <vector>
#include <boost/range/iterator_range.hpp>
#include <glad/glad.h>
#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<GLsizei>(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<GLsizei>(std::log2(width)) + 1;
glTexStorage2D(GL_TEXTURE_CUBE_MAP, levels, format_tuple.internal_format, width, width);
} else {
for (auto faces : {

View file

@ -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 <array>
#include <list>
#include <memory>
#include <mutex>
#include <set>
#include <tuple>
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#endif
#include <boost/icl/interval_map.hpp>
#include <boost/icl/interval_set.hpp>
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
#include <unordered_map>
#include <boost/functional/hash.hpp>
#include <glad/glad.h>
#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"

View file

@ -5,6 +5,7 @@
#pragma once
#include <memory>
#include <set>
#include <tuple>
#include <boost/icl/interval_map.hpp>
#include <boost/icl/interval_set.hpp>
#include "common/common_types.h"
@ -12,7 +13,7 @@
namespace OpenGL {
class CachedSurface;
struct CachedSurface;
using Surface = std::shared_ptr<CachedSurface>;
// Declare rasterizer interval types

View file

@ -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.

View file

@ -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.