GLES: Move some vendor bug checks to Draw.

This commit is contained in:
Unknown W. Brackets
2018-12-23 20:27:22 -08:00
parent 9a3de5cb1c
commit adeca2c3ba
15 changed files with 32 additions and 21 deletions
+4 -2
View File
@@ -2,6 +2,7 @@
#include "GLRenderManager.h"
#include "gfx_es2/gpu_features.h"
#include "thin3d/thin3d.h"
#include "thread/threadutil.h"
#include "base/logging.h"
#include "GPU/GPUState.h"
@@ -89,12 +90,13 @@ GLRenderManager::~GLRenderManager() {
_assert_(deleter_.IsEmpty());
}
void GLRenderManager::ThreadStart() {
void GLRenderManager::ThreadStart(Draw::DrawContext *draw) {
queueRunner_.CreateDeviceObjects();
threadFrame_ = threadInitFrame_;
renderThreadId = std::this_thread::get_id();
bool mapBuffers = (gl_extensions.bugs & BUG_ANY_MAP_BUFFER_RANGE_SLOW) == 0;
// Don't save draw, we don't want any thread safety confusion.
bool mapBuffers = draw->GetBugs().Has(Draw::Bugs::ANY_MAP_BUFFER_RANGE_SLOW);
bool hasBufferStorage = gl_extensions.ARB_buffer_storage || gl_extensions.EXT_buffer_storage;
if (!gl_extensions.VersionGEThan(3, 0, 0) && gl_extensions.IsGLES && !hasBufferStorage) {
// Force disable if it wouldn't work anyway.