X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fintel%2Fcompiler%2Fbrw_eu.h;h=374ff75db454b780fd0fee339bbf11b2b9f05143;hb=cf52b40fb0bf53816ca4bb90e31ecd146fbcb533;hp=9ed481e10e63b69029f5bc50d51dc0bdf901a6e0;hpb=c48f42e178a1cc484870367c0cfe5fbbf71d86cc;p=mesa.git diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h index 9ed481e10e6..374ff75db45 100644 --- a/src/intel/compiler/brw_eu.h +++ b/src/intel/compiler/brw_eu.h @@ -220,6 +220,7 @@ ALU2(MUL) ALU1(FRC) ALU1(RNDD) ALU1(RNDE) +ALU1(RNDU) ALU1(RNDZ) ALU2(MAC) ALU2(MACH) @@ -311,6 +312,36 @@ brw_message_ex_desc_ex_mlen(UNUSED const struct gen_device_info *devinfo, return GET_BITS(ex_desc, 9, 6); } +static inline uint32_t +brw_urb_desc(const struct gen_device_info *devinfo, + unsigned msg_type, + bool per_slot_offset_present, + bool channel_mask_present, + unsigned global_offset) +{ + if (devinfo->gen >= 8) { + return (SET_BITS(per_slot_offset_present, 17, 17) | + SET_BITS(channel_mask_present, 15, 15) | + SET_BITS(global_offset, 14, 4) | + SET_BITS(msg_type, 3, 0)); + } else if (devinfo->gen >= 7) { + assert(!channel_mask_present); + return (SET_BITS(per_slot_offset_present, 16, 16) | + SET_BITS(global_offset, 13, 3) | + SET_BITS(msg_type, 3, 0)); + } else { + unreachable("unhandled URB write generation"); + } +} + +static inline uint32_t +brw_urb_desc_msg_type(ASSERTED const struct gen_device_info *devinfo, + uint32_t desc) +{ + assert(devinfo->gen >= 7); + return GET_BITS(desc, 3, 0); +} + /** * Construct a message descriptor immediate with the specified sampler * function controls.