Lines Matching refs:ptl
410 CRTextureLevel *ptl = &(pTexture->level[face][i]);
411 rc = SSMR3PutMem(pSSM, ptl, sizeof(*ptl));
413 if (ptl->img)
415 CRASSERT(ptl->bytes);
416 rc = SSMR3PutMem(pSSM, ptl->img, ptl->bytes);
421 * Even with CR_STATE_NO_TEXTURE_IMAGE_STORE defined, it's possible that ptl->img!=NULL.
426 else if (ptl->bytes)
473 ptl->width,
474 ptl->height);
491 pImg = crAlloc(ptl->bytes+4);
493 pImg = crAlloc(ptl->bytes);
498 *(int*)((char*)pImg+ptl->bytes) = 0xDEADDEAD;
506 ptl->compressed, face, i, ptl->width, ptl->height, ptl->bytes);
509 if (w!=ptl->width || h!=ptl->height)
520 if (i<4 || (ptl->width>2 && ptl->height>2))
522 if (!ptl->compressed)
524 diff_api.GetTexImage(target, i, ptl->format, ptl->type, pImg);
534 crMemset(pImg, 0, ptl->bytes);
538 if (*(int*)((char*)pImg+ptl->bytes) != 0xDEADDEAD)
544 rc = SSMR3PutMem(pSSM, pImg, ptl->bytes);
567 CRTextureLevel *ptl = &(pTexture->level[face][i]);
568 CRASSERT(!ptl->img);
570 rc = SSMR3GetMem(pSSM, ptl, sizeof(*ptl));
572 if (ptl->img)
574 CRASSERT(ptl->bytes);
576 ptl->img = crAlloc(ptl->bytes);
577 if (!ptl->img) return VERR_NO_MEMORY;
579 rc = SSMR3GetMem(pSSM, ptl->img, ptl->bytes);
584 else if (ptl->bytes)
586 ptl->img = crAlloc(ptl->bytes);
587 if (!ptl->img) return VERR_NO_MEMORY;
589 rc = SSMR3GetMem(pSSM, ptl->img, ptl->bytes);
593 crStateTextureInitTextureFormat(ptl, ptl->internalFormat);