Merge pull request #2131 from jpark37/input-layout-error
libobs-d3d11: Fix null input layout rebuild
This commit is contained in:
commit
92e1d5365d
@ -178,10 +178,13 @@ void gs_vertex_shader::Rebuild(ID3D11Device *dev)
|
||||
if (FAILED(hr))
|
||||
throw HRError("Failed to create vertex shader", hr);
|
||||
|
||||
hr = dev->CreateInputLayout(layoutData.data(), (UINT)layoutData.size(),
|
||||
data.data(), data.size(), &layout);
|
||||
if (FAILED(hr))
|
||||
throw HRError("Failed to create input layout", hr);
|
||||
const UINT layoutSize = (UINT)layoutData.size();
|
||||
if (layoutSize > 0) {
|
||||
hr = dev->CreateInputLayout(layoutData.data(), layoutSize,
|
||||
data.data(), data.size(), &layout);
|
||||
if (FAILED(hr))
|
||||
throw HRError("Failed to create input layout", hr);
|
||||
}
|
||||
|
||||
if (constantSize) {
|
||||
hr = dev->CreateBuffer(&bd, NULL, &constants);
|
||||
|
Loading…
x
Reference in New Issue
Block a user