glsl/nir: Add and use a gl_nir_link() function

Perform all the NIR linking steps in order.  Change iris and i965 to
use it.  Suggested by Alejandro.

v2: Add gl_nir_linker_options struct.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> [v1]
This commit is contained in:
Caio Marcelo de Oliveira Filho
2019-08-23 06:50:11 -07:00
parent eca8032f20
commit 83fd1e58d8
4 changed files with 32 additions and 15 deletions

View File

@@ -31,6 +31,14 @@ extern "C" {
struct gl_context;
struct gl_shader_program;
struct gl_nir_linker_options {
bool fill_parameters;
};
bool gl_nir_link(struct gl_context *ctx,
struct gl_shader_program *prog,
const struct gl_nir_linker_options *options);
bool gl_nir_link_uniforms(struct gl_context *ctx,
struct gl_shader_program *prog,
bool fill_parameters);