diff options
author | Jason Ekstrand <[email protected]> | 2016-05-25 17:26:42 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-05-26 14:13:38 -0700 |
commit | 86a2447eec7e87e46e842ca7a3ad5cd9fadb1ca5 (patch) | |
tree | 1bd9bdbb1cee9acecea599e9b4050c66ed93daa3 /src/mesa/drivers/dri/i965/brw_nir.h | |
parent | 58d1e82d32ccdbcda4dbf96c8fdef827ad076c10 (diff) |
i965/nir: Move the type_size_*_bytes functions to brw_nir.h
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_nir.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_nir.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_nir.h b/src/mesa/drivers/dri/i965/brw_nir.h index 2711606511d..041f337667f 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.h +++ b/src/mesa/drivers/dri/i965/brw_nir.h @@ -25,12 +25,25 @@ #include "brw_context.h" #include "brw_reg.h" +#include "brw_shader.h" #include "compiler/nir/nir.h" #ifdef __cplusplus extern "C" { #endif +static inline int +type_size_scalar_bytes(const struct glsl_type *type) +{ + return type_size_scalar(type) * 4; +} + +static inline int +type_size_vec4_bytes(const struct glsl_type *type) +{ + return type_size_vec4(type) * 16; +} + /* Flags set in the instr->pass_flags field by i965 analysis passes */ enum { BRW_NIR_NON_BOOLEAN = 0x0, |