diff --git a/rpcs3/Emu/RSX/VK/vkutils/commands.h b/rpcs3/Emu/RSX/VK/vkutils/commands.h index 9ba6af0ccb..65ebfe95b2 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/commands.h +++ b/rpcs3/Emu/RSX/VK/vkutils/commands.h @@ -42,7 +42,7 @@ namespace vk queue_submit_t(const queue_submit_t& other) { - std::memcpy(this, &other, sizeof(queue_submit_t)); + std::memcpy(static_cast(this), &other, sizeof(queue_submit_t)); } inline queue_submit_t& wait_on(VkSemaphore semaphore, VkPipelineStageFlags stage) diff --git a/rpcs3/Emu/RSX/VK/vkutils/graphics_pipeline_state.hpp b/rpcs3/Emu/RSX/VK/vkutils/graphics_pipeline_state.hpp index 96bf576b06..11f2b834ae 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/graphics_pipeline_state.hpp +++ b/rpcs3/Emu/RSX/VK/vkutils/graphics_pipeline_state.hpp @@ -23,7 +23,7 @@ namespace vk graphics_pipeline_state() { // NOTE: Vk** structs have padding bytes - memset(this, 0, sizeof(graphics_pipeline_state)); + std::memset(static_cast(this), 0, sizeof(graphics_pipeline_state)); ia.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; cs.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; @@ -43,7 +43,7 @@ namespace vk graphics_pipeline_state(const graphics_pipeline_state& other) { // NOTE: Vk** structs have padding bytes - memcpy(this, &other, sizeof(graphics_pipeline_state)); + std::memcpy(static_cast(this), &other, sizeof(graphics_pipeline_state)); if (other.cs.pAttachments == other.att_state) { @@ -59,7 +59,7 @@ namespace vk if (this != &other) { // NOTE: Vk** structs have padding bytes - memcpy(this, &other, sizeof(graphics_pipeline_state)); + std::memcpy(static_cast(this), &other, sizeof(graphics_pipeline_state)); if (other.cs.pAttachments == other.att_state) {