コード例 #1
0
// copy all local data to the GPU using
// stored buffer ID
void VBuffer::SyncBuffer()
{
    if (m_renderID == 0)
    {
        fprintf(stderr, "Default Render Information not Populated, aborting\n");
        return;
    }
    SyncBuffer(m_renderID, (m_renderSize == NULL) ? 0 : m_renderSize);
}
コード例 #2
0
ファイル: VIF.cpp プロジェクト: dona12345/Play-
void CVIF::CFifoStream::Read(void* buffer, uint32 size)
{
	assert(m_source != NULL);
	uint8* readBuffer = reinterpret_cast<uint8*>(buffer);
	while(size != 0)
	{
		SyncBuffer();
		uint32 read = std::min<uint32>(size, BUFFERSIZE - m_bufferPosition);
		if(readBuffer != NULL)
		{
			memcpy(readBuffer, reinterpret_cast<uint8*>(&m_buffer) + m_bufferPosition, read);
			readBuffer += read;
		}
		m_bufferPosition += read;
		size -= read;
	}
}
コード例 #3
0
ファイル: VIF.cpp プロジェクト: dona12345/Play-
void CVIF::CFifoStream::SetDmaParams(uint32 address, uint32 size)
{
	if(address & 0x80000000)
	{
		m_source = m_spr;
		address &= (PS2::EE_SPR_SIZE - 1);
		assert((address + size) <= PS2::EE_SPR_SIZE);
	}
	else
	{
		m_source = m_ram;
		address &= (PS2::EE_RAM_SIZE - 1);
		assert((address + size) <= PS2::EE_RAM_SIZE);
	}
	m_nextAddress = address;
	m_endAddress = address + size;
	SyncBuffer();
}