[d3d9] Fix for missing restriction check in ProcessVertices

Co-authored-by: aroztkow <aneta.roztkowska@intel.com>
This commit is contained in:
Adam Jereczek 2022-09-28 16:40:41 +02:00 committed by GitHub
parent 49854dbfba
commit b2ad25755a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -2620,9 +2620,18 @@ namespace dxvk {
DWORD Flags) {
D3D9DeviceLock lock = LockDevice();
if (unlikely(pDestBuffer == nullptr || pVertexDecl == nullptr))
if (unlikely(pDestBuffer == nullptr))
return D3DERR_INVALIDCALL;
// When vertex shader 3.0 or above is set as the current vertex shader,
// the output vertex declaration must be present.
if (UseProgrammableVS()) {
const auto& programInfo = GetCommonShader(m_state.vertexShader)->GetInfo();
if (unlikely(programInfo.majorVersion() >= 3) && (pVertexDecl == nullptr))
return D3DERR_INVALIDCALL;
}
if (!SupportsSWVP()) {
static bool s_errorShown = false;