# HG changeset patch # User Faisal Memon # Date 1287738989 -3600 # Node ID d9b81aebba7b29419fba1bd0bbefc1dd963aa12b # Parent 021dd2b9ee6aa9e1578671995cd5612c68eb4314 Add mapping fix to guestegl and debugging (temporary) diff -r 021dd2b9ee6a -r d9b81aebba7b guestrendering/guestegl/inc/eglapi.h --- a/guestrendering/guestegl/inc/eglapi.h Thu Oct 07 18:48:18 2010 +0100 +++ b/guestrendering/guestegl/inc/eglapi.h Fri Oct 22 10:16:29 2010 +0100 @@ -16,6 +16,8 @@ #ifndef EGLAPI_H_ #define EGLAPI_H_ +#define _DEBUG // FAISALMEMON temporary + // INCLUDES #include #include diff -r 021dd2b9ee6a -r d9b81aebba7b guestrendering/guestegl/src/guestegl.cpp --- a/guestrendering/guestegl/src/guestegl.cpp Thu Oct 07 18:48:18 2010 +0100 +++ b/guestrendering/guestegl/src/guestegl.cpp Fri Oct 22 10:16:29 2010 +0100 @@ -265,6 +265,7 @@ attributes.iOffsetBetweenBuffers = 0; attributes.iContiguous = ETrue; attributes.iCacheAttrib = RSurfaceManager::ENotCached; // Cache attributes + attributes.iMappable = ETrue; iDisplayMapLock.WriteLock(); CEglDisplayInfo** pDispInfo; @@ -281,7 +282,8 @@ surfaceInfo->iConfigId = aConfig; surfaceInfo->iSurfaceManager.Open(); surfaceInfo->iSurfaceManager.CreateSurface(buf, surfaceId); - (void) surfaceInfo->iSurfaceManager.MapSurface(surfaceId, surfaceInfo->iChunk); + TInt err = surfaceInfo->iSurfaceManager.MapSurface(surfaceId, surfaceInfo->iChunk); + EGL_TRACE("CGuestEGL::eglCreateWindowSurface surface manager returned chunk %x and ret val %d", surfaceInfo->iChunk, err); RemoteFunctionCallData rfcdata; EglRFC eglApiData( rfcdata ); eglApiData.Init( EglRFC::EeglCreateWindowSurface); @@ -1264,14 +1266,15 @@ // FAISALMEMON END OF STUB CODE TUint32 chunkHWBase = 0; - (void)CVghwUtils::MapToHWAddress(aSurfaceInfo.iChunk.Handle(), chunkHWBase); + TInt err = CVghwUtils::MapToHWAddress(aSurfaceInfo.iChunk.Handle(), chunkHWBase); + EGL_TRACE("CGuestEGL::EglInternalFunction_CreateSurface MapToHWAddress returned %d", err); // FAISALMEMON write code to handle errors in the above function EGL_TRACE("CGuestEGL::EglInternalFunction_CreateSurface AFTER VGHWUtils::MapToHWAddress"); TUint32 surfaceBufferBaseAddress(0); (void)CVghwUtils::GetSurfaceBufferBaseAddress(surfaceBufferBaseAddress); - EGL_TRACE("CPlatsimEGL::egliCreateSurface AFTER VGHWUtils::MapToHWAddress"); - + EGL_TRACE("CGuestEGL::egliCreateSurface AFTER VGHWUtils::MapToHWAddress"); + EGL_TRACE("CGuestEGL::egliCreateSurface aSurfaceInfo.iChunk.Base() is %x", aSurfaceInfo.iChunk.Base()); /* Store the pointer to the pixel data */ aSurfaceInfo.iBuffer0 = aSurfaceInfo.iChunk.Base() + offsetToFirstBuffer; aSurfaceInfo.iBuffer1 = aSurfaceInfo.iChunk.Base() + offsetToSecondBuffer; diff -r 021dd2b9ee6a -r d9b81aebba7b guestrendering/guestopenvg/inc/vgstate.h --- a/guestrendering/guestopenvg/inc/vgstate.h Thu Oct 07 18:48:18 2010 +0100 +++ b/guestrendering/guestopenvg/inc/vgstate.h Fri Oct 22 10:16:29 2010 +0100 @@ -21,9 +21,10 @@ #include #include "vghwutils.h" - +#define _DEBUG // FAISALMEMON temporary // tracing + #include #ifdef _DEBUG #define OPENVG_TRACE(fmt, args...) RDebug::Printf(fmt, ##args) diff -r 021dd2b9ee6a -r d9b81aebba7b vghwinterface/vghwutils/inc/vghwutils.h --- a/vghwinterface/vghwutils/inc/vghwutils.h Thu Oct 07 18:48:18 2010 +0100 +++ b/vghwinterface/vghwutils/inc/vghwutils.h Fri Oct 22 10:16:29 2010 +0100 @@ -16,6 +16,7 @@ #ifndef __VGHWUTILS_H__ #define __VGHWUTILS_H__ +#define _DEBUG // FAISALMEMON temporary // Include Files #include // CBase #include