diff --git a/src/core/gpu_hw_d3d11.cpp b/src/core/gpu_hw_d3d11.cpp index 84ac69b56..9a7358bf3 100644 --- a/src/core/gpu_hw_d3d11.cpp +++ b/src/core/gpu_hw_d3d11.cpp @@ -362,9 +362,10 @@ bool GPU_HW_D3D11::CompileShaders() if (!vs_bytecode) return false; - const HRESULT hr = m_device->CreateInputLayout(attributes.data(), static_cast(attributes.size()), - vs_bytecode->GetBufferPointer(), vs_bytecode->GetBufferSize(), - m_batch_input_layout.ReleaseAndGetAddressOf()); + const UINT num_attributes = static_cast(attributes.size()) - (m_using_uv_limits ? 0 : 1); + const HRESULT hr = + m_device->CreateInputLayout(attributes.data(), num_attributes, vs_bytecode->GetBufferPointer(), + vs_bytecode->GetBufferSize(), m_batch_input_layout.ReleaseAndGetAddressOf()); if (FAILED(hr)) { Log_ErrorPrintf("CreateInputLayout failed: 0x%08X", hr);