summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_constants.h
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-11-26 08:32:02 +0100
committerSamuel Pitoiset <[email protected]>2019-11-28 10:59:14 +0100
commitd347f2805d8d8c37eb3e50483346bff9583c8e48 (patch)
tree40ed0d43d654f93253c573cd400a98e98ca4a18a /src/amd/vulkan/radv_constants.h
parent52aadbfd04e464ac6b9bfddce05e3276f7bc53fc (diff)
radv: add more constants to avoid using magic numbers
Trivial. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_constants.h')
-rw-r--r--src/amd/vulkan/radv_constants.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_constants.h b/src/amd/vulkan/radv_constants.h
index 6abcf085206..a12e79e9623 100644
--- a/src/amd/vulkan/radv_constants.h
+++ b/src/amd/vulkan/radv_constants.h
@@ -78,5 +78,16 @@
#define RADV_NUM_PHYSICAL_VGPRS 256
+/* Make sure everything is addressable by a signed 32-bit int, and
+ * our largest descriptors are 96 bytes.
+ */
+#define RADV_MAX_PER_SET_DESCRIPTORS ((1ull << 31 ) / 96)
+
+/* Our buffer size fields allow only this much */
+#define RADV_MAX_MEMORY_ALLOCATION_SIZE 0xFFFFFFFFull
+
+/* Number of invocations in each subgroup. */
+#define RADV_SUBGROUP_SIZE 64
+
#endif /* RADV_CONSTANTS_H */