shm: align size to stride (#7383)

calculate the size to the stride we got to better align it.
This commit is contained in:
Tom Englund
2024-08-18 10:23:27 +02:00
committed by GitHub
parent b2a18aa80a
commit 1006663b6e

View File

@@ -63,7 +63,7 @@ Aquamarine::SSHMAttrs CWLSHMBuffer::shm() {
}
std::tuple<uint8_t*, uint32_t, size_t> CWLSHMBuffer::beginDataPtr(uint32_t flags) {
return {(uint8_t*)pool->data + offset, fmt, size.x * size.y * 4};
return {(uint8_t*)pool->data + offset, fmt, stride * size.y};
}
void CWLSHMBuffer::endDataPtr() {