i965: Compile the fp64 program based on nir options
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 5 Mar 2019 04:54:44 +0000 (22:54 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Wed, 6 Mar 2019 17:24:57 +0000 (17:24 +0000)
Instead of looking the devinfo directly, look at the lowering options we
provided to NIR.  This is more accurate as it's now checking for "do we
need full software lowering" rather than a hardware bit.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_program.c

index 5dedca5a7194f5729f134b431a1852d7379d7386..5b7c1afe55a3a49d90a9cd404625d2d3915cecda 100644 (file)
@@ -158,7 +158,8 @@ brw_create_nir(struct brw_context *brw,
 
    nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
 
-   if (!devinfo->has_64bit_types && nir->info.uses_64bit) {
+   if ((options->lower_doubles_options & nir_lower_fp64_full_software) &&
+       nir->info.uses_64bit) {
       nir_shader *fp64 = compile_fp64_funcs(ctx, options, ralloc_parent(nir), stage);
 
       nir_validate_shader(fp64, "fp64");