Misc: More warning fixes

This commit is contained in:
Connor McLaughlin
2022-08-10 14:33:20 +10:00
parent 0f198cbe3a
commit 916900be5d
11 changed files with 18 additions and 18 deletions

View File

@ -24,7 +24,7 @@ public:
CDROMAsyncReader();
~CDROMAsyncReader();
const CDImage::LBA GetLastReadSector() const { return m_buffers[m_buffer_front.load()].lba; }
CDImage::LBA GetLastReadSector() const { return m_buffers[m_buffer_front.load()].lba; }
const SectorBuffer& GetSectorBuffer() const { return m_buffers[m_buffer_front.load()].data; }
const CDImage::SubChannelQ& GetSectorSubQ() const { return m_buffers[m_buffer_front.load()].subq; }
u32 GetBufferedSectorCount() const { return m_buffer_count.load(); }

View File

@ -94,10 +94,10 @@ struct CodeBlock
u32 recompile_count = 0;
u32 invalidate_frame_number = 0;
const u32 GetPC() const { return key.GetPC(); }
const u32 GetSizeInBytes() const { return static_cast<u32>(instructions.size()) * sizeof(Instruction); }
const u32 GetStartPageIndex() const { return (key.GetPCPhysicalAddress() / HOST_PAGE_SIZE); }
const u32 GetEndPageIndex() const { return ((key.GetPCPhysicalAddress() + GetSizeInBytes()) / HOST_PAGE_SIZE); }
u32 GetPC() const { return key.GetPC(); }
u32 GetSizeInBytes() const { return static_cast<u32>(instructions.size()) * sizeof(Instruction); }
u32 GetStartPageIndex() const { return (key.GetPCPhysicalAddress() / HOST_PAGE_SIZE); }
u32 GetEndPageIndex() const { return ((key.GetPCPhysicalAddress() + GetSizeInBytes()) / HOST_PAGE_SIZE); }
bool IsInRAM() const
{
// TODO: Constant

View File

@ -317,9 +317,11 @@ void CodeGenerator::EmitSignExtend(HostReg to_reg, RegSize to_size, HostReg from
}
}
break;
}
Panic("Unknown sign-extend combination");
default:
Panic("Unknown sign-extend combination");
break;
}
}
void CodeGenerator::EmitZeroExtend(HostReg to_reg, RegSize to_size, HostReg from_reg, RegSize from_size)

View File

@ -33,7 +33,7 @@ public:
GPU_HW();
virtual ~GPU_HW();
const Threading::Thread* GetSWThread() const;
const Threading::Thread* GetSWThread() const override;
virtual bool Initialize() override;
virtual void Reset(bool clear_vram) override;

View File

@ -798,7 +798,7 @@ void GPU_HW_Vulkan::ClearFramebuffer()
m_vram_depth_texture.TransitionToLayout(cmdbuf, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
static constexpr VkClearColorValue cc = {};
const VkClearDepthStencilValue cds = {m_pgxp_depth_buffer ? 1.0f : 0.0f};
const VkClearDepthStencilValue cds = {m_pgxp_depth_buffer ? 1.0f : 0.0f, 0u};
static constexpr VkImageSubresourceRange csrr = {VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u};
static constexpr VkImageSubresourceRange dsrr = {VK_IMAGE_ASPECT_DEPTH_BIT, 0u, 1u, 0u, 1u};
vkCmdClearColorImage(cmdbuf, m_vram_texture.GetImage(), m_vram_texture.GetLayout(), &cc, 1u, &csrr);

View File

@ -23,7 +23,7 @@ public:
ALWAYS_INLINE const GPU_SW_Backend& GetBackend() const { return m_backend; }
GPURenderer GetRendererType() const override;
const Threading::Thread* GetSWThread() const;
const Threading::Thread* GetSWThread() const override;
bool Initialize() override;
bool DoState(StateWrapper& sw, HostDisplayTexture** host_texture, bool update_display) override;