Fixed a bug in grLfbLock. For write locks, the code returned the
address of the LFB, not the address of the buffer. This may be the Windows behavior, but it's not the behavior we expect in Linux. I changed the Linux behavior, and left the Windows behavior alone.
This commit is contained in:
@@ -686,10 +686,16 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer,
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
info->lfbPtr = (void *)gc->lfb_ptr;
|
||||
#ifdef __linux__
|
||||
/*
|
||||
* For Linux, we just return the correct address and
|
||||
* stride.
|
||||
*/
|
||||
info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride;
|
||||
#endif /* defined(__linux__) */
|
||||
info->lfbPtr = (void *)gc->lfbBuffers[colBufferIndex];
|
||||
#else /* defined(__linux__) */
|
||||
info->lfbPtr = (void *)gc->lfb_ptr;
|
||||
#endif /* defined(__linux__) */
|
||||
switch (writeMode) {
|
||||
case GR_LFBWRITEMODE_565_DEPTH:
|
||||
case GR_LFBWRITEMODE_555_DEPTH:
|
||||
@@ -776,7 +782,16 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer,
|
||||
/* Make sure dither rotation is disabled for 3D LFBs. */
|
||||
_3dlfb = FXTRUE;
|
||||
|
||||
#if defined(__linux__)
|
||||
/*
|
||||
* For Linux, we just return the correct address and
|
||||
* stride.
|
||||
*/
|
||||
info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride;
|
||||
info->lfbPtr = (void *)gc->lfbBuffers[colBufferIndex];
|
||||
#else /* defined(__linux__) */
|
||||
info->lfbPtr = (void *)gc->lfb_ptr;
|
||||
#endif /* defined(__linux__) */
|
||||
|
||||
switch (writeMode) {
|
||||
case GR_LFBWRITEMODE_565_DEPTH:
|
||||
|
||||
Reference in New Issue
Block a user