mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-14 10:54:57 +00:00
video_core: Amend constructor initializer list order where applicable
Specifies the members in the same order that initialization would take place in. This also silences -Wreorder warnings.
This commit is contained in:
parent
47f2405ab1
commit
a5fa4b311e
6 changed files with 14 additions and 14 deletions
|
@ -71,8 +71,8 @@ private:
|
||||||
bool is_registered{}; ///< Whether the object is currently registered with the cache
|
bool is_registered{}; ///< Whether the object is currently registered with the cache
|
||||||
bool is_dirty{}; ///< Whether the object is dirty (out of sync with guest memory)
|
bool is_dirty{}; ///< Whether the object is dirty (out of sync with guest memory)
|
||||||
u64 last_modified_ticks{}; ///< When the object was last modified, used for in-order flushing
|
u64 last_modified_ticks{}; ///< When the object was last modified, used for in-order flushing
|
||||||
CacheAddr cache_addr{}; ///< Cache address memory, unique from emulated virtual address space
|
|
||||||
const u8* host_ptr{}; ///< Pointer to the memory backing this cached region
|
const u8* host_ptr{}; ///< Pointer to the memory backing this cached region
|
||||||
|
CacheAddr cache_addr{}; ///< Cache address memory, unique from emulated virtual address space
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|
|
@ -15,8 +15,8 @@ namespace OpenGL {
|
||||||
|
|
||||||
CachedBufferEntry::CachedBufferEntry(VAddr cpu_addr, std::size_t size, GLintptr offset,
|
CachedBufferEntry::CachedBufferEntry(VAddr cpu_addr, std::size_t size, GLintptr offset,
|
||||||
std::size_t alignment, u8* host_ptr)
|
std::size_t alignment, u8* host_ptr)
|
||||||
: cpu_addr{cpu_addr}, size{size}, offset{offset}, alignment{alignment}, RasterizerCacheObject{
|
: RasterizerCacheObject{host_ptr}, cpu_addr{cpu_addr}, size{size}, offset{offset},
|
||||||
host_ptr} {}
|
alignment{alignment} {}
|
||||||
|
|
||||||
OGLBufferCache::OGLBufferCache(RasterizerOpenGL& rasterizer, std::size_t size)
|
OGLBufferCache::OGLBufferCache(RasterizerOpenGL& rasterizer, std::size_t size)
|
||||||
: RasterizerCache{rasterizer}, stream_buffer(size, true) {}
|
: RasterizerCache{rasterizer}, stream_buffer(size, true) {}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
namespace OpenGL {
|
namespace OpenGL {
|
||||||
|
|
||||||
CachedGlobalRegion::CachedGlobalRegion(VAddr cpu_addr, u32 size, u8* host_ptr)
|
CachedGlobalRegion::CachedGlobalRegion(VAddr cpu_addr, u32 size, u8* host_ptr)
|
||||||
: cpu_addr{cpu_addr}, size{size}, RasterizerCacheObject{host_ptr} {
|
: RasterizerCacheObject{host_ptr}, cpu_addr{cpu_addr}, size{size} {
|
||||||
buffer.Create();
|
buffer.Create();
|
||||||
// Bind and unbind the buffer so it gets allocated by the driver
|
// Bind and unbind the buffer so it gets allocated by the driver
|
||||||
glBindBuffer(GL_SHADER_STORAGE_BUFFER, buffer.handle);
|
glBindBuffer(GL_SHADER_STORAGE_BUFFER, buffer.handle);
|
||||||
|
|
|
@ -562,8 +562,8 @@ void RasterizerCacheOpenGL::CopySurface(const Surface& src_surface, const Surfac
|
||||||
}
|
}
|
||||||
|
|
||||||
CachedSurface::CachedSurface(const SurfaceParams& params)
|
CachedSurface::CachedSurface(const SurfaceParams& params)
|
||||||
: params{params}, gl_target{SurfaceTargetToGL(params.target)},
|
: RasterizerCacheObject{params.host_ptr}, params{params},
|
||||||
cached_size_in_bytes{params.size_in_bytes}, RasterizerCacheObject{params.host_ptr} {
|
gl_target{SurfaceTargetToGL(params.target)}, cached_size_in_bytes{params.size_in_bytes} {
|
||||||
|
|
||||||
const auto optional_cpu_addr{
|
const auto optional_cpu_addr{
|
||||||
Core::System::GetInstance().GPU().MemoryManager().GpuToCpuAddress(params.gpu_addr)};
|
Core::System::GetInstance().GPU().MemoryManager().GpuToCpuAddress(params.gpu_addr)};
|
||||||
|
|
|
@ -215,9 +215,9 @@ CachedShader::CachedShader(VAddr cpu_addr, u64 unique_identifier,
|
||||||
Maxwell::ShaderProgram program_type, ShaderDiskCacheOpenGL& disk_cache,
|
Maxwell::ShaderProgram program_type, ShaderDiskCacheOpenGL& disk_cache,
|
||||||
const PrecompiledPrograms& precompiled_programs,
|
const PrecompiledPrograms& precompiled_programs,
|
||||||
ProgramCode&& program_code, ProgramCode&& program_code_b, u8* host_ptr)
|
ProgramCode&& program_code, ProgramCode&& program_code_b, u8* host_ptr)
|
||||||
: host_ptr{host_ptr}, cpu_addr{cpu_addr}, unique_identifier{unique_identifier},
|
: RasterizerCacheObject{host_ptr}, host_ptr{host_ptr}, cpu_addr{cpu_addr},
|
||||||
program_type{program_type}, disk_cache{disk_cache},
|
unique_identifier{unique_identifier}, program_type{program_type}, disk_cache{disk_cache},
|
||||||
precompiled_programs{precompiled_programs}, RasterizerCacheObject{host_ptr} {
|
precompiled_programs{precompiled_programs} {
|
||||||
|
|
||||||
const std::size_t code_size = CalculateProgramSize(program_code);
|
const std::size_t code_size = CalculateProgramSize(program_code);
|
||||||
const std::size_t code_size_b =
|
const std::size_t code_size_b =
|
||||||
|
@ -245,9 +245,9 @@ CachedShader::CachedShader(VAddr cpu_addr, u64 unique_identifier,
|
||||||
Maxwell::ShaderProgram program_type, ShaderDiskCacheOpenGL& disk_cache,
|
Maxwell::ShaderProgram program_type, ShaderDiskCacheOpenGL& disk_cache,
|
||||||
const PrecompiledPrograms& precompiled_programs,
|
const PrecompiledPrograms& precompiled_programs,
|
||||||
GLShader::ProgramResult result, u8* host_ptr)
|
GLShader::ProgramResult result, u8* host_ptr)
|
||||||
: cpu_addr{cpu_addr}, unique_identifier{unique_identifier}, program_type{program_type},
|
: RasterizerCacheObject{host_ptr}, cpu_addr{cpu_addr}, unique_identifier{unique_identifier},
|
||||||
disk_cache{disk_cache}, precompiled_programs{precompiled_programs}, RasterizerCacheObject{
|
program_type{program_type}, disk_cache{disk_cache}, precompiled_programs{
|
||||||
host_ptr} {
|
precompiled_programs} {
|
||||||
|
|
||||||
code = std::move(result.first);
|
code = std::move(result.first);
|
||||||
entries = result.second;
|
entries = result.second;
|
||||||
|
|
|
@ -19,8 +19,8 @@ namespace Vulkan {
|
||||||
|
|
||||||
CachedBufferEntry::CachedBufferEntry(VAddr cpu_addr, std::size_t size, u64 offset,
|
CachedBufferEntry::CachedBufferEntry(VAddr cpu_addr, std::size_t size, u64 offset,
|
||||||
std::size_t alignment, u8* host_ptr)
|
std::size_t alignment, u8* host_ptr)
|
||||||
: cpu_addr{cpu_addr}, size{size}, offset{offset}, alignment{alignment}, RasterizerCacheObject{
|
: RasterizerCacheObject{host_ptr}, cpu_addr{cpu_addr}, size{size}, offset{offset},
|
||||||
host_ptr} {}
|
alignment{alignment} {}
|
||||||
|
|
||||||
VKBufferCache::VKBufferCache(Tegra::MemoryManager& tegra_memory_manager,
|
VKBufferCache::VKBufferCache(Tegra::MemoryManager& tegra_memory_manager,
|
||||||
VideoCore::RasterizerInterface& rasterizer, const VKDevice& device,
|
VideoCore::RasterizerInterface& rasterizer, const VKDevice& device,
|
||||||
|
|
Loading…
Reference in a new issue