diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.cpp | 9 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 38497678a..1d1581f49 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp | |||
| @@ -35,6 +35,7 @@ Device::Device(std::nullptr_t) { | |||
| 35 | 35 | ||
| 36 | bool Device::TestVariableAoffi() { | 36 | bool Device::TestVariableAoffi() { |
| 37 | const GLchar* AOFFI_TEST = R"(#version 430 core | 37 | const GLchar* AOFFI_TEST = R"(#version 430 core |
| 38 | // This is a unit test, please ignore me on apitrace bug reports. | ||
| 38 | uniform sampler2D tex; | 39 | uniform sampler2D tex; |
| 39 | uniform ivec2 variable_offset; | 40 | uniform ivec2 variable_offset; |
| 40 | void main() { | 41 | void main() { |
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 7ee1c99c0..d66252224 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -170,7 +170,8 @@ GLShader::ProgramResult CreateProgram(const Device& device, Maxwell::ShaderProgr | |||
| 170 | CachedProgram SpecializeShader(const std::string& code, const GLShader::ShaderEntries& entries, | 170 | CachedProgram SpecializeShader(const std::string& code, const GLShader::ShaderEntries& entries, |
| 171 | Maxwell::ShaderProgram program_type, BaseBindings base_bindings, | 171 | Maxwell::ShaderProgram program_type, BaseBindings base_bindings, |
| 172 | GLenum primitive_mode, bool hint_retrievable = false) { | 172 | GLenum primitive_mode, bool hint_retrievable = false) { |
| 173 | std::string source = "#version 430 core\n"; | 173 | std::string source = "#version 430 core\n" |
| 174 | "#extension GL_ARB_separate_shader_objects : enable\n\n"; | ||
| 174 | source += fmt::format("#define EMULATION_UBO_BINDING {}\n", base_bindings.cbuf++); | 175 | source += fmt::format("#define EMULATION_UBO_BINDING {}\n", base_bindings.cbuf++); |
| 175 | 176 | ||
| 176 | for (const auto& cbuf : entries.const_buffers) { | 177 | for (const auto& cbuf : entries.const_buffers) { |
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 7ab0b4553..d2bb705a9 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp | |||
| @@ -19,8 +19,7 @@ static constexpr u32 PROGRAM_OFFSET{10}; | |||
| 19 | ProgramResult GenerateVertexShader(const Device& device, const ShaderSetup& setup) { | 19 | ProgramResult GenerateVertexShader(const Device& device, const ShaderSetup& setup) { |
| 20 | const std::string id = fmt::format("{:016x}", setup.program.unique_identifier); | 20 | const std::string id = fmt::format("{:016x}", setup.program.unique_identifier); |
| 21 | 21 | ||
| 22 | std::string out = "#extension GL_ARB_separate_shader_objects : enable\n\n"; | 22 | std::string out = "// Shader Unique Id: VS" + id + "\n\n"; |
| 23 | out += "// Shader Unique Id: VS" + id + "\n\n"; | ||
| 24 | out += GetCommonDeclarations(); | 23 | out += GetCommonDeclarations(); |
| 25 | 24 | ||
| 26 | out += R"( | 25 | out += R"( |
| @@ -82,8 +81,7 @@ void main() { | |||
| 82 | ProgramResult GenerateGeometryShader(const Device& device, const ShaderSetup& setup) { | 81 | ProgramResult GenerateGeometryShader(const Device& device, const ShaderSetup& setup) { |
| 83 | const std::string id = fmt::format("{:016x}", setup.program.unique_identifier); | 82 | const std::string id = fmt::format("{:016x}", setup.program.unique_identifier); |
| 84 | 83 | ||
| 85 | std::string out = "#extension GL_ARB_separate_shader_objects : enable\n\n"; | 84 | std::string out = "// Shader Unique Id: GS" + id + "\n\n"; |
| 86 | out += "// Shader Unique Id: GS" + id + "\n\n"; | ||
| 87 | out += GetCommonDeclarations(); | 85 | out += GetCommonDeclarations(); |
| 88 | 86 | ||
| 89 | out += R"( | 87 | out += R"( |
| @@ -113,8 +111,7 @@ void main() { | |||
| 113 | ProgramResult GenerateFragmentShader(const Device& device, const ShaderSetup& setup) { | 111 | ProgramResult GenerateFragmentShader(const Device& device, const ShaderSetup& setup) { |
| 114 | const std::string id = fmt::format("{:016x}", setup.program.unique_identifier); | 112 | const std::string id = fmt::format("{:016x}", setup.program.unique_identifier); |
| 115 | 113 | ||
| 116 | std::string out = "#extension GL_ARB_separate_shader_objects : enable\n\n"; | 114 | std::string out = "// Shader Unique Id: FS" + id + "\n\n"; |
| 117 | out += "// Shader Unique Id: FS" + id + "\n\n"; | ||
| 118 | out += GetCommonDeclarations(); | 115 | out += GetCommonDeclarations(); |
| 119 | 116 | ||
| 120 | out += R"( | 117 | out += R"( |