mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
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:
parent
708b7d57cd
commit
2c9c4d0f01
@ -78,7 +78,6 @@ void StreamBuffer::Alloc ( size_t size, u32 stride )
|
|||||||
break;
|
break;
|
||||||
case MAP_AND_SYNC:
|
case MAP_AND_SYNC:
|
||||||
case PINNED_MEMORY:
|
case PINNED_MEMORY:
|
||||||
case MAP_AND_RISK:
|
|
||||||
|
|
||||||
// insert waiting slots for used memory
|
// insert waiting slots for used memory
|
||||||
for(u32 i=SLOT(m_used_iterator); i<SLOT(m_iterator); i++)
|
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;
|
m_free_iterator = iter_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case MAP_AND_RISK:
|
||||||
|
if(iter_end >= m_size) {
|
||||||
|
m_iterator_aligned = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BUFFERSUBDATA:
|
case BUFFERSUBDATA:
|
||||||
m_iterator_aligned = 0;
|
m_iterator_aligned = 0;
|
||||||
@ -183,10 +187,6 @@ void StreamBuffer::Init()
|
|||||||
glBindBuffer(m_buffertype, m_buffer);
|
glBindBuffer(m_buffertype, m_buffer);
|
||||||
break;
|
break;
|
||||||
case MAP_AND_RISK:
|
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);
|
glBindBuffer(m_buffertype, m_buffer);
|
||||||
glBufferData(m_buffertype, m_size, NULL, GL_STREAM_DRAW);
|
glBufferData(m_buffertype, m_size, NULL, GL_STREAM_DRAW);
|
||||||
pointer = (u8*)glMapBuffer(m_buffertype, GL_WRITE_ONLY);
|
pointer = (u8*)glMapBuffer(m_buffertype, GL_WRITE_ONLY);
|
||||||
@ -203,12 +203,12 @@ void StreamBuffer::Shutdown()
|
|||||||
{
|
{
|
||||||
switch(m_uploadtype) {
|
switch(m_uploadtype) {
|
||||||
case MAP_AND_SYNC:
|
case MAP_AND_SYNC:
|
||||||
case MAP_AND_RISK:
|
|
||||||
for(u32 i=0; i<SYNC_POINTS; i++)
|
for(u32 i=0; i<SYNC_POINTS; i++)
|
||||||
glDeleteSync(fences[i]);
|
glDeleteSync(fences[i]);
|
||||||
delete [] fences;
|
delete [] fences;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MAP_AND_RISK:
|
||||||
case MAP_AND_ORPHAN:
|
case MAP_AND_ORPHAN:
|
||||||
case BUFFERSUBDATA:
|
case BUFFERSUBDATA:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user