mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-24 09:20:49 +02:00
brw: Make some integer check more explicit
Use the positive ("is int?") check when applicable.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
This commit is contained in:
parent
c3d2ba6973
commit
d1f4fb8eee
3 changed files with 5 additions and 5 deletions
|
|
@ -1089,7 +1089,7 @@ has_dst_aligned_region_restriction(const intel_device_info *devinfo,
|
|||
* simulator suggest that only 32x32-bit integer multiplication is
|
||||
* restricted.
|
||||
*/
|
||||
const bool is_dword_multiply = !brw_type_is_float(exec_type) &&
|
||||
const bool is_dword_multiply = brw_type_is_int(exec_type) &&
|
||||
((inst->opcode == BRW_OPCODE_MUL &&
|
||||
MIN2(brw_type_size_bytes(inst->src[0].type), brw_type_size_bytes(inst->src[1].type)) >= 4) ||
|
||||
(inst->opcode == BRW_OPCODE_MAD &&
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ namespace {
|
|||
if (inst->src[i].file != BAD_FILE &&
|
||||
!inst->is_control_source(i)) {
|
||||
const brw_reg_type t = inst->src[i].type;
|
||||
has_int_src |= !brw_type_is_float(t);
|
||||
has_int_src |= brw_type_is_int(t);
|
||||
has_long_src |= brw_type_size_bytes(t) >= 8;
|
||||
}
|
||||
}
|
||||
|
|
@ -116,7 +116,7 @@ namespace {
|
|||
inferred_exec_pipe(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
const brw_reg_type t = get_exec_type(inst);
|
||||
const bool is_dword_multiply = !brw_type_is_float(t) &&
|
||||
const bool is_dword_multiply = brw_type_is_int(t) &&
|
||||
((inst->opcode == BRW_OPCODE_MUL &&
|
||||
MIN2(brw_type_size_bytes(inst->src[0].type),
|
||||
brw_type_size_bytes(inst->src[1].type)) >= 4) ||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ brw_type_is_float(enum brw_reg_type t)
|
|||
static inline bool
|
||||
brw_type_is_uint(enum brw_reg_type t)
|
||||
{
|
||||
return (t & BRW_TYPE_BASE_MASK) == 0;
|
||||
return (t & BRW_TYPE_BASE_MASK) == BRW_TYPE_BASE_UINT;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
|
|
@ -112,7 +112,7 @@ brw_type_is_sint(enum brw_reg_type t)
|
|||
static inline bool
|
||||
brw_type_is_int(enum brw_reg_type t)
|
||||
{
|
||||
return !brw_type_is_float(t);
|
||||
return brw_type_is_uint(t) || brw_type_is_sint(t);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue