mirror of https://github.com/PCSX2/pcsx2.git
GS/OGL: Fix upload row length for texture Update()
This commit is contained in:
parent
16989f2122
commit
b9b47e3ec7
|
@ -261,9 +261,14 @@ bool GSTextureOGL::Update(const GSVector4i& r, const void* data, int pitch, int
|
|||
sb->Unmap(map_size);
|
||||
sb->Bind();
|
||||
|
||||
const u32 row_length = CalcUploadRowLengthFromPitch(preferred_pitch);
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, row_length);
|
||||
|
||||
glTextureSubImage2D(m_texture_id, layer, r.x, r.y, r.width(), r.height(), m_int_format, m_int_type,
|
||||
reinterpret_cast<void*>(static_cast<uintptr_t>(map.buffer_offset)));
|
||||
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||
|
||||
sb->Unbind();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue