mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: GSVertexArrayOGL uses ASSERT with condition
Remove useless indentation too
This commit is contained in:
parent
71c26a829e
commit
f96a653d05
|
@ -134,19 +134,12 @@ class GSBufferOGL {
|
||||||
|
|
||||||
void map_upload(const void* src)
|
void map_upload(const void* src)
|
||||||
{
|
{
|
||||||
void* dst;
|
ASSERT(m_count < m_limit);
|
||||||
|
|
||||||
size_t offset = m_start*m_stride;
|
size_t offset = m_start*m_stride;
|
||||||
size_t length = m_count*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
|
if (m_count > (m_limit - m_start) ) {
|
||||||
{
|
|
||||||
// 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) ) {
|
|
||||||
size_t current_chunk = offset >> 20;
|
size_t current_chunk = offset >> 20;
|
||||||
#ifdef ENABLE_OGL_DEBUG_FENCE
|
#ifdef ENABLE_OGL_DEBUG_FENCE
|
||||||
fprintf(stderr, "%x: Wrap buffer\n", m_target);
|
fprintf(stderr, "%x: Wrap buffer\n", m_target);
|
||||||
|
@ -174,7 +167,6 @@ class GSBufferOGL {
|
||||||
gl_DeleteSync(m_fence[0]);
|
gl_DeleteSync(m_fence[0]);
|
||||||
m_fence[0] = 0;
|
m_fence[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Protect buffer with fences
|
// 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);
|
memcpy(dst, src, length);
|
||||||
gl_FlushMappedBufferRange(m_target, offset, length);
|
gl_FlushMappedBufferRange(m_target, offset, length);
|
||||||
|
|
Loading…
Reference in New Issue