i965/emit: Assert that src1 is not an MRF after doing the MRF->GRF conversion
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 22 Jan 2015 23:49:56 +0000 (15:49 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 23 Jan 2015 00:00:34 +0000 (16:00 -0800)
When emitting texturing from indirect texture units, we need to be able to
scratch around in the header message.  Since we only do this for >= HSW,
this is ok since there are no MRFs.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/brw_eu_emit.c

index 39b2022bcccccff65e81e69feddc49977ffc0250..57161e282dc1142fa5d5d1087fbb601b069d9b80 100644 (file)
@@ -453,12 +453,12 @@ void
 brw_set_src1(struct brw_compile *p, brw_inst *inst, struct brw_reg reg)
 {
    const struct brw_context *brw = p->brw;
-   assert(reg.file != BRW_MESSAGE_REGISTER_FILE);
 
    if (reg.file != BRW_ARCHITECTURE_REGISTER_FILE)
       assert(reg.nr < 128);
 
    gen7_convert_mrf_to_grf(p, &reg);
+   assert(reg.file != BRW_MESSAGE_REGISTER_FILE);
 
    validate_reg(brw, inst, reg);