Lines Matching refs:pIn

163     const ADDR2_COMPUTE_HTILE_INFO_INPUT*    pIn,    ///< [in] input structure  in HwlComputeHtileInfo()  argument
167 UINT_32 numPipeTotal = GetPipeNumForMetaAddressing(pIn->hTileFlags.pipeAligned, in HwlComputeHtileInfo()
168 pIn->swizzleMode); in HwlComputeHtileInfo()
170 UINT_32 numRbTotal = pIn->hTileFlags.rbAligned ? m_se * m_rbPerSe : 1; in HwlComputeHtileInfo()
194 UINT_32 widthAmp = (pIn->numMipLevels > 1) ? (totalAmpBits >> 1) : RoundHalf(totalAmpBits); in HwlComputeHtileInfo()
204 ((pIn->numMipLevels > 1) && (metaBlkDimDbg.h == metaBlkDimDbg.w))) in HwlComputeHtileInfo()
220 GetMetaMipInfo(pIn->numMipLevels, &metaBlkDim, FALSE, pOut->pMipInfo, in HwlComputeHtileInfo()
221 pIn->unalignedWidth, pIn->unalignedHeight, pIn->numSlices, in HwlComputeHtileInfo()
243 pOut->baseAlign = Max(pOut->baseAlign, GetBlockSize(pIn->swizzleMode)); in HwlComputeHtileInfo()
246 if ((IsXor(pIn->swizzleMode) == FALSE) && (numPipeTotal > 2)) in HwlComputeHtileInfo()
273 const ADDR2_COMPUTE_CMASK_INFO_INPUT* pIn, ///< [in] input structure in HwlComputeCmaskInfo() argument
280 UINT_32 numPipeTotal = GetPipeNumForMetaAddressing(pIn->cMaskFlags.pipeAligned, in HwlComputeCmaskInfo()
281 pIn->swizzleMode); in HwlComputeCmaskInfo()
283 UINT_32 numRbTotal = pIn->cMaskFlags.rbAligned ? m_se * m_rbPerSe : 1; in HwlComputeCmaskInfo()
330 UINT_32 numMetaBlkX = (pIn->unalignedWidth + metaBlkDim.w - 1) / metaBlkDim.w; in HwlComputeCmaskInfo()
331 UINT_32 numMetaBlkY = (pIn->unalignedHeight + metaBlkDim.h - 1) / metaBlkDim.h; in HwlComputeCmaskInfo()
332 UINT_32 numMetaBlkZ = Max(pIn->numSlices, 1u); in HwlComputeCmaskInfo()
344 pOut->baseAlign = Max(pOut->baseAlign, GetBlockSize(pIn->swizzleMode)); in HwlComputeCmaskInfo()
541 const ADDR2_COMPUTE_DCCINFO_INPUT* pIn, ///< [in] input structure in HwlComputeDccInfo() argument
545 BOOL_32 dataLinear = IsLinear(pIn->swizzleMode); in HwlComputeDccInfo()
546 BOOL_32 metaLinear = pIn->dccKeyFlags.linear; in HwlComputeDccInfo()
547 BOOL_32 pipeAligned = pIn->dccKeyFlags.pipeAligned; in HwlComputeDccInfo()
558 UINT_32 numPipeTotal = GetPipeNumForMetaAddressing(pipeAligned, pIn->swizzleMode); in HwlComputeDccInfo()
566 pOut->dccRamSize = PowTwoAlign((pIn->dataSurfaceSize / 256), pOut->dccRamBaseAlign); in HwlComputeDccInfo()
570 BOOL_32 dataThick = IsThick(pIn->resourceType, pIn->swizzleMode); in HwlComputeDccInfo()
574 UINT_32 numFrags = Max(pIn->numFrags, 1u); in HwlComputeDccInfo()
575 UINT_32 numSlices = Max(pIn->numSlices, 1u); in HwlComputeDccInfo()
581 UINT_32 numRbTotal = pIn->dccKeyFlags.rbAligned ? m_se * m_rbPerSe : 1; in HwlComputeDccInfo()
590 if (numCompressBlkPerMetaBlk > 65536 * pIn->bpp) in HwlComputeDccInfo()
592 numCompressBlkPerMetaBlk = 65536 * pIn->bpp; in HwlComputeDccInfo()
596 Dim3d compressBlkDim = GetDccCompressBlk(pIn->resourceType, pIn->swizzleMode, pIn->bpp); in HwlComputeDccInfo()
602 ((pIn->numMipLevels > 1) && (metaBlkDim.h == metaBlkDim.w))) in HwlComputeDccInfo()
630 GetMetaMipInfo(pIn->numMipLevels, &metaBlkDim, dataThick, pOut->pMipInfo, in HwlComputeDccInfo()
631 pIn->unalignedWidth, pIn->unalignedHeight, numSlices, in HwlComputeDccInfo()
648 pOut->dccRamBaseAlign = Max(pOut->dccRamBaseAlign, GetBlockSize(pIn->swizzleMode)); in HwlComputeDccInfo()
702 const ADDR2_COMPUTE_CMASK_ADDRFROMCOORD_INPUT* pIn, ///< [in] input structure in HwlComputeCmaskAddrFromCoord() argument
707 input.cMaskFlags = pIn->cMaskFlags; in HwlComputeCmaskAddrFromCoord()
708 input.colorFlags = pIn->colorFlags; in HwlComputeCmaskAddrFromCoord()
709 input.unalignedWidth = Max(pIn->unalignedWidth, 1u); in HwlComputeCmaskAddrFromCoord()
710 input.unalignedHeight = Max(pIn->unalignedHeight, 1u); in HwlComputeCmaskAddrFromCoord()
711 input.numSlices = Max(pIn->numSlices, 1u); in HwlComputeCmaskAddrFromCoord()
712 input.swizzleMode = pIn->swizzleMode; in HwlComputeCmaskAddrFromCoord()
713 input.resourceType = pIn->resourceType; in HwlComputeCmaskAddrFromCoord()
722 UINT_32 fmaskBpp = GetFmaskBpp(pIn->numSamples, pIn->numFrags); in HwlComputeCmaskAddrFromCoord()
727 const CoordEq* pMetaEq = GetMetaEquation({0, fmaskElementBytesLog2, 0, pIn->cMaskFlags, in HwlComputeCmaskAddrFromCoord()
728 … Gfx9DataFmask, pIn->swizzleMode, pIn->resourceType, in HwlComputeCmaskAddrFromCoord()
731 UINT_32 xb = pIn->x / output.metaBlkWidth; in HwlComputeCmaskAddrFromCoord()
732 UINT_32 yb = pIn->y / output.metaBlkHeight; in HwlComputeCmaskAddrFromCoord()
733 UINT_32 zb = pIn->slice; in HwlComputeCmaskAddrFromCoord()
739 UINT_64 address = pMetaEq->solve(pIn->x, pIn->y, pIn->slice, 0, blockIndex); in HwlComputeCmaskAddrFromCoord()
745 UINT_32 numPipeBits = GetPipeLog2ForMetaAddressing(pIn->cMaskFlags.pipeAligned, in HwlComputeCmaskAddrFromCoord()
746 pIn->swizzleMode); in HwlComputeCmaskAddrFromCoord()
748 UINT_64 pipeXor = static_cast<UINT_64>(pIn->pipeXor & ((1 << numPipeBits) - 1)); in HwlComputeCmaskAddrFromCoord()
768 const ADDR2_COMPUTE_HTILE_ADDRFROMCOORD_INPUT* pIn, ///< [in] input structure in HwlComputeHtileAddrFromCoord() argument
773 if (pIn->numMipLevels > 1) in HwlComputeHtileAddrFromCoord()
781 input.hTileFlags = pIn->hTileFlags; in HwlComputeHtileAddrFromCoord()
782 input.depthFlags = pIn->depthflags; in HwlComputeHtileAddrFromCoord()
783 input.swizzleMode = pIn->swizzleMode; in HwlComputeHtileAddrFromCoord()
784 input.unalignedWidth = Max(pIn->unalignedWidth, 1u); in HwlComputeHtileAddrFromCoord()
785 input.unalignedHeight = Max(pIn->unalignedHeight, 1u); in HwlComputeHtileAddrFromCoord()
786 input.numSlices = Max(pIn->numSlices, 1u); in HwlComputeHtileAddrFromCoord()
787 input.numMipLevels = Max(pIn->numMipLevels, 1u); in HwlComputeHtileAddrFromCoord()
796 UINT_32 elementBytesLog2 = Log2(pIn->bpp >> 3); in HwlComputeHtileAddrFromCoord()
799 UINT_32 numSamplesLog2 = Log2(pIn->numSamples); in HwlComputeHtileAddrFromCoord()
801 … const CoordEq* pMetaEq = GetMetaEquation({0, elementBytesLog2, numSamplesLog2, pIn->hTileFlags, in HwlComputeHtileAddrFromCoord()
802 … Gfx9DataDepthStencil, pIn->swizzleMode, ADDR_RSRC_TEX_2D, in HwlComputeHtileAddrFromCoord()
805 UINT_32 xb = pIn->x / output.metaBlkWidth; in HwlComputeHtileAddrFromCoord()
806 UINT_32 yb = pIn->y / output.metaBlkHeight; in HwlComputeHtileAddrFromCoord()
807 UINT_32 zb = pIn->slice; in HwlComputeHtileAddrFromCoord()
813 UINT_64 address = pMetaEq->solve(pIn->x, pIn->y, pIn->slice, 0, blockIndex); in HwlComputeHtileAddrFromCoord()
817 UINT_32 numPipeBits = GetPipeLog2ForMetaAddressing(pIn->hTileFlags.pipeAligned, in HwlComputeHtileAddrFromCoord()
818 pIn->swizzleMode); in HwlComputeHtileAddrFromCoord()
820 UINT_64 pipeXor = static_cast<UINT_64>(pIn->pipeXor & ((1 << numPipeBits) - 1)); in HwlComputeHtileAddrFromCoord()
841 const ADDR2_COMPUTE_HTILE_COORDFROMADDR_INPUT* pIn, ///< [in] input structure in HwlComputeHtileCoordFromAddr() argument
846 if (pIn->numMipLevels > 1) in HwlComputeHtileCoordFromAddr()
854 input.hTileFlags = pIn->hTileFlags; in HwlComputeHtileCoordFromAddr()
855 input.swizzleMode = pIn->swizzleMode; in HwlComputeHtileCoordFromAddr()
856 input.unalignedWidth = Max(pIn->unalignedWidth, 1u); in HwlComputeHtileCoordFromAddr()
857 input.unalignedHeight = Max(pIn->unalignedHeight, 1u); in HwlComputeHtileCoordFromAddr()
858 input.numSlices = Max(pIn->numSlices, 1u); in HwlComputeHtileCoordFromAddr()
859 input.numMipLevels = Max(pIn->numMipLevels, 1u); in HwlComputeHtileCoordFromAddr()
868 UINT_32 elementBytesLog2 = Log2(pIn->bpp >> 3); in HwlComputeHtileCoordFromAddr()
871 UINT_32 numSamplesLog2 = Log2(pIn->numSamples); in HwlComputeHtileCoordFromAddr()
873 … const CoordEq* pMetaEq = GetMetaEquation({0, elementBytesLog2, numSamplesLog2, pIn->hTileFlags, in HwlComputeHtileCoordFromAddr()
874 … Gfx9DataDepthStencil, pIn->swizzleMode, ADDR_RSRC_TEX_2D, in HwlComputeHtileCoordFromAddr()
877 UINT_32 numPipeBits = GetPipeLog2ForMetaAddressing(pIn->hTileFlags.pipeAligned, in HwlComputeHtileCoordFromAddr()
878 pIn->swizzleMode); in HwlComputeHtileCoordFromAddr()
880 UINT_64 pipeXor = static_cast<UINT_64>(pIn->pipeXor & ((1 << numPipeBits) - 1)); in HwlComputeHtileCoordFromAddr()
882 UINT_64 nibbleAddress = (pIn->addr ^ (pipeXor << m_pipeInterleaveLog2)) << 1; in HwlComputeHtileCoordFromAddr()
911 const ADDR2_COMPUTE_DCC_ADDRFROMCOORD_INPUT* pIn, in HwlComputeDccAddrFromCoord() argument
916 if ((pIn->numMipLevels > 1) || (pIn->mipId > 1) || pIn->dccKeyFlags.linear) in HwlComputeDccAddrFromCoord()
924 input.dccKeyFlags = pIn->dccKeyFlags; in HwlComputeDccAddrFromCoord()
925 input.colorFlags = pIn->colorFlags; in HwlComputeDccAddrFromCoord()
926 input.swizzleMode = pIn->swizzleMode; in HwlComputeDccAddrFromCoord()
927 input.resourceType = pIn->resourceType; in HwlComputeDccAddrFromCoord()
928 input.bpp = pIn->bpp; in HwlComputeDccAddrFromCoord()
929 input.unalignedWidth = Max(pIn->unalignedWidth, 1u); in HwlComputeDccAddrFromCoord()
930 input.unalignedHeight = Max(pIn->unalignedHeight, 1u); in HwlComputeDccAddrFromCoord()
931 input.numSlices = Max(pIn->numSlices, 1u); in HwlComputeDccAddrFromCoord()
932 input.numFrags = Max(pIn->numFrags, 1u); in HwlComputeDccAddrFromCoord()
933 input.numMipLevels = Max(pIn->numMipLevels, 1u); in HwlComputeDccAddrFromCoord()
942 UINT_32 elementBytesLog2 = Log2(pIn->bpp >> 3); in HwlComputeDccAddrFromCoord()
943 UINT_32 numSamplesLog2 = Log2(pIn->numFrags); in HwlComputeDccAddrFromCoord()
951 …const CoordEq* pMetaEq = GetMetaEquation({pIn->mipId, elementBytesLog2, numSamplesLog2, pIn->dccKe… in HwlComputeDccAddrFromCoord()
952 … Gfx9DataColor, pIn->swizzleMode, pIn->resourceType, in HwlComputeDccAddrFromCoord()
956 UINT_32 xb = pIn->x / output.metaBlkWidth; in HwlComputeDccAddrFromCoord()
957 UINT_32 yb = pIn->y / output.metaBlkHeight; in HwlComputeDccAddrFromCoord()
958 UINT_32 zb = pIn->slice / output.metaBlkDepth; in HwlComputeDccAddrFromCoord()
964 UINT_64 address = pMetaEq->solve(pIn->x, pIn->y, pIn->slice, pIn->sample, blockIndex); in HwlComputeDccAddrFromCoord()
968 UINT_32 numPipeBits = GetPipeLog2ForMetaAddressing(pIn->dccKeyFlags.pipeAligned, in HwlComputeDccAddrFromCoord()
969 pIn->swizzleMode); in HwlComputeDccAddrFromCoord()
971 UINT_64 pipeXor = static_cast<UINT_64>(pIn->pipeXor & ((1 << numPipeBits) - 1)); in HwlComputeDccAddrFromCoord()
2165 const ADDR2_COMPUTE_SURFACE_INFO_INPUT* pIn, in HwlGetEquationIndex() argument
2169 AddrResourceType rsrcType = pIn->resourceType; in HwlGetEquationIndex()
2170 AddrSwizzleMode swMode = pIn->swizzleMode; in HwlGetEquationIndex()
2171 UINT_32 elementBytesLog2 = Log2(pIn->bpp >> 3); in HwlGetEquationIndex()
2184 for (UINT_32 i = 0; i < pIn->numMipLevels; i++) in HwlGetEquationIndex()
2834 const ADDR2_COMPUTE_SURFACE_INFO_INPUT* pIn) const in IsValidDisplaySwizzleMode()
2838 const AddrResourceType resourceType = pIn->resourceType; in IsValidDisplaySwizzleMode()
2840 const AddrSwizzleMode swizzleMode = pIn->swizzleMode; in IsValidDisplaySwizzleMode()
2848 support = (pIn->bpp == 32); in IsValidDisplaySwizzleMode()
2864 support = (pIn->bpp <= 64); in IsValidDisplaySwizzleMode()
2882 support = (pIn->bpp == 64); in IsValidDisplaySwizzleMode()
2893 support = (pIn->bpp <= 64); in IsValidDisplaySwizzleMode()
2920 const ADDR2_COMPUTE_PIPEBANKXOR_INPUT* pIn, in HwlComputePipeBankXor() argument
2923 UINT_32 macroBlockBits = GetBlockSizeLog2(pIn->swizzleMode); in HwlComputePipeBankXor()
2931 const UINT_32 index = pIn->surfIndex & bankMask; in HwlComputePipeBankXor()
2933 const UINT_32 bpp = pIn->flags.fmask ? in HwlComputePipeBankXor()
2934 … GetFmaskBpp(pIn->numSamples, pIn->numFrags) : GetElemLib()->GetBitsPerPixel(pIn->format); in HwlComputePipeBankXor()
2966 const ADDR2_COMPUTE_SLICE_PIPEBANKXOR_INPUT* pIn, in HwlComputeSlicePipeBankXor() argument
2969 UINT_32 macroBlockBits = GetBlockSizeLog2(pIn->swizzleMode); in HwlComputeSlicePipeBankXor()
2973 UINT_32 pipeXor = ReverseBitVector(pIn->slice, pipeBits); in HwlComputeSlicePipeBankXor()
2974 UINT_32 bankXor = ReverseBitVector(pIn->slice >> pipeBits, bankBits); in HwlComputeSlicePipeBankXor()
2976 pOut->pipeBankXor = pIn->basePipeBankXor ^ (pipeXor | (bankXor << pipeBits)); in HwlComputeSlicePipeBankXor()
2993 const ADDR2_COMPUTE_SUBRESOURCE_OFFSET_FORSWIZZLEPATTERN_INPUT* pIn, in HwlComputeSubResourceOffsetForSwizzlePattern() argument
2996 ADDR_ASSERT(IsThin(pIn->resourceType, pIn->swizzleMode)); in HwlComputeSubResourceOffsetForSwizzlePattern()
2998 UINT_32 macroBlockBits = GetBlockSizeLog2(pIn->swizzleMode); in HwlComputeSubResourceOffsetForSwizzlePattern()
3001 UINT_32 pipeXor = ReverseBitVector(pIn->slice, pipeBits); in HwlComputeSubResourceOffsetForSwizzlePattern()
3002 UINT_32 bankXor = ReverseBitVector(pIn->slice >> pipeBits, bankBits); in HwlComputeSubResourceOffsetForSwizzlePattern()
3003 …UINT_32 pipeBankXor = ((pipeXor | (bankXor << pipeBits)) ^ (pIn->pipeBankXor)) << m_pipeInterle… in HwlComputeSubResourceOffsetForSwizzlePattern()
3005 pOut->offset = pIn->slice * pIn->sliceSize + in HwlComputeSubResourceOffsetForSwizzlePattern()
3006 pIn->macroBlockOffset + in HwlComputeSubResourceOffsetForSwizzlePattern()
3007 (pIn->mipTailOffset ^ pipeBankXor) - in HwlComputeSubResourceOffsetForSwizzlePattern()
3024 const ADDR2_COMPUTE_SURFACE_INFO_INPUT* pIn) const in HwlComputeSurfaceInfoSanityCheck()
3028 if ((pIn->bpp > 128) || (pIn->width == 0) || (pIn->numFrags > 8) || (pIn->numSamples > 16)) in HwlComputeSurfaceInfoSanityCheck()
3032 else if ((pIn->swizzleMode >= ADDR_SW_MAX_TYPE) || in HwlComputeSurfaceInfoSanityCheck()
3033 (pIn->resourceType >= ADDR_RSRC_MAX_TYPE)) in HwlComputeSurfaceInfoSanityCheck()
3038 BOOL_32 mipmap = (pIn->numMipLevels > 1); in HwlComputeSurfaceInfoSanityCheck()
3039 BOOL_32 msaa = (pIn->numFrags > 1); in HwlComputeSurfaceInfoSanityCheck()
3041 ADDR2_SURFACE_FLAGS flags = pIn->flags; in HwlComputeSurfaceInfoSanityCheck()
3046 AddrResourceType rsrcType = pIn->resourceType; in HwlComputeSurfaceInfoSanityCheck()
3048 AddrSwizzleMode swizzle = pIn->swizzleMode; in HwlComputeSurfaceInfoSanityCheck()
3058 if ((pIn->numFrags > 1) && in HwlComputeSurfaceInfoSanityCheck()
3059 (GetBlockSize(swizzle) < (m_pipeInterleaveBytes * pIn->numFrags))) in HwlComputeSurfaceInfoSanityCheck()
3089 invalid = (IsValidDisplaySwizzleMode(pIn) == FALSE); in HwlComputeSurfaceInfoSanityCheck()
3098 zbuffer || msaa || (pIn->bpp == 0) || ((pIn->bpp % 8) != 0); in HwlComputeSurfaceInfoSanityCheck()
3127 invalid = zbuffer || (pIn->bpp > 64) || tex3d; in HwlComputeSurfaceInfoSanityCheck()
3155 const ADDR2_GET_PREFERRED_SURF_SETTING_INPUT* pIn, in HwlGetPreferredSurfaceSetting() argument
3197 UINT_32 bpp = pIn->bpp; in HwlGetPreferredSurfaceSetting()
3198 UINT_32 width = pIn->width; in HwlGetPreferredSurfaceSetting()
3199 UINT_32 height = pIn->height; in HwlGetPreferredSurfaceSetting()
3201 if (pIn->format != ADDR_FMT_INVALID) in HwlGetPreferredSurfaceSetting()
3207 bpp = pElemLib->GetBitsPerPixel(pIn->format, in HwlGetPreferredSurfaceSetting()
3222 UINT_32 numSamples = Max(pIn->numSamples, 1u); in HwlGetPreferredSurfaceSetting()
3223 UINT_32 numFrags = (pIn->numFrags == 0) ? numSamples : pIn->numFrags; in HwlGetPreferredSurfaceSetting()
3224 UINT_32 slice = Max(pIn->numSlices, 1u); in HwlGetPreferredSurfaceSetting()
3225 UINT_32 numMipLevels = Max(pIn->numMipLevels, 1u); in HwlGetPreferredSurfaceSetting()
3226 UINT_32 minSizeAlign = NextPow2(pIn->minSizeAlign); in HwlGetPreferredSurfaceSetting()
3228 if (pIn->flags.fmask) in HwlGetPreferredSurfaceSetting()
3238 pOut->resourceType = pIn->resourceType; in HwlGetPreferredSurfaceSetting()
3261 clientPreferredSwSet = pIn->preferredSwSet; in HwlGetPreferredSurfaceSetting()
3269 BOOL_32 prtXor = (pIn->flags.prt || pIn->flags.qbStereo) && (pIn->noXor == FALSE); in HwlGetPreferredSurfaceSetting()
3272 pOut->canXor = (pIn->flags.prt == FALSE) && (pIn->noXor == FALSE); in HwlGetPreferredSurfaceSetting()
3275 if (pIn->flags.fmask || pIn->flags.depth || pIn->flags.stencil) in HwlGetPreferredSurfaceSetting()
3282 if (pIn->flags.depth && pIn->flags.texture) in HwlGetPreferredSurfaceSetting()
3295 else if (ElemLib::IsBlockCompressed(pIn->format)) in HwlGetPreferredSurfaceSetting()
3303 if ((pIn->flags.texture == FALSE) && in HwlGetPreferredSurfaceSetting()
3304 (pIn->forbiddenBlock.macro4KB && pIn->forbiddenBlock.macro64KB)) in HwlGetPreferredSurfaceSetting()
3312 else if (ElemLib::IsMacroPixelPacked(pIn->format)) in HwlGetPreferredSurfaceSetting()
3326 if (pIn->flags.prt) in HwlGetPreferredSurfaceSetting()
3339 else if (pIn->flags.color) in HwlGetPreferredSurfaceSetting()
3356 addrPreferredSwSet.value = ((pIn->flags.display == TRUE) || in HwlGetPreferredSurfaceSetting()
3357 (pIn->flags.overlay == TRUE) || in HwlGetPreferredSurfaceSetting()
3358 (pIn->bpp == 128)) ? AddrSwSetD : AddrSwSetS; in HwlGetPreferredSurfaceSetting()
3377 displayResource = pIn->flags.rotated || pIn->flags.display; in HwlGetPreferredSurfaceSetting()
3381 addrPreferredSwSet.value = pIn->flags.rotated ? AddrSwSetR : AddrSwSetD; in HwlGetPreferredSurfaceSetting()
3383 if (pIn->bpp > 64) in HwlGetPreferredSurfaceSetting()
3389 if (pIn->bpp != 32) in HwlGetPreferredSurfaceSetting()
3402 if (pIn->bpp == 64) in HwlGetPreferredSurfaceSetting()
3475 if (pIn->flags.prt) in HwlGetPreferredSurfaceSetting()
3481 blockSet.value &= ~pIn->forbiddenBlock.value; in HwlGetPreferredSurfaceSetting()
3483 if (pIn->maxAlign > 0) in HwlGetPreferredSurfaceSetting()
3485 if (pIn->maxAlign < GetBlockSize(ADDR_SW_64KB)) in HwlGetPreferredSurfaceSetting()
3490 if (pIn->maxAlign < GetBlockSize(ADDR_SW_4KB)) in HwlGetPreferredSurfaceSetting()
3495 if (pIn->maxAlign < GetBlockSize(ADDR_SW_256B)) in HwlGetPreferredSurfaceSetting()
3594 if (pIn->flags.minimizeAlign) in HwlGetPreferredSurfaceSetting()
3615 else if (pIn->flags.opt4space) in HwlGetPreferredSurfaceSetting()
3726 localIn.flags = pIn->flags; in HwlGetPreferredSurfaceSetting()
3729 localIn.format = pIn->format; in HwlGetPreferredSurfaceSetting()
3763 const ADDR2_COMPUTE_SURFACE_INFO_INPUT* pIn, in ComputeStereoInfo() argument
3770 UINT_32 eqIndex = HwlGetEquationIndex(pIn, pOut); in ComputeStereoInfo()
3774 if (IsXor(pIn->swizzleMode)) in ComputeStereoInfo()
3776 const UINT_32 blkSizeLog2 = GetBlockSizeLog2(pIn->swizzleMode); in ComputeStereoInfo()
3779 const UINT_32 bppLog2 = Log2(pIn->bpp >> 3); in ComputeStereoInfo()
3813 if ((PowTwoAlign(pIn->height, *pHeightAlign) % (*pHeightAlign * 2)) != 0) in ComputeStereoInfo()
3855 const ADDR2_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] input structure in HwlComputeSurfaceInfoTiled() argument
3862 pIn->bpp, in HwlComputeSurfaceInfoTiled()
3863 pIn->numFrags, in HwlComputeSurfaceInfoTiled()
3864 pIn->resourceType, in HwlComputeSurfaceInfoTiled()
3865 pIn->swizzleMode); in HwlComputeSurfaceInfoTiled()
3871 if ((IsTex2d(pIn->resourceType) == TRUE) && in HwlComputeSurfaceInfoTiled()
3872 (pIn->flags.display || pIn->flags.rotated) && in HwlComputeSurfaceInfoTiled()
3873 (pIn->numMipLevels <= 1) && in HwlComputeSurfaceInfoTiled()
3874 (pIn->numSamples <= 1) && in HwlComputeSurfaceInfoTiled()
3875 (pIn->numFrags <= 1)) in HwlComputeSurfaceInfoTiled()
3881 pOut->pitch = PowTwoAlign(pIn->width, pitchAlignInElement); in HwlComputeSurfaceInfoTiled()
3883 if ((pIn->numMipLevels <= 1) && (pIn->pitchInElement > 0)) in HwlComputeSurfaceInfoTiled()
3885 if ((pIn->pitchInElement % pitchAlignInElement) != 0) in HwlComputeSurfaceInfoTiled()
3889 else if (pIn->pitchInElement < pOut->pitch) in HwlComputeSurfaceInfoTiled()
3895 pOut->pitch = pIn->pitchInElement; in HwlComputeSurfaceInfoTiled()
3901 if (pIn->flags.qbStereo) in HwlComputeSurfaceInfoTiled()
3903 returnCode = ComputeStereoInfo(pIn, pOut, &heightAlign); in HwlComputeSurfaceInfoTiled()
3908 pOut->height = PowTwoAlign(pIn->height, pOut->blockHeight); in HwlComputeSurfaceInfoTiled()
3915 pOut->numSlices = PowTwoAlign(pIn->numSlices, pOut->blockSlices); in HwlComputeSurfaceInfoTiled()
3919 pOut->firstMipIdInTail = pIn->numMipLevels; in HwlComputeSurfaceInfoTiled()
3925 if (pIn->numMipLevels > 1) in HwlComputeSurfaceInfoTiled()
3927 pOut->firstMipIdInTail = GetMipChainInfo(pIn->resourceType, in HwlComputeSurfaceInfoTiled()
3928 pIn->swizzleMode, in HwlComputeSurfaceInfoTiled()
3929 pIn->bpp, in HwlComputeSurfaceInfoTiled()
3930 pIn->width, in HwlComputeSurfaceInfoTiled()
3931 pIn->height, in HwlComputeSurfaceInfoTiled()
3932 pIn->numSlices, in HwlComputeSurfaceInfoTiled()
3936 pIn->numMipLevels, in HwlComputeSurfaceInfoTiled()
3939 const UINT_32 endingMipId = Min(pOut->firstMipIdInTail, pIn->numMipLevels - 1); in HwlComputeSurfaceInfoTiled()
3943 const Dim3d tailMaxDim = GetMipTailDim(pIn->resourceType, in HwlComputeSurfaceInfoTiled()
3944 pIn->swizzleMode, in HwlComputeSurfaceInfoTiled()
3952 pOut->numSlices = IsThick(pIn->resourceType, pIn->swizzleMode) ? in HwlComputeSurfaceInfoTiled()
3953 tailMaxDim.d : pIn->numSlices; in HwlComputeSurfaceInfoTiled()
3961 AddrMajorMode majorMode = GetMajorMode(pIn->resourceType, in HwlComputeSurfaceInfoTiled()
3962 pIn->swizzleMode, in HwlComputeSurfaceInfoTiled()
3996 UINT_32 elementBytesLog2 = Log2(pIn->bpp >> 3); in HwlComputeSurfaceInfoTiled()
3998 for (UINT_32 i = 0; i < pIn->numMipLevels; i++) in HwlComputeSurfaceInfoTiled()
4003 mipStartPos = GetMipStartPos(pIn->resourceType, in HwlComputeSurfaceInfoTiled()
4004 pIn->swizzleMode, in HwlComputeSurfaceInfoTiled()
4022 blockIndex << GetBlockSizeLog2(pIn->swizzleMode); in HwlComputeSurfaceInfoTiled()
4033 pOut->pMipInfo[0].depth = IsTex3d(pIn->resourceType)? pOut->numSlices : 1; in HwlComputeSurfaceInfoTiled()
4038 (pIn->bpp >> 3) * pIn->numFrags; in HwlComputeSurfaceInfoTiled()
4040 pOut->baseAlign = HwlComputeSurfaceBaseAlign(pIn->swizzleMode); in HwlComputeSurfaceInfoTiled()
4042 if (pIn->flags.prt) in HwlComputeSurfaceInfoTiled()
4064 const ADDR2_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] input structure in HwlComputeSurfaceInfoLinear() argument
4071 UINT_32 elementBytes = pIn->bpp >> 3; in HwlComputeSurfaceInfoLinear()
4072 const UINT_32 alignment = pIn->flags.prt ? PrtAlignment : 256; in HwlComputeSurfaceInfoLinear()
4074 if (IsTex1d(pIn->resourceType)) in HwlComputeSurfaceInfoLinear()
4076 if (pIn->height > 1) in HwlComputeSurfaceInfoLinear()
4084 pitch = PowTwoAlign(pIn->width, pitchAlignInElement); in HwlComputeSurfaceInfoLinear()
4085 actualHeight = pIn->numMipLevels; in HwlComputeSurfaceInfoLinear()
4087 if (pIn->flags.prt == FALSE) in HwlComputeSurfaceInfoLinear()
4089 returnCode = ApplyCustomizedPitchHeight(pIn, elementBytes, pitchAlignInElement, in HwlComputeSurfaceInfoLinear()
4097 for (UINT_32 i = 0; i < pIn->numMipLevels; i++) in HwlComputeSurfaceInfoLinear()
4110 returnCode = ComputeSurfaceLinearPadding(pIn, &pitch, &actualHeight, pOut->pMipInfo); in HwlComputeSurfaceInfoLinear()
4121 pOut->height = pIn->height; in HwlComputeSurfaceInfoLinear()
4122 pOut->numSlices = pIn->numSlices; in HwlComputeSurfaceInfoLinear()
4126 pOut->epitchIsHeight = (pIn->numMipLevels > 1) ? TRUE : FALSE; in HwlComputeSurfaceInfoLinear()
4129 … pOut->baseAlign = (pIn->swizzleMode == ADDR_SW_LINEAR_GENERAL) ? (pIn->bpp / 8) : alignment; in HwlComputeSurfaceInfoLinear()
4130 … pOut->blockWidth = (pIn->swizzleMode == ADDR_SW_LINEAR_GENERAL) ? 1 : (256 / elementBytes); in HwlComputeSurfaceInfoLinear()
4588 const ADDR2_COMPUTE_SURFACE_ADDRFROMCOORD_INPUT* pIn, ///< [in] input structure in HwlComputeSurfaceAddrFromCoordTiled() argument
4593 localIn.swizzleMode = pIn->swizzleMode; in HwlComputeSurfaceAddrFromCoordTiled()
4594 localIn.flags = pIn->flags; in HwlComputeSurfaceAddrFromCoordTiled()
4595 localIn.resourceType = pIn->resourceType; in HwlComputeSurfaceAddrFromCoordTiled()
4596 localIn.bpp = pIn->bpp; in HwlComputeSurfaceAddrFromCoordTiled()
4597 localIn.width = Max(pIn->unalignedWidth, 1u); in HwlComputeSurfaceAddrFromCoordTiled()
4598 localIn.height = Max(pIn->unalignedHeight, 1u); in HwlComputeSurfaceAddrFromCoordTiled()
4599 localIn.numSlices = Max(pIn->numSlices, 1u); in HwlComputeSurfaceAddrFromCoordTiled()
4600 localIn.numMipLevels = Max(pIn->numMipLevels, 1u); in HwlComputeSurfaceAddrFromCoordTiled()
4601 localIn.numSamples = Max(pIn->numSamples, 1u); in HwlComputeSurfaceAddrFromCoordTiled()
4602 localIn.numFrags = Max(pIn->numFrags, 1u); in HwlComputeSurfaceAddrFromCoordTiled()
4605 localIn.pitchInElement = pIn->pitchInElement; in HwlComputeSurfaceAddrFromCoordTiled()
4612 (IsThin(pIn->resourceType, pIn->swizzleMode) || in HwlComputeSurfaceAddrFromCoordTiled()
4613 IsThick(pIn->resourceType, pIn->swizzleMode)) && in HwlComputeSurfaceAddrFromCoordTiled()
4614 ((pIn->pipeBankXor == 0) || (IsXor(pIn->swizzleMode))); in HwlComputeSurfaceAddrFromCoordTiled()
4618 UINT_32 log2ElementBytes = Log2(pIn->bpp >> 3); in HwlComputeSurfaceAddrFromCoordTiled()
4622 if (pIn->numMipLevels > 1) in HwlComputeSurfaceAddrFromCoordTiled()
4625 ADDR_ASSERT((pIn->numSamples <= 1) && (pIn->numFrags<= 1)); in HwlComputeSurfaceAddrFromCoordTiled()
4627 mipStartPos = GetMipStartPos(pIn->resourceType, in HwlComputeSurfaceAddrFromCoordTiled()
4628 pIn->swizzleMode, in HwlComputeSurfaceAddrFromCoordTiled()
4635 pIn->mipId, in HwlComputeSurfaceAddrFromCoordTiled()
4646 if (IsThin(pIn->resourceType, pIn->swizzleMode)) in HwlComputeSurfaceAddrFromCoordTiled()
4649 UINT_32 log2blkSize = GetBlockSizeLog2(pIn->swizzleMode); in HwlComputeSurfaceAddrFromCoordTiled()
4651 if (IsZOrderSwizzle(pIn->swizzleMode)) in HwlComputeSurfaceAddrFromCoordTiled()
4658 UINT_32 lowBitsValue = MortonGen2d(pIn->y, pIn->x, mortBits); in HwlComputeSurfaceAddrFromCoordTiled()
4661 MortonGen2d(pIn->x >> mortBits, pIn->y >> mortBits, 9) << totalLowBits; in HwlComputeSurfaceAddrFromCoordTiled()
4667 blockOffset = MortonGen2d(pIn->y, pIn->x, 13); in HwlComputeSurfaceAddrFromCoordTiled()
4671 if (pIn->numSamples > 1) in HwlComputeSurfaceAddrFromCoordTiled()
4673 blockOffset *= pIn->numSamples; in HwlComputeSurfaceAddrFromCoordTiled()
4674 blockOffset |= pIn->sample; in HwlComputeSurfaceAddrFromCoordTiled()
4683 UINT_32 microBlockOffset = ComputeSurface2DMicroBlockOffset(pIn); in HwlComputeSurfaceAddrFromCoordTiled()
4691 MortonGen2d((pIn->x / microBlockDim.w), (pIn->y / microBlockDim.h), 12) << 8; in HwlComputeSurfaceAddrFromCoordTiled()
4694 UINT_32 sampleStart = log2blkSize - Log2(pIn->numSamples); in HwlComputeSurfaceAddrFromCoordTiled()
4696 if (IsNonPrtXor(pIn->swizzleMode)) in HwlComputeSurfaceAddrFromCoordTiled()
4699 blockOffset = blockOffset ^ (pIn->sample << sampleStart); in HwlComputeSurfaceAddrFromCoordTiled()
4706 blockOffset |= (pIn->sample << sampleStart); in HwlComputeSurfaceAddrFromCoordTiled()
4711 if (IsXor(pIn->swizzleMode)) in HwlComputeSurfaceAddrFromCoordTiled()
4714 if (IsPrt(pIn->swizzleMode)) in HwlComputeSurfaceAddrFromCoordTiled()
4749 if (IsNonPrtXor(pIn->swizzleMode) && (pIn->numSamples <= 1)) in HwlComputeSurfaceAddrFromCoordTiled()
4752 blockOffset ^= (ReverseBitVector(pIn->slice, pipeBits) << m_pipeInterleaveLog2); in HwlComputeSurfaceAddrFromCoordTiled()
4753 blockOffset ^= (ReverseBitVector(pIn->slice >> pipeBits, bankBits) << in HwlComputeSurfaceAddrFromCoordTiled()
4757 returnCode = ApplyCustomerPipeBankXor(pIn->swizzleMode, pIn->pipeBankXor, in HwlComputeSurfaceAddrFromCoordTiled()
4766 (pIn->slice + mipStartPos.d) * sliceSizeInMacroBlock + in HwlComputeSurfaceAddrFromCoordTiled()
4767 ((pIn->y / localOut.blockHeight) + mipStartPos.h) * pitchInMacroBlock + in HwlComputeSurfaceAddrFromCoordTiled()
4768 ((pIn->x / localOut.blockWidth) + mipStartPos.w); in HwlComputeSurfaceAddrFromCoordTiled()
4771 GetBlockSizeLog2(pIn->swizzleMode)); in HwlComputeSurfaceAddrFromCoordTiled()
4777 UINT_32 log2blkSize = GetBlockSizeLog2(pIn->swizzleMode); in HwlComputeSurfaceAddrFromCoordTiled()
4781 UINT_32 blockOffset = MortonGen3d((pIn->x / microBlockDim.w), in HwlComputeSurfaceAddrFromCoordTiled()
4782 (pIn->y / microBlockDim.h), in HwlComputeSurfaceAddrFromCoordTiled()
4783 (pIn->slice / microBlockDim.d), in HwlComputeSurfaceAddrFromCoordTiled()
4787 blockOffset |= ComputeSurface3DMicroBlockOffset(pIn); in HwlComputeSurfaceAddrFromCoordTiled()
4789 if (IsXor(pIn->swizzleMode)) in HwlComputeSurfaceAddrFromCoordTiled()
4792 if (IsPrt(pIn->swizzleMode)) in HwlComputeSurfaceAddrFromCoordTiled()
4826 returnCode = ApplyCustomerPipeBankXor(pIn->swizzleMode, pIn->pipeBankXor, in HwlComputeSurfaceAddrFromCoordTiled()
4831 UINT_32 xb = pIn->x / localOut.blockWidth + mipStartPos.w; in HwlComputeSurfaceAddrFromCoordTiled()
4832 UINT_32 yb = pIn->y / localOut.blockHeight + mipStartPos.h; in HwlComputeSurfaceAddrFromCoordTiled()
4833 UINT_32 zb = pIn->slice / localOut.blockSlices + + mipStartPos.d; in HwlComputeSurfaceAddrFromCoordTiled()
4863 const ADDR2_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] input srtucture in ComputeSurfaceLinearPadding() argument
4871 UINT_32 elementBytes = pIn->bpp >> 3; in ComputeSurfaceLinearPadding()
4874 if (pIn->swizzleMode == ADDR_SW_LINEAR_GENERAL) in ComputeSurfaceLinearPadding()
4876 ADDR_ASSERT(pIn->numMipLevels <= 1); in ComputeSurfaceLinearPadding()
4877 ADDR_ASSERT(pIn->numSlices <= 1); in ComputeSurfaceLinearPadding()
4885 UINT_32 mipChainWidth = PowTwoAlign(pIn->width, pitchAlignInElement); in ComputeSurfaceLinearPadding()
4886 UINT_32 slice0PaddedHeight = pIn->height; in ComputeSurfaceLinearPadding()
4888 returnCode = ApplyCustomizedPitchHeight(pIn, elementBytes, pitchAlignInElement, in ComputeSurfaceLinearPadding()
4894 UINT_32 mipHeight = pIn->height; in ComputeSurfaceLinearPadding()
4896 for (UINT_32 i = 0; i < pIn->numMipLevels; i++) in ComputeSurfaceLinearPadding()
4912 *pSlice0PaddedHeight = (pIn->numMipLevels > 1) ? mipChainHeight : slice0PaddedHeight; in ComputeSurfaceLinearPadding()