diff --git a/src/util/opengl_device.cpp b/src/util/opengl_device.cpp index 302052587..2bb6e785e 100644 --- a/src/util/opengl_device.cpp +++ b/src/util/opengl_device.cpp @@ -220,8 +220,7 @@ void OpenGLDevice::PushDebugGroup(const char* fmt, ...) va_start(ap, fmt); const std::string buf(StringUtil::StdStringFromFormatV(fmt, ap)); va_end(ap); - if (!buf.empty()) - glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, static_cast(buf.size()), buf.c_str()); + glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, static_cast(buf.size()), buf.c_str()); #endif } diff --git a/src/util/opengl_pipeline.cpp b/src/util/opengl_pipeline.cpp index f9f1f993c..7d85553b7 100644 --- a/src/util/opengl_pipeline.cpp +++ b/src/util/opengl_pipeline.cpp @@ -362,7 +362,7 @@ void OpenGLDevice::PostLinkProgram(const GPUPipeline::GraphicsConfig& plconfig, glUniform1i(location, i); } - glUseProgram(m_current_pipeline ? m_current_pipeline->GetProgram() : 0); + glUseProgram(m_last_program); } } @@ -722,6 +722,8 @@ bool OpenGLDevice::ReadPipelineCache(const std::string& filename) } OpenGLPipeline::ProgramCacheItem pitem; + pitem.program_id = 0; + pitem.reference_count = 0; pitem.file_format = entry.format; pitem.file_offset = entry.offset; pitem.file_uncompressed_size = entry.uncompressed_size;