gl_device: Simplify GLASM setting logic
This commit is contained in:
parent
56c30dd9e0
commit
c9528282d9
@ -172,16 +172,14 @@ Device::Device() {
|
|||||||
// uniform buffers as "push constants"
|
// uniform buffers as "push constants"
|
||||||
has_fast_buffer_sub_data = is_nvidia && !disable_fast_buffer_sub_data;
|
has_fast_buffer_sub_data = is_nvidia && !disable_fast_buffer_sub_data;
|
||||||
|
|
||||||
use_assembly_shaders =
|
shader_backend = Settings::values.shader_backend.GetValue();
|
||||||
Settings::values.shader_backend.GetValue() == 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_gpu_program5 && GLAD_GL_NV_compute_program5 &&
|
||||||
GLAD_GL_NV_transform_feedback2;
|
GLAD_GL_NV_transform_feedback && GLAD_GL_NV_transform_feedback2;
|
||||||
|
if (shader_backend == Settings::ShaderBackend::GLASM && !use_assembly_shaders) {
|
||||||
shader_backend = (Settings::values.shader_backend.GetValue() ==
|
LOG_ERROR(Render_OpenGL, "Assembly shaders enabled but not supported");
|
||||||
Settings::ShaderBackend::GLASM) == use_assembly_shaders
|
shader_backend = Settings::ShaderBackend::GLSL;
|
||||||
? Settings::values.shader_backend.GetValue()
|
}
|
||||||
: Settings::ShaderBackend::GLSL;
|
|
||||||
|
|
||||||
// Completely disable async shaders for now, as it causes graphical glitches
|
// Completely disable async shaders for now, as it causes graphical glitches
|
||||||
use_asynchronous_shaders = false;
|
use_asynchronous_shaders = false;
|
||||||
// Blocks AMD and Intel OpenGL drivers on Windows from using asynchronous shader compilation.
|
// Blocks AMD and Intel OpenGL drivers on Windows from using asynchronous shader compilation.
|
||||||
@ -194,11 +192,6 @@ Device::Device() {
|
|||||||
LOG_INFO(Render_OpenGL, "Renderer_PreciseBug: {}", has_precise_bug);
|
LOG_INFO(Render_OpenGL, "Renderer_PreciseBug: {}", has_precise_bug);
|
||||||
LOG_INFO(Render_OpenGL, "Renderer_BrokenTextureViewFormats: {}",
|
LOG_INFO(Render_OpenGL, "Renderer_BrokenTextureViewFormats: {}",
|
||||||
has_broken_texture_view_formats);
|
has_broken_texture_view_formats);
|
||||||
|
|
||||||
if (shader_backend == Settings::ShaderBackend::GLASM && !use_assembly_shaders) {
|
|
||||||
LOG_ERROR(Render_OpenGL, "Assembly shaders enabled but not supported");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Settings::values.use_asynchronous_shaders.GetValue() && !use_asynchronous_shaders) {
|
if (Settings::values.use_asynchronous_shaders.GetValue() && !use_asynchronous_shaders) {
|
||||||
LOG_WARNING(Render_OpenGL, "Asynchronous shader compilation enabled but not supported");
|
LOG_WARNING(Render_OpenGL, "Asynchronous shader compilation enabled but not supported");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user