(06-06-2012, 07:54 AM)Squall Leonhart Wrote: [ -> ]Video link is bust
no patch
i call bullshit.
This seems too much like a pimping of his Youtube profile which is decked out with illegal content.
Sorry it took so long to post back, but here is the primary source area I'm attempting to parallel, and my code changes. The revisions show promise, I am able to get full speed in a demanding game such as mickey even on my (inferior?) Phenom II, but there are some major synching issues that (not being a developer / coder) I'm unable to deal with at present.
Give me another month or two and no life and I might be able to figure something out to keep things synched a bit better. As it stands now I have all four cores at 100% when playing, the problem with that is that it leaves no room for code cache / Jit etc. So the frame rate is only stable when things aren't being loaded all other times the screen will pause to let the CPU (Core) catch up.
Maybe a dev could help out, I need a way of limiting the amount of processor time Fifo/GPU are allowed to take in order to leave enough room for other tasks to be performed in real-time.
Also this code is not portable and can only be compiled with ICC builds, I'm sure the Devs may know how to make it work using open source libraries though ( OpenMP? ) I'm happy to continue working on it myself, but I would appreciate help.
[CODE Excerpt]
FIFO.CPP
while (GpuRunningState)
{
g_video_backend->PeekMessages();
cilk_spawn VideoFifo_CheckAsyncRequest();
CommandProcessor::SetCpStatus();
cilk_sync;
// check if we are able to run this buffer
while (GpuRunningState && !CommandProcessor::interruptWaiting && fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint() && !PixelEngine::WaitingForPEInterrupt())
{
if (!GpuRunningState) break;
fifo.isGpuReadingData = true;
CommandProcessor::isPossibleWaitingSetDrawDone = fifo.bFF_GPLinkEnable ? true : false;
u32 readPtr = fifo.CPReadPointer;
u8 *uData = Memory::GetPointer(readPtr);
if (readPtr == fifo.CPEnd) readPtr = fifo.CPBase;
else readPtr += 32;
_assert_msg_(COMMANDPROCESSOR, (s32)fifo.CPReadWriteDistance - 32 >= 0 ,
"Negative fifo.CPReadWriteDistance = %i in FIFO Loop !\nThat can produce inestabilty in the game. Please report it.", fifo.CPReadWriteDistance - 32);
ReadDataFromFifo(uData, 32);
cilk_spawn OpcodeDecoder_Run(g_bSkipCurrentFrame);
Common::AtomicStore(fifo.CPReadPointer, readPtr);
Common::AtomicAdd(fifo.CPReadWriteDistance, -32);
if((GetVideoBufferEndPtr() - g_pVideoData) == 0)
Common::AtomicStore(fifo.SafeCPReadPointer, fifo.CPReadPointer);
CommandProcessor::SetCpStatus();
// This call is pretty important in DualCore mode and must be called in the FIFO Loop.
// If we don't, s_swapRequested or s_efbAccessRequested won't be set to false
// leading the CPU thread to wait in Video_BeginField or Video_AccessEFB thus slowing things down.
VideoFifo_CheckAsyncRequest();
CommandProcessor::isPossibleWaitingSetDrawDone = false;
cilk_sync;
}
[End Code]
Note that I'm learning to use clik_spawn to create the parallel regions and parallel studio to find optimal placements, I'm not familiar with anything else... So I leave it up to someone else to port a complete product if ever there is one.
Can't seem to get Youtube to cooperate...
This will have to do unbelievers.
Image link
http://postimage.org/image/ttl2bg14n/