Fix incorrect streamout buffer index in GS + refactor various code (#258)

This commit is contained in:
Herman Semenov 2022-09-17 04:45:18 +03:00 committed by GitHub
parent 4a3d02db55
commit 03f5967408
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 70 additions and 92 deletions

View file

@ -493,17 +493,18 @@ bool LatteMRT::UpdateCurrentFBO()
sint32 colorAttachmentWidth;
sint32 colorAttachmentHeight;
LatteTexture_getSize(colorAttachmentView->baseTexture, &colorAttachmentWidth, &colorAttachmentHeight, nullptr, colorAttachmentView->firstMip);
// set effective size
sint32 effectiveWidth, effectiveHeight;
LatteTexture_getEffectiveSize(colorAttachmentView->baseTexture, &effectiveWidth, &effectiveHeight, nullptr, colorAttachmentView->firstMip);
if( rtEffectiveSize->width == 0 && rtEffectiveSize->height == 0 )
if (rtEffectiveSize->width == 0 && rtEffectiveSize->height == 0)
{
rtEffectiveSize->width = effectiveWidth;
rtEffectiveSize->height = effectiveHeight;
}
else if( rtEffectiveSize->width != effectiveWidth && rtEffectiveSize->height != effectiveHeight )
else if (rtEffectiveSize->width != effectiveWidth && rtEffectiveSize->height != effectiveHeight)
{
#ifndef PUBLIC_RELEASE
forceLog_printf("Color buffer size mismatch (%dx%d). Effective size: %dx%d Real size: %dx%d Mismatching texture: %08x %dx%d fmt %04x", rtEffectiveSize->width, rtEffectiveSize->height, effectiveWidth, effectiveHeight, colorAttachmentView->baseTexture->width, colorAttachmentView->baseTexture->height, colorAttachmentView->baseTexture->physAddress, colorAttachmentView->baseTexture->width, colorAttachmentView->baseTexture->height, (uint32)colorAttachmentView->baseTexture->format);