core,shader_recompiler: align structures for 64-bit platforms (#447)
Decreased sizes: * TextureDefinition 32 bytes -> 24 bytes * PortOut 72 bytes -> 64 bytes * Request 48 bytes -> 40 bytes * WindowSystemInfo 32 bytes -> 24 bytes
This commit is contained in:
parent
fc745ee767
commit
243fd0be78
|
@ -22,15 +22,15 @@ public:
|
|||
|
||||
private:
|
||||
struct PortOut {
|
||||
bool isOpen = false;
|
||||
int type = 0;
|
||||
SDL_AudioStream* stream = nullptr;
|
||||
u32 samples_num = 0;
|
||||
u8 sample_size = 0;
|
||||
u32 freq = 0;
|
||||
u32 format = -1;
|
||||
int type = 0;
|
||||
int channels_num = 0;
|
||||
int volume[8] = {};
|
||||
SDL_AudioStream* stream = nullptr;
|
||||
u8 sample_size = 0;
|
||||
bool isOpen = false;
|
||||
};
|
||||
std::shared_mutex m_mutex;
|
||||
std::array<PortOut, 22> portsOut; // main up to 8 ports , BGM 1 port , voice up to 4 ports ,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <pthread.h>
|
||||
|
@ -252,8 +252,8 @@ void VideoOutDriver::SubmitFlipInternal(VideoOutPort* port, s32 index, s64 flip_
|
|||
requests.push({
|
||||
.frame = frame,
|
||||
.port = port,
|
||||
.index = index,
|
||||
.flip_arg = flip_arg,
|
||||
.index = index,
|
||||
.eop = is_eop,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
@ -92,8 +92,8 @@ private:
|
|||
struct Request {
|
||||
Vulkan::Frame* frame;
|
||||
VideoOutPort* port;
|
||||
s32 index;
|
||||
s64 flip_arg;
|
||||
s32 index;
|
||||
bool eop;
|
||||
|
||||
operator bool() const noexcept {
|
||||
|
|
|
@ -25,9 +25,6 @@ enum class WindowSystemType : u8 {
|
|||
};
|
||||
|
||||
struct WindowSystemInfo {
|
||||
// Window system type. Determines which GL context or Vulkan WSI is used.
|
||||
WindowSystemType type = WindowSystemType::Headless;
|
||||
|
||||
// Connection to a display server. This is used on X11 and Wayland platforms.
|
||||
void* display_connection = nullptr;
|
||||
|
||||
|
@ -38,6 +35,9 @@ struct WindowSystemInfo {
|
|||
|
||||
// Scale of the render surface. For hidpi systems, this will be >1.
|
||||
float render_surface_scale = 1.0f;
|
||||
|
||||
// Window system type. Determines which GL context or Vulkan WSI is used.
|
||||
WindowSystemType type = WindowSystemType::Headless;
|
||||
};
|
||||
|
||||
class WindowSDL {
|
||||
|
|
|
@ -485,8 +485,8 @@ void EmitContext::DefineImagesAndSamplers() {
|
|||
Name(id, fmt::format("{}_{}{}_{:02x}", stage, "img", image_desc.sgpr_base,
|
||||
image_desc.dword_offset));
|
||||
images.push_back({
|
||||
.id = id,
|
||||
.data_types = data_types,
|
||||
.id = id,
|
||||
.sampled_type = image_desc.is_storage ? sampled_type : TypeSampledImage(image_type),
|
||||
.pointer_type = pointer_type,
|
||||
.image_type = image_type,
|
||||
|
|
|
@ -193,8 +193,8 @@ public:
|
|||
Id shared_memory_u32_type{};
|
||||
|
||||
struct TextureDefinition {
|
||||
Id id;
|
||||
const VectorIds* data_types;
|
||||
Id id;
|
||||
Id sampled_type;
|
||||
Id pointer_type;
|
||||
Id image_type;
|
||||
|
|
Loading…
Reference in New Issue