Skip to content

Commit

Permalink
Merge pull request #18131 from hrydgard/assorted-fixes-4
Browse files Browse the repository at this point in the history
Fix crash in Beats on x86-64, minor other fixes
  • Loading branch information
hrydgard committed Sep 11, 2023
2 parents b83e89a + accd9b1 commit 064532a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Common/GPU/Vulkan/VulkanMemory.cpp
Expand Up @@ -291,7 +291,7 @@ VulkanPushPool::Block VulkanPushPool::CreateBlock(size_t size) {
_assert_(result == VK_SUCCESS);

result = vmaMapMemory(vulkan_->Allocator(), block.allocation, (void **)(&block.writePtr));
_assert_(result == VK_SUCCESS);
_assert_msg_(result == VK_SUCCESS, "VulkanPushPool: Failed to map memory (result = %08x)", result);

_assert_msg_(block.writePtr != nullptr, "VulkanPushPool: Failed to map memory on block of size %d", (int)block.size);
return block;
Expand Down
2 changes: 2 additions & 0 deletions Core/MIPS/JitCommon/JitBlockCache.cpp
Expand Up @@ -247,6 +247,8 @@ static void ExpandRange(std::pair<u32, u32> &range, u32 newStart, u32 newEnd) {
void JitBlockCache::FinalizeBlock(int block_num, bool block_link) {
JitBlock &b = blocks_[block_num];

_assert_msg_(Memory::IsValidAddress(b.originalAddress), "FinalizeBlock: Bad originalAddress %08x in block %d", b.originalAddress, block_num);

b.originalFirstOpcode = Memory::Read_Opcode_JIT(b.originalAddress);
MIPSOpcode opcode = GetEmuHackOpForBlock(block_num);
Memory::Write_Opcode_JIT(b.originalAddress, opcode);
Expand Down
1 change: 1 addition & 0 deletions Core/MIPS/x86/CompLoadStore.cpp
Expand Up @@ -429,6 +429,7 @@ namespace MIPSComp {
skipStore = J_CC(CC_NE);

CompITypeMemWrite(op, 32, safeMemFuncs.writeU32);
gpr.MapReg(rt, true, true);
MOV(32, gpr.R(rt), Imm32(1));
finish = J();

Expand Down
2 changes: 1 addition & 1 deletion Core/Util/PPGeDraw.cpp
Expand Up @@ -827,7 +827,7 @@ static void PPGeResetCurrentText() {
// Draws some text using the one font we have in the atlas.
void PPGeDrawCurrentText(u32 color) {
// If the atlas is larger than 512x512, need to use windows into it.
bool useTextureWindow = atlasWidth > 512 || atlasHeight > 512;
bool useTextureWindow = g_Config.bSoftwareRendering && atlasWidth > 512 || atlasHeight > 512;
uint32_t texturePosX = 0;
uint32_t texturePosY = 0;

Expand Down

0 comments on commit 064532a

Please sign in to comment.