Changeset 45616 in vbox for trunk/src/VBox
- Timestamp:
- Apr 18, 2013 5:44:22 PM (12 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_version.h
r45149 r45616 16 16 /* version with invalid glGetError state */ 17 17 #define SHCROGL_SSM_VERSION_WITH_INVALID_ERROR_STATE 30 18 /* VBox 4.2.12 had a bug that incorrectly CRMuralInfo data 19 * in a different format without changing the state version, 20 * i.e. 30 version can have both "correct" and "incorrect" CRMuralInfo data */ 21 #define SHCROGL_SSM_VERSION_WITH_BUGGY_MURAL_INFO 30 18 22 /* the saved state has incorrect front and back buffer image data */ 19 23 #define SHCROGL_SSM_VERSION_WITH_BUGGY_FB_IMAGE_DATA 31 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_context.c
r45248 r45616 307 307 crStateSwitchPrepare(cr_server.bUseMultipleContexts ? NULL : ctx, oldCtx, idDrawFBO, idReadFBO); 308 308 309 /* 310 crDebug("**** %s client %d curCtx=%d curWin=%d", __func__, 311 cr_server.curClient->number, ctxPos, window); 312 */ 313 cr_server.curClient->currentContextNumber = context; 314 cr_server.curClient->currentCtxInfo = ctxInfo; 315 cr_server.curClient->currentMural = mural; 316 cr_server.curClient->currentWindow = window; 317 318 CRASSERT(cr_server.curClient->currentCtxInfo); 319 CRASSERT(cr_server.curClient->currentCtxInfo->pContext); 309 if (cr_server.curClient) 310 { 311 /* 312 crDebug("**** %s client %d curCtx=%d curWin=%d", __func__, 313 cr_server.curClient->number, ctxPos, window); 314 */ 315 cr_server.curClient->currentContextNumber = context; 316 cr_server.curClient->currentCtxInfo = ctxInfo; 317 cr_server.curClient->currentMural = mural; 318 cr_server.curClient->currentWindow = window; 319 320 CRASSERT(cr_server.curClient->currentCtxInfo); 321 CRASSERT(cr_server.curClient->currentCtxInfo->pContext); 322 } 320 323 321 324 /* This is a hack to force updating the 'current' attribs */ … … 401 404 402 405 if (!ctx->framebufferobject.drawFB 403 && (ctx->buffer.drawBuffer == GL_FRONT || ctx->buffer.drawBuffer == GL_FRONT_LEFT)) 406 && (ctx->buffer.drawBuffer == GL_FRONT || ctx->buffer.drawBuffer == GL_FRONT_LEFT) 407 && cr_server.curClient) 404 408 cr_server.curClient->currentMural->bFbDraw = GL_TRUE; 405 409 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
r45527 r45616 1090 1090 return VINF_SUCCESS; 1091 1091 1092 pData->idFBO = (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidColorTexs[fWrite ? pMural->iCurDrawBuffer : pMural->iCurReadBuffer] : 0;1092 pData->idFBO = pMural && (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidColorTexs[fWrite ? pMural->iCurDrawBuffer : pMural->iCurReadBuffer] : 0; 1093 1093 pData->cElements = 0; 1094 1094 1095 1095 pEl = &pData->aElements[pData->cElements]; 1096 pEl->idFBO = (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidFBOs[CR_SERVER_FBO_FB_IDX(pMural)] : 0;1096 pEl->idFBO = pMural && (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidFBOs[CR_SERVER_FBO_FB_IDX(pMural)] : 0; 1097 1097 pEl->enmBuffer = pData->aElements[1].idFBO ? GL_COLOR_ATTACHMENT0 : GL_FRONT; 1098 1098 pEl->posX = 0; … … 1121 1121 { 1122 1122 pEl = &pData->aElements[pData->cElements]; 1123 pEl->idFBO = (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidFBOs[CR_SERVER_FBO_BB_IDX(pMural)] : 0;1123 pEl->idFBO = pMural && (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidFBOs[CR_SERVER_FBO_BB_IDX(pMural)] : 0; 1124 1124 pEl->enmBuffer = pData->aElements[1].idFBO ? GL_COLOR_ATTACHMENT0 : GL_BACK; 1125 1125 pEl->posX = 0; … … 1151 1151 AssertCompile(sizeof (GLfloat) == 4); 1152 1152 pEl = &pData->aElements[pData->cElements]; 1153 pEl->idFBO = (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidFBOs[CR_SERVER_FBO_FB_IDX(pMural)] : 0;1153 pEl->idFBO = pMural && (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidFBOs[CR_SERVER_FBO_FB_IDX(pMural)] : 0; 1154 1154 pEl->enmBuffer = 0; /* we do not care */ 1155 1155 pEl->posX = 0; … … 1182 1182 AssertCompile(sizeof (GLuint) == 4); 1183 1183 pEl = &pData->aElements[pData->cElements]; 1184 pEl->idFBO = (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidFBOs[CR_SERVER_FBO_FB_IDX(pMural)] : 0;1184 pEl->idFBO = pMural && (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidFBOs[CR_SERVER_FBO_FB_IDX(pMural)] : 0; 1185 1185 pEl->enmBuffer = 0; /* we do not care */ 1186 1186 pEl->posX = 0; … … 1207 1207 { 1208 1208 pEl = &pData->aElements[pData->cElements]; 1209 pEl->idFBO = (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidFBOs[CR_SERVER_FBO_FB_IDX(pMural)] : 0;1209 pEl->idFBO = pMural && (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO) ? pMural->aidFBOs[CR_SERVER_FBO_FB_IDX(pMural)] : 0; 1210 1210 pEl->enmBuffer = 0; /* we do not care */ 1211 1211 pEl->posX = 0; … … 1687 1687 } 1688 1688 1689 static int32_t crVBoxServerLoadMurals(PSSMHANDLE pSSM, uint32_t version) 1689 typedef struct CR_SERVER_LOADSTATE_READER 1690 { 1691 PSSMHANDLE pSSM; 1692 uint32_t cbBuffer; 1693 uint32_t cbData; 1694 uint32_t offData; 1695 uint8_t *pu8Buffer; 1696 } CR_SERVER_LOADSTATE_READER; 1697 1698 static void crServerLsrInit(CR_SERVER_LOADSTATE_READER *pReader, PSSMHANDLE pSSM) 1699 { 1700 memset(pReader, 0, sizeof (*pReader)); 1701 pReader->pSSM = pSSM; 1702 } 1703 1704 static void crServerLsrTerm(CR_SERVER_LOADSTATE_READER *pReader) 1705 { 1706 if (pReader->pu8Buffer) 1707 RTMemFree(pReader->pu8Buffer); 1708 1709 /* sanity */ 1710 memset(pReader, 0, sizeof (*pReader)); 1711 } 1712 1713 static int crServerLsrDataGetMem(CR_SERVER_LOADSTATE_READER *pReader, void *pvBuffer, uint32_t cbBuffer) 1714 { 1715 int rc = VINF_SUCCESS; 1716 uint32_t cbRemaining = cbBuffer; 1717 if (pReader->cbData) 1718 { 1719 uint8_t cbData = RT_MIN(pReader->cbData, cbBuffer); 1720 memcpy(pvBuffer, pReader->pu8Buffer + pReader->offData, cbData); 1721 pReader->cbData -= cbData; 1722 pReader->offData += cbData; 1723 1724 cbRemaining -= cbData; 1725 pvBuffer = ((uint8_t*)pvBuffer) + cbData; 1726 } 1727 1728 if (cbRemaining) 1729 { 1730 rc = SSMR3GetMem(pReader->pSSM, pvBuffer, cbRemaining); 1731 AssertRC(rc); 1732 } 1733 1734 return rc; 1735 } 1736 1737 static int crServerLsrDataGetU32(CR_SERVER_LOADSTATE_READER *pReader, uint32_t *pu32) 1738 { 1739 return crServerLsrDataGetMem(pReader, pu32, sizeof (*pu32)); 1740 } 1741 1742 static int crServerLsrDataPutMem(CR_SERVER_LOADSTATE_READER *pReader, void *pvBuffer, uint32_t cbBuffer) 1743 { 1744 if (!pReader->cbData && pReader->cbBuffer >= cbBuffer) 1745 { 1746 pReader->offData = 0; 1747 pReader->cbData = cbBuffer; 1748 memcpy(pReader->pu8Buffer, pvBuffer, cbBuffer); 1749 } 1750 else if (pReader->offData >= cbBuffer) 1751 { 1752 pReader->offData -= cbBuffer; 1753 pReader->cbData += cbBuffer; 1754 memcpy(pReader->pu8Buffer + pReader->offData, pvBuffer, cbBuffer); 1755 } 1756 else 1757 { 1758 uint8_t *pu8Buffer = pReader->pu8Buffer; 1759 1760 pReader->pu8Buffer = (uint8_t*)RTMemAlloc(cbBuffer + pReader->cbData); 1761 if (!pReader->pu8Buffer) 1762 { 1763 crWarning("failed to allocate mem %d", cbBuffer + pReader->cbData); 1764 return VERR_NO_MEMORY; 1765 } 1766 1767 memcpy(pReader->pu8Buffer, pvBuffer, cbBuffer); 1768 if (pu8Buffer) 1769 { 1770 memcpy(pReader->pu8Buffer + cbBuffer, pu8Buffer + pReader->offData, pReader->cbData); 1771 RTMemFree(pu8Buffer); 1772 } 1773 else 1774 { 1775 Assert(!pReader->cbData); 1776 } 1777 pReader->offData = 0; 1778 pReader->cbData += cbBuffer; 1779 } 1780 1781 return VINF_SUCCESS; 1782 } 1783 1784 /* data to bi skipped by */ 1785 1786 typedef struct CR_SERVER_BUGGY_MURAL_DATA_2 1787 { 1788 void*ListHead_pNext; 1789 void*ListHead_pPrev; 1790 uint32_t cEntries; 1791 } CR_SERVER_BUGGY_MURAL_DATA_2; 1792 typedef struct CR_SERVER_BUGGY_MURAL_DATA_1 1793 { 1794 /* VBOXVR_COMPOSITOR_ENTRY Ce; */ 1795 void*Ce_Node_pNext; 1796 void*Ce_Node_pPrev; 1797 CR_SERVER_BUGGY_MURAL_DATA_2 Vr; 1798 /* VBOXVR_TEXTURE Tex; */ 1799 uint32_t Tex_width; 1800 uint32_t Tex_height; 1801 uint32_t Tex_target; 1802 uint32_t Tex_hwid; 1803 /* RTPOINT Pos; */ 1804 uint32_t Pos_x; 1805 uint32_t Pos_y; 1806 uint32_t fChanged; 1807 uint32_t cRects; 1808 void* paSrcRects; 1809 void* paDstRects; 1810 } CR_SERVER_BUGGY_MURAL_DATA_1; 1811 1812 typedef struct CR_SERVER_BUGGY_MURAL_DATA_4 1813 { 1814 uint32_t u32Magic; 1815 int32_t cLockers; 1816 RTNATIVETHREAD NativeThreadOwner; 1817 int32_t cNestings; 1818 uint32_t fFlags; 1819 void* EventSem; 1820 R3R0PTRTYPE(PRTLOCKVALRECEXCL) pValidatorRec; 1821 RTHCPTR Alignment; 1822 } CR_SERVER_BUGGY_MURAL_DATA_4; 1823 1824 typedef struct CR_SERVER_BUGGY_MURAL_DATA_3 1825 { 1826 void*Compositor_List_pNext; 1827 void*Compositor_List_pPrev; 1828 void*Compositor_pfnEntryRemoved; 1829 float StretchX; 1830 float StretchY; 1831 uint32_t cRects; 1832 uint32_t cRectsBuffer; 1833 void*paSrcRects; 1834 void*paDstRects; 1835 CR_SERVER_BUGGY_MURAL_DATA_4 CritSect; 1836 } CR_SERVER_BUGGY_MURAL_DATA_3; 1837 1838 typedef struct CR_SERVER_BUGGY_MURAL_DATA 1839 { 1840 uint8_t fRootVrOn; 1841 CR_SERVER_BUGGY_MURAL_DATA_1 RootVrCEntry; 1842 CR_SERVER_BUGGY_MURAL_DATA_3 RootVrCompositor; 1843 } CR_SERVER_BUGGY_MURAL_DATA; 1844 1845 AssertCompile(sizeof (CR_SERVER_BUGGY_MURAL_DATA) < sizeof (CRClient)); 1846 1847 static int32_t crVBoxServerLoadMurals(CR_SERVER_LOADSTATE_READER *pReader, uint32_t version) 1690 1848 { 1691 1849 unsigned long key; 1692 1850 uint32_t ui, uiNumElems; 1851 bool fBuggyMuralData = false; 1693 1852 /* Load windows */ 1694 int32_t rc = SSMR3GetU32(pSSM, &uiNumElems);1853 int32_t rc = crServerLsrDataGetU32(pReader, &uiNumElems); 1695 1854 AssertRCReturn(rc, rc); 1696 1855 for (ui=0; ui<uiNumElems; ++ui) … … 1701 1860 unsigned long key; 1702 1861 1703 rc = SSMR3GetMem(pSSM, &key, sizeof(key));1862 rc = crServerLsrDataGetMem(pReader, &key, sizeof(key)); 1704 1863 AssertRCReturn(rc, rc); 1705 rc = SSMR3GetMem(pSSM, &createInfo, sizeof(createInfo));1864 rc = crServerLsrDataGetMem(pReader, &createInfo, sizeof(createInfo)); 1706 1865 AssertRCReturn(rc, rc); 1707 1866 1867 CRASSERT(!pReader->cbData); 1868 1708 1869 if (createInfo.pszDpyName) 1709 1870 { 1710 rc = SSMR3GetStrZEx(p SSM, psz, 200, NULL);1871 rc = SSMR3GetStrZEx(pReader->pSSM, psz, 200, NULL); 1711 1872 AssertRCReturn(rc, rc); 1712 1873 createInfo.pszDpyName = psz; … … 1718 1879 1719 1880 /* Load cr_server.muralTable */ 1720 rc = SSMR3GetU32(p SSM, &uiNumElems);1881 rc = SSMR3GetU32(pReader->pSSM, &uiNumElems); 1721 1882 AssertRCReturn(rc, rc); 1722 1883 for (ui=0; ui<uiNumElems; ++ui) … … 1725 1886 CRMuralInfo *pActualMural = NULL; 1726 1887 1727 rc = SSMR3GetMem(pSSM, &key, sizeof(key));1888 rc = crServerLsrDataGetMem(pReader, &key, sizeof(key)); 1728 1889 AssertRCReturn(rc, rc); 1729 rc = SSMR3GetMem(pSSM, &muralInfo, RT_OFFSETOF(CRMuralInfo, CreateInfo));1890 rc = crServerLsrDataGetMem(pReader, &muralInfo, RT_OFFSETOF(CRMuralInfo, CreateInfo)); 1730 1891 AssertRCReturn(rc, rc); 1731 1892 1732 1893 if (version <= SHCROGL_SSM_VERSION_BEFORE_FRONT_DRAW_TRACKING) 1733 1894 muralInfo.bFbDraw = GL_TRUE; 1895 1896 if (!ui && version == SHCROGL_SSM_VERSION_WITH_BUGGY_MURAL_INFO) 1897 { 1898 /* Lookahead buffer used to determine whether the data erroneously storred root visible regions data */ 1899 union 1900 { 1901 void * apv[1]; 1902 CR_SERVER_BUGGY_MURAL_DATA Data; 1903 /* need to chak spuWindow, so taking the offset of filed following it*/ 1904 uint8_t au8[RT_OFFSETOF(CRMuralInfo, screenId)]; 1905 RTRECT aVisRects[sizeof (CR_SERVER_BUGGY_MURAL_DATA) / sizeof (RTRECT)]; 1906 } LaBuf; 1907 1908 do { 1909 /* first value is bool (uint8_t) value followed by pointer-size-based alignment. 1910 * the mural memory is zero-initialized initially, so we can be sure the padding is zeroed, 1911 * i.e. possible values for visible regions data are 0 or (1 << (sizeof (void*) - 8)) */ 1912 rc = crServerLsrDataGetMem(pReader, &LaBuf, sizeof (LaBuf)); 1913 AssertRCReturn(rc, rc); 1914 if (LaBuf.apv[0] != NULL && LaBuf.apv[0] != ((void*)(1 << (sizeof (void*) - 8)))) 1915 break; 1916 1917 /* check that the pointers are either valid or NULL */ 1918 if(LaBuf.Data.RootVrCEntry.Ce_Node_pNext && !RT_VALID_PTR(LaBuf.Data.RootVrCEntry.Ce_Node_pNext)) 1919 break; 1920 if(LaBuf.Data.RootVrCEntry.Ce_Node_pPrev && !RT_VALID_PTR(LaBuf.Data.RootVrCEntry.Ce_Node_pPrev)) 1921 break; 1922 if(LaBuf.Data.RootVrCEntry.Vr.ListHead_pNext && !RT_VALID_PTR(LaBuf.Data.RootVrCEntry.Vr.ListHead_pNext)) 1923 break; 1924 if(LaBuf.Data.RootVrCEntry.Vr.ListHead_pPrev && !RT_VALID_PTR(LaBuf.Data.RootVrCEntry.Vr.ListHead_pPrev)) 1925 break; 1926 1927 /* the entry can can be the only one within the (mural) compositor, 1928 * so its compositor entry node can either contain NULL pNext and pPrev, 1929 * or both of them pointing to compositor's list head */ 1930 if (LaBuf.Data.RootVrCEntry.Ce_Node_pNext != LaBuf.Data.RootVrCEntry.Ce_Node_pPrev) 1931 break; 1932 1933 /* can either both or none be NULL */ 1934 if (!LaBuf.Data.RootVrCEntry.Ce_Node_pNext != !LaBuf.Data.RootVrCEntry.Ce_Node_pPrev) 1935 break; 1936 1937 if (!LaBuf.Data.fRootVrOn) 1938 { 1939 if (LaBuf.Data.RootVrCEntry.Ce_Node_pNext || LaBuf.Data.RootVrCEntry.Ce_Node_pPrev) 1940 break; 1941 1942 /* either non-initialized (zeroed) or empty list */ 1943 if (LaBuf.Data.RootVrCEntry.Vr.ListHead_pNext != LaBuf.Data.RootVrCEntry.Vr.ListHead_pPrev) 1944 break; 1945 1946 if (LaBuf.Data.RootVrCEntry.Vr.cEntries) 1947 break; 1948 } 1949 else 1950 { 1951 /* the entry should be initialized */ 1952 if (!LaBuf.Data.RootVrCEntry.Vr.ListHead_pNext) 1953 break; 1954 if (!LaBuf.Data.RootVrCEntry.Vr.ListHead_pPrev) 1955 break; 1956 1957 if (LaBuf.Data.RootVrCEntry.Vr.cEntries) 1958 { 1959 /* entry should be in compositor list*/ 1960 if (LaBuf.Data.RootVrCEntry.Ce_Node_pPrev == NULL) 1961 break; 1962 CRASSERT(LaBuf.Data.RootVrCEntry.Ce_Node_pNext); 1963 } 1964 else 1965 { 1966 /* entry should NOT be in compositor list*/ 1967 if (LaBuf.Data.RootVrCEntry.Ce_Node_pPrev != NULL) 1968 break; 1969 CRASSERT(!LaBuf.Data.RootVrCEntry.Ce_Node_pNext); 1970 } 1971 } 1972 1973 #if 0 1974 if (muralInfo.pVisibleRects) 1975 { 1976 int j; 1977 int cRects = RT_MIN(muralInfo.cVisibleRects, RT_ELEMENTS(LaBuf.aVisRects)); 1978 CRASSERT(cRects); 1979 for (j = 0; j < cRects; ++j) 1980 { 1981 PRTRECT pRect = &LaBuf.aVisRects[j]; 1982 if (pRect->xLeft >= pRect->xRight) 1983 break; 1984 if (pRect->yTop >= pRect->yBottom) 1985 break; 1986 if (pRect->xLeft < 0 || pRect->xRight < 0 1987 || pRect->yTop < 0 || pRect->yBottom < 0) 1988 break; 1989 if (pRect->xLeft > (GLint)muralInfo.width 1990 || pRect->xRight > (GLint)muralInfo.width) 1991 break; 1992 if (pRect->yTop > (GLint)muralInfo.height 1993 || pRect->yBottom > (GLint)muralInfo.height) 1994 break; 1995 } 1996 1997 if (j < cRects) 1998 { 1999 fBuggyMuralData = true; 2000 break; 2001 } 2002 } 2003 2004 if (muralInfo.pVisibleRects) 2005 { 2006 /* @todo: do we actually need any further checks here? */ 2007 fBuggyMuralData = true; 2008 break; 2009 } 2010 2011 /* no visible regions*/ 2012 2013 if (ui == uiNumElems - 1) 2014 { 2015 /* this is the last mural, next it goes idsPool, whose content can not match the above template again */ 2016 fBuggyMuralData = true; 2017 break; 2018 } 2019 2020 /* next it goes a next mural info */ 2021 // if (!fExpectPtr) 2022 // { 2023 // CRMuralInfo *pNextSpuWindowInfoMural = (CRMuralInfo*)((void*)&LaBuf); 2024 // if (!pNextSpuWindowInfoMural->spuWindow) 2025 // fBuggyMuralData = true; 2026 // 2027 // break; 2028 // } 2029 #endif 2030 /* fExpectPtr == true, the valid pointer values should not match possible mural width/height/position */ 2031 fBuggyMuralData = true; 2032 break; 2033 2034 } while (0); 2035 2036 rc = crServerLsrDataPutMem(pReader, &LaBuf, sizeof (LaBuf)); 2037 AssertRCReturn(rc, rc); 2038 } 2039 2040 if (fBuggyMuralData) 2041 { 2042 CR_SERVER_BUGGY_MURAL_DATA Tmp; 2043 rc = crServerLsrDataGetMem(pReader, &Tmp, sizeof (Tmp)); 2044 AssertRCReturn(rc, rc); 2045 } 1734 2046 1735 2047 if (muralInfo.pVisibleRects) … … 1741 2053 } 1742 2054 1743 rc = SSMR3GetMem(pSSM, muralInfo.pVisibleRects, 4*sizeof(GLint)*muralInfo.cVisibleRects);2055 rc = crServerLsrDataGetMem(pReader, muralInfo.pVisibleRects, 4*sizeof(GLint)*muralInfo.cVisibleRects); 1744 2056 AssertRCReturn(rc, rc); 1745 2057 } 1746 2058 1747 pActualMural = (CRMuralInfo *)crHashtableSearch(cr_server.muralTable, key); ;2059 pActualMural = (CRMuralInfo *)crHashtableSearch(cr_server.muralTable, key); 1748 2060 CRASSERT(pActualMural); 1749 2061 1750 2062 if (version >= SHCROGL_SSM_VERSION_WITH_WINDOW_CTX_USAGE) 1751 2063 { 1752 rc = SSMR3GetMem(pSSM, pActualMural->ctxUsage, sizeof (pActualMural->ctxUsage));2064 rc = crServerLsrDataGetMem(pReader, pActualMural->ctxUsage, sizeof (pActualMural->ctxUsage)); 1753 2065 CRASSERT(rc == VINF_SUCCESS); 1754 2066 } … … 1906 2218 unsigned long key; 1907 2219 GLenum err; 2220 CR_SERVER_LOADSTATE_READER Reader; 1908 2221 1909 2222 if (!cr_server.bIsInLoadingState) … … 1929 2242 return VERR_SSM_DATA_UNIT_FORMAT_CHANGED; 1930 2243 } 2244 2245 crServerLsrInit(&Reader, pSSM); 1931 2246 1932 2247 #ifdef DEBUG_misha … … 1973 2288 if (version > SHCROGL_SSM_VERSION_WITH_BUGGY_FB_IMAGE_DATA) 1974 2289 { 2290 CRASSERT(!Reader.pu8Buffer); 1975 2291 /* we have a mural data here */ 1976 rc = crVBoxServerLoadMurals( pSSM, version);2292 rc = crVBoxServerLoadMurals(&Reader, version); 1977 2293 AssertRCReturn(rc, rc); 2294 CRASSERT(!Reader.pu8Buffer); 1978 2295 } 1979 2296 … … 2091 2408 CRServerFreeIDsPool_t dummyIdsPool; 2092 2409 2410 CRASSERT(!Reader.pu8Buffer); 2411 2093 2412 /* we have a mural data here */ 2094 rc = crVBoxServerLoadMurals( pSSM, version);2413 rc = crVBoxServerLoadMurals(&Reader, version); 2095 2414 AssertRCReturn(rc, rc); 2096 2415 2097 2416 /* not used any more, just read it out and ignore */ 2098 rc = SSMR3GetMem(pSSM, &dummyIdsPool, sizeof(dummyIdsPool));2417 rc = crServerLsrDataGetMem(&Reader, &dummyIdsPool, sizeof(dummyIdsPool)); 2099 2418 CRASSERT(rc == VINF_SUCCESS); 2100 2419 } … … 2109 2428 unsigned long ctxID=-1, winID=-1; 2110 2429 2111 rc = SSMR3GetU32(pSSM, &ui);2430 rc = crServerLsrDataGetU32(&Reader, &ui); 2112 2431 AssertRCReturn(rc, rc); 2113 2432 /* If this assert fires, then we should search correct client in the list first*/ … … 2116 2435 if (version>=4) 2117 2436 { 2118 rc = SSMR3GetU32(pSSM, &pClient->conn->vMajor);2437 rc = crServerLsrDataGetU32(&Reader, &pClient->conn->vMajor); 2119 2438 AssertRCReturn(rc, rc); 2120 2439 2121 rc = SSMR3GetU32(pSSM, &pClient->conn->vMinor);2440 rc = crServerLsrDataGetU32(&Reader, &pClient->conn->vMinor); 2122 2441 AssertRCReturn(rc, rc); 2123 2442 } 2124 2443 2125 rc = SSMR3GetMem(pSSM, &client, sizeof(client));2444 rc = crServerLsrDataGetMem(&Reader, &client, sizeof(client)); 2126 2445 CRASSERT(rc == VINF_SUCCESS); 2127 2446 … … 2142 2461 if (client.currentCtxInfo && client.currentContextNumber>=0) 2143 2462 { 2144 rc = SSMR3GetMem(pSSM, &ctxID, sizeof(ctxID));2463 rc = crServerLsrDataGetMem(&Reader, &ctxID, sizeof(ctxID)); 2145 2464 AssertRCReturn(rc, rc); 2146 2465 client.currentCtxInfo = (CRContextInfo*) crHashtableSearch(cr_server.contextTable, ctxID); … … 2153 2472 if (client.currentMural && client.currentWindow>=0) 2154 2473 { 2155 rc = SSMR3GetMem(pSSM, &winID, sizeof(winID));2474 rc = crServerLsrDataGetMem(&Reader, &winID, sizeof(winID)); 2156 2475 AssertRCReturn(rc, rc); 2157 2476 client.currentMural = (CRMuralInfo*) crHashtableSearch(cr_server.muralTable, winID); … … 2160 2479 //pClient->currentWindow = winID; 2161 2480 } 2481 2482 CRASSERT(!Reader.cbData); 2162 2483 2163 2484 /* Restore client active context and window */ … … 2243 2564 cr_server.head_spu->dispatch_table.StringMarkerGREMEDY(sizeof (CR_DBG_STR_STATE_LOAD_STOP), CR_DBG_STR_STATE_LOAD_STOP); 2244 2565 #endif 2566 2567 CRASSERT(!Reader.cbData); 2568 crServerLsrTerm(&Reader); 2245 2569 2246 2570 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.