externals: Upgrade glad to latest version
* Also change some mentions to OpenGL 3.3 to 4.3
This commit is contained in:
parent
7bcf753a21
commit
12f84e18dc
9 changed files with 1682 additions and 24459 deletions
|
@ -462,12 +462,6 @@ void ShaderProgramManager::ApplyTo(OpenGLState& state) {
|
|||
|
||||
void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading,
|
||||
const VideoCore::DiskResourceLoadCallback& callback) {
|
||||
if (!GLAD_GL_ARB_get_program_binary && !GLES) {
|
||||
LOG_ERROR(Render_OpenGL,
|
||||
"Cannot load disk cache as ARB_get_program_binary is not supported!");
|
||||
return;
|
||||
}
|
||||
|
||||
auto& disk_cache = impl->disk_cache;
|
||||
const auto transferable = disk_cache.LoadTransferable();
|
||||
if (!transferable) {
|
||||
|
|
|
@ -1234,7 +1234,7 @@ static void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum
|
|||
VideoCore::ResultStatus RendererOpenGL::Init() {
|
||||
#ifndef ANDROID
|
||||
if (!gladLoadGL()) {
|
||||
return VideoCore::ResultStatus::ErrorBelowGL33;
|
||||
return VideoCore::ResultStatus::ErrorBelowGL43;
|
||||
}
|
||||
|
||||
// Qualcomm has some spammy info messages that are marked as errors but not important
|
||||
|
@ -1245,9 +1245,9 @@ VideoCore::ResultStatus RendererOpenGL::Init() {
|
|||
}
|
||||
#endif
|
||||
|
||||
const char* gl_version{reinterpret_cast<char const*>(glGetString(GL_VERSION))};
|
||||
const char* gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))};
|
||||
const char* gpu_model{reinterpret_cast<char const*>(glGetString(GL_RENDERER))};
|
||||
const std::string_view gl_version{reinterpret_cast<char const*>(glGetString(GL_VERSION))};
|
||||
const std::string_view gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))};
|
||||
const std::string_view gpu_model{reinterpret_cast<char const*>(glGetString(GL_RENDERER))};
|
||||
|
||||
LOG_INFO(Render_OpenGL, "GL_VERSION: {}", gl_version);
|
||||
LOG_INFO(Render_OpenGL, "GL_VENDOR: {}", gpu_vendor);
|
||||
|
@ -1259,12 +1259,12 @@ VideoCore::ResultStatus RendererOpenGL::Init() {
|
|||
telemetry_session.AddField(user_system, "GPU_Model", std::string(gpu_model));
|
||||
telemetry_session.AddField(user_system, "GPU_OpenGL_Version", std::string(gl_version));
|
||||
|
||||
if (!strcmp(gpu_vendor, "GDI Generic")) {
|
||||
if (gpu_vendor == "GDI Generic") {
|
||||
return VideoCore::ResultStatus::ErrorGenericDrivers;
|
||||
}
|
||||
|
||||
if (!(GLAD_GL_VERSION_3_3 || GLAD_GL_ES_VERSION_3_1)) {
|
||||
return VideoCore::ResultStatus::ErrorBelowGL33;
|
||||
if (!(GLAD_GL_VERSION_4_3 || GLAD_GL_ES_VERSION_3_1)) {
|
||||
return VideoCore::ResultStatus::ErrorBelowGL43;
|
||||
}
|
||||
|
||||
InitOpenGLObjects();
|
||||
|
|
|
@ -90,15 +90,9 @@ void Anime4kUltrafast::Filter(const OGLTexture& src_tex, Common::Rectangle<u32>
|
|||
state.Apply();
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, texture.tex.handle);
|
||||
if (GL_ARB_texture_storage) {
|
||||
glTexStorage2D(GL_TEXTURE_2D, 1, internal_format,
|
||||
src_rect.GetWidth() * internal_scale_factor,
|
||||
src_rect.GetHeight() * internal_scale_factor);
|
||||
} else {
|
||||
glTexImage2D(
|
||||
GL_TEXTURE_2D, 0, internal_format, src_rect.GetWidth() * internal_scale_factor,
|
||||
src_rect.GetHeight() * internal_scale_factor, 0, format, GL_HALF_FLOAT, nullptr);
|
||||
}
|
||||
glTexStorage2D(GL_TEXTURE_2D, 1, internal_format,
|
||||
src_rect.GetWidth() * internal_scale_factor,
|
||||
src_rect.GetHeight() * internal_scale_factor);
|
||||
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
|
||||
texture.tex.handle, 0);
|
||||
return texture;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <atomic>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
#include "core/frontend/emu_window.h"
|
||||
|
||||
namespace Frontend {
|
||||
|
@ -49,7 +50,7 @@ extern Memory::MemorySystem* g_memory;
|
|||
enum class ResultStatus {
|
||||
Success,
|
||||
ErrorGenericDrivers,
|
||||
ErrorBelowGL33,
|
||||
ErrorBelowGL43,
|
||||
};
|
||||
|
||||
/// Initialize the video core
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue