mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
video_core: Fix some struct comparisons. (#3450)
This commit is contained in:
@@ -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