diff options
author | Jason Ekstrand <[email protected]> | 2019-03-04 15:55:19 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-03-06 17:24:57 +0000 |
commit | e02959f442ed6546fb632a153ffc32848968038f (patch) | |
tree | 7704af3591371b6f8a83765e1cc598c1e1c4e25a /src/mesa/drivers | |
parent | f25ca337b40f1d5846ac146f00fba77b1610be37 (diff) |
nir/lower_doubles: Inline functions directly in lower_doubles
Instead of trusting the caller to already have created a softfp64
function shader and added all its functions to our shader, we simply
take the softfp64 shader as an argument and do the function inlining
ouselves. This means that there's no more nasty functions lying around
that the caller needs to worry about cleaning up.
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index f40d2c33549..ffb49c35cd4 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -112,14 +112,14 @@ brw_create_nir(struct brw_context *brw, nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); + nir_shader *softfp64 = NULL; if ((options->lower_doubles_options & nir_lower_fp64_full_software) && nir->info.uses_64bit) { - nir_shader *fp64 = glsl_float64_funcs_to_nir(ctx, options); - ralloc_steal(ralloc_parent(nir), fp64); - exec_list_append(&nir->functions, &fp64->functions); + softfp64 = glsl_float64_funcs_to_nir(ctx, options); + ralloc_steal(ralloc_parent(nir), softfp64); } - nir = brw_preprocess_nir(brw->screen->compiler, nir); + nir = brw_preprocess_nir(brw->screen->compiler, nir, softfp64); NIR_PASS_V(nir, brw_nir_lower_image_load_store, devinfo); |