Skip to content

Commit

Permalink
test2
Browse files Browse the repository at this point in the history
  • Loading branch information
Xcedf committed Feb 26, 2025
1 parent 71a2689 commit de67c09
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/core/libraries/kernel/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
namespace Libraries::Kernel {

u64 PS4_SYSV_ABI sceKernelGetDirectMemorySize() {
LOG_WARNING(Kernel_Vmm, "called");
//LOG_WARNING(Kernel_Vmm, "called");
const auto* memory = Core::Memory::Instance();
return memory->GetTotalDirectSize();
}
Expand Down Expand Up @@ -64,7 +64,7 @@ int PS4_SYSV_ABI sceKernelAllocateDirectMemory(s64 searchStart, s64 searchEnd, u

*physAddrOut = static_cast<s64>(phys_addr);

LOG_INFO(Kernel_Vmm,
LOG_TRACE(Kernel_Vmm,
"searchStart = {:#x}, searchEnd = {:#x}, len = {:#x}, "
"alignment = {:#x}, memoryType = {:#x}, physAddrOut = {:#x}",
searchStart, searchEnd, len, alignment, memoryType, phys_addr);
Expand Down Expand Up @@ -163,7 +163,7 @@ s32 PS4_SYSV_ABI sceKernelReserveVirtualRange(void** addr, u64 len, int flags, u
int PS4_SYSV_ABI sceKernelMapNamedDirectMemory(void** addr, u64 len, int prot, int flags,
s64 directMemoryStart, u64 alignment,
const char* name) {
LOG_INFO(Kernel_Vmm,
LOG_TRACE(Kernel_Vmm,
"in_addr = {}, len = {:#x}, prot = {:#x}, flags = {:#x}, "
"directMemoryStart = {:#x}, alignment = {:#x}, name = '{}'",
fmt::ptr(*addr), len, prot, flags, directMemoryStart, alignment, name);
Expand Down Expand Up @@ -192,13 +192,13 @@ int PS4_SYSV_ABI sceKernelMapNamedDirectMemory(void** addr, u64 len, int prot, i
memory->MapMemory(addr, in_addr, len, mem_prot, map_flags, Core::VMAType::Direct, "", false,
directMemoryStart, alignment);

LOG_INFO(Kernel_Vmm, "out_addr = {}", fmt::ptr(*addr));
//LOG_INFO(Kernel_Vmm, "out_addr = {}", fmt::ptr(*addr));
return ret;
}

int PS4_SYSV_ABI sceKernelMapDirectMemory(void** addr, u64 len, int prot, int flags,
s64 directMemoryStart, u64 alignment) {
LOG_INFO(Kernel_Vmm, "called, redirected to sceKernelMapNamedDirectMemory");
//LOG_INFO(Kernel_Vmm, "called, redirected to sceKernelMapNamedDirectMemory");
return sceKernelMapNamedDirectMemory(addr, len, prot, flags, directMemoryStart, alignment, "");
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/libraries/libs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void InitHLELibs(Core::Loader::SymbolsResolver* sym) {
Libraries::Random::RegisterlibSceRandom(sym);
Libraries::Usbd::RegisterlibSceUsbd(sym);
Libraries::Pad::RegisterlibScePad(sym);
Libraries::Ajm::RegisterlibSceAjm(sym);
//Libraries::Ajm::RegisterlibSceAjm(sym);
Libraries::ErrorDialog::RegisterlibSceErrorDialog(sym);
Libraries::ImeDialog::RegisterlibSceImeDialog(sym);
Libraries::AvPlayer::RegisterlibSceAvPlayer(sym);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ using BufferAlias = EmitContext::BufferAlias;
Id EmitReadConst(EmitContext& ctx, IR::Inst* inst) {
const u32 flatbuf_off_dw = inst->Flags<u32>();
const auto& srt_flatbuf = ctx.buffers.back();
ASSERT(srt_flatbuf.binding >= 0 && flatbuf_off_dw > 0 &&
srt_flatbuf.buffer_type == BufferType::ReadConstUbo);
//ASSERT(srt_flatbuf.binding >= 0 && flatbuf_off_dw > 0 &&
// srt_flatbuf.buffer_type == BufferType::ReadConstUbo);
const auto [id, pointer_type] = srt_flatbuf[BufferAlias::U32];
const Id ptr{
ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, ctx.ConstU32(flatbuf_off_dw))};
Expand Down
4 changes: 3 additions & 1 deletion src/video_core/texture_cache/image_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ s32 ImageInfo::SliceOf(const ImageInfo& info, s32 mip) const {
}

// 2D dimensions of both images should be the same.
if ((size.width != info.size.width) || (size.height != info.size.height)) {
const auto mip_w = std::max(info.size.width >> mip, 1u);
const auto mip_h = std::max(info.size.height >> mip, 1u);
if ((size.width != mip_w) || (size.height != mip_h)) {
return -1;
}

Expand Down

0 comments on commit de67c09

Please sign in to comment.