diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-31 08:50:02 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-31 10:56:11 -0700 |
commit | cf6cad3922f85127a29a8c1e49f980efcc5e9bac (patch) | |
tree | 1f5f941edd7030fcc00eb4e23cd07be976e6a9bd /src/panfrost/include | |
parent | 160795429d62d6eedcd2b8dc0c26887509b58e3e (diff) |
panfrost: Simplify filter_mode definition
It's just a bit field containing some flags; there's no need for all the
macro magic.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/include')
-rw-r--r-- | src/panfrost/include/panfrost-job.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index 5d038431cee..0b633b02c2f 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -1188,21 +1188,15 @@ struct mali_texture_descriptor { mali_ptr payload[MAX_MIP_LEVELS * MAX_CUBE_FACES * MAX_ELEMENTS]; } __attribute__((packed)); -/* Used as part of filter_mode */ +/* filter_mode */ -#define MALI_LINEAR 0 -#define MALI_NEAREST 1 -#define MALI_MIP_LINEAR (0x18) +#define MALI_SAMP_MAG_NEAREST (1 << 0) +#define MALI_SAMP_MIN_NEAREST (1 << 1) -/* Used to construct low bits of filter_mode */ +/* TODO: What do these bits mean individually? Only seen set together */ -#define MALI_TEX_MAG(mode) (((mode) & 1) << 0) -#define MALI_TEX_MIN(mode) (((mode) & 1) << 1) - -#define MALI_TEX_MAG_MASK (1) -#define MALI_TEX_MIN_MASK (2) - -#define MALI_FILTER_NAME(filter) (filter ? "MALI_NEAREST" : "MALI_LINEAR") +#define MALI_SAMP_MIP_LINEAR_1 (1 << 3) +#define MALI_SAMP_MIP_LINEAR_2 (1 << 4) /* Used for lod encoding. Thanks @urjaman for pointing out these routines can * be cleaned up a lot. */ |