D3D11: Fix potential invalid VAO access in dispatch.

In some instances running a dispatch call could lead to accessing an
invalid VAO pointer. This seemed to be tied to switching Contexts.
Fix the bug by invalidating the cache pointers on Context switch. Note
that it seems this bug can only affect ES 3.1+ Contexts.

Bug: angleproject:3349
Change-Id: Ib712bcc29215b3fd1c8b7eb0cbd70dea649b3cfc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1594289
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Jamie Madill 2019-05-04 10:00:02 -04:00 коммит произвёл Commit Bot
Родитель 62742f9e39
Коммит 6f0c5b8dd5
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1701,6 +1701,11 @@ angle::Result StateManager11::onMakeCurrent(const gl::Context *context)
}
}
// Reset the cache objects.
mProgramD3D = nullptr;
mVertexArray11 = nullptr;
mFramebuffer11 = nullptr;
return angle::Result::Continue;
}