intel/fs: Allow CLUSTER_BROADCAST to do type conversion
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 4 Jun 2019 16:45:50 +0000 (11:45 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 20 Sep 2019 18:02:15 +0000 (18:02 +0000)
We can't really handle it in the little-core 64-bit case but it's not
really needed there.  Where we really want this is for when we need to
do 16 -> 8-bit conversions.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
src/intel/compiler/brw_fs_generator.cpp

index 6756461bc6df7c64f9a12f89b6b3e3697226ca5f..b34280d5c5ab5913ca9acce59db4999ffb2e72e3 100644 (file)
@@ -2134,7 +2134,6 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width,
          break;
 
       case SHADER_OPCODE_CLUSTER_BROADCAST: {
-         assert(src[0].type == dst.type);
          assert(!src[0].negate && !src[0].abs);
          assert(src[1].file == BRW_IMMEDIATE_VALUE);
          assert(src[1].type == BRW_REGISTER_TYPE_UD);
@@ -2171,6 +2170,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width,
              * indirect here to handle adding 4 bytes to the offset and avoid
              * the extra ADD to the register file.
              */
+            assert(src[0].type == dst.type);
             brw_MOV(p, subscript(dst, BRW_REGISTER_TYPE_D, 0),
                        subscript(strided, BRW_REGISTER_TYPE_D, 0));
             brw_MOV(p, subscript(dst, BRW_REGISTER_TYPE_D, 1),