gsdx-ogl: GSVertexArrayOGL uses ASSERT with condition

Remove useless indentation too
This commit is contained in:
Gregory Hainaut 2015-05-01 12:16:26 +02:00
parent 71c26a829e
commit f96a653d05
1 changed files with 52 additions and 61 deletions

View File

@ -134,19 +134,12 @@ class GSBufferOGL {
void map_upload(const void* src)
{
void* dst;
ASSERT(m_count < m_limit);
size_t offset = m_start*m_stride;
size_t length = m_count*m_stride;
//fprintf(stderr, "Upload from %x offset %x bytes (%x)\n", offset, length, m_target);
// Get the pointer of the buffer
{
// It would need some protection of the data. For the moment finger cross!
if (m_count > m_limit) {
fprintf(stderr, "Buffer (%x) too small! Please report it upstream\n", m_target);
ASSERT(0);
} else if (m_count > (m_limit - m_start) ) {
if (m_count > (m_limit - m_start) ) {
size_t current_chunk = offset >> 20;
#ifdef ENABLE_OGL_DEBUG_FENCE
fprintf(stderr, "%x: Wrap buffer\n", m_target);
@ -174,7 +167,6 @@ class GSBufferOGL {
gl_DeleteSync(m_fence[0]);
m_fence[0] = 0;
}
}
// Protect buffer with fences
@ -203,8 +195,7 @@ class GSBufferOGL {
}
}
dst = m_buffer_ptr + offset;
}
void* dst = m_buffer_ptr + offset;
memcpy(dst, src, length);
gl_FlushMappedBufferRange(m_target, offset, length);