Enable building of holdingarea code, using CMake/Microsoft Visual Studio Express, using hostthreadadapter. bug235_bringup_0
authorMatt Plumtree <matt.plumtree@nokia.com>
Thu, 16 Sep 2010 12:43:44 +0100
branchbug235_bringup_0
changeset 23 e70851cd9e5e
parent 22 b801ed730c0a
child 24 a3f46bb01be2
Enable building of holdingarea code, using CMake/Microsoft Visual Studio Express, using hostthreadadapter.
CMakeLists.txt
holdingarea/CMakeLists.txt
holdingarea/build_vs2005_platsim_extensions.bat
holdingarea/build_vs2008_platsim_extensions.bat
holdingarea/serialization/Graphics/KhronosAPIWrapper/CMakeLists.txt
holdingarea/serialization/Graphics/KhronosAPIWrapper/inc/khronosapiwrapperdefs.h
holdingarea/serialization/Graphics/KhronosAPIWrapper/src/eglapiwrapper.cpp
holdingarea/serialization/Graphics/guestvideodriverinterfaceconstants.h
holdingarea/vg/2D_OpenVG_1_1_SF/ri/src/riContext.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CMakeLists.txt	Thu Sep 16 12:43:44 2010 +0100
@@ -0,0 +1,21 @@
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http:#www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Temporary CMake meta build file for hostthreadadapter and holdingarea
+
+cmake_minimum_required (VERSION 2.8)
+
+set(GLOBAL_LIB_DIR ${PROJECT_SOURCE_DIR}/holdingarea/lib)
+
+add_subdirectory(hostsupport/hostthreadadapter)
+add_subdirectory(holdingarea)
--- a/holdingarea/CMakeLists.txt	Thu Sep 16 12:38:21 2010 +0100
+++ b/holdingarea/CMakeLists.txt	Thu Sep 16 12:43:44 2010 +0100
@@ -99,8 +99,8 @@
 if(WIN32)
     if (PLATSIM_EXTENSIONS)
         add_subdirectory(serialization/Graphics/KhronosAPIWrapper)	# Platsim serialization
-        add_dependencies(KhronosAPIWrapper libEGL libGLESv1 libGLESv2)
-        set(ALL_TARGETS libEGL libOpenVG libGLESv1 libGLESv2 KhronosAPIWrapper ${DEV_EXTRA_TARGETS})
+        add_dependencies(KhronosAPIWrapper libEGL libGLESv1 libGLESv2 hostthreadadapter)
+        set(ALL_TARGETS libEGL libOpenVG libGLESv1 libGLESv2 hostthreadadapter KhronosAPIWrapper ${DEV_EXTRA_TARGETS})
     else(PLATSIM_EXTENSIONS)
         set(ALL_TARGETS libEGL libOpenVG libGLESv1 libGLESv2 ${DEV_EXTRA_TARGETS})
     endif(PLATSIM_EXTENSIONS)
--- a/holdingarea/build_vs2005_platsim_extensions.bat	Thu Sep 16 12:38:21 2010 +0100
+++ b/holdingarea/build_vs2005_platsim_extensions.bat	Thu Sep 16 12:43:44 2010 +0100
@@ -1,5 +1,5 @@
 @ECHO OFF
 mkdir build_vs2005_platsim_extensions
 cd build_vs2005_platsim_extensions
-cmake -DUSE_MINI_EGL:Bool=OFF -DPLATSIM_EXTENSIONS:Bool=ON %* -G "Visual Studio 8 2005" ..
+cmake -DUSE_MINI_EGL:Bool=OFF -DPLATSIM_EXTENSIONS:Bool=ON %* -G "Visual Studio 8 2005" ../..
 cd ..
--- a/holdingarea/build_vs2008_platsim_extensions.bat	Thu Sep 16 12:38:21 2010 +0100
+++ b/holdingarea/build_vs2008_platsim_extensions.bat	Thu Sep 16 12:43:44 2010 +0100
@@ -1,6 +1,6 @@
 @ECHO OFF
 mkdir build_vs2008_platsim_extensions
 cd build_vs2008_platsim_extensions
-cmake -DUSE_MINI_EGL:Bool=OFF -DPLATSIM_EXTENSIONS:Bool=ON %* -G "Visual Studio 9 2008" ..
+cmake -DUSE_MINI_EGL:Bool=OFF -DPLATSIM_EXTENSIONS:Bool=ON %* -G "Visual Studio 9 2008" ../..
 cd ..
 
--- a/holdingarea/serialization/Graphics/KhronosAPIWrapper/CMakeLists.txt	Thu Sep 16 12:38:21 2010 +0100
+++ b/holdingarea/serialization/Graphics/KhronosAPIWrapper/CMakeLists.txt	Thu Sep 16 12:43:44 2010 +0100
@@ -15,17 +15,19 @@
 
 set(WRAPPER_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
 set(WRAPPER_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/inc)
-set(SERIALIZER_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../platsim_graphics/serialiser/inc)
-set(SERIALIZER_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../platsim_graphics/serialiser/src)
+set(SERIALIZER_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../guestrendering/vghwserialiser/inc)
+set(SERIALIZER_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../guestrendering/vghwserialiser/src)
 set(SERIALIZATION_COMMON_INC ${CMAKE_CURRENT_SOURCE_DIR}/../../inc)
-set(PLATSIM_VIDEODRIVER_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../platsim_graphics/platsimvideodriver/commoninc)
+# For guestvideodriverinterfaceconstants.h file
+set(VIDEODRIVER_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
+set(HOSTTHREADADAPTER_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../hostsupport/hostthreadadapter/inc)
 
 set(WRAPPER_LIBS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../lib)
 
 if(WIN32)
 	message("*** KhronosAPIWrapper Win32")
 	set(WRAPPER_SSE_FLAGS "/arch:SSE2")
-	set(WRAPPER_PLATFORM_LINK_LIBRARIES libEGL libOpenVG libGLESv1 hostthreadadapter)
+	set(WRAPPER_PLATFORM_LINK_LIBRARIES libEGL libOpenVG libGLESv1)
 	set(WRAPPER_PLATFORM_SOURCE_DIR "win32")
 else(WIN32)
 	set(WRAPPER_SSE_FLAGS "-msse2 -mfpmath=sse -march=pentium4")
@@ -69,9 +71,10 @@
   ${WRAPPER_INC_DIR}
   ${SERIALIZER_INC_DIR}
   ${KHRONOS_API_INC}
-  ${PLATSIM_VIDEODRIVER_INC_DIR}
+  ${VIDEODRIVER_INC_DIR}
   ${COMMON_INC_DIR}
   ${SERIALIZATION_COMMON_INC}
+  ${HOSTTHREADADAPTER_INC_DIR}
   )
 
 link_directories(${WRAPPER_LIBS_DIR} ${GLOBAL_LIB_DIR})
@@ -80,4 +83,4 @@
 
 add_library(KhronosAPIWrapper SHARED ${WRAPPER_SRC_FILES})
 
-target_link_libraries(KhronosAPIWrapper ${WRAPPER_PLATFORM_LINK_LIBRARIES})
+target_link_libraries(KhronosAPIWrapper hostthreadadapter ${WRAPPER_PLATFORM_LINK_LIBRARIES})
--- a/holdingarea/serialization/Graphics/KhronosAPIWrapper/inc/khronosapiwrapperdefs.h	Thu Sep 16 12:38:21 2010 +0100
+++ b/holdingarea/serialization/Graphics/KhronosAPIWrapper/inc/khronosapiwrapperdefs.h	Thu Sep 16 12:43:44 2010 +0100
@@ -16,7 +16,7 @@
 #ifndef KHRONOSAPIWRAPPERDEFS_H
 #define KHRONOSAPIWRAPPERDEFS_H
 
-#include "VirtualVideoInterfaceConstants.h"
+#include "guestvideodriverinterfaceconstants.h"
 
 const int KMaxStackSize( VVI_PARAMETERS_INPUT_MEMORY_SIZE );//16Mb
 
--- a/holdingarea/serialization/Graphics/KhronosAPIWrapper/src/eglapiwrapper.cpp	Thu Sep 16 12:38:21 2010 +0100
+++ b/holdingarea/serialization/Graphics/KhronosAPIWrapper/src/eglapiwrapper.cpp	Thu Sep 16 12:43:44 2010 +0100
@@ -1253,12 +1253,12 @@
             ret = eglCopyBuffers();
             break;
         }
-        case EglRFC::EeglPlatsimSetSurfaceParams:
+        case EglRFC::EeglSimulatorSetSurfaceParams:
         {
             ret = eglPlatsimSetSurfaceParams();
             break;
         }
-		case EglRFC::EeglPlatsimCopyImageData:
+		case EglRFC::EeglSimulatorCopyImageData:
         {
             ret = eglPlatsimCopyImageData();
             break;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/holdingarea/serialization/Graphics/guestvideodriverinterfaceconstants.h	Thu Sep 16 12:43:44 2010 +0100
@@ -0,0 +1,71 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Header file for the guest video driver
+
+#ifndef VirtualVideoInterfaceConstants_h_
+#define VirtualVideoInterfaceConstants_h_
+
+//      virtualhw.irq => ic.input[391];
+//        pvbus.pvbus_m_range[0x60000000..0x62ffffff] => graphicsvirtualhw.mbus; //=>Reserve own memory area later
+//        pvbus.pvbus_m_range[0x63000000..0x63000fff] => graphicsvirtualhw.pbus; //=>Reserve own memory area later                
+
+#ifdef PLATSIM_CONFIG
+#define VVI_BASE 0x60000000
+#else
+#define VVI_BASE 0x00000000
+#endif // PLATSIM_CONFIG
+
+// base address
+#define VVI_REGISTERS_BASE_ADDRESS VVI_BASE + 0x03000000 
+#define VVI_REGISTERS_MEMORY_SIZE 0x1000
+#define VVI_REGISTERS_MASK 0x0FFF
+
+#define VVI_PARAMETERS_INPUT_BASE_ADDRESS VVI_BASE + 0x00000000
+#define VVI_PARAMETERS_INPUT_MEMORY_SIZE  0x01000000
+
+#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
+
+// register indices, TODO: cleanup needed, some are not used
+#define VVI_R_ID                                0x0000
+#define VVI_R_IRQ_ENABLE                        0x0004
+#define VVI_R_IRQ_STATUS                        0x0008
+#define VVI_R_COMMAND                           0x000c
+#define VVI_R_PARAMETER_LOAD                    0x0010
+#define VVI_R_ERROR                             0x0014
+#define VVI_R_INPUT_BUFFER_TAIL                 0x0018
+#define VVI_R_INPUT_BUFFER_HEAD                 0x001c
+#define VVI_R_INPUT_BUFFER_READ_COUNT           0x0020
+#define VVI_R_INPUT_BUFFER_WRITE_COUNT          0x0024
+#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_LASTREG                           0x0038  // not a register, address of last register
+
+// COMMAND register values
+#define VVI_EXECUTE 0
+
+//IRQ number
+#ifdef PLATSIM_CONFIG
+#define VVI_IRQ 391
+#else
+// Jani - This is defined in syborg.h "EIntGraphics" - should we get it from there?
+#define VVI_IRQ 13
+#endif // PLATSIM_CONFIG
+
+#endif
--- a/holdingarea/vg/2D_OpenVG_1_1_SF/ri/src/riContext.h	Thu Sep 16 12:38:21 2010 +0100
+++ b/holdingarea/vg/2D_OpenVG_1_1_SF/ri/src/riContext.h	Thu Sep 16 12:43:44 2010 +0100
@@ -62,10 +62,6 @@
 #include "riArray.h"
 #endif
 
-#ifndef __RIJIT_H
-#include "riJIT.h"
-#endif
-
 #ifndef __SFDYNAMICBLITTER_H
 #   include "sfDynamicBlitter.h"
 #endif