mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-01 16:05:07 +01:00
rasterizer_cache: Header cleanup and copyright date update
This commit is contained in:
parent
f6e3bb54f4
commit
199671301d
@ -1,37 +1,19 @@
|
|||||||
// Copyright 2015 Citra Emulator Project
|
// Copyright 2022 Citra Emulator Project
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// 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 <optional>
|
||||||
#include <unordered_set>
|
|
||||||
#include <utility>
|
|
||||||
#include <vector>
|
|
||||||
#include <boost/range/iterator_range.hpp>
|
#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/logging/log.h"
|
||||||
#include "common/math_util.h"
|
|
||||||
#include "common/microprofile.h"
|
#include "common/microprofile.h"
|
||||||
#include "common/scope_exit.h"
|
#include "common/scope_exit.h"
|
||||||
#include "common/texture.h"
|
#include "common/texture.h"
|
||||||
#include "common/vector_math.h"
|
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/custom_tex_cache.h"
|
|
||||||
#include "core/hle/kernel/process.h"
|
#include "core/hle/kernel/process.h"
|
||||||
#include "core/settings.h"
|
|
||||||
#include "video_core/pica_state.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/morton_swizzle.h"
|
||||||
#include "video_core/rasterizer_cache/rasterizer_cache.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/gl_state.h"
|
||||||
#include "video_core/renderer_opengl/texture_downloader_es.h"
|
#include "video_core/renderer_opengl/texture_downloader_es.h"
|
||||||
#include "video_core/renderer_opengl/texture_filters/texture_filterer.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) {
|
if (GL_ARB_texture_storage) {
|
||||||
// Allocate all possible mipmap levels upfront
|
// 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);
|
glTexStorage2D(GL_TEXTURE_2D, levels, format_tuple.internal_format, width, height);
|
||||||
} else {
|
} else {
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, format_tuple.internal_format, width, height, 0,
|
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());
|
glActiveTexture(TextureUnits::TextureCube.Enum());
|
||||||
if (GL_ARB_texture_storage) {
|
if (GL_ARB_texture_storage) {
|
||||||
// Allocate all possible mipmap levels in case the game uses them later
|
// 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);
|
glTexStorage2D(GL_TEXTURE_CUBE_MAP, levels, format_tuple.internal_format, width, width);
|
||||||
} else {
|
} else {
|
||||||
for (auto faces : {
|
for (auto faces : {
|
||||||
|
@ -1,31 +1,10 @@
|
|||||||
// Copyright 2015 Citra Emulator Project
|
// Copyright 2022 Citra Emulator Project
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#pragma once
|
#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 <unordered_map>
|
||||||
#include <boost/functional/hash.hpp>
|
|
||||||
#include <glad/glad.h>
|
|
||||||
#include "common/assert.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 "core/custom_tex_cache.h"
|
||||||
#include "video_core/rasterizer_cache/rasterizer_cache_utils.h"
|
#include "video_core/rasterizer_cache/rasterizer_cache_utils.h"
|
||||||
#include "video_core/rasterizer_cache/surface_params.h"
|
#include "video_core/rasterizer_cache/surface_params.h"
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <tuple>
|
||||||
#include <boost/icl/interval_map.hpp>
|
#include <boost/icl/interval_map.hpp>
|
||||||
#include <boost/icl/interval_set.hpp>
|
#include <boost/icl/interval_set.hpp>
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
@ -12,7 +13,7 @@
|
|||||||
|
|
||||||
namespace OpenGL {
|
namespace OpenGL {
|
||||||
|
|
||||||
class CachedSurface;
|
struct CachedSurface;
|
||||||
using Surface = std::shared_ptr<CachedSurface>;
|
using Surface = std::shared_ptr<CachedSurface>;
|
||||||
|
|
||||||
// Declare rasterizer interval types
|
// Declare rasterizer interval types
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2020 Citra Emulator Project
|
// Copyright 2022 Citra Emulator Project
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2020 Citra Emulator Project
|
// Copyright 2022 Citra Emulator Project
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user