From: Iago Toral Quiroga Date: Thu, 7 Jan 2016 13:11:28 +0000 (+0100) Subject: i965: two-argument instructions can only use 32-bit immediates X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3210870b34ac64ccdc399778ba306ce452ac7e88;p=mesa.git i965: two-argument instructions can only use 32-bit immediates Reviewed-by: Kenneth Graunke Reviewed-by: Jordan Justen --- diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 434be830f9a..1a2ed3fb085 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -501,6 +501,8 @@ brw_set_src1(struct brw_codegen *p, brw_inst *inst, struct brw_reg reg) assert(brw_inst_src0_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE); if (reg.file == BRW_IMMEDIATE_VALUE) { + /* two-argument instructions can only use 32-bit immediates */ + assert(type_sz(reg.type) < 8); brw_inst_set_imm_ud(devinfo, inst, reg.ud); } else { /* This is a hardware restriction, which may or may not be lifted