MCPcopy Create free account
hub / github.com/aliasIsolation/aliasIsolation / createConstantBuffer

Function createConstantBuffer

src/dll/post.cpp:57–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57static ID3D11Buffer *createConstantBuffer(unsigned sizeBytes)
58{
59 ZoneScopedN(__FUNCTION__);
60
61 // Fill in a buffer description.
62 D3D11_BUFFER_DESC cbDesc = {};
63 cbDesc.ByteWidth = sizeBytes;
64 cbDesc.Usage = D3D11_USAGE_DYNAMIC;
65 cbDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
66 cbDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
67
68 // Create the buffer.
69 ID3D11Buffer *res = nullptr;
70 DX_CHECK(g_device->CreateBuffer(&cbDesc, nullptr, &res));
71
72 return res;
73}
74
75static void updateConstantBuffer(ID3D11DeviceContext *context, ID3D11Buffer *constantBuffer, void *data,
76 unsigned sizeBytes)

Callers 2

modifySharpenPassFunction · 0.85
caOnDrawFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected