forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/gpu/drm/vmwgfx/device_include/svga3d_limits.h
....@@ -1,6 +1,6 @@
11 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
22 /**********************************************************
3
- * Copyright 2007-2015 VMware, Inc.
3
+ * Copyright 2007-2019 VMware, Inc.
44 *
55 * Permission is hereby granted, free of charge, to any person
66 * obtaining a copy of this software and associated documentation
....@@ -40,11 +40,25 @@
4040 #include "includeCheck.h"
4141
4242 #define SVGA3D_NUM_CLIPPLANES 6
43
+#define SVGA3D_MAX_CONTEXT_IDS 256
44
+#define SVGA3D_MAX_SURFACE_IDS (32 * 1024)
45
+
46
+/*
47
+ * While there are separate bind-points for RenderTargetViews and
48
+ * UnorderedAccessViews in a DXContext, there is in fact one shared
49
+ * semantic space that the guest-driver can use on any given draw call.
50
+ * So there are really only 8 slots that can be spilt up between them, with the
51
+ * spliceIndex controlling where the UAV's sit in the collapsed array.
52
+ */
4353 #define SVGA3D_MAX_RENDER_TARGETS 8
4454 #define SVGA3D_MAX_SIMULTANEOUS_RENDER_TARGETS (SVGA3D_MAX_RENDER_TARGETS)
4555 #define SVGA3D_MAX_UAVIEWS 8
46
-#define SVGA3D_MAX_CONTEXT_IDS 256
47
-#define SVGA3D_MAX_SURFACE_IDS (32 * 1024)
56
+#define SVGA3D_DX11_1_MAX_UAVIEWS 64
57
+
58
+/*
59
+ * Maximum canonical size of a surface in host-backed mode (pre-GBObjects).
60
+ */
61
+#define SVGA3D_HB_MAX_SURFACE_SIZE MBYTES_2_BYTES(128)
4862
4963 /*
5064 * Maximum ID a shader can be assigned on a given context.
....@@ -59,6 +73,8 @@
5973 #define SVGA3D_NUM_TEXTURE_UNITS 32
6074 #define SVGA3D_NUM_LIGHTS 8
6175
76
+#define SVGA3D_MAX_VIDEOPROCESSOR_SAMPLERS 32
77
+
6278 /*
6379 * Maximum size in dwords of shader text the SVGA device will allow.
6480 * Currently 8 MB.
....@@ -66,6 +82,11 @@
6682 #define SVGA3D_MAX_SHADER_MEMORY_BYTES (8 * 1024 * 1024)
6783 #define SVGA3D_MAX_SHADER_MEMORY (SVGA3D_MAX_SHADER_MEMORY_BYTES / \
6884 sizeof(uint32))
85
+
86
+/*
87
+ * The maximum value of threadGroupCount in each dimension
88
+ */
89
+#define SVGA3D_MAX_SHADER_THREAD_GROUPS 65535
6990
7091 #define SVGA3D_MAX_CLIP_PLANES 6
7192
....@@ -85,7 +106,9 @@
85106 /*
86107 * Maximum number of array indexes in a GB surface (with DX enabled).
87108 */
88
-#define SVGA3D_MAX_SURFACE_ARRAYSIZE 512
109
+#define SVGA3D_SM4_MAX_SURFACE_ARRAYSIZE 512
110
+#define SVGA3D_SM5_MAX_SURFACE_ARRAYSIZE 2048
111
+#define SVGA3D_MAX_SURFACE_ARRAYSIZE SVGA3D_SM5_MAX_SURFACE_ARRAYSIZE
89112
90113 /*
91114 * The maximum number of vertex arrays we're guaranteed to support in
....@@ -99,4 +122,9 @@
99122 */
100123 #define SVGA3D_MAX_DRAW_PRIMITIVE_RANGES 32
101124
125
+/*
126
+ * The maximum number of samples that can be contained in a surface.
127
+ */
128
+#define SVGA3D_MAX_SAMPLES 8
129
+
102130 #endif /* _SVGA3D_LIMITS_H_ */