Skip to content

Commit

Permalink
Merge pull request #389 from paulbartrum/fix-unitialized-field
Browse files Browse the repository at this point in the history
[BUG] Fix uninitialized D3D12_RESOURCE_BARRIER flags field
  • Loading branch information
tannergooding authored Mar 22, 2024
2 parents c447c93 + 7702e7d commit e681ccb
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static D3D12_RESOURCE_BARRIER InitAliasing(ID3D12Resource* pResourceBefor
Unsafe.SkipInit(out D3D12_RESOURCE_BARRIER result);

result.Type = D3D12_RESOURCE_BARRIER_TYPE_ALIASING;
result.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
result.Aliasing.pResourceBefore = pResourceBefore;
result.Aliasing.pResourceAfter = pResourceAfter;

Expand All @@ -48,6 +49,7 @@ public static D3D12_RESOURCE_BARRIER InitUAV(ID3D12Resource* pResource)
Unsafe.SkipInit(out D3D12_RESOURCE_BARRIER result);

result.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV;
result.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
result.Anonymous.UAV.pResource = pResource;

return result;
Expand Down

0 comments on commit e681ccb

Please sign in to comment.