Changeset 57503 in vbox for trunk/src/VBox/Devices/Graphics
- Timestamp:
- Aug 23, 2015 5:35:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r57502 r57503 140 140 *********************************************************************************************************************************/ 141 141 /* Define the default light parameters as specified by MSDN. */ 142 /* @todo move out; fetched from Wine */142 /** @todo move out; fetched from Wine */ 143 143 const SVGA3dLightData vmsvga3d_default_light = 144 144 { … … 845 845 * 846 846 */ 847 /** @todo :distinguish between vertex and pixel shaders??? */847 /** @todo distinguish between vertex and pixel shaders??? */ 848 848 if ( vmsvga3dCheckGLExtension(pState, 0.0f, " GL_NV_gpu_program4 ") 849 849 || strstr(pState->pszOtherExtensions, " GL_NV_gpu_program4 ")) … … 1097 1097 uint32_t result = 0; 1098 1098 1099 /* @todo missing:1099 /** @todo missing: 1100 1100 * 1101 1101 * SVGA3DFORMAT_OP_PIXELSIZE … … 1123 1123 } 1124 1124 1125 /* @todo check hardware caps! */1125 /** @todo check hardware caps! */ 1126 1126 switch (idx3dCaps) 1127 1127 { … … 1201 1201 uint32_t result = 0; 1202 1202 1203 /* @todo test this somehow */1203 /** @todo test this somehow */ 1204 1204 result = SVGA3DFORMAT_OP_ZSTENCIL | SVGA3DFORMAT_OP_ZSTENCIL_WITH_ARBITRARY_COLOR_DEPTH; 1205 1205 … … 1296 1296 1297 1297 case SVGA3D_DEVCAP_MAX_SHADER_TEXTURES: 1298 /* @todo ?? */1298 /** @todo ?? */ 1299 1299 rc = VERR_INVALID_PARAMETER; 1300 1300 break; … … 1370 1370 break; 1371 1371 1372 case SVGA3D_DEVCAP_MAX_RENDER_TARGETS: /* @todo same thing? */1372 case SVGA3D_DEVCAP_MAX_RENDER_TARGETS: /** @todo same thing? */ 1373 1373 case SVGA3D_DEVCAP_MAX_SIMULTANEOUS_RENDER_TARGETS: 1374 1374 *pu32Val = pState->caps.maxColorAttachments; … … 1802 1802 return D3DMULTISAMPLE_NONE; 1803 1803 1804 /* @todo exact same mapping as d3d? */1804 /** @todo exact same mapping as d3d? */ 1805 1805 return (D3DMULTISAMPLE_TYPE)multisampleCount; 1806 1806 } … … 1821 1821 { 1822 1822 case SVGA3D_SURFACE_CUBEMAP: 1823 AssertFailed(); /** @todo */1823 AssertFailed(); /** @todo destroy SVGA3D_SURFACE_CUBEMAP */ 1824 1824 break; 1825 1825 … … 2026 2026 glGenTextures(1, &pSurface->oglId.texture); 2027 2027 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 2028 /* @todo Set the mip map generation filter settings. */2028 /** @todo Set the mip map generation filter settings. */ 2029 2029 2030 2030 glGetIntegerv(GL_TEXTURE_BINDING_2D, &activeTexture); … … 2421 2421 2422 2422 case SVGA3D_SURFACE_HINT_DEPTHSTENCIL: 2423 AssertFailed(); /* @todo*/2423 AssertFailed(); /** @todo DMA SVGA3D_SURFACE_HINT_DEPTHSTENCIL */ 2424 2424 break; 2425 2425 … … 2502 2502 } 2503 2503 2504 /* @todo Only screen 0 for now. */2504 /** @todo Only screen 0 for now. */ 2505 2505 AssertReturn(dest == 0, VERR_INTERNAL_ERROR); 2506 2506 AssertReturn(src.mipmap == 0 && src.face == 0, VERR_INVALID_PARAMETER); 2507 /* @todo scaling */2507 /** @todo scaling */ 2508 2508 AssertReturn(destRect.right - destRect.left == srcRect.right - srcRect.left && destRect.bottom - destRect.top == srcRect.bottom - srcRect.top, VERR_INVALID_PARAMETER); 2509 2509 … … 2547 2547 dst.pitch = pThis->svga.cbScanline; 2548 2548 2549 /* @todo merge into one SurfaceDMA call */2549 /** @todo merge into one SurfaceDMA call */ 2550 2550 for (uint32_t i = 0; i < cRects; i++) 2551 2551 { … … 2604 2604 else 2605 2605 { 2606 /* @todo new filter */2606 /** @todo new filter */ 2607 2607 AssertFailed(); 2608 2608 } … … 2640 2640 pSurface = pState->papSurfaces[sid]; 2641 2641 2642 /* @todo stricter checks for associated context */2642 /** @todo stricter checks for associated context */ 2643 2643 Log(("vmsvga3dCommandPresent: sid=%x cRects=%d\n", sid, cRects)); 2644 2644 for (uint32_t i=0; i < cRects; i++) … … 3155 3155 3156 3156 pixelFormat = ChoosePixelFormat(pContext->hdc, &pfd); 3157 /* @todo is this really necessary?? */3157 /** @todo is this really necessary?? */ 3158 3158 pixelFormat = ChoosePixelFormat(pContext->hdc, &pfd); 3159 3159 AssertMsgReturn(pixelFormat != 0, ("ChoosePixelFormat failed with %d\n", GetLastError()), VERR_INTERNAL_ERROR); … … 3253 3253 } 3254 3254 #if 0 3255 /* @todo move to shader lib!!! */3255 /** @todo move to shader lib!!! */ 3256 3256 /* Clear the screen */ 3257 3257 VMSVGA3D_SET_CURRENT_CONTEXT(pState, pContext); … … 3266 3266 if (pState->ext.glProvokingVertex) 3267 3267 pState->ext.glProvokingVertex(GL_FIRST_VERTEX_CONVENTION); 3268 /* @todo move to shader lib!!! */3268 /** @todo move to shader lib!!! */ 3269 3269 #endif 3270 3270 return VINF_SUCCESS; … … 3615 3615 return GL_SRC_ALPHA_SATURATE; 3616 3616 case SVGA3D_BLENDOP_BLENDFACTOR: 3617 return GL_CONSTANT_ALPHA; /* @todo correct?? */3617 return GL_CONSTANT_ALPHA; /** @todo correct?? */ 3618 3618 case SVGA3D_BLENDOP_INVBLENDFACTOR: 3619 return GL_ONE_MINUS_CONSTANT_ALPHA; /* @todo correct?? */3619 return GL_ONE_MINUS_CONSTANT_ALPHA; /** @todo correct?? */ 3620 3620 default: 3621 3621 AssertFailed(); … … 3769 3769 3770 3770 case SVGA3D_RS_POINTSIZE: /* float */ 3771 /* @todo we need to apply scaling for point sizes below the min or above the max; see Wine) */3771 /** @todo we need to apply scaling for point sizes below the min or above the max; see Wine) */ 3772 3772 if (pRenderState[i].floatValue < pState->caps.flPointSize[0]) 3773 3773 pRenderState[i].floatValue = pState->caps.flPointSize[0]; … … 3877 3877 } 3878 3878 3879 /* @todo how to switch between vertex and pixel fog modes??? */3879 /** @todo how to switch between vertex and pixel fog modes??? */ 3880 3880 Assert(mode.s.type == SVGA3D_FOGTYPE_PIXEL); 3881 3881 #if 0 … … 3964 3964 case SVGA3D_RS_LINEPATTERN: /* SVGA3dLinePattern */ 3965 3965 /* No longer supported by d3d; mesagl comments suggest not all backends support it */ 3966 /* @todo */3966 /** @todo */ 3967 3967 Log(("WARNING: SVGA3D_RS_LINEPATTERN %x not supported!!\n", pRenderState[i].uintValue)); 3968 3968 /* … … 4238 4238 case SVGA3D_RS_CCWSTENCILFUNC: /* SVGA3dCmpFunc */ 4239 4239 { 4240 /* @todo SVGA3D_RS_STENCILFAIL/ZFAIL/PASS for front & back faces4241 * SVGA3D_RS_CCWSTENCILFAIL/ZFAIL/PASS for back faces ??4240 /** @todo SVGA3D_RS_STENCILFAIL/ZFAIL/PASS for front & back faces 4241 * SVGA3D_RS_CCWSTENCILFAIL/ZFAIL/PASS for back faces ?? 4242 4242 */ 4243 4243 GLint ref; … … 4258 4258 case SVGA3D_RS_CCWSTENCILPASS: /* SVGA3dStencilOp */ 4259 4259 { 4260 /* @todo SVGA3D_RS_STENCILFAIL/ZFAIL/PASS for front & back faces4261 * SVGA3D_RS_CCWSTENCILFAIL/ZFAIL/PASS for back faces ??4260 /** @todo SVGA3D_RS_STENCILFAIL/ZFAIL/PASS for front & back faces 4261 * SVGA3D_RS_CCWSTENCILFAIL/ZFAIL/PASS for back faces ?? 4262 4262 */ 4263 4263 GLint sfail, dpfail, dppass; … … 4293 4293 4294 4294 case SVGA3D_RS_ZBIAS: /* float */ 4295 /* @todo unknown meaning; depth bias is not identical4295 /** @todo unknown meaning; depth bias is not identical 4296 4296 renderState = D3DRS_DEPTHBIAS; 4297 4297 val = pRenderState[i].uintValue; … … 4304 4304 GLfloat factor; 4305 4305 4306 /* @todo not sure if the d3d & ogl definitions are identical. */4306 /** @todo not sure if the d3d & ogl definitions are identical. */ 4307 4307 4308 4308 /* Do not change the factor part. */ … … 4319 4319 GLfloat units; 4320 4320 4321 /* @todo not sure if the d3d & ogl definitions are identical. */4321 /** @todo not sure if the d3d & ogl definitions are identical. */ 4322 4322 4323 4323 /* Do not change the factor part. */ … … 4416 4416 case SVGA3D_RS_COORDINATETYPE: /* SVGA3dCoordinateType */ 4417 4417 Assert(pRenderState[i].uintValue == SVGA3D_COORDINATE_LEFTHANDED); 4418 /* @todo setup a view matrix to scale the world space by -1 in the z-direction for right handed coordinates. */4418 /** @todo setup a view matrix to scale the world space by -1 in the z-direction for right handed coordinates. */ 4419 4419 /* 4420 4420 renderState = D3DRS_COORDINATETYPE; … … 4661 4661 Log(("vmsvga3dSetRenderTarget: WARNING: glCheckFramebufferStatus returned %x\n", status)); 4662 4662 #endif 4663 /* @todo use glDrawBuffers too? */4663 /** @todo use glDrawBuffers too? */ 4664 4664 break; 4665 4665 } … … 4707 4707 return D3DTOP_MODULATE4X; 4708 4708 case SVGA3D_TC_DSDT: 4709 AssertFailed(); /* @todo ??? */4709 AssertFailed(); /** @todo ??? */ 4710 4710 return D3DTOP_DISABLE; 4711 4711 case SVGA3D_TC_DOTPRODUCT3: … … 4772 4772 return D3DTTFF_DISABLE; 4773 4773 case SVGA3D_TEX_TRANSFORM_S: 4774 return D3DTTFF_COUNT1; /* @todo correct? */4774 return D3DTTFF_COUNT1; /** @todo correct? */ 4775 4775 case SVGA3D_TEX_TRANSFORM_T: 4776 return D3DTTFF_COUNT2; /* @todo correct? */4776 return D3DTTFF_COUNT2; /** @todo correct? */ 4777 4777 case SVGA3D_TEX_TRANSFORM_R: 4778 return D3DTTFF_COUNT3; /* @todo correct? */4778 return D3DTTFF_COUNT3; /** @todo correct? */ 4779 4779 case SVGA3D_TEX_TRANSFORM_Q: 4780 return D3DTTFF_COUNT4; /* @todo correct? */4780 return D3DTTFF_COUNT4; /** @todo correct? */ 4781 4781 case SVGA3D_TEX_PROJECTED: 4782 4782 return D3DTTFF_PROJECTED; … … 4802 4802 case SVGA3D_TEX_ADDRESS_MIRRORONCE: 4803 4803 AssertFailed(); 4804 return GL_CLAMP_TO_EDGE_SGIS; /* @todo correct? */4804 return GL_CLAMP_TO_EDGE_SGIS; /** @todo correct? */ 4805 4805 4806 4806 case SVGA3D_TEX_ADDRESS_EDGE: … … 4822 4822 return GL_NEAREST; 4823 4823 case SVGA3D_TEX_FILTER_ANISOTROPIC: 4824 /* @todo */4824 /** @todo */ 4825 4825 case SVGA3D_TEX_FILTER_FLATCUBIC: // Deprecated, not implemented 4826 4826 case SVGA3D_TEX_FILTER_GAUSSIANCUBIC: // Deprecated, not implemented … … 4910 4910 case SVGA3D_TS_ALPHAARG1: /* SVGA3dTextureArgData */ 4911 4911 case SVGA3D_TS_ALPHAARG2: /* SVGA3dTextureArgData */ 4912 /* @todo;not used by MesaGL */4912 /** @todo not used by MesaGL */ 4913 4913 Log(("vmsvga3dSetTextureState: colorop/alphaop not yet supported!!\n")); 4914 4914 break; … … 5044 5044 vmsvgaColor2GLFloatArray(pTextureState[i].value, &color[0], &color[1], &color[2], &color[3]); 5045 5045 5046 glTexParameterfv(GL_TEXTURE_2D /* @todo flexible type */, GL_TEXTURE_BORDER_COLOR, color); /* Identical; default 0.0 identical too */5046 glTexParameterfv(GL_TEXTURE_2D /** @todo flexible type */, GL_TEXTURE_BORDER_COLOR, color); /* Identical; default 0.0 identical too */ 5047 5047 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 5048 5048 break; … … 5050 5050 5051 5051 case SVGA3D_TS_TEXTURE_LOD_BIAS: /* float */ 5052 glTexParameterf(GL_TEXTURE_2D /* @todo flexible type */, GL_TEXTURE_LOD_BIAS, pTextureState[i].value); /* Identical; default 0.0 identical too */5052 glTexParameterf(GL_TEXTURE_2D /** @todo flexible type */, GL_TEXTURE_LOD_BIAS, pTextureState[i].value); /* Identical; default 0.0 identical too */ 5053 5053 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 5054 5054 break; … … 5086 5086 if (textureType != ~0U) 5087 5087 { 5088 glTexParameteri(GL_TEXTURE_2D /* @todo flexible type */, textureType, val);5088 glTexParameteri(GL_TEXTURE_2D /** @todo flexible type */, textureType, val); 5089 5089 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 5090 5090 } … … 5146 5146 } 5147 5147 5148 /* @todo Move into separate library as we are using logic from Wine here. */5148 /** @todo Move into separate library as we are using logic from Wine here. */ 5149 5149 int vmsvga3dSetLightData(PVGASTATE pThis, uint32_t cid, uint32_t index, SVGA3dLightData *pData) 5150 5150 { … … 5223 5223 VMSVGA3D_CHECK_LAST_ERROR_WARN(pState, pContext); 5224 5224 5225 /* @todo range */5225 /** @todo range */ 5226 5226 break; 5227 5227 } … … 5291 5291 VMSVGA3D_CHECK_LAST_ERROR_WARN(pState, pContext); 5292 5292 5293 /* @todo range */5293 /** @todo range */ 5294 5294 break; 5295 5295 } … … 5385 5385 pContext->state.u32UpdateFlags |= VMSVGA3D_UPDATE_VIEWPORT; 5386 5386 5387 /* @todo y-inversion for partial viewport coordinates? */5387 /** @todo y-inversion for partial viewport coordinates? */ 5388 5388 glViewport(pRect->x, pRect->y, pRect->w, pRect->h); 5389 5389 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); … … 5514 5514 if (clearFlag & SVGA3D_CLEAR_STENCIL) 5515 5515 { 5516 /* @todo possibly the same problem as with glDepthMask */5516 /** @todo possibly the same problem as with glDepthMask */ 5517 5517 glClearStencil(stencil); 5518 5518 mask |= GL_STENCIL_BUFFER_BIT; … … 5626 5626 case SVGA3D_DECLTYPE_UDEC3: 5627 5627 size = 3; 5628 type = GL_UNSIGNED_INT_2_10_10_10_REV; /* @todo correct? */5628 type = GL_UNSIGNED_INT_2_10_10_10_REV; /** @todo correct? */ 5629 5629 break; 5630 5630 … … 5632 5632 normalized = true; 5633 5633 size = 3; 5634 type = GL_INT_2_10_10_10_REV; /* @todo correct? */5634 type = GL_INT_2_10_10_10_REV; /** @todo correct? */ 5635 5635 break; 5636 5636 … … 5715 5715 5716 5716 Assert(pVertexSurface->fDirty); 5717 /* @todo rethink usage dynamic/static */5717 /** @todo rethink usage dynamic/static */ 5718 5718 pState->ext.glBufferData(GL_ARRAY_BUFFER, pVertexSurface->pMipmapLevels[0].cbSurface, pVertexSurface->pMipmapLevels[0].pSurfaceData, GL_DYNAMIC_DRAW); 5719 5719 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); … … 5756 5756 (const GLvoid *)(uintptr_t)pVertexDecl[iVertex].array.offset); 5757 5757 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); 5758 /* case SVGA3D_DECLUSAGE_COLOR: @todocolor component order not identical!! test GL_BGRA!! */5758 /** @todo case SVGA3D_DECLUSAGE_COLOR: color component order not identical!! test GL_BGRA!! */ 5759 5759 } 5760 5760 else … … 5892 5892 case SVGA3D_DECLUSAGE_POSITIONT: 5893 5893 break; 5894 case SVGA3D_DECLUSAGE_COLOR: /* @todo color component order not identical!! */5894 case SVGA3D_DECLUSAGE_COLOR: /** @todo color component order not identical!! */ 5895 5895 glDisableClientState(GL_COLOR_ARRAY); 5896 5896 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); … … 5927 5927 AssertReturn(numRanges && numRanges <= SVGA3D_MAX_DRAW_PRIMITIVE_RANGES, VERR_INVALID_PARAMETER); 5928 5928 AssertReturn(!cVertexDivisor || cVertexDivisor == numVertexDecls, VERR_INVALID_PARAMETER); 5929 /* @todo*/5929 /** @todo Non-zero cVertexDivisor */ 5930 5930 Assert(!cVertexDivisor); 5931 5931 … … 6021 6021 Assert(pIndexSurface->fDirty); 6022 6022 6023 /* @todo rethink usage dynamic/static */6023 /** @todo rethink usage dynamic/static */ 6024 6024 pState->ext.glBufferData(GL_ELEMENT_ARRAY_BUFFER, pIndexSurface->pMipmapLevels[0].cbSurface, pIndexSurface->pMipmapLevels[0].pSurfaceData, GL_DYNAMIC_DRAW); 6025 6025 VMSVGA3D_CHECK_LAST_ERROR(pState, pContext); … … 6050 6050 else 6051 6051 { 6052 Assert(pRange[iPrimitive].indexBias >= 0); /* @todo*/6052 Assert(pRange[iPrimitive].indexBias >= 0); /** @todo indexBias */ 6053 6053 Assert(pRange[iPrimitive].indexWidth == pRange[iPrimitive].indexArray.stride); 6054 6054
Note:
See TracChangeset
for help on using the changeset viewer.