diff --git a/src/intel/compiler/brw_builder.h b/src/intel/compiler/brw_builder.h index 199460d6cb3..39f07b1600a 100644 --- a/src/intel/compiler/brw_builder.h +++ b/src/intel/compiler/brw_builder.h @@ -879,8 +879,8 @@ public: /* BROADCAST will only write a single component after lowering. Munge * size_written here to match the allocated size of dst. */ - exec_all().emit(SHADER_OPCODE_BROADCAST, dst, value, index) - ->size_written = dst.component_size(xbld.dispatch_width()); + xbld.emit(SHADER_OPCODE_BROADCAST, dst, value, index, + brw_imm_ud(value.component_size(_dispatch_width))); return component(dst, 0); } diff --git a/src/intel/compiler/brw_eu_defines.h b/src/intel/compiler/brw_eu_defines.h index ac8d77bb136..1b57739b07a 100644 --- a/src/intel/compiler/brw_eu_defines.h +++ b/src/intel/compiler/brw_eu_defines.h @@ -361,6 +361,10 @@ enum opcode { * Return the index of the first enabled live channel and assign it to * to the first component of the destination. Frequently used as input * for the BROADCAST pseudo-opcode. + * + * Source 0: A value. + * Source 1: Index from Value to broadcast. + * Source 2: A size in byte of the value register. */ SHADER_OPCODE_FIND_LIVE_CHANNEL, diff --git a/src/intel/compiler/brw_inst.cpp b/src/intel/compiler/brw_inst.cpp index fb9648e4852..b66b9d9badc 100644 --- a/src/intel/compiler/brw_inst.cpp +++ b/src/intel/compiler/brw_inst.cpp @@ -188,7 +188,6 @@ brw_inst::is_control_source(unsigned arg) const case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD: return arg == 0; - case SHADER_OPCODE_BROADCAST: case SHADER_OPCODE_SHUFFLE: case SHADER_OPCODE_QUAD_SWIZZLE: return arg == 1; @@ -198,6 +197,7 @@ brw_inst::is_control_source(unsigned arg) const case FS_OPCODE_INTERPOLATE_AT_PER_SLOT_OFFSET: return arg == INTERP_SRC_MSG_DESC || arg == INTERP_SRC_NOPERSPECTIVE; + case SHADER_OPCODE_BROADCAST: case SHADER_OPCODE_MOV_INDIRECT: case SHADER_OPCODE_CLUSTER_BROADCAST: return arg == 1 || arg == 2; @@ -538,6 +538,7 @@ brw_inst::size_read(const struct intel_device_info *devinfo, int arg) const case SHADER_OPCODE_BARRIER: return REG_SIZE; + case SHADER_OPCODE_BROADCAST: case SHADER_OPCODE_MOV_INDIRECT: if (arg == 0) { assert(src[2].file == IMM);