Changeset 82063 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 21, 2019 7:45:53 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h
r82003 r82063 1226 1226 { 1227 1227 /** @todo stricter checks for associated context */ 1228 if ( cid >= pState->cContexts 1229 || pState->papContexts[cid]->id != cid) 1228 AssertReturn(cid < pState->cContexts, VERR_INVALID_PARAMETER); 1229 PVMSVGA3DCONTEXT const pContext = pState->papContexts[cid]; 1230 if (RT_LIKELY(pContext && pContext->id == cid)) 1230 1231 { 1231 Log(("vmsvga3dSurfaceCopy invalid context id!\n"));1232 return V ERR_INVALID_PARAMETER;1232 *ppContext = pContext; 1233 return VINF_SUCCESS; 1233 1234 } 1234 1235 *ppContext = pState->papContexts[cid]; 1236 return VINF_SUCCESS; 1235 LogRelMax(64, ("VMSVGA: unknown cid=%d (%s cid=%d)\n", cid, pContext ? "expected" : "null", pContext ? pContext->id : -1)); 1236 return VERR_INVALID_PARAMETER; 1237 1237 } 1238 1238 1239 1239 DECLINLINE(int) vmsvga3dSurfaceFromSid(PVMSVGA3DSTATE pState, uint32_t sid, PVMSVGA3DSURFACE *ppSurface) 1240 1240 { 1241 Assert(sid < SVGA3D_MAX_SURFACE_IDS);1242 1241 AssertReturn(sid < pState->cSurfaces, VERR_INVALID_PARAMETER); 1243 PVMSVGA3DSURFACE pSurface = pState->papSurfaces[sid]; 1244 AssertReturn(pSurface && pSurface->id == sid, VERR_INVALID_PARAMETER); 1245 *ppSurface = pSurface; 1246 return VINF_SUCCESS; 1242 PVMSVGA3DSURFACE const pSurface = pState->papSurfaces[sid]; 1243 if (RT_LIKELY(pSurface && pSurface->id == sid)) 1244 { 1245 *ppSurface = pSurface; 1246 return VINF_SUCCESS; 1247 } 1248 LogRelMax(64, ("VMSVGA: unknown sid=%d (%s sid=%d)\n", sid, pSurface ? "expected" : "null", pSurface ? pSurface->id : -1)); 1249 return VERR_INVALID_PARAMETER; 1247 1250 } 1248 1251
Note:
See TracChangeset
for help on using the changeset viewer.