diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program.c | 11 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program.h | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index a502b8e084f..7f69977e204 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -64,7 +64,7 @@ brw_nir_lower_uniforms(nir_shader *nir, bool is_scalar) nir_shader * brw_create_nir(struct brw_context *brw, const struct gl_shader_program *shader_prog, - const struct gl_program *prog, + struct gl_program *prog, gl_shader_stage stage, bool is_scalar) { @@ -107,6 +107,15 @@ brw_create_nir(struct brw_context *brw, nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); + /* nir_shader may have been cloned so make sure shader_info is in sync */ + if (nir->info != &prog->info) { + const char *name = prog->info.name; + const char *label = prog->info.label; + prog->info = *nir->info; + prog->info.name = name; + prog->info.label = label; + } + if (shader_prog) { NIR_PASS_V(nir, nir_lower_samplers, shader_prog); NIR_PASS_V(nir, nir_lower_atomics, shader_prog); diff --git a/src/mesa/drivers/dri/i965/brw_program.h b/src/mesa/drivers/dri/i965/brw_program.h index 43bc6254345..6eda165e875 100644 --- a/src/mesa/drivers/dri/i965/brw_program.h +++ b/src/mesa/drivers/dri/i965/brw_program.h @@ -34,7 +34,7 @@ struct brw_context; struct nir_shader *brw_create_nir(struct brw_context *brw, const struct gl_shader_program *shader_prog, - const struct gl_program *prog, + struct gl_program *prog, gl_shader_stage stage, bool is_scalar); |