Skip to content

Commit

Permalink
[Graphics] - Fixed a bug where creating a constant buffer as a stagin…
Browse files Browse the repository at this point in the history
…g buffer would fail.
  • Loading branch information
Tape-Worm committed Apr 29, 2022
1 parent a65cfaa commit 80f82e3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private void Initialize(ReadOnlySpan<byte> initialData)
{
SizeInBytes = _info.SizeInBytes,
Usage = (D3D11.ResourceUsage)_info.Usage,
BindFlags = D3D11.BindFlags.ConstantBuffer,
BindFlags = _info.Usage != ResourceUsage.Staging ? D3D11.BindFlags.ConstantBuffer : D3D11.BindFlags.None,
OptionFlags = D3D11.ResourceOptionFlags.None,
CpuAccessFlags = cpuFlags,
StructureByteStride = 0
Expand Down

0 comments on commit 80f82e3

Please sign in to comment.