mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-09 05:08:43 +00:00
video_core: Fix some struct comparisons. (#3450)
This commit is contained in:
@@ -17,7 +17,7 @@ struct VsAttribSpecialization {
|
||||
AmdGpu::NumberClass num_class{};
|
||||
AmdGpu::CompMapping dst_select{};
|
||||
|
||||
auto operator<=>(const VsAttribSpecialization&) const = default;
|
||||
bool operator==(const VsAttribSpecialization&) const = default;
|
||||
};
|
||||
|
||||
struct BufferSpecialization {
|
||||
@@ -52,21 +52,21 @@ struct ImageSpecialization {
|
||||
AmdGpu::CompMapping dst_select{};
|
||||
AmdGpu::NumberConversion num_conversion{};
|
||||
|
||||
auto operator<=>(const ImageSpecialization&) const = default;
|
||||
bool operator==(const ImageSpecialization&) const = default;
|
||||
};
|
||||
|
||||
struct FMaskSpecialization {
|
||||
u32 width;
|
||||
u32 height;
|
||||
|
||||
auto operator<=>(const FMaskSpecialization&) const = default;
|
||||
bool operator==(const FMaskSpecialization&) const = default;
|
||||
};
|
||||
|
||||
struct SamplerSpecialization {
|
||||
u8 force_unnormalized : 1;
|
||||
u8 force_degamma : 1;
|
||||
|
||||
auto operator<=>(const SamplerSpecialization&) const = default;
|
||||
bool operator==(const SamplerSpecialization&) const = default;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -56,6 +56,10 @@ struct GraphicsPipelineKey {
|
||||
u32 depth_clip_enable : 1;
|
||||
};
|
||||
|
||||
GraphicsPipelineKey() {
|
||||
std::memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
||||
bool operator==(const GraphicsPipelineKey& key) const noexcept {
|
||||
return std::memcmp(this, &key, sizeof(key)) == 0;
|
||||
}
|
||||
|
||||
@@ -20,15 +20,20 @@ namespace Vulkan {
|
||||
class Instance;
|
||||
|
||||
struct RenderState {
|
||||
std::array<vk::RenderingAttachmentInfo, 8> color_attachments{};
|
||||
vk::RenderingAttachmentInfo depth_attachment{};
|
||||
vk::RenderingAttachmentInfo stencil_attachment{};
|
||||
u32 num_color_attachments{};
|
||||
u32 num_layers{1};
|
||||
bool has_depth{};
|
||||
bool has_stencil{};
|
||||
u32 width{};
|
||||
u32 height{};
|
||||
std::array<vk::RenderingAttachmentInfo, 8> color_attachments;
|
||||
vk::RenderingAttachmentInfo depth_attachment;
|
||||
vk::RenderingAttachmentInfo stencil_attachment;
|
||||
u32 num_color_attachments;
|
||||
u32 num_layers;
|
||||
bool has_depth;
|
||||
bool has_stencil;
|
||||
u32 width;
|
||||
u32 height;
|
||||
|
||||
RenderState() {
|
||||
std::memset(this, 0, sizeof(*this));
|
||||
num_layers = 1;
|
||||
}
|
||||
|
||||
bool operator==(const RenderState& other) const noexcept {
|
||||
return std::memcmp(this, &other, sizeof(RenderState)) == 0;
|
||||
|
||||
Reference in New Issue
Block a user