Skip to content

Commit

Permalink
gi: minor bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pablode committed Dec 15, 2024
1 parent 5901cc4 commit 911bdd9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/gi/impl/Gi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1636,12 +1636,12 @@ namespace gtl
auto& oldAov = oldAovs[i];
auto& newAov = newAovs[i];

if (oldAov.aovId != newAov.aovId || oldAov.renderBuffer != newAov.renderBuffer)
if (oldAov.aovId != newAov.aovId)
{
aovsChanged = true;
break;
}
if (memcmp(oldAov.clearValue, newAov.clearValue, GI_MAX_AOV_COMP_SIZE) == 0)
if (memcmp(oldAov.clearValue, newAov.clearValue, GI_MAX_AOV_COMP_SIZE) != 0)
{
aovDefaultsChanged = true;
}
Expand All @@ -1653,7 +1653,7 @@ namespace gtl
}
if (aovsChanged || aovDefaultsChanged)
{
flags |= GiSceneDirtyFlags::DirtyAovBindingDefaults;
flags |= GiSceneDirtyFlags::DirtyAovBindingDefaults | GiSceneDirtyFlags::DirtyFramebuffer;
}

if (memcmp(&a.camera, &b.camera, sizeof(GiCameraDesc)) != 0 ||
Expand Down Expand Up @@ -1778,10 +1778,10 @@ namespace gtl
for (uint32_t i = 0; i < params.aovBindings.size(); i++)
{
const GiAovBinding& binding = params.aovBindings[i];
memcpy(&defaultsData[i * GI_MAX_AOV_COMP_SIZE], &binding.clearValue[0], GI_MAX_AOV_COMP_SIZE);
memcpy(&defaultsData[int(binding.aovId) * GI_MAX_AOV_COMP_SIZE], &binding.clearValue[0], GI_MAX_AOV_COMP_SIZE);
}

if (!s_stager->stageToBuffer(&defaultsData[0], conservativeSize, scene->aovDefaultValues, 0) ||
if (!s_stager->stageToBuffer(&defaultsData[0], defaultsData.size(), scene->aovDefaultValues) ||
!s_stager->flush())
{
GB_ERROR("failed to stage AOV default values");
Expand Down

0 comments on commit 911bdd9

Please sign in to comment.