summaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/include/panfrost-job.h6
-rw-r--r--src/panfrost/pandecode/decode.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h
index b7312a60720..1f9fbafbe08 100644
--- a/src/panfrost/include/panfrost-job.h
+++ b/src/panfrost/include/panfrost-job.h
@@ -783,6 +783,11 @@ struct mali_payload_set_value {
* 3. If e <= 2^shift, then we need to use the round-down algorithm. Set
* magic_divisor = m - 1 and extra_flags = 1.
* 4. Otherwise, set magic_divisor = m and extra_flags = 0.
+ *
+ * Unrelated to instancing/actual attributes, images (the OpenCL kind) are
+ * implemented as special attributes, denoted by MALI_ATTR_IMAGE. For images,
+ * let shift=extra_flags=0. Stride is set to the image format's bytes-per-pixel
+ * (*NOT the row stride*). Size is set to the size of the image itself.
*/
enum mali_attr_mode {
@@ -791,6 +796,7 @@ enum mali_attr_mode {
MALI_ATTR_POT_DIVIDE = 2,
MALI_ATTR_MODULO = 3,
MALI_ATTR_NPOT_DIVIDE = 4,
+ MALI_ATTR_IMAGE = 5
};
/* This magic "pseudo-address" is used as `elements` to implement
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index fb48087cddb..f8942b0ec18 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -371,6 +371,7 @@ static char *pandecode_attr_mode(enum mali_attr_mode mode)
DEFINE_CASE(POT_DIVIDE);
DEFINE_CASE(MODULO);
DEFINE_CASE(NPOT_DIVIDE);
+ DEFINE_CASE(IMAGE);
default:
return "MALI_ATTR_UNUSED /* XXX: Unknown stencil op, check dump */";
}