diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-08 00:07:45 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-08 00:08:42 +0100 |
commit | 3ab05146985f09994fcb98388b22a31f9fbea5bf (patch) | |
tree | ee10483797b6c4fd8bdbdff6f458c5074f5dbb62 /src/video_core | |
parent | gl_shader_decompiler: Add safe fallbacks when ARB_shader_ballot is not available (diff) | |
download | yuzu-3ab05146985f09994fcb98388b22a31f9fbea5bf.tar yuzu-3ab05146985f09994fcb98388b22a31f9fbea5bf.tar.gz yuzu-3ab05146985f09994fcb98388b22a31f9fbea5bf.tar.bz2 yuzu-3ab05146985f09994fcb98388b22a31f9fbea5bf.tar.lz yuzu-3ab05146985f09994fcb98388b22a31f9fbea5bf.tar.xz yuzu-3ab05146985f09994fcb98388b22a31f9fbea5bf.tar.zst yuzu-3ab05146985f09994fcb98388b22a31f9fbea5bf.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index a287b5ee1..21bac11ec 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -275,17 +275,25 @@ CachedProgram BuildShader(const Device& device, u64 unique_identifier, ProgramTy std::string source = fmt::format(R"(// {} #version 430 core #extension GL_ARB_separate_shader_objects : enable -#extension GL_ARB_shader_ballot : enable -#extension GL_ARB_shader_viewport_layer_array : enable -#extension GL_EXT_shader_image_load_formatted : enable -#extension GL_NV_gpu_shader5 : enable -#extension GL_NV_shader_thread_group : enable -#extension GL_NV_shader_thread_shuffle : enable )", GetShaderId(unique_identifier, program_type)); if (is_compute) { source += "#extension GL_ARB_compute_variable_group_size : require\n"; } + if (device.HasShaderBallot()) { + source += "#extension GL_ARB_shader_ballot : require\n"; + } + if (device.HasVertexViewportLayer()) { + source += "#extension GL_ARB_shader_viewport_layer_array : require\n"; + } + if (device.HasImageLoadFormatted()) { + source += "#extension GL_EXT_shader_image_load_formatted : require\n"; + } + if (device.HasWarpIntrinsics()) { + source += "#extension GL_NV_gpu_shader5 : require\n" + "#extension GL_NV_shader_thread_group : require\n" + "#extension GL_NV_shader_thread_shuffle : require\n"; + } source += '\n'; if (!is_compute) { |