GLShaderInterface: Fix SSBO using the ubo mask
This might head lead to a crash when a shader uses both ubo and ssbo.
This commit is contained in:
@@ -319,6 +319,7 @@ GLShaderInterface::GLShaderInterface(GLuint program)
|
||||
input->binding = input->location = binding;
|
||||
|
||||
name_buffer_offset += this->set_input_name(input, name, name_len);
|
||||
enabled_ssbo_mask_ |= (input->binding != -1) ? (1lu << input->binding) : 0lu;
|
||||
}
|
||||
|
||||
/* Builtin Uniforms */
|
||||
@@ -476,7 +477,7 @@ GLShaderInterface::GLShaderInterface(GLuint program, const shader::ShaderCreateI
|
||||
if (res.bind_type == ShaderCreateInfo::Resource::BindType::STORAGE_BUFFER) {
|
||||
copy_input_name(input, res.storagebuf.name, name_buffer_, name_buffer_offset);
|
||||
input->location = input->binding = res.slot;
|
||||
enabled_ubo_mask_ |= (1 << input->binding);
|
||||
enabled_ssbo_mask_ |= (1 << input->binding);
|
||||
input++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user