- Remove old TODO
- Additional comments - Detect compressed volume texture test case
This commit is contained in:
parent
fc430320ac
commit
755bb73b1c
|
@ -6047,6 +6047,10 @@ void CreateHostResource(xbox::X_D3DResource *pResource, DWORD D3DUsage, int iTex
|
||||||
// Each row contains a 4x4 pixel DXT blocks, instead of single pixels
|
// Each row contains a 4x4 pixel DXT blocks, instead of single pixels
|
||||||
// So divide by 4 to get the number of rows
|
// So divide by 4 to get the number of rows
|
||||||
numRows = (numRows + 3) / 4;
|
numRows = (numRows + 3) / 4;
|
||||||
|
|
||||||
|
if (dwDepth > 1) {
|
||||||
|
LOG_TEST_CASE("Unsupported compressed volume texture");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD mip2dSize = dwMipRowPitch * numRows; // the size of one layer of the mip slice
|
DWORD mip2dSize = dwMipRowPitch * numRows; // the size of one layer of the mip slice
|
||||||
|
@ -6128,7 +6132,7 @@ void CreateHostResource(xbox::X_D3DResource *pResource, DWORD D3DUsage, int iTex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bSwizzled) {
|
else if (bSwizzled) {
|
||||||
// First we need to unswizzle the texture data
|
// Unswizzle the texture data into the host texture
|
||||||
EmuUnswizzleBox(
|
EmuUnswizzleBox(
|
||||||
pSrc, pxMipWidth, pxMipHeight, pxMipDepth,
|
pSrc, pxMipWidth, pxMipHeight, pxMipDepth,
|
||||||
dwBPP,
|
dwBPP,
|
||||||
|
@ -6139,25 +6143,12 @@ void CreateHostResource(xbox::X_D3DResource *pResource, DWORD D3DUsage, int iTex
|
||||||
memcpy(pDst, pSrc, mip2dSize);
|
memcpy(pDst, pSrc, mip2dSize);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* TODO : // Let DirectX convert the surface (including palette formats) :
|
if (dwDstRowPitch == dwMipRowPitch) {
|
||||||
if(!EmuXBFormatRequiresConversionToARGB) {
|
// Source and destination layout match - simple copy
|
||||||
D3DXLoadSurfaceFromMemory(
|
|
||||||
GetHostSurface(pResource),
|
|
||||||
nullptr, // no destination palette
|
|
||||||
&destRect,
|
|
||||||
pSrc, // Source buffer
|
|
||||||
dwMipPitch, // Source pitch
|
|
||||||
g_pXbox_Palette_Data,
|
|
||||||
&SrcRect,
|
|
||||||
D3DX_DEFAULT, // D3DX_FILTER_NONE,
|
|
||||||
0 // No ColorKey?
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
*/
|
|
||||||
if ((dwDstRowPitch == dwMipRowPitch) && (dwMipRowPitch == pxMipWidth * dwBPP)) {
|
|
||||||
memcpy(pDst, pSrc, mip2dSize);
|
memcpy(pDst, pSrc, mip2dSize);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// Copy accounting for different row pitch
|
||||||
for (DWORD v = 0; v < pxMipHeight; v++) {
|
for (DWORD v = 0; v < pxMipHeight; v++) {
|
||||||
memcpy(pDst, pSrc, pxMipWidth * dwBPP);
|
memcpy(pDst, pSrc, pxMipWidth * dwBPP);
|
||||||
pDst += dwDstRowPitch;
|
pDst += dwDstRowPitch;
|
||||||
|
|
Loading…
Reference in New Issue