[Mesa-dev] [PATCH] i965: stop counting double outputs twice

Iago Toral itoral at igalia.com
Fri Jul 22 12:52:00 UTC 2016


This fixes the crash (and the test), however, it seems to break at
least two other fp64 tests that go from pass to fail:

spec/arb_gpu_shader_fp64/execution/explicit-location-gs-fs-vs
spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations

Iago

On Fri, 2016-07-22 at 22:28 +1000, Timothy Arceri wrote:
> Since 7f53fead5c we treat every location as using all
> four components so there is no need for handling doubles
> as a special case.
> 
> This fixes a crash in GL45-CTS.enhanced_layouts.varying_locations
> where the outputs array would overflow when a double was stored at
> the max varying location.
> 
> Cc: Iago Toral <itoral at igalia.com>
> ---
>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> index 50d73eb..5d26018 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> @@ -67,14 +67,9 @@ fs_visitor::nir_setup_single_output_varying(fs_reg
> *reg,
>        }
>     } else {
>        assert(type->is_scalar() || type->is_vector());
> -      unsigned num_iter = 1;
> -      if (type->is_double())
> -         num_iter = 2;
> -      for (unsigned count = 0; count < num_iter; count++) {
> -         this->outputs[*location] = *reg;
> -         *reg = offset(*reg, bld, 4);
> -         (*location)++;
> -      }
> +      this->outputs[*location] = *reg;
> +      *reg = offset(*reg, bld, 4);
> +      (*location)++;
>     }
>  }
>  


More information about the mesa-dev mailing list