summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-06-07 07:52:23 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-07-21 16:56:54 +0200
commitd146dd9d123a999e40307a93403239b81b04bffc (patch)
tree6d338ad871fa37b47f00938773d5e27195325897 /src/video_core/renderer_opengl
parentconfiguration: Use IDs to sort holds (diff)
downloadyuzu-d146dd9d123a999e40307a93403239b81b04bffc.tar
yuzu-d146dd9d123a999e40307a93403239b81b04bffc.tar.gz
yuzu-d146dd9d123a999e40307a93403239b81b04bffc.tar.bz2
yuzu-d146dd9d123a999e40307a93403239b81b04bffc.tar.lz
yuzu-d146dd9d123a999e40307a93403239b81b04bffc.tar.xz
yuzu-d146dd9d123a999e40307a93403239b81b04bffc.tar.zst
yuzu-d146dd9d123a999e40307a93403239b81b04bffc.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_compute_pipeline.cpp6
-rw-r--r--src/video_core/renderer_opengl/gl_device.cpp8
-rw-r--r--src/video_core/renderer_opengl/gl_graphics_pipeline.cpp6
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp12
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp4
5 files changed, 18 insertions, 18 deletions
diff --git a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp
index f9ca55c36..d70501860 100644
--- a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp
+++ b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp
@@ -34,13 +34,13 @@ ComputePipeline::ComputePipeline(const Device& device, TextureCache& texture_cac
: texture_cache{texture_cache_}, buffer_cache{buffer_cache_},
program_manager{program_manager_}, info{info_} {
switch (device.GetShaderBackend()) {
- case Settings::ShaderBackend::GLSL:
+ case Settings::ShaderBackend::Glsl:
source_program = CreateProgram(code, GL_COMPUTE_SHADER);
break;
- case Settings::ShaderBackend::GLASM:
+ case Settings::ShaderBackend::Glasm:
assembly_program = CompileProgram(code, GL_COMPUTE_PROGRAM_NV);
break;
- case Settings::ShaderBackend::SPIRV:
+ case Settings::ShaderBackend::SpirV:
source_program = CreateProgram(code_v, GL_COMPUTE_SHADER);
break;
}
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp
index 33e63c17d..ee140c9c2 100644
--- a/src/video_core/renderer_opengl/gl_device.cpp
+++ b/src/video_core/renderer_opengl/gl_device.cpp
@@ -177,15 +177,15 @@ Device::Device(Core::Frontend::EmuWindow& emu_window) {
has_fast_buffer_sub_data = is_nvidia && !disable_fast_buffer_sub_data;
shader_backend = Settings::values.shader_backend.GetValue();
- use_assembly_shaders = shader_backend == Settings::ShaderBackend::GLASM &&
+ use_assembly_shaders = shader_backend == Settings::ShaderBackend::Glasm &&
GLAD_GL_NV_gpu_program5 && GLAD_GL_NV_compute_program5 &&
GLAD_GL_NV_transform_feedback && GLAD_GL_NV_transform_feedback2;
- if (shader_backend == Settings::ShaderBackend::GLASM && !use_assembly_shaders) {
+ if (shader_backend == Settings::ShaderBackend::Glasm && !use_assembly_shaders) {
LOG_ERROR(Render_OpenGL, "Assembly shaders enabled but not supported");
- shader_backend = Settings::ShaderBackend::GLSL;
+ shader_backend = Settings::ShaderBackend::Glsl;
}
- if (shader_backend == Settings::ShaderBackend::GLSL && is_nvidia) {
+ if (shader_backend == Settings::ShaderBackend::Glsl && is_nvidia) {
const std::string_view driver_version = version.substr(13);
const int version_major =
std::atoi(driver_version.substr(0, driver_version.find(".")).data());
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
index 71f720c63..f822fa856 100644
--- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
+++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
@@ -236,18 +236,18 @@ GraphicsPipeline::GraphicsPipeline(const Device& device, TextureCache& texture_c
force_context_flush](ShaderContext::Context*) mutable {
for (size_t stage = 0; stage < 5; ++stage) {
switch (backend) {
- case Settings::ShaderBackend::GLSL:
+ case Settings::ShaderBackend::Glsl:
if (!sources_[stage].empty()) {
source_programs[stage] = CreateProgram(sources_[stage], Stage(stage));
}
break;
- case Settings::ShaderBackend::GLASM:
+ case Settings::ShaderBackend::Glasm:
if (!sources_[stage].empty()) {
assembly_programs[stage] =
CompileProgram(sources_[stage], AssemblyStage(stage));
}
break;
- case Settings::ShaderBackend::SPIRV:
+ case Settings::ShaderBackend::SpirV:
if (!sources_spirv_[stage].empty()) {
source_programs[stage] = CreateProgram(sources_spirv_[stage], Stage(stage));
}
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index 7e1d7f92e..618cb6354 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -522,14 +522,14 @@ std::unique_ptr<GraphicsPipeline> ShaderCache::CreateGraphicsPipeline(
const auto runtime_info{
MakeRuntimeInfo(key, program, previous_program, glasm_use_storage_buffers, use_glasm)};
switch (device.GetShaderBackend()) {
- case Settings::ShaderBackend::GLSL:
+ case Settings::ShaderBackend::Glsl:
ConvertLegacyToGeneric(program, runtime_info);
sources[stage_index] = EmitGLSL(profile, runtime_info, program, binding);
break;
- case Settings::ShaderBackend::GLASM:
+ case Settings::ShaderBackend::Glasm:
sources[stage_index] = EmitGLASM(profile, runtime_info, program, binding);
break;
- case Settings::ShaderBackend::SPIRV:
+ case Settings::ShaderBackend::SpirV:
ConvertLegacyToGeneric(program, runtime_info);
sources_spirv[stage_index] = EmitSPIRV(profile, runtime_info, program, binding);
break;
@@ -582,13 +582,13 @@ std::unique_ptr<ComputePipeline> ShaderCache::CreateComputePipeline(
std::string code{};
std::vector<u32> code_spirv;
switch (device.GetShaderBackend()) {
- case Settings::ShaderBackend::GLSL:
+ case Settings::ShaderBackend::Glsl:
code = EmitGLSL(profile, program);
break;
- case Settings::ShaderBackend::GLASM:
+ case Settings::ShaderBackend::Glasm:
code = EmitGLASM(profile, info, program);
break;
- case Settings::ShaderBackend::SPIRV:
+ case Settings::ShaderBackend::SpirV:
code_spirv = EmitSPIRV(profile, program);
break;
}
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index 38ae12d8e..9cafd2983 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -232,7 +232,7 @@ void ApplySwizzle(GLuint handle, PixelFormat format, std::array<SwizzleSource, 4
[[nodiscard]] bool CanBeAccelerated(const TextureCacheRuntime& runtime,
const VideoCommon::ImageInfo& info) {
if (IsPixelFormatASTC(info.format) && info.size.depth == 1 && !runtime.HasNativeASTC()) {
- return Settings::values.accelerate_astc.GetValue() == Settings::AstcDecodeMode::GPU &&
+ return Settings::values.accelerate_astc.GetValue() == Settings::AstcDecodeMode::Gpu &&
Settings::values.astc_recompression.GetValue() ==
Settings::AstcRecompression::Uncompressed;
}
@@ -267,7 +267,7 @@ void ApplySwizzle(GLuint handle, PixelFormat format, std::array<SwizzleSource, 4
const VideoCommon::ImageInfo& info) {
if (IsPixelFormatASTC(info.format) && !runtime.HasNativeASTC()) {
return Settings::values.accelerate_astc.GetValue() ==
- Settings::AstcDecodeMode::CPUAsynchronous;
+ Settings::AstcDecodeMode::CpuAsynchronous;
}
return false;
}