diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_ir_fs.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_ir_fs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h index 1e54bb23301..0727ac5109e 100644 --- a/src/mesa/drivers/dri/i965/brw_ir_fs.h +++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h @@ -166,6 +166,13 @@ component(fs_reg reg, unsigned idx) return reg; } +static inline bool +is_uniform(const fs_reg ®) +{ + return (reg.width == 1 || reg.stride == 0 || reg.is_null()) && + (!reg.reladdr || is_uniform(*reg.reladdr)); +} + /** * Get either of the 8-component halves of a 16-component register. * |