remove syncing on hacked buffer

nvidia does wait for their gpu on syncing, so removing it.
But now, we have to recheck it on every plattform
This commit is contained in:
degasus 2013-03-08 10:23:27 +01:00
parent 708b7d57cd
commit 2c9c4d0f01

View File

@ -78,7 +78,6 @@ void StreamBuffer::Alloc ( size_t size, u32 stride )
break;
case MAP_AND_SYNC:
case PINNED_MEMORY:
case MAP_AND_RISK:
// insert waiting slots for used memory
for(u32 i=SLOT(m_used_iterator); i<SLOT(m_iterator); i++)
@ -115,6 +114,11 @@ void StreamBuffer::Alloc ( size_t size, u32 stride )
m_free_iterator = iter_end;
}
break;
case MAP_AND_RISK:
if(iter_end >= m_size) {
m_iterator_aligned = 0;
}
break;
case BUFFERSUBDATA:
m_iterator_aligned = 0;
@ -183,10 +187,6 @@ void StreamBuffer::Init()
glBindBuffer(m_buffertype, m_buffer);
break;
case MAP_AND_RISK:
fences = new GLsync[SYNC_POINTS];
for(u32 i=0; i<SYNC_POINTS; i++)
fences[i] = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
glBindBuffer(m_buffertype, m_buffer);
glBufferData(m_buffertype, m_size, NULL, GL_STREAM_DRAW);
pointer = (u8*)glMapBuffer(m_buffertype, GL_WRITE_ONLY);
@ -203,12 +203,12 @@ void StreamBuffer::Shutdown()
{
switch(m_uploadtype) {
case MAP_AND_SYNC:
case MAP_AND_RISK:
for(u32 i=0; i<SYNC_POINTS; i++)
glDeleteSync(fences[i]);
delete [] fences;
break;
case MAP_AND_RISK:
case MAP_AND_ORPHAN:
case BUFFERSUBDATA:
break;