diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h index 0426fc80c0d..fa7d681df24 100644 --- a/src/intel/compiler/brw_eu.h +++ b/src/intel/compiler/brw_eu.h @@ -414,6 +414,20 @@ brw_sampler_desc(const struct intel_device_info *devinfo, const unsigned desc = (SET_BITS(binding_table_index, 7, 0) | SET_BITS(sampler, 11, 8)); + /* From GFX20 Bspec: Shared Functions - Message Descriptor - + * Sampling Engine: + * + * Message Type[5] 31 This bit represents the upper bit of message type + * 6-bit encoding (c.f. [16:12]). This bit is set + * for messages with programmable offsets. + */ + if (devinfo->ver >= 20) + return desc | SET_BITS(msg_type & 0x1F, 16, 12) | + SET_BITS(simd_mode & 0x3, 18, 17) | + SET_BITS(simd_mode >> 2, 29, 29) | + SET_BITS(return_format, 30, 30) | + SET_BITS(msg_type >> 5, 31, 31); + /* From the CHV Bspec: Shared Functions - Message Descriptor - * Sampling Engine: * @@ -456,7 +470,9 @@ brw_sampler_desc_sampler(UNUSED const struct intel_device_info *devinfo, static inline unsigned brw_sampler_desc_msg_type(const struct intel_device_info *devinfo, uint32_t desc) { - if (devinfo->ver >= 7) + if (devinfo->ver >= 20) + return GET_BITS(desc, 31, 31) << 5 | GET_BITS(desc, 16, 12); + else if (devinfo->ver >= 7) return GET_BITS(desc, 16, 12); else if (devinfo->verx10 >= 45) return GET_BITS(desc, 15, 12);