mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 10:21:21 +00:00
Merge pull request #288 from raven02/patch-29
Implement cellSpursAttributeSetMemoryContainerForSpuThread
This commit is contained in:
commit
834f5dc9a9
@ -54,8 +54,10 @@ public:
|
||||
this->spuThreadGroupPriority = spuPriority;
|
||||
this->ppuThreadPriority = ppuPriority;
|
||||
this->exitIfNoWork = exitIfNoWork;
|
||||
|
||||
memset(this->namePrefix, 0, CELL_SPURS_NAME_MAX_LENGTH + 1);
|
||||
this->threadGroupType = 0;
|
||||
this->container = 0;
|
||||
}
|
||||
|
||||
int _setNamePrefix(const char *name, u32 size)
|
||||
@ -71,13 +73,20 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _setMemoryContainerForSpuThread(u32 container)
|
||||
{
|
||||
this->container = container;
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
be_t<int> nSpus;
|
||||
be_t<int> spuThreadGroupPriority;
|
||||
be_t<int> ppuThreadPriority;
|
||||
bool exitIfNoWork;
|
||||
char namePrefix[CELL_SPURS_NAME_MAX_LENGTH+1];
|
||||
be_t<int> threadGroupType;
|
||||
be_t<int> threadGroupType;
|
||||
be_t<u32> container;
|
||||
};
|
||||
|
||||
// Main SPURS manager class.
|
||||
@ -89,4 +98,4 @@ public:
|
||||
|
||||
protected:
|
||||
SPURSManagerAttribute *attr;
|
||||
};
|
||||
};
|
||||
|
@ -75,12 +75,13 @@ int _cellSpursAttributeInitialize(mem_ptr_t<CellSpursAttribute> attr, int nSpus,
|
||||
|
||||
int cellSpursAttributeSetMemoryContainerForSpuThread(mem_ptr_t<CellSpursAttribute> attr, u32 container)
|
||||
{
|
||||
cellSpurs.Error("cellSpursAttributeSetMemoryContainerForSpuThread(attr_addr=0x%x, container=0x%x)",
|
||||
cellSpurs.Warning("cellSpursAttributeSetMemoryContainerForSpuThread(attr_addr=0x%x, container=0x%x)",
|
||||
attr.GetAddr(), container);
|
||||
|
||||
if(!attr.IsGood())
|
||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||
|
||||
attr->attr->_setMemoryContainerForSpuThread(container);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -122,8 +123,8 @@ int cellSpursAttributeSetSpuThreadGroupType(mem_ptr_t<CellSpursAttribute> attr,
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSpursAttributeEnableSystemWorkload(mem_ptr_t<CellSpursAttribute> attr, const u8 priority[8],
|
||||
u32 maxSpu, const bool isPreemptible[8])
|
||||
int cellSpursAttributeEnableSystemWorkload(mem_ptr_t<CellSpursAttribute> attr, const u8 priority[CELL_SPURS_MAX_SPU],
|
||||
u32 maxSpu, const bool isPreemptible[CELL_SPURS_MAX_SPU])
|
||||
{
|
||||
cellSpurs.Error("cellSpursAttributeEnableSystemWorkload(attr_addr=0x%x, priority[%u], maxSpu=%u, isPreemptible[%u])",
|
||||
attr.GetAddr(), priority, maxSpu, isPreemptible);
|
||||
@ -131,7 +132,7 @@ int cellSpursAttributeEnableSystemWorkload(mem_ptr_t<CellSpursAttribute> attr, c
|
||||
if(!attr.IsGood())
|
||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||
|
||||
for (int i=0; i<8; i++)
|
||||
for (int i = 0; i < CELL_SPURS_MAX_SPU; i++)
|
||||
if(priority[i] != 1 || maxSpu == 0)
|
||||
return CELL_SPURS_CORE_ERROR_INVAL;
|
||||
|
||||
@ -204,7 +205,7 @@ int cellSpursSetPriority(mem_ptr_t<CellSpurs> spurs, u32 workloadId, u32 spuId,
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSpursSetPreemptionVictimHints(mem_ptr_t<CellSpurs> spurs, const bool isPreemptible[8])
|
||||
int cellSpursSetPreemptionVictimHints(mem_ptr_t<CellSpurs> spurs, const bool isPreemptible[CELL_SPURS_MAX_SPU])
|
||||
{
|
||||
cellSpurs.Error("cellSpursSetPreemptionVictimHints(spurs_addr=0x%x, isPreemptible[%u])",
|
||||
spurs.GetAddr(), isPreemptible);
|
||||
@ -430,4 +431,4 @@ void cellSpurs_init()
|
||||
cellSpurs.AddFunc(0xe7dd87e1, cellSpursGetTasksetId);
|
||||
cellSpurs.AddFunc(0xa789e631, cellSpursShutdownTaskset);
|
||||
cellSpurs.AddFunc(0xbeb600ac, cellSpursCreateTask);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user