summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_fs_nir.cpp
diff options
context:
space:
mode:
authorJose Maria Casanova Crespo <[email protected]>2018-06-09 11:46:04 +0200
committerJose Maria Casanova Crespo <[email protected]>2018-06-16 22:39:08 +0200
commit5565630f8542544a8be550f0b52751cfa724a84e (patch)
treef9f2e21a733d3d64a4116dda2929c40396d18f1c /src/intel/compiler/brw_fs_nir.cpp
parent152bffb69bdb13e63a9112ddab78dc86855d9687 (diff)
intel/fs: Use shuffle_from_32bit_read at VS load_input
shuffle_from_32bit_read manages 32-bit reads to 32-bit destination in the same way that the previous loop so now we just call the new function for all bitsizes, simplifying also the 64-bit load_input. v2: Add comment about future 16-bit support (Jason Ekstrand) Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs_nir.cpp')
-rw-r--r--src/intel/compiler/brw_fs_nir.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index f45e123cc1b..7fdc9313d15 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -2483,16 +2483,11 @@ fs_visitor::nir_emit_vs_intrinsic(const fs_builder &bld,
if (type_sz(dest.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));
- }
-
- if (type_sz(dest.type) == 8) {
- shuffle_32bit_load_result_to_64bit_data(bld,
- dest,
- retype(dest, BRW_REGISTER_TYPE_F),
- instr->num_components);
- }
+ /* For 16-bit support maybe a temporary will be needed to copy from
+ * the ATTR file.
+ */
+ shuffle_from_32bit_read(bld, dest, retype(src, BRW_REGISTER_TYPE_D),
+ first_component, num_components);
break;
}