Lines Matching refs:pSurface

53 typedef TU_Error (LoopFunction)(FILE*& pFile, TGA_INFO*& pTGAD, GX2Surface*& pSurface, u32 nMipLeve…
54 TU_Error GenericLoadFunction(FILE*& pFile, TGA_INFO*& pTGAD, GX2Surface*& pSurface, ChannelFormat c…
55 bool GetGX2TextureInfo(const TGA_INFO* pTGAD, GX2Surface* pSurface, ChannelFormat channelFormat,
343 bool GetGX2TextureInfo(const TGA_INFO* pTGAD, GX2Surface* pSurface, ChannelFormat channelFormat, in GetGX2TextureInfo() argument
347 pSurface->depth = 1; in GetGX2TextureInfo()
348 pSurface->dim = GX2_SURFACE_DIM_2D; in GetGX2TextureInfo()
349 pSurface->numMips = 1; in GetGX2TextureInfo()
350 pSurface->width = pTGAD->hdr.dwWidth; in GetGX2TextureInfo()
351 pSurface->height = pTGAD->hdr.dwHeight; in GetGX2TextureInfo()
352 pSurface->tileMode = GX2_TILE_MODE_LINEAR_SPECIAL; in GetGX2TextureInfo()
353 pSurface->use = GX2_SURFACE_USE_TEXTURE; in GetGX2TextureInfo()
354 pSurface->alignment = 1; in GetGX2TextureInfo()
372 pSurface->format = GX2_SURFACE_FORMAT_TCS_R8_G8_B8_A8_UNORM; in GetGX2TextureInfo()
384 if (!fpTC2GetSourceSurfaceSize(pSurface)) in GetGX2TextureInfo()
394 TU_Error GenericLoadFunction(FILE*& pFile, TGA_INFO*& pTGAD, GX2Surface*& pSurface, ChannelFormat c… in GenericLoadFunction() argument
401 memset(pSurface, 0, sizeof(*pSurface)); in GenericLoadFunction()
402 if (!GetGX2TextureInfo(pTGAD, pSurface, channelFormat, textureDataType, &cubeFaceMask)) in GenericLoadFunction()
407 pSurface->imagePtr = malloc(pSurface->imageSize + pSurface->mipSize); in GenericLoadFunction()
408 assert(pSurface->imagePtr); in GenericLoadFunction()
410 if (pSurface->mipSize) in GenericLoadFunction()
412 pSurface->mipPtr = (void*)((u8*)pSurface->imagePtr + pSurface->imageSize); in GenericLoadFunction()
415 for(u32 nFace = 0; nFace < pSurface->depth; nFace++) in GenericLoadFunction()
419 for(u32 nMipLevel = 0; nMipLevel < pSurface->numMips; nMipLevel++) in GenericLoadFunction()
421 err = fnLoop(pFile, pTGAD, pSurface, nMipLevel, nFace, dwWidth, dwHeight); in GenericLoadFunction()
432 TU_Error GenericFreeFunction(GX2Surface*& pSurface) in GenericFreeFunction() argument
434 if(pSurface == NULL) in GenericFreeFunction()
436 assert(pSurface); in GenericFreeFunction()
440 if(pSurface->imagePtr != NULL) in GenericFreeFunction()
442 free(pSurface->imagePtr); in GenericFreeFunction()
443 pSurface->imagePtr = NULL; in GenericFreeFunction()
444 pSurface->mipPtr = NULL; in GenericFreeFunction()
454 TU_Error LoopRGBA(FILE*& pFile, TGA_INFO*& pTGAD, GX2Surface*& pSurface, in LoopRGBA() argument
463 if (!GetMipLevel(pSurface, nMipLevel, nFaceOrSlice, &mipLevel)) in LoopRGBA()
511 TU_Error LoadRGBA(FILE* pFile, TGA_INFO* pTGAD, GX2Surface* pSurface) in LoadRGBA() argument
513 TU_Error err = GenericLoadFunction(pFile, pTGAD, pSurface, CF_8bit, TDT_ARGB, LoopRGBA); in LoadRGBA()
522 bool TGALoadFile(const TCHAR* pszFilename, GX2Surface* pSurface) in TGALoadFile() argument
622 return LoadRGBA(pFile, &tgad, pSurface) == PE_OK; in TGALoadFile()
625 bool TGAFree(GX2Surface* pSurface) in TGAFree() argument
627 return GenericFreeFunction(pSurface) == PE_OK; in TGAFree()