reflect: stop adding null bytes to uniform names
This commit is contained in:
parent
1e0727f89d
commit
77b957bf5e
|
@ -146,7 +146,6 @@ impl CompileShader<GLSL> for CrossReflect<targets::Glsl> {
|
|||
self.fragment
|
||||
.set_decoration(res.id, Decoration::Binding, DecorationValue::unset())?;
|
||||
let mut name = res.name.to_string();
|
||||
name.push('\0');
|
||||
texture_fixups.push((name, binding));
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ impl<T: GLInterface> FilterChainImpl<T> {
|
|||
let offset = meta.offset();
|
||||
|
||||
if offset.ubo.is_some() {
|
||||
let vert_name = format!("LIBRA_UBO_VERTEX_INSTANCE.{}\0", meta.id());
|
||||
let frag_name = format!("LIBRA_UBO_FRAGMENT_INSTANCE.{}\0", meta.id());
|
||||
let vert_name = format!("LIBRA_UBO_VERTEX_INSTANCE.{}", meta.id());
|
||||
let frag_name = format!("LIBRA_UBO_FRAGMENT_INSTANCE.{}", meta.id());
|
||||
unsafe {
|
||||
let vertex = gl::GetUniformLocation(pipeline, vert_name.as_ptr().cast());
|
||||
let fragment = gl::GetUniformLocation(pipeline, frag_name.as_ptr().cast());
|
||||
|
@ -74,8 +74,8 @@ impl<T: GLInterface> FilterChainImpl<T> {
|
|||
}
|
||||
|
||||
if offset.push.is_some() {
|
||||
let vert_name = format!("LIBRA_PUSH_VERTEX_INSTANCE.{}\0", meta.id());
|
||||
let frag_name = format!("LIBRA_PUSH_FRAGMENT_INSTANCE.{}\0", meta.id());
|
||||
let vert_name = format!("LIBRA_PUSH_VERTEX_INSTANCE.{}", meta.id());
|
||||
let frag_name = format!("LIBRA_PUSH_FRAGMENT_INSTANCE.{}", meta.id());
|
||||
unsafe {
|
||||
let vertex = gl::GetUniformLocation(pipeline, vert_name.as_ptr().cast());
|
||||
let fragment = gl::GetUniformLocation(pipeline, frag_name.as_ptr().cast());
|
||||
|
|
Loading…
Reference in a new issue