GPU: Removes GPU_shader_get_builtin_ssbo

Simplify the API. Use hardcoded ssbo location instead.
This commit is contained in:
2023-02-12 23:04:04 +01:00
parent 164f591033
commit 173a8f4ac9
7 changed files with 6 additions and 90 deletions

View File

@@ -371,13 +371,6 @@ GLShaderInterface::GLShaderInterface(GLuint program)
builtin_blocks_[u] = (block != nullptr) ? block->binding : -1;
}
/* Builtin Storage Buffers */
for (int32_t u_int = 0; u_int < GPU_NUM_STORAGE_BUFFERS; u_int++) {
GPUStorageBufferBuiltin u = static_cast<GPUStorageBufferBuiltin>(u_int);
const ShaderInput *block = this->ssbo_get(builtin_storage_block_name(u));
builtin_buffers_[u] = (block != nullptr) ? block->binding : -1;
}
MEM_freeN(uniforms_from_blocks);
/* Resize name buffer to save some memory. */
@@ -550,13 +543,6 @@ GLShaderInterface::GLShaderInterface(GLuint program, const shader::ShaderCreateI
builtin_blocks_[u] = (block != nullptr) ? block->binding : -1;
}
/* Builtin Storage Buffers */
for (int32_t u_int = 0; u_int < GPU_NUM_STORAGE_BUFFERS; u_int++) {
GPUStorageBufferBuiltin u = static_cast<GPUStorageBufferBuiltin>(u_int);
const ShaderInput *block = this->ssbo_get(builtin_storage_block_name(u));
builtin_buffers_[u] = (block != nullptr) ? block->binding : -1;
}
this->sort_inputs();
// this->debug_print();