Created
February 28, 2019 23:02
-
-
Save mstange/119f415b7ab912fc343a18ba3d0b9f76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gfx/wr/webrender/src/device/gl.rs b/gfx/wr/webrender/src/device/gl.rs | |
--- a/gfx/wr/webrender/src/device/gl.rs | |
+++ b/gfx/wr/webrender/src/device/gl.rs | |
@@ -1281,30 +1281,30 @@ impl Device { | |
name: &str, | |
shader_type: gl::GLenum, | |
source: &String, | |
) -> Result<gl::GLuint, ShaderError> { | |
debug!("compile {}", name); | |
let id = gl.create_shader(shader_type); | |
gl.shader_source(id, &[source.as_bytes()]); | |
gl.compile_shader(id); | |
- let log = gl.get_shader_info_log(id); | |
let mut status = [0]; | |
unsafe { | |
gl.get_shader_iv(id, gl::COMPILE_STATUS, &mut status); | |
} | |
if status[0] == 0 { | |
+ let log = gl.get_shader_info_log(id); | |
error!("Failed to compile shader: {}\n{}", name, log); | |
#[cfg(debug_assertions)] | |
Self::print_shader_errors(source, &log); | |
Err(ShaderError::Compilation(name.to_string(), log)) | |
} else { | |
- if !log.is_empty() { | |
- warn!("Warnings detected on shader: {}\n{}", name, log); | |
- } | |
+ // if !log.is_empty() { | |
+ // warn!("Warnings detected on shader: {}\n{}", name, log); | |
+ // } | |
Ok(id) | |
} | |
} | |
pub fn begin_frame(&mut self) -> GpuFrameId { | |
debug_assert!(!self.inside_frame); | |
self.inside_frame = true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment