intel/compiler: fix first_component for 64-bit types on vertex inputs
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 19 Jan 2018 08:17:06 +0000 (09:17 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Wed, 14 Feb 2018 11:00:14 +0000 (12:00 +0100)
Divide it by two as we do for other stages. This is because the
component layout qualifier is always in 32-bit units.

Fixes issues in a new CTS test (still WIP):
KHR-GL45.enhanced_layouts.varying_double_components

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/intel/compiler/brw_fs_nir.cpp

index 0d775649303daae6cdcbb75213a9f5a5885a5cb3..7a6346a4b5d4bd008e760baece940da71fad12f9 100644 (file)
@@ -2420,6 +2420,9 @@ fs_visitor::nir_emit_vs_intrinsic(const fs_builder &bld,
       assert(const_offset && "Indirect input loads not allowed");
       src = offset(src, bld, const_offset->u32[0]);
 
+      if (type_sz(type) == 8)
+         first_component /= 2;
+
       for (unsigned j = 0; j < num_components; j++) {
          bld.MOV(offset(dest, bld, j), offset(src, bld, j + first_component));
       }