# HG changeset patch # User Matt Plumtree # Date 1285247358 -3600 # Node ID e77cac87b3972e81db7917f038aaad8dd1b6ff4d # Parent f204b762818d61f332ae0f839926c90e9fe6c412# Parent 9464ab1666a09d3ba047a212f29ba4389bda8b6e Merge rename of frame buffer to surface buffer with Guest EGL changes. diff -r 9464ab1666a0 -r e77cac87b397 .hgignore --- a/.hgignore Thu Sep 23 12:57:41 2010 +0100 +++ b/.hgignore Thu Sep 23 14:09:18 2010 +0100 @@ -1,6 +1,4 @@ holdingarea/build_vs200* holdingarea/bin/ holdingarea/lib/ -holdingarea/vg/bin -holdingarea/vg/2D_OpenVG_1_1_SF/ri/src/sfGammaLUT.h -holdingarea/vg/2D_OpenVG_1_1_SF/ri/src/sfAlphaRcp.h +holdingarea/vg/bin/c_utils.pyc diff -r 9464ab1666a0 -r e77cac87b397 guestrendering/guestegl/src/guestegl.cpp --- a/guestrendering/guestegl/src/guestegl.cpp Thu Sep 23 12:57:41 2010 +0100 +++ b/guestrendering/guestegl/src/guestegl.cpp Thu Sep 23 14:09:18 2010 +0100 @@ -1084,16 +1084,16 @@ // FAISALMEMON write code to handle errors in the above function EGL_TRACE("CGuestEGL::EglInternalFunction_CreateSurface AFTER VGHWUtils::MapToHWAddress"); - TUint32 frameBufferBaseAddress(0); - (void)CVghwUtils::GetFrameBufferBaseAddress(frameBufferBaseAddress); - EGL_TRACE("CPlatsimEGL::egliCreateSurface AFTER VGHWUtils::MapToHWAddress"); + TUint32 surfaceBufferBaseAddress(0); + (void)CVghwUtils::GetSurfaceBufferBaseAddress(frameBufferBaseAddress); + EGL_TRACE("CGuestEGL::egliCreateSurface AFTER VGHWUtils::MapToHWAddress"); /* Store the pointer to the pixel data */ aSurfaceInfo.iBuffer0 = aSurfaceInfo.iChunk->Base() + offsetToFirstBuffer; aSurfaceInfo.iBuffer1 = aSurfaceInfo.iChunk->Base() + offsetToSecondBuffer; - aSurfaceInfo.iBuffer0Index = (chunkHWBase + offsetToFirstBuffer) - frameBufferBaseAddress; - aSurfaceInfo.iBuffer1Index = (chunkHWBase + offsetToSecondBuffer) - frameBufferBaseAddress; + aSurfaceInfo.iBuffer0Index = (chunkHWBase + offsetToFirstBuffer) - surfaceBufferBaseAddress; + aSurfaceInfo.iBuffer1Index = (chunkHWBase + offsetToSecondBuffer) - surfaceBufferBaseAddress; EGL_TRACE("CGuestEGL::EglInternalFunction_CreateSurface %u %x %x %x %x",chunkHWBase, offsetToFirstBuffer, offsetToSecondBuffer, aSurfaceInfo.iBuffer0Index, aSurfaceInfo.iBuffer1Index); diff -r 9464ab1666a0 -r e77cac87b397 guestrendering/guestvideodriver/api/src/guestvideodriver.cpp --- a/guestrendering/guestvideodriver/api/src/guestvideodriver.cpp Thu Sep 23 12:57:41 2010 +0100 +++ b/guestrendering/guestvideodriver/api/src/guestvideodriver.cpp Thu Sep 23 14:09:18 2010 +0100 @@ -223,13 +223,13 @@ } // ----------------------------------------------------------------------------- -// RGuestVideDriver::GetFrameBufferBaseAddress +// RGuestVideDriver::GetSurfaceBufferBaseAddress // ----------------------------------------------------------------------------- // -EXPORT_C TInt RGuestVideoDriver::GetFrameBufferBaseAddress( TUint32& aFrameBufferBaseAddress ) +EXPORT_C TInt RGuestVideoDriver::GetSurfaceBufferBaseAddress( TUint32& aSurfaceBufferBaseAddress ) { - TPckg address( aFrameBufferBaseAddress ); - return DoControl( GuestVideoDriver::ERequestFrameBaseAddress, (TAny*)&address ); + TPckg address( aSurfaceBufferBaseAddress ); + return DoControl( GuestVideoDriver::ERequestSurfaceBaseAddress, (TAny*)&address ); } // ----------------------------------------------------------------------------- diff -r 9464ab1666a0 -r e77cac87b397 guestrendering/guestvideodriver/ldd/src/virtualvideohwchannel.cpp --- a/guestrendering/guestvideodriver/ldd/src/virtualvideohwchannel.cpp Thu Sep 23 12:57:41 2010 +0100 +++ b/guestrendering/guestvideodriver/ldd/src/virtualvideohwchannel.cpp Thu Sep 23 14:09:18 2010 +0100 @@ -236,10 +236,10 @@ } break; } - case ERequestFrameBaseAddress: + case ERequestSurfaceBufferBaseAddress: { TPhysAddr physicalAddress(0); - physicalAddress = iHwInterface.GetFrameBase(); + physicalAddress = iHwInterface.GetSurfaceBufferBase(); TPckgC address(physicalAddress); err = Kern::ThreadDesWrite(aUserThread, a1, address, 0, 0, aUserThread); break; diff -r 9464ab1666a0 -r e77cac87b397 guestrendering/guestvideodriver/ldd/src/virtualvideohwinterface.cpp --- a/guestrendering/guestvideodriver/ldd/src/virtualvideohwinterface.cpp Thu Sep 23 12:57:41 2010 +0100 +++ b/guestrendering/guestvideodriver/ldd/src/virtualvideohwinterface.cpp Thu Sep 23 14:09:18 2010 +0100 @@ -50,7 +50,7 @@ VVI_R_INPUT_BUFFER_MAX_TAIL, VVI_R_REQUEST_ID, VVI_R_SHARED_CMD_MEMORY_BASE, - VVI_R_SHARED_FRAMEBUFFER_MEMORY_BASE + VVI_R_SHARED_SURFACEBUFFER_MEMORY_BASE }; #define ASSERT_PANIC(c,p) __ASSERT_DEBUG(c,Kern::PanicCurrentThread(KVirtualVideoHwInterfacePanic,p)); @@ -81,7 +81,7 @@ // Reserve a contiguous memory chunk for graphics usage TUint32 ramSize = VVI_PARAMETERS_INPUT_MEMORY_SIZE + VVI_PARAMETERS_OUTPUT_MEMORY_SIZE + - VVI_FRAMEBUFFER_MEMORY_SIZE; + VVI_SURFACEBUFFER_MEMORY_SIZE; TInt r = Epoc::AllocPhysicalRam( ramSize, iVideoRamBasePhys ); VVHW_TRACE("DVirtualVideoHwInterface::DVirtualVideoHwInterface() AllocPhysicalRam %d", r); if (r != KErrNone) @@ -90,7 +90,7 @@ Kern::Fault("DVirtualVideoHwInterface Allocate Ram %d",r); } SetSharedCmdMemBase( iVideoRamBasePhys + VVI_PARAMETERS_INPUT_BASE_ADDRESS ); - SetSharedFramebufferMemBase( iVideoRamBasePhys + VVI_FRAMEBUFFER_BASE_ADDRESS ); + SetSharedSurfacebufferMemBase( iVideoRamBasePhys + VVI_SURFACEBUFFER_BASE_ADDRESS ); #endif // PLATSIM_CONFIG VVHW_TRACE("DVirtualVideoHwInterface::DVirtualVideoHwInterface()<"); @@ -258,10 +258,10 @@ SetRegisterValue( ERegSharedCmdMemBase, aPhysicalAddress ); } -void DVirtualVideoHwInterface::SetSharedFramebufferMemBase( TUint32 aPhysicalAddress ) +void DVirtualVideoHwInterface::SetSharedSurfacebufferMemBase( TUint32 aPhysicalAddress ) { - VVHW_TRACE("DVirtualVideoHwInterface::SetSharedFramebufferMemBase 0x%08x", aPhysicalAddress); - SetRegisterValue( ERegSharedFramebufferMemBase, aPhysicalAddress ); + VVHW_TRACE("DVirtualVideoHwInterface::SetSharedSurfacebufferMemBase 0x%08x", aPhysicalAddress); + SetRegisterValue( ERegSharedSurfacebufferMemBase, aPhysicalAddress ); } // ----------------------------------------------------------------------------- @@ -315,12 +315,12 @@ } } -EXPORT_C TPhysAddr DVirtualVideoHwInterface::GetFrameBase() +EXPORT_C TPhysAddr DVirtualVideoHwInterface::GetSurfaceBase() { TPhysAddr ret = 0; if( iVideoRamBasePhys != 0 ) { - ret = iVideoRamBasePhys + VVI_FRAMEBUFFER_BASE_ADDRESS; + ret = iVideoRamBasePhys + VVI_SURFACEBUFFER_BASE_ADDRESS; } return ret; } diff -r 9464ab1666a0 -r e77cac87b397 guestrendering/vghwutils/eabi/vghwutilsu.def --- a/guestrendering/vghwutils/eabi/vghwutilsu.def Thu Sep 23 12:57:41 2010 +0100 +++ b/guestrendering/vghwutils/eabi/vghwutilsu.def Thu Sep 23 14:09:18 2010 +0100 @@ -29,7 +29,7 @@ _ZN10CVghwUtils11VgApiForEglEv @ 28 NONAME _ZN10CVghwUtils15Gles11ApiForEglEv @ 29 NONAME _ZN10CVghwUtils14Gles2ApiForEglEv @ 30 NONAME - _ZN10CVghwUtils25GetFrameBufferBaseAddressERm @ 31 NONAME + _ZN10CVghwUtils25GetSurfaceBufferBaseAddressERm @ 31 NONAME diff -r 9464ab1666a0 -r e77cac87b397 guestrendering/vghwutils/inc/vghwutils.h --- a/guestrendering/vghwutils/inc/vghwutils.h Thu Sep 23 12:57:41 2010 +0100 +++ b/guestrendering/vghwutils/inc/vghwutils.h Thu Sep 23 14:09:18 2010 +0100 @@ -130,7 +130,7 @@ IMPORT_C static void DestroyStatics(); IMPORT_C static TInt MapToHWAddress(const TInt aChunkHandle, TUint32& aHWAddress); - IMPORT_C static TInt GetFrameBufferBaseAddress(TUint32& aHWAddress); + IMPORT_C static TInt GetSurfaceBufferBaseAddress(TUint32& aHWAddress); IMPORT_C static TInt EglGetSgHandles(const TUint64 aId, TUint64 *aSgHandles); // VG Memory Pool APIs (One heap is created for the process, for use by all Simulator Graphics DLLs) diff -r 9464ab1666a0 -r e77cac87b397 guestrendering/vghwutils/src/vghwutils.cpp --- a/guestrendering/vghwutils/src/vghwutils.cpp Thu Sep 23 12:57:41 2010 +0100 +++ b/guestrendering/vghwutils/src/vghwutils.cpp Thu Sep 23 14:09:18 2010 +0100 @@ -800,19 +800,19 @@ } // ----------------------------------------------------------------------------- -// Use driver to discover base address of the frame memory. +// Use driver to discover base address of the surface memory. // ----------------------------------------------------------------------------- // -EXPORT_C TInt CVghwUtils::GetFrameBufferBaseAddress( TUint32& aHWAddress ) +EXPORT_C TInt CVghwUtils::GetSurfaceBufferBaseAddress( TUint32& aHWAddress ) { - UTIL_TRACE("TVghwUtils::GetFrameBufferBaseAddress"); + UTIL_TRACE("CVghwUtils::GetSurfaceBufferBaseAddress"); if (!iInitialized || !iDriver) { - UTIL_TRACE("CVghwUtils::GetFrameBufferBaseAddress called before initialised VghwUtils: iInitialized=%d, iDriver=0x%x", iInitialized, iDriver); + UTIL_TRACE("CVghwUtils::GetSurfaceBufferBaseAddress called before initialised VghwUtils: iInitialized=%d, iDriver=0x%x", iInitialized, iDriver); InitStatics(); } VGHWPANIC_ASSERT(iInitialized && iDriver, EVghwPanicGraphicsDriverNotOpen); - return iDriver->GetFrameBufferBaseAddress( aHWAddress ); + return iDriver->GetSurfaceBufferBaseAddress( aHWAddress ); } #ifdef _DEBUG diff -r 9464ab1666a0 -r e77cac87b397 holdingarea/serialization/Graphics/KhronosAPIWrapper/inc/KhronosAPIWrapper.h --- a/holdingarea/serialization/Graphics/KhronosAPIWrapper/inc/KhronosAPIWrapper.h Thu Sep 23 12:57:41 2010 +0100 +++ b/holdingarea/serialization/Graphics/KhronosAPIWrapper/inc/KhronosAPIWrapper.h Thu Sep 23 14:09:18 2010 +0100 @@ -52,7 +52,7 @@ { public: - KhronosAPIWrapper( MGraphicsVHWCallback* aServiceIf, void* framebuffer, + KhronosAPIWrapper( MGraphicsVHWCallback* aServiceIf, void* surfacebuffer, void* inputdata, void* outputdata ); ~KhronosAPIWrapper(); @@ -99,7 +99,7 @@ Psu::PLATFORM_THREAD_T m_threadHandle; Psu::PLATFORM_SEMAPHORE_T m_SemapHandle; bool m_exit; - void* m_frameBuffer; + void* m_surfaceBuffer; //Input buffer Psu::PLATFORM_MUTEX_T m_InputBufferMutex; diff -r 9464ab1666a0 -r e77cac87b397 holdingarea/serialization/Graphics/KhronosAPIWrapper/inc/eglapiwrapper.h --- a/holdingarea/serialization/Graphics/KhronosAPIWrapper/inc/eglapiwrapper.h Thu Sep 23 12:57:41 2010 +0100 +++ b/holdingarea/serialization/Graphics/KhronosAPIWrapper/inc/eglapiwrapper.h Thu Sep 23 14:09:18 2010 +0100 @@ -79,7 +79,7 @@ EGLAPIWrapper( RemoteFunctionCallData& currentFunctionCallData, APIWrapperStack* stack, void* result, MGraphicsVHWCallback* serviceIf, - void* framebuffer, KhronosAPIWrapper* aAPIWrapper ); + void* surfacebuffer, KhronosAPIWrapper* aAPIWrapper ); int WriteReply(); int DispatchRequest( unsigned long aCode ); @@ -131,7 +131,7 @@ private: int m_lastEglError; EglRFC m_currentFunctionCall; - void* m_frameBuffer; + void* m_surfaceBuffer; TSurfaceMap m_windowMap; KhronosAPIWrapper* m_APIWrapper; }; diff -r 9464ab1666a0 -r e77cac87b397 holdingarea/serialization/Graphics/KhronosAPIWrapper/src/KhronosAPIWrapper.cpp --- a/holdingarea/serialization/Graphics/KhronosAPIWrapper/src/KhronosAPIWrapper.cpp Thu Sep 23 12:57:41 2010 +0100 +++ b/holdingarea/serialization/Graphics/KhronosAPIWrapper/src/KhronosAPIWrapper.cpp Thu Sep 23 14:09:18 2010 +0100 @@ -303,7 +303,7 @@ } -KhronosAPIWrapper::KhronosAPIWrapper( MGraphicsVHWCallback* aServiceIf, void* framebuffer, void* inputdata, void* outputdata ) +KhronosAPIWrapper::KhronosAPIWrapper( MGraphicsVHWCallback* aServiceIf, void* surfacebuffer, void* inputdata, void* outputdata ) { TRACE("KhronosAPIWrapper::KhronosAPIWrapper()\n"); m_lastVgError = VG_NO_ERROR; @@ -313,7 +313,7 @@ m_lastThreadId = 0; m_currentInput = inputdata; m_currentResult = outputdata; - m_frameBuffer = framebuffer; + m_surfaceBuffer = surfacebuffer; m_exit = false; iServiceIf = aServiceIf; m_initDone = false; @@ -333,7 +333,7 @@ m_OpenVGWrapper = new OpenVGAPIWrapper( *iRFCData, iStack, m_currentResult, iServiceIf, this ); m_OGLESWrapper = new OGLES11Wrapper(*iRFCData, iStack, m_currentResult, iServiceIf); - m_EGLWrapper = new EGLAPIWrapper( *iRFCData, iStack, m_currentResult, iServiceIf, m_frameBuffer, this ); + m_EGLWrapper = new EGLAPIWrapper( *iRFCData, iStack, m_currentResult, iServiceIf, m_surfaceBuffer, this ); m_DriverAPIWrapper = new DriverAPIWrapper( *iRFCData, iStack, m_currentResult, iServiceIf, this ); #ifdef KHRONOS_API_W_MULTITHREAD diff -r 9464ab1666a0 -r e77cac87b397 holdingarea/serialization/Graphics/KhronosAPIWrapper/src/driverapiwrapper.cpp --- a/holdingarea/serialization/Graphics/KhronosAPIWrapper/src/driverapiwrapper.cpp Thu Sep 23 12:57:41 2010 +0100 +++ b/holdingarea/serialization/Graphics/KhronosAPIWrapper/src/driverapiwrapper.cpp Thu Sep 23 14:09:18 2010 +0100 @@ -96,7 +96,7 @@ } - /* get an appropriate EGL frame buffer configuration */ + /* get an appropriate EGL surface buffer configuration */ if( ::eglChooseConfig( display, getColorAttributes( EUidPixelFormatXRGB_8888, red, green, blue, alpha ), &config, diff -r 9464ab1666a0 -r e77cac87b397 holdingarea/serialization/Graphics/KhronosAPIWrapper/src/eglapiwrapper.cpp --- a/holdingarea/serialization/Graphics/KhronosAPIWrapper/src/eglapiwrapper.cpp Thu Sep 23 12:57:41 2010 +0100 +++ b/holdingarea/serialization/Graphics/KhronosAPIWrapper/src/eglapiwrapper.cpp Thu Sep 23 14:09:18 2010 +0100 @@ -34,11 +34,11 @@ APIWrapperStack* stack, void* result, MGraphicsVHWCallback* serviceIf, - void* framebuffer, + void* surfacebuffer, KhronosAPIWrapper* aAPIWrapper ): APIWrapper( currentFunctionCallData, stack, result, serviceIf ), m_currentFunctionCall( m_currentFunctionCallData ), - m_frameBuffer( framebuffer ), + m_surfaceBuffer( surfacebuffer ), m_APIWrapper( aAPIWrapper ) { TRACE("EGLAPIWrapper::EGLAPIWrapper()\n"); @@ -838,8 +838,8 @@ m_currentFunctionCall.GetEGLint( buffer0Offset, 6 ); m_currentFunctionCall.GetEGLint( buffer1Offset, 7 ); - void* buffer0 = (void*)((EGLint)m_frameBuffer + buffer0Offset); - void* buffer1 = (void*)((EGLint)m_frameBuffer + buffer1Offset); + void* buffer0 = (void*)((EGLint)m_surfaceBuffer + buffer0Offset); + void* buffer1 = (void*)((EGLint)m_surfaceBuffer + buffer1Offset); ::eglPlatsimSetSurfaceParams(display, surface, width, height, stride, buffer0, buffer1); m_currentFunctionCall.SetReturnValue( 0 ); diff -r 9464ab1666a0 -r e77cac87b397 holdingarea/serialization/Graphics/guestvideodriverinterfaceconstants.h --- a/holdingarea/serialization/Graphics/guestvideodriverinterfaceconstants.h Thu Sep 23 12:57:41 2010 +0100 +++ b/holdingarea/serialization/Graphics/guestvideodriverinterfaceconstants.h Thu Sep 23 14:09:18 2010 +0100 @@ -37,8 +37,8 @@ #define VVI_PARAMETERS_OUTPUT_BASE_ADDRESS VVI_BASE + 0x01000000 #define VVI_PARAMETERS_OUTPUT_MEMORY_SIZE 0x01000000 -#define VVI_FRAMEBUFFER_BASE_ADDRESS VVI_BASE + 0x02000000 -#define VVI_FRAMEBUFFER_MEMORY_SIZE 0x01000000 +#define VVI_SURFACEBUFFER_BASE_ADDRESS VVI_BASE + 0x02000000 +#define VVI_SURFACEBUFFER_MEMORY_SIZE 0x01000000 // register indices, TODO: cleanup needed, some are not used #define VVI_R_ID 0x0000 @@ -54,7 +54,7 @@ #define VVI_R_INPUT_BUFFER_MAX_TAIL 0x0028 #define VVI_R_REQUEST_ID 0x002c #define VVI_R_SHARED_CMD_MEMORY_BASE 0x0030 -#define VVI_R_SHARED_FRAMEBUFFER_MEMORY_BASE 0x0034 +#define VVI_R_SHARED_SURFACEBUFFER_MEMORY_BASE 0x0034 #define VVI_R_LASTREG 0x0038 // not a register, address of last register // COMMAND register values