@@ -170,7 +170,7 @@ void LatteTexture_UnregisterTextureMemoryOccupancy(LatteTexture* texture)
170
170
}
171
171
172
172
// calculate the actually accessed data range
173
- // the resulting range is an estimate and may be smaller than the actual slice size (but not larger)
173
+ // the resulting range is an estimate and may be smaller than the actual slice size (but not larger)
174
174
void LatteTexture_EstimateMipSliceAccessedDataRange (LatteTexture* texture, sint32 sliceIndex, sint32 mipIndex, LatteTextureSliceMipInfo* sliceMipInfo)
175
175
{
176
176
uint32 estAddrStart;
@@ -222,7 +222,7 @@ void LatteTexture_InitSliceAndMipInfo(LatteTexture* texture)
222
222
LatteAddrLib::AddrSurfaceInfo_OUT surfaceInfo;
223
223
LatteAddrLib::GX2CalculateSurfaceInfo (texture->format , texture->width , texture->height , texture->depth , texture->dim , Latte::MakeGX2TileMode (texture->tileMode ), 0 , mipIndex, &surfaceInfo);
224
224
sliceMipInfo->tileMode = surfaceInfo.hwTileMode ;
225
-
225
+
226
226
if (mipIndex == 0 )
227
227
sliceMipInfo->pitch = texture->pitch ; // for the base level, use the pitch value configured in hardware
228
228
else
@@ -352,6 +352,7 @@ void LatteTexture_CopySlice(LatteTexture* srcTexture, sint32 srcSlice, sint32 sr
352
352
if (srcTexture->isDepth != dstTexture->isDepth )
353
353
{
354
354
g_renderer->surfaceCopy_copySurfaceWithFormatConversion (srcTexture, srcMip, srcSlice, dstTexture, dstMip, dstSlice, width, height);
355
+ throw std::runtime_error (" 1" );
355
356
return ;
356
357
}
357
358
// rescale copy size
@@ -384,6 +385,7 @@ void LatteTexture_CopySlice(LatteTexture* srcTexture, sint32 srcSlice, sint32 sr
384
385
cemuLog_log (LogType::Force, " Source: {:08x} origResolution {:4}/{:4} effectiveResolution {:4}/{:4} fmt {:04x} mipIndex {} ratioW/H: {:.4}/{:.4}" , srcTexture->physAddress , srcTexture->width , srcTexture->height , effectiveWidth_src, effectiveHeight_src, (uint32)srcTexture->format , srcMip, ratioWidth_src, ratioHeight_src);
385
386
cemuLog_log (LogType::Force, " Destination: {:08x} origResolution {:4}/{:4} effectiveResolution {:4}/{:4} fmt {:04x} mipIndex {} ratioW/H: {:.4}/{:.4}" , dstTexture->physAddress , dstTexture->width , dstTexture->height , effectiveWidth_dst, effectiveHeight_dst, (uint32)dstTexture->format , dstMip, ratioWidth_dst, ratioHeight_dst);
386
387
}
388
+ throw std::runtime_error (" 2" );
387
389
// cemuLog_logDebug(LogType::Force, "If these textures are not meant to share data you can ignore this");
388
390
return ;
389
391
}
@@ -877,7 +879,7 @@ VIEWCOMPATIBILITY LatteTexture_CanTextureBeRepresentedAsView(LatteTexture* baseT
877
879
// check pitch
878
880
if (sliceMipInfo->pitch != pitch)
879
881
continue ;
880
- // check all slices
882
+ // check all slices
881
883
if (LatteAddrLib::TM_IsThickAndMacroTiled (baseTexture->tileMode ))
882
884
continue ; // todo - check only every 4th slice?
883
885
for (sint32 s=0 ; s<baseTexture->GetMipDepth (m); s++)
@@ -978,7 +980,7 @@ LatteTextureView* LatteTexture_CreateMapping(MPTR physAddr, MPTR physMipAddr, si
978
980
}
979
981
// note: When creating an existing texture, we only allow mip and slice expansion at the end
980
982
cemu_assert_debug (depth);
981
-
983
+
982
984
cemu_assert_debug (!(depth > 1 && dimBase == Latte::E_DIM::DIM_2D));
983
985
cemu_assert_debug (!(numSlice > 1 && dimView == Latte::E_DIM::DIM_2D));
984
986
// todo, depth and numSlice are redundant
0 commit comments