summaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-31 09:08:07 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-31 10:56:11 -0700
commit3e47a1181b7c5bc962380553c8c99a49a49f45d9 (patch)
tree4faac4f56d4a9386b99af2f7d812bcd9c9b374dc /src/panfrost
parentcf6cad3922f85127a29a8c1e49f980efcc5e9bac (diff)
panfrost: Add MALI_SAMP_NORM_COORDS flag
Corresponds to the normalized coordinates? flag on images in OpenCL and evidently also shows up in GL, so let's wire it in. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/include/panfrost-job.h5
-rw-r--r--src/panfrost/pandecode/decode.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h
index 0b633b02c2f..ffe1bf25aa4 100644
--- a/src/panfrost/include/panfrost-job.h
+++ b/src/panfrost/include/panfrost-job.h
@@ -1198,6 +1198,11 @@ struct mali_texture_descriptor {
#define MALI_SAMP_MIP_LINEAR_1 (1 << 3)
#define MALI_SAMP_MIP_LINEAR_2 (1 << 4)
+/* Flag in filter_mode, corresponding to OpenCL's NORMALIZED_COORDS_TRUE
+ * sampler_t flag. For typical OpenGL textures, this is always set. */
+
+#define MALI_SAMP_NORM_COORDS (1 << 5)
+
/* Used for lod encoding. Thanks @urjaman for pointing out these routines can
* be cleaned up a lot. */
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index a556776b38b..2df3cbdc986 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -251,6 +251,7 @@ static const struct pandecode_flag_info sampler_flag_info [] = {
FLAG_INFO(MIN_NEAREST),
FLAG_INFO(MIP_LINEAR_1),
FLAG_INFO(MIP_LINEAR_2),
+ FLAG_INFO(NORM_COORDS),
{}
};
#undef FLAG_INFO