Skip to content

Commit 17c6ef8

Browse files
fix GL_PIXEL_UNPACK_ALIGNMENT bug
1 parent 1ab1018 commit 17c6ef8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nbl/video/COpenGLCommandBuffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ COpenGLCommandBuffer::~COpenGLCommandBuffer()
147147
//assert(?);
148148

149149
uint32_t pitch = ((it->bufferRowLength ? it->bufferRowLength : it->imageExtent.width) * bpp).getIntegerApprox();
150-
int32_t alignment = 0x1 << core::min(core::max(core::findLSB(it->bufferOffset), core::findLSB(pitch)), 3u);
150+
int32_t alignment = 0x1 << core::min(core::min<uint32_t>(core::findLSB(it->bufferOffset),core::findLSB(pitch)), 3u);
151151
ctxlocal->nextState.pixelUnpack.alignment = alignment;
152152
ctxlocal->nextState.pixelUnpack.rowLength = it->bufferRowLength;
153153
ctxlocal->nextState.pixelUnpack.imgHeight = it->bufferImageHeight;

0 commit comments

Comments
 (0)