Skip to content

Commit

Permalink
Lambda must not be static, as it captures 'this'
Browse files Browse the repository at this point in the history
  • Loading branch information
sultim-t committed Jul 31, 2023
1 parent cfe64bc commit 394ac8e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Source/VulkanDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1008,10 +1008,10 @@ void RTGL1::VulkanDevice::UploadMeshPrimitive( const RgMeshInfo* pMesh,
Dev_TryBreak( pPrimitive->pTextureName, false );


static auto logDebugStat = [ this ]( Devmode::DebugPrimMode mode,
const RgMeshInfo* mesh,
const RgMeshPrimitiveInfo& prim,
UploadResult rtResult = UploadResult::Fail ) {
auto logDebugStat = [ this ]( Devmode::DebugPrimMode mode,
const RgMeshInfo* mesh,
const RgMeshPrimitiveInfo& prim,
UploadResult rtResult = UploadResult::Fail ) {
if( !devmode || devmode->primitivesTableMode != mode )
{
return;
Expand Down Expand Up @@ -1058,8 +1058,8 @@ void RTGL1::VulkanDevice::UploadMeshPrimitive( const RgMeshInfo* pMesh,
}
};

auto uploadPrimitive_Core = [ this ]( const RgMeshInfo& mesh,
const RgMeshPrimitiveInfo& prim ) {
auto uploadPrimitive_Core = [ this, &logDebugStat ]( const RgMeshInfo& mesh,
const RgMeshPrimitiveInfo& prim ) {
assert( !pnext::find< RgMeshPrimitiveForceRasterizedEXT >( &prim ) );

if( IsRasterized( mesh, prim ) )
Expand Down Expand Up @@ -1193,7 +1193,7 @@ void RTGL1::VulkanDevice::UploadMeshPrimitive( const RgMeshInfo* pMesh,
uploadPrimitive_Core( mesh, modified );
};

auto uploadPrimitive_FilterSwapchained = [ this, &uploadPrimitive_WithMeta ](
auto uploadPrimitive_FilterSwapchained = [ this, &uploadPrimitive_WithMeta, &logDebugStat ](
const RgMeshInfo* mesh,
const RgMeshPrimitiveInfo& prim ) {
if( mesh )
Expand Down

0 comments on commit 394ac8e

Please sign in to comment.