diff --git a/Windows/EmuThread.cpp b/Windows/EmuThread.cpp index 2617ed00c4..36dd44c34d 100644 --- a/Windows/EmuThread.cpp +++ b/Windows/EmuThread.cpp @@ -72,9 +72,9 @@ void EmuThread_Stop() { Core_Stop(); Core_WaitInactive(800); emuThread.join(); - if (useRenderThread) { - renderThread.join(); - } + if (useRenderThread) { + renderThread.join(); + } PostMessage(MainWindow::GetHWND(), MainWindow::WM_USER_UPDATE_UI, 0, 0); } diff --git a/ext/native/thin3d/GLQueueRunner.cpp b/ext/native/thin3d/GLQueueRunner.cpp index 45e14ad164..fd8286511a 100644 --- a/ext/native/thin3d/GLQueueRunner.cpp +++ b/ext/native/thin3d/GLQueueRunner.cpp @@ -134,13 +134,12 @@ void GLQueueRunner::RunInitSteps(const std::vector &steps) { } } } - } break; + } case GLRInitStepType::CREATE_SHADER: { GLuint shader = glCreateShader(step.create_shader.stage); step.create_shader.shader->shader = shader; - // language_ = language; const char *code = step.create_shader.code; glShaderSource(shader, 1, &code, nullptr); delete[] code; @@ -667,7 +666,7 @@ void GLQueueRunner::PerformRenderPass(const GLRStep &step) { } } attrMask = layout->semanticsMask_; - for (int i = 0; i < layout->entries.size(); i++) { + for (size_t i = 0; i < layout->entries.size(); i++) { auto &entry = layout->entries[i]; glVertexAttribPointer(entry.location, entry.count, entry.type, entry.normalized, entry.stride, (const void *)(c.bindVertexBuffer.offset + entry.offset)); } @@ -826,6 +825,7 @@ void GLQueueRunner::PerformCopy(const GLRStep &step) { dstTex = dst->color_texture; break; case GL_DEPTH_BUFFER_BIT: + // TODO: Support depth copies. _assert_msg_(G3D, false, "Depth copies not yet supported - soon"); target = GL_RENDERBUFFER; /* @@ -1101,4 +1101,4 @@ GLRFramebuffer::~GLRFramebuffer() { } glDeleteTextures(1, &color_texture); -} \ No newline at end of file +} diff --git a/ext/native/thin3d/GLRenderManager.h b/ext/native/thin3d/GLRenderManager.h index 6d0e44f0ca..22e5679258 100644 --- a/ext/native/thin3d/GLRenderManager.h +++ b/ext/native/thin3d/GLRenderManager.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include #include @@ -101,7 +101,7 @@ public: } return loc; } - std::map uniformCache_; + std::unordered_map uniformCache_; }; class GLRTexture { diff --git a/ext/native/thin3d/thin3d_gl.cpp b/ext/native/thin3d/thin3d_gl.cpp index 22721ed468..83ae2c484f 100644 --- a/ext/native/thin3d/thin3d_gl.cpp +++ b/ext/native/thin3d/thin3d_gl.cpp @@ -237,7 +237,7 @@ public: ~OpenGLShaderModule() { if (shader_) - render_->DeleteShader(shader_); + render_->DeleteShader(shader_); } bool Compile(GLRenderManager *render, ShaderLanguage language, const uint8_t *data, size_t dataSize); @@ -1036,7 +1036,8 @@ OpenGLInputLayout::~OpenGLInputLayout() { void OpenGLInputLayout::Compile(const InputLayoutDesc &desc) { int semMask = 0; - // This is only accurate if there's only one stream. But whatever, for now. + // TODO: This is only accurate if there's only one stream. But whatever, for now we + // never use multiple streams anyway. stride = (GLsizei)desc.bindings[0].stride; std::vector entries;