Changeset 77114 in vbox for trunk/src/VBox
- Timestamp:
- Feb 1, 2019 1:13:31 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128571
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp
r76553 r77114 292 292 for (uint32_t i = 0; i < pSurface->faces[iFace].numMipLevels; i++, pMipmapLevel++) 293 293 { 294 #ifdef VMSVGA3D_DIRECT3D 295 if (pSurface->u.pSurface) 296 #else 297 if (pSurface->oglId.texture != OPENGL_INVALID_ID) 298 #endif 294 if (VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface)) 299 295 { 300 296 Assert(pMipmapLevel->cbSurface); … … 451 447 * OpenGL specifics. 452 448 */ 453 switch ( fSwitchFlags)449 switch (pSurface->enmOGLResType) 454 450 { 455 case SVGA3D_SURFACE_HINT_TEXTURE: 456 case SVGA3D_SURFACE_HINT_RENDERTARGET: 457 case SVGA3D_SURFACE_HINT_TEXTURE | SVGA3D_SURFACE_HINT_RENDERTARGET: 451 case VMSVGA3D_OGLRESTYPE_TEXTURE: 458 452 { 459 453 GLint activeTexture; … … 483 477 } 484 478 485 case SVGA3D_SURFACE_HINT_VERTEXBUFFER | SVGA3D_SURFACE_HINT_INDEXBUFFER: 486 case SVGA3D_SURFACE_HINT_VERTEXBUFFER: 487 case SVGA3D_SURFACE_HINT_INDEXBUFFER: 479 case VMSVGA3D_OGLRESTYPE_BUFFER: 488 480 { 489 481 pState->ext.glBindBuffer(GL_ARRAY_BUFFER, pSurface->oglId.buffer); -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h
r76565 r77114 254 254 # define VMSVGA3D_GL_COMPLAIN(a_pState, a_pContext, a_LogRelDetails) \ 255 255 do { \ 256 LogRelMax(32, ("VMSVGA3d: OpenGL error %#x (idActiveContext=%#x) on line %u ", (a_pContext)->lastError, (a_pContext)->id )); \256 LogRelMax(32, ("VMSVGA3d: OpenGL error %#x (idActiveContext=%#x) on line %u ", (a_pContext)->lastError, (a_pContext)->id, __LINE__)); \ 257 257 GLenum iNextError; \ 258 258 while ((iNextError = glGetError()) != GL_NO_ERROR) \ … … 524 524 #endif /* VMSVGA3D_DIRECT3D */ 525 525 526 #ifdef VMSVGA3D_OPENGL 527 /* What kind of OpenGL resource has been created for the VMSVGA3D surface. */ 528 typedef enum VMSVGA3DOGLRESTYPE 529 { 530 VMSVGA3D_OGLRESTYPE_NONE = 0, 531 VMSVGA3D_OGLRESTYPE_BUFFER = 1, 532 VMSVGA3D_OGLRESTYPE_TEXTURE = 2, 533 VMSVGA3D_OGLRESTYPE_RENDERBUFFER = 3 534 } VMSVGA3DOGLRESTYPE; 535 #endif 536 526 537 /** 527 538 * VMSVGA3d surface. … … 541 552 GLint formatGL; 542 553 GLint typeGL; 554 VMSVGA3DOGLRESTYPE enmOGLResType; /* Which resource was created for the surface. */ 543 555 union 544 556 { … … 1020 1032 PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv; 1021 1033 PFNGLTEXIMAGE3DPROC glTexImage3D; 1034 PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D; 1022 1035 PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor; 1023 1036 PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced; … … 1026 1039 PFNGLCOMPRESSEDTEXIMAGE3DPROC glCompressedTexImage3D; 1027 1040 PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glCompressedTexSubImage2D; 1041 PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glCompressedTexSubImage3D; 1028 1042 } ext; 1029 1043 -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r76553 r77114 680 680 GLGETPROC_(PFNGLGETQUERYOBJECTUIVPROC , glGetQueryObjectuiv, ""); 681 681 GLGETPROC_(PFNGLTEXIMAGE3DPROC , glTexImage3D, ""); 682 GLGETPROC_(PFNGLTEXSUBIMAGE3DPROC , glTexSubImage3D, ""); 682 683 GLGETPROC_(PFNGLCOMPRESSEDTEXIMAGE2DPROC , glCompressedTexImage2D, ""); 683 684 GLGETPROC_(PFNGLCOMPRESSEDTEXIMAGE3DPROC , glCompressedTexImage3D, ""); 684 685 GLGETPROC_(PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC , glCompressedTexSubImage2D, ""); 686 GLGETPROC_(PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC , glCompressedTexSubImage3D, ""); 685 687 GLGETPROC_(PFNGLPOINTPARAMETERFPROC , glPointParameterf, ""); 686 688 GLGETPROC_(PFNGLBLENDEQUATIONSEPARATEPROC , glBlendEquationSeparate, ""); … … 1952 1954 VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext); 1953 1955 1954 switch (pSurface->surfaceFlags & VMSVGA3D_SURFACE_HINT_SWITCH_MASK) 1955 { 1956 case SVGA3D_SURFACE_HINT_INDEXBUFFER | SVGA3D_SURFACE_HINT_VERTEXBUFFER: 1957 case SVGA3D_SURFACE_HINT_INDEXBUFFER: 1958 case SVGA3D_SURFACE_HINT_VERTEXBUFFER: 1959 if (pSurface->oglId.buffer != OPENGL_INVALID_ID) 1960 { 1956 switch (pSurface->enmOGLResType) 1957 { 1958 case VMSVGA3D_OGLRESTYPE_BUFFER: 1959 Assert(pSurface->oglId.buffer != OPENGL_INVALID_ID); 1961 1960 pState->ext.glDeleteBuffers(1, &pSurface->oglId.buffer); 1962 1961 VMSVGA3D_CHECK_LAST_ERROR_WARN(pState, pContext); 1963 } 1964 break; 1965 1966 case SVGA3D_SURFACE_CUBEMAP: 1967 case SVGA3D_SURFACE_CUBEMAP | SVGA3D_SURFACE_HINT_TEXTURE: 1968 case SVGA3D_SURFACE_CUBEMAP | SVGA3D_SURFACE_HINT_TEXTURE | SVGA3D_SURFACE_HINT_RENDERTARGET: 1969 /* Cubemap is a texture. */ 1970 case SVGA3D_SURFACE_HINT_TEXTURE: 1971 case SVGA3D_SURFACE_HINT_TEXTURE | SVGA3D_SURFACE_HINT_RENDERTARGET: 1972 if (pSurface->oglId.texture != OPENGL_INVALID_ID) 1973 { 1962 break; 1963 1964 case VMSVGA3D_OGLRESTYPE_TEXTURE: 1965 Assert(pSurface->oglId.texture != OPENGL_INVALID_ID); 1974 1966 glDeleteTextures(1, &pSurface->oglId.texture); 1975 1967 VMSVGA3D_CHECK_LAST_ERROR_WARN(pState, pContext); 1976 } 1977 break; 1978 1979 case SVGA3D_SURFACE_HINT_RENDERTARGET: 1980 case SVGA3D_SURFACE_HINT_DEPTHSTENCIL: 1981 case SVGA3D_SURFACE_HINT_DEPTHSTENCIL | SVGA3D_SURFACE_HINT_TEXTURE: /** @todo actual texture surface not supported */ 1982 if (pSurface->oglId.renderbuffer != OPENGL_INVALID_ID) 1983 { 1968 break; 1969 1970 case VMSVGA3D_OGLRESTYPE_RENDERBUFFER: 1971 Assert(pSurface->oglId.renderbuffer != OPENGL_INVALID_ID); 1984 1972 pState->ext.glDeleteRenderbuffers(1, &pSurface->oglId.renderbuffer); 1985 1973 VMSVGA3D_CHECK_LAST_ERROR_WARN(pState, pContext); 1986 } 1987 break; 1988 1989 default: 1990 AssertMsg(!VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface), ("type=%x\n", (pSurface->surfaceFlags & VMSVGA3D_SURFACE_HINT_SWITCH_MASK))); 1991 break; 1974 break; 1975 1976 default: 1977 AssertMsg(!VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface), 1978 ("hint=%#x, type=%d\n", 1979 (pSurface->surfaceFlags & VMSVGA3D_SURFACE_HINT_SWITCH_MASK), pSurface->enmOGLResType)); 1980 break; 1992 1981 } 1993 1982 } … … 2014 2003 destBox.d = pBox[i].d; 2015 2004 2016 int rc = vmsvga3dSurfaceStretchBlt(pThis, &dest, &destBox, &src, &srcBox, SVGA3D_STRETCH_BLT_LINEAR); 2005 /* No stretching is required, therefore use SVGA3D_STRETCH_BLT_POINT which translated to GL_NEAREST. */ 2006 int rc = vmsvga3dSurfaceStretchBlt(pThis, &dest, &destBox, &src, &srcBox, SVGA3D_STRETCH_BLT_POINT); 2017 2007 AssertRCReturn(rc, rc); 2018 2008 } … … 2184 2174 glGenTextures(1, &pSurface->oglId.texture); 2185 2175 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 2176 pSurface->enmOGLResType = VMSVGA3D_OGLRESTYPE_TEXTURE; 2186 2177 2187 2178 GLint activeTexture = 0; … … 2388 2379 RT_NOREF(pThis); 2389 2380 2381 AssertReturn( RT_BOOL(pSrcSurface->surfaceFlags & SVGA3D_SURFACE_HINT_DEPTHSTENCIL) 2382 == RT_BOOL(pDstSurface->surfaceFlags & SVGA3D_SURFACE_HINT_DEPTHSTENCIL), VERR_NOT_IMPLEMENTED); 2383 2384 GLenum glAttachment = GL_COLOR_ATTACHMENT0; 2385 GLbitfield glMask = GL_COLOR_BUFFER_BIT; 2386 if (pDstSurface->surfaceFlags & SVGA3D_SURFACE_HINT_DEPTHSTENCIL) 2387 { 2388 /** @todo Need GL_DEPTH_STENCIL_ATTACHMENT for depth/stencil formats? */ 2389 glAttachment = GL_DEPTH_ATTACHMENT; 2390 glMask = GL_DEPTH_BUFFER_BIT; 2391 } 2392 2390 2393 /* Activate the read and draw framebuffer objects. */ 2391 2394 pState->ext.glBindFramebuffer(GL_READ_FRAMEBUFFER, pContext->idReadFramebuffer); … … 2396 2399 /* Bind the source and destination objects to the right place. */ 2397 2400 GLenum textarget; 2398 if (pSrcSurface-> surfaceFlags & SVGA3D_SURFACE_CUBEMAP)2401 if (pSrcSurface->targetGL == GL_TEXTURE_CUBE_MAP) 2399 2402 textarget = vmsvga3dCubemapFaceFromIndex(uSrcFace); 2400 2403 else 2404 { 2405 /// @todo later AssertMsg(pSrcSurface->targetGL == GL_TEXTURE_2D, ("%#x\n", pSrcSurface->targetGL)); 2401 2406 textarget = GL_TEXTURE_2D; 2402 pState->ext.glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, textarget, 2407 } 2408 pState->ext.glFramebufferTexture2D(GL_READ_FRAMEBUFFER, glAttachment, textarget, 2403 2409 pSrcSurface->oglId.texture, uSrcMipmap); 2404 2410 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 2405 2411 2406 if (pDstSurface-> surfaceFlags & SVGA3D_SURFACE_CUBEMAP)2412 if (pDstSurface->targetGL == GL_TEXTURE_CUBE_MAP) 2407 2413 textarget = vmsvga3dCubemapFaceFromIndex(uDstFace); 2408 2414 else 2415 { 2416 /// @todo later AssertMsg(pDstSurface->targetGL == GL_TEXTURE_2D, ("%#x\n", pDstSurface->targetGL)); 2409 2417 textarget = GL_TEXTURE_2D; 2410 pState->ext.glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, textarget, 2418 } 2419 pState->ext.glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, glAttachment, textarget, 2411 2420 pDstSurface->oglId.texture, uDstMipmap); 2412 2421 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); … … 2426 2435 pDstBox->x + pDstBox->w, /* exclusive. */ 2427 2436 pDstBox->y + pDstBox->h, 2428 GL_COLOR_BUFFER_BIT,2437 glMask, 2429 2438 (enmMode == SVGA3D_STRETCH_BLT_POINT) ? GL_NEAREST : GL_LINEAR); 2430 2439 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); … … 2601 2610 2602 2611 GLenum texImageTarget; 2603 if (pSurface->targetGL == GL_TEXTURE_CUBE_MAP) 2612 if (pSurface->targetGL == GL_TEXTURE_3D) 2613 { 2614 texImageTarget = GL_TEXTURE_3D; 2615 } 2616 else if (pSurface->targetGL == GL_TEXTURE_CUBE_MAP) 2604 2617 { 2605 2618 texImageTarget = vmsvga3dCubemapFaceFromIndex(uHostFace); … … 2607 2620 else 2608 2621 { 2609 Assert (pSurface->targetGL == GL_TEXTURE_2D);2622 AssertMsg(pSurface->targetGL == GL_TEXTURE_2D, ("%#x\n", pSurface->targetGL)); 2610 2623 texImageTarget = GL_TEXTURE_2D; 2611 2624 } … … 2684 2697 vmsvga3dOglSetUnpackParams(pState, pContext, pSurface, &SavedParams); /** @todo do we need to set ROW_LENGTH to w here? */ 2685 2698 2686 if ( pSurface->internalFormatGL == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 2687 || pSurface->internalFormatGL == GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 2688 || pSurface->internalFormatGL == GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) 2699 if (texImageTarget == GL_TEXTURE_3D) 2689 2700 { 2690 pState->ext.glCompressedTexSubImage2D(texImageTarget, 2691 uHostMipmap, 2692 pBox->x, 2693 pBox->y, 2694 pBox->w, 2695 pBox->h, 2696 pSurface->internalFormatGL, 2697 cbSurfacePitch * cBlocksY, 2698 pDoubleBuffer); 2701 if ( pSurface->internalFormatGL == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 2702 || pSurface->internalFormatGL == GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 2703 || pSurface->internalFormatGL == GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) 2704 { 2705 pState->ext.glCompressedTexSubImage3D(texImageTarget, 2706 uHostMipmap, 2707 pBox->x, 2708 pBox->y, 2709 pBox->z, 2710 pBox->w, 2711 pBox->h, 2712 pBox->d, 2713 pSurface->formatGL, 2714 pSurface->typeGL, 2715 pDoubleBuffer); 2716 } 2717 else 2718 { 2719 pState->ext.glTexSubImage3D(texImageTarget, 2720 uHostMipmap, 2721 u32HostBlockX, 2722 u32HostBlockY, 2723 pBox->z, 2724 cBlocksX, 2725 cBlocksY, 2726 pBox->d, 2727 pSurface->formatGL, 2728 pSurface->typeGL, 2729 pDoubleBuffer); 2730 } 2699 2731 } 2700 2732 else 2701 2733 { 2702 glTexSubImage2D(texImageTarget, 2703 uHostMipmap, 2704 u32HostBlockX, 2705 u32HostBlockY, 2706 cBlocksX, 2707 cBlocksY, 2708 pSurface->formatGL, 2709 pSurface->typeGL, 2710 pDoubleBuffer); 2734 if ( pSurface->internalFormatGL == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 2735 || pSurface->internalFormatGL == GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 2736 || pSurface->internalFormatGL == GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) 2737 { 2738 pState->ext.glCompressedTexSubImage2D(texImageTarget, 2739 uHostMipmap, 2740 pBox->x, 2741 pBox->y, 2742 pBox->w, 2743 pBox->h, 2744 pSurface->internalFormatGL, 2745 cbSurfacePitch * cBlocksY, 2746 pDoubleBuffer); 2747 } 2748 else 2749 { 2750 glTexSubImage2D(texImageTarget, 2751 uHostMipmap, 2752 u32HostBlockX, 2753 u32HostBlockY, 2754 cBlocksX, 2755 cBlocksY, 2756 pSurface->formatGL, 2757 pSurface->typeGL, 2758 pDoubleBuffer); 2759 } 2711 2760 } 2712 2761 VMSVGA3D_CHECK_LAST_ERROR_WARN(pState, pContext); … … 4457 4506 case SVGA3D_RT_DEPTH: 4458 4507 case SVGA3D_RT_STENCIL: 4459 AssertReturn(target.mipmap == 0, VERR_INVALID_PARAMETER);4460 4508 #if 1 4461 4509 /* A texture surface can be used as a render target to fill it and later on used as a texture. */ … … 4478 4526 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 4479 4527 #else 4528 AssertReturn(target.mipmap == 0, VERR_INVALID_PARAMETER); 4480 4529 if (pRenderTarget->oglId.texture == OPENGL_INVALID_ID) 4481 4530 { … … 4486 4535 pState->ext.glGenRenderbuffers(1, &pRenderTarget->oglId.renderbuffer); 4487 4536 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 4537 pSurface->enmOGLResType = VMSVGA3D_OGLRESTYPE_RENDERBUFFER; 4488 4538 4489 4539 pState->ext.glBindRenderbuffer(GL_RENDERBUFFER, pRenderTarget->oglId.renderbuffer); … … 5713 5763 pState->ext.glGenBuffers(1, &pVertexSurface->oglId.buffer); 5714 5764 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 5765 pVertexSurface->enmOGLResType = VMSVGA3D_OGLRESTYPE_BUFFER; 5715 5766 5716 5767 pState->ext.glBindBuffer(GL_ARRAY_BUFFER, pVertexSurface->oglId.buffer); … … 6073 6124 pState->ext.glGenBuffers(1, &pIndexSurface->oglId.buffer); 6074 6125 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 6126 pIndexSurface->enmOGLResType = VMSVGA3D_OGLRESTYPE_BUFFER; 6075 6127 6076 6128 pState->ext.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, pIndexSurface->oglId.buffer); … … 6116 6168 else 6117 6169 { 6170 Assert(pRange[iPrimitive].indexWidth == pRange[iPrimitive].indexArray.stride); 6171 6118 6172 GLenum indexType; 6119 6120 Assert(pRange[iPrimitive].indexBias >= 0); /** @todo indexBias */ 6121 Assert(pRange[iPrimitive].indexWidth == pRange[iPrimitive].indexArray.stride); 6122 6123 if (pRange[iPrimitive].indexWidth == sizeof(uint8_t)) 6173 switch (pRange[iPrimitive].indexWidth) 6124 6174 { 6125 indexType = GL_UNSIGNED_BYTE; 6126 } 6127 else 6128 if (pRange[iPrimitive].indexWidth == sizeof(uint16_t)) 6129 { 6130 indexType = GL_UNSIGNED_SHORT; 6131 } 6132 else 6133 { 6134 Assert(pRange[iPrimitive].indexWidth == sizeof(uint32_t)); 6135 indexType = GL_UNSIGNED_INT; 6175 case 1: indexType = GL_UNSIGNED_BYTE; break; 6176 case 2: indexType = GL_UNSIGNED_SHORT; break; 6177 default: AssertMsgFailed(("indexWidth %d\n", pRange[iPrimitive].indexWidth)); 6178 RT_FALL_THROUGH(); 6179 case 4: indexType = GL_UNSIGNED_INT; break; 6136 6180 } 6137 6181 … … 6573 6617 { 6574 6618 AssertReturn(pState->ext.glGenQueries, VERR_NOT_SUPPORTED); 6619 VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext); 6620 6575 6621 GLuint idQuery = 0; 6576 6622 pState->ext.glGenQueries(1, &idQuery); … … 6584 6630 { 6585 6631 AssertReturn(pState->ext.glDeleteQueries, VERR_NOT_SUPPORTED); 6632 VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext); 6633 6586 6634 if (pContext->occlusion.idQuery) 6587 6635 { … … 6594 6642 { 6595 6643 AssertReturn(pState->ext.glBeginQuery, VERR_NOT_SUPPORTED); 6644 VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext); 6645 6596 6646 pState->ext.glBeginQuery(GL_ANY_SAMPLES_PASSED, pContext->occlusion.idQuery); 6597 6647 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); … … 6601 6651 int vmsvga3dOcclusionQueryEnd(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext) 6602 6652 { 6603 RT_NOREF(pContext);6604 6653 AssertReturn(pState->ext.glEndQuery, VERR_NOT_SUPPORTED); 6654 VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext); 6655 6605 6656 pState->ext.glEndQuery(GL_ANY_SAMPLES_PASSED); 6606 6657 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); … … 6611 6662 { 6612 6663 AssertReturn(pState->ext.glGetQueryObjectuiv, VERR_NOT_SUPPORTED); 6664 VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext); 6665 6613 6666 GLuint pixels = 0; 6614 6667 pState->ext.glGetQueryObjectuiv(pContext->occlusion.idQuery, GL_QUERY_RESULT, &pixels); -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-savedstate.cpp
r76553 r77114 701 701 Log(("Surface sid=%d: save mipmap level %d with %x bytes data.\n", sid, i, pMipmapLevel->cbSurface)); 702 702 703 #ifdef VMSVGA3D_DIRECT3D 704 if (!pSurface->u.pSurface) 705 #else 706 if (pSurface->oglId.texture == OPENGL_INVALID_ID) 707 #endif 703 if (!VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface)) 708 704 { 709 705 if (pMipmapLevel->fDirty) … … 888 884 Assert(pMipmapLevel->cbSurface); 889 885 890 switch (pSurface-> surfaceFlags & VMSVGA3D_SURFACE_HINT_SWITCH_MASK)886 switch (pSurface->enmOGLResType) 891 887 { 892 888 default: 893 889 AssertFailed(); 894 890 RT_FALL_THRU(); 895 case SVGA3D_SURFACE_HINT_DEPTHSTENCIL: 896 case SVGA3D_SURFACE_HINT_DEPTHSTENCIL | SVGA3D_SURFACE_HINT_TEXTURE: 897 /** @todo fetch data from the renderbuffer */ 891 case VMSVGA3D_OGLRESTYPE_RENDERBUFFER: 892 /** @todo fetch data from the renderbuffer. Not used currently. */ 898 893 /* No data follows */ 899 894 rc = SSMR3PutBool(pSSM, false); … … 901 896 break; 902 897 903 case SVGA3D_SURFACE_HINT_TEXTURE | SVGA3D_SURFACE_HINT_RENDERTARGET: 904 case SVGA3D_SURFACE_HINT_TEXTURE: 905 case SVGA3D_SURFACE_HINT_RENDERTARGET: 898 case VMSVGA3D_OGLRESTYPE_TEXTURE: 906 899 { 907 900 GLint activeTexture; … … 943 936 } 944 937 945 case SVGA3D_SURFACE_HINT_VERTEXBUFFER | SVGA3D_SURFACE_HINT_INDEXBUFFER: 946 case SVGA3D_SURFACE_HINT_VERTEXBUFFER: 947 case SVGA3D_SURFACE_HINT_INDEXBUFFER: 938 case VMSVGA3D_OGLRESTYPE_BUFFER: 948 939 { 949 940 uint8_t *pBufferData;
Note:
See TracChangeset
for help on using the changeset viewer.