mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
SPU/event queue: Implement protocol for SPU queue
This commit is contained in:
parent
f1f93b8f81
commit
063df64108
3 changed files with 19 additions and 4 deletions
|
@ -4835,6 +4835,16 @@ spu_thread::thread_name_t::operator std::string() const
|
|||
return full_name;
|
||||
}
|
||||
|
||||
spu_thread::priority_t::operator s32() const
|
||||
{
|
||||
if (_this->get_type() != spu_type::threaded || !_this->group->has_scheduler_context)
|
||||
{
|
||||
return s32{smax};
|
||||
}
|
||||
|
||||
return _this->group->prio;
|
||||
}
|
||||
|
||||
template <>
|
||||
void fmt_class_string<spu_channel>::format(std::string& out, u64 arg)
|
||||
{
|
||||
|
|
|
@ -857,6 +857,14 @@ public:
|
|||
|
||||
operator std::string() const;
|
||||
} thread_name{ this };
|
||||
|
||||
// For lv2_obj::schedule<spu_thread>
|
||||
const struct priority_t
|
||||
{
|
||||
const spu_thread* _this;
|
||||
|
||||
operator s32() const;
|
||||
} prio{ this };
|
||||
};
|
||||
|
||||
class spu_function_logger
|
||||
|
|
|
@ -67,10 +67,7 @@ CellError lv2_event_queue::send(lv2_event event)
|
|||
else
|
||||
{
|
||||
// Store event in In_MBox
|
||||
auto& spu = static_cast<spu_thread&>(*sq.front());
|
||||
|
||||
// TODO: use protocol?
|
||||
sq.pop_front();
|
||||
auto& spu = static_cast<spu_thread&>(*schedule<spu_thread>(sq, protocol));
|
||||
|
||||
const u32 data1 = static_cast<u32>(std::get<1>(event));
|
||||
const u32 data2 = static_cast<u32>(std::get<2>(event));
|
||||
|
|
Loading…
Add table
Reference in a new issue