mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 06:51:26 +12:00
Bugfix
This commit is contained in:
parent
1636531d4a
commit
f16ec62b4a
5 changed files with 21 additions and 26 deletions
|
@ -198,19 +198,11 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
|
||||||
auto args = vm::ptr<u32>::make(args_addr);
|
auto args = vm::ptr<u32>::make(args_addr);
|
||||||
|
|
||||||
#if CMD_DEBUG
|
#if CMD_DEBUG
|
||||||
<<<<<<< HEAD
|
|
||||||
std::string debug = GetMethodName(cmd);
|
|
||||||
debug += "(";
|
|
||||||
for(u32 i=0; i<count; ++i) debug += (i ? ", " : "") + fmt::Format("0x%x", ARGS(i));
|
|
||||||
debug += ")";
|
|
||||||
LOG_NOTICE(RSX, debug);
|
|
||||||
=======
|
|
||||||
std::string debug = GetMethodName(cmd);
|
std::string debug = GetMethodName(cmd);
|
||||||
debug += "(";
|
debug += "(";
|
||||||
for (u32 i = 0; i < count; ++i) debug += (i ? ", " : "") + fmt::Format("0x%x", ARGS(i));
|
for (u32 i = 0; i < count; ++i) debug += (i ? ", " : "") + fmt::Format("0x%x", ARGS(i));
|
||||||
debug += ")";
|
debug += ")";
|
||||||
LOG_NOTICE(RSX, debug);
|
LOG_NOTICE(RSX, debug);
|
||||||
>>>>>>> 4b8d61736460fe75f264c7180bd7d9d898b540f5
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u32 index = 0;
|
u32 index = 0;
|
||||||
|
|
|
@ -214,12 +214,12 @@ next:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 adecOpen(AudioDecoder* data)
|
u32 adecOpen(AudioDecoder* adec_ptr)
|
||||||
{
|
{
|
||||||
std::shared_ptr<AudioDecoder> data_ptr(data);
|
std::shared_ptr<AudioDecoder> sptr(adec_ptr);
|
||||||
AudioDecoder& adec = *data;
|
AudioDecoder& adec = *adec_ptr;
|
||||||
|
|
||||||
u32 adec_id = cellAdec->GetNewId(data_ptr);
|
u32 adec_id = cellAdec->GetNewId(sptr);
|
||||||
|
|
||||||
adec.id = adec_id;
|
adec.id = adec_id;
|
||||||
|
|
||||||
|
@ -232,8 +232,9 @@ u32 adecOpen(AudioDecoder* data)
|
||||||
adec.adecCb->InitRegs();
|
adec.adecCb->InitRegs();
|
||||||
adec.adecCb->DoRun();
|
adec.adecCb->DoRun();
|
||||||
|
|
||||||
thread t("Audio Decoder[" + std::to_string(adec_id) + "] Thread", [&, data_ptr]()
|
thread t("Audio Decoder[" + std::to_string(adec_id) + "] Thread", [adec_ptr, sptr]()
|
||||||
{
|
{
|
||||||
|
AudioDecoder& adec = *adec_ptr;
|
||||||
cellAdec->Notice("Audio Decoder thread started");
|
cellAdec->Notice("Audio Decoder thread started");
|
||||||
|
|
||||||
AdecTask& task = adec.task;
|
AdecTask& task = adec.task;
|
||||||
|
|
|
@ -288,20 +288,20 @@ void dmuxQueryEsAttr(u32 info_addr /* may be 0 */, vm::ptr<const CellCodecEsFilt
|
||||||
const u32 esSpecificInfo_addr, vm::ptr<CellDmuxEsAttr> attr)
|
const u32 esSpecificInfo_addr, vm::ptr<CellDmuxEsAttr> attr)
|
||||||
{
|
{
|
||||||
if (esFilterId->filterIdMajor >= 0xe0)
|
if (esFilterId->filterIdMajor >= 0xe0)
|
||||||
attr->memSize = 0x400000; // 0x45fa49 from ps3
|
attr->memSize = 0x500000; // 0x45fa49 from ps3
|
||||||
else
|
else
|
||||||
attr->memSize = 0x6000; // 0x73d9 from ps3
|
attr->memSize = 0x7000; // 0x73d9 from ps3
|
||||||
|
|
||||||
cellDmux->Warning("*** filter(0x%x, 0x%x, 0x%x, 0x%x)", (u32)esFilterId->filterIdMajor, (u32)esFilterId->filterIdMinor,
|
cellDmux->Warning("*** filter(0x%x, 0x%x, 0x%x, 0x%x)", (u32)esFilterId->filterIdMajor, (u32)esFilterId->filterIdMinor,
|
||||||
(u32)esFilterId->supplementalInfo1, (u32)esFilterId->supplementalInfo2);
|
(u32)esFilterId->supplementalInfo1, (u32)esFilterId->supplementalInfo2);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 dmuxOpen(Demuxer* data)
|
u32 dmuxOpen(Demuxer* dmux_ptr)
|
||||||
{
|
{
|
||||||
std::shared_ptr<Demuxer> data_ptr(data);
|
std::shared_ptr<Demuxer> sptr(dmux_ptr);
|
||||||
Demuxer& dmux = *data;
|
Demuxer& dmux = *dmux_ptr;
|
||||||
|
|
||||||
u32 dmux_id = cellDmux->GetNewId(data_ptr);
|
u32 dmux_id = cellDmux->GetNewId(sptr);
|
||||||
|
|
||||||
dmux.id = dmux_id;
|
dmux.id = dmux_id;
|
||||||
|
|
||||||
|
@ -314,8 +314,9 @@ u32 dmuxOpen(Demuxer* data)
|
||||||
dmux.dmuxCb->InitRegs();
|
dmux.dmuxCb->InitRegs();
|
||||||
dmux.dmuxCb->DoRun();
|
dmux.dmuxCb->DoRun();
|
||||||
|
|
||||||
thread t("Demuxer[" + std::to_string(dmux_id) + "] Thread", [&, data_ptr]()
|
thread t("Demuxer[" + std::to_string(dmux_id) + "] Thread", [dmux_ptr, sptr]()
|
||||||
{
|
{
|
||||||
|
Demuxer& dmux = *dmux_ptr;
|
||||||
cellDmux->Notice("Demuxer thread started (mem=0x%x, size=0x%x, cb=0x%x, arg=0x%x)", dmux.memAddr, dmux.memSize, dmux.cbFunc, dmux.cbArg);
|
cellDmux->Notice("Demuxer thread started (mem=0x%x, size=0x%x, cb=0x%x, arg=0x%x)", dmux.memAddr, dmux.memSize, dmux.cbFunc, dmux.cbArg);
|
||||||
|
|
||||||
DemuxerTask task;
|
DemuxerTask task;
|
||||||
|
|
|
@ -204,12 +204,12 @@ u32 vdecQueryAttr(CellVdecCodecType type, u32 profile, u32 spec_addr /* may be 0
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 vdecOpen(VideoDecoder* data)
|
u32 vdecOpen(VideoDecoder* vdec_ptr)
|
||||||
{
|
{
|
||||||
std::shared_ptr<VideoDecoder> data_ptr(data);
|
std::shared_ptr<VideoDecoder> sptr(vdec_ptr);
|
||||||
VideoDecoder& vdec = *data;
|
VideoDecoder& vdec = *vdec_ptr;
|
||||||
|
|
||||||
u32 vdec_id = cellVdec->GetNewId(data_ptr);
|
u32 vdec_id = cellVdec->GetNewId(sptr);
|
||||||
|
|
||||||
vdec.id = vdec_id;
|
vdec.id = vdec_id;
|
||||||
|
|
||||||
|
@ -222,8 +222,9 @@ u32 vdecOpen(VideoDecoder* data)
|
||||||
vdec.vdecCb->InitRegs();
|
vdec.vdecCb->InitRegs();
|
||||||
vdec.vdecCb->DoRun();
|
vdec.vdecCb->DoRun();
|
||||||
|
|
||||||
thread t("Video Decoder[" + std::to_string(vdec_id) + "] Thread", [&, data_ptr]()
|
thread t("Video Decoder[" + std::to_string(vdec_id) + "] Thread", [vdec_ptr, sptr]()
|
||||||
{
|
{
|
||||||
|
VideoDecoder& vdec = *vdec_ptr;
|
||||||
cellVdec->Notice("Video Decoder thread started");
|
cellVdec->Notice("Video Decoder thread started");
|
||||||
|
|
||||||
VdecTask& task = vdec.task;
|
VdecTask& task = vdec.task;
|
||||||
|
|
|
@ -83,7 +83,7 @@ s32 sys_mutex_destroy(PPUThread& CPU, u32 mutex_id)
|
||||||
|
|
||||||
const u32 tid = CPU.GetId();
|
const u32 tid = CPU.GetId();
|
||||||
|
|
||||||
if (mutex->owner.compare_and_swap_test(0, tid)) // check if locked
|
if (!mutex->owner.compare_and_swap_test(0, tid)) // check if locked
|
||||||
{
|
{
|
||||||
return CELL_EBUSY;
|
return CELL_EBUSY;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue