1 /*==============================================================================
2 Copyright(c) 2017 Intel Corporation
3
4 Permission is hereby granted, free of charge, to any person obtaining a
5 copy of this software and associated documentation files(the "Software"),
6 to deal in the Software without restriction, including without limitation
7 the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 and / or sell copies of the Software, and to permit persons to whom the
9 Software is furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included
12 in all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 OTHER DEALINGS IN THE SOFTWARE.
21 ============================================================================*/
22
23 #include "Internal/Common/GmmLibInc.h"
24
25 /////////////////////////////////////////////////////////////////////////////////////
26 /// Allocates This function will initialize the necessary info based on platform.
27 /// - Buffer type restrictions (Eg: Z, Color, Display)
28 /// - X/Y tile dimensions
29 ///
30 /// @param[in] Platform: Contains information about platform to initialize an object
31 /////////////////////////////////////////////////////////////////////////////////////
PlatformInfoGen8(PLATFORM & Platform,Context * pGmmLibContext)32 GmmLib::PlatformInfoGen8::PlatformInfoGen8(PLATFORM &Platform, Context *pGmmLibContext)
33 : PlatformInfo(Platform, pGmmLibContext)
34 {
35 __GMM_ASSERTPTR(pGmmLibContext, VOIDRETURN);
36 // --------------------------
37 // Non Native Dispay Interface buffer restriction. Register Ref: DSPACNTR, DSPASTRIDE, DSPASURF
38 // Clamping res based on 2 Nndi buffers and GMM_NNDI_SEGMENT_SIZE reserved gfx memory
39 // --------------------------
40 Data.Nndi.Alignment = PAGE_SIZE;
41 Data.Nndi.PitchAlignment = GMM_BYTES(1);
42 Data.Nndi.RenderPitchAlignment = GMM_BYTES(1);
43 Data.Nndi.LockPitchAlignment = GMM_BYTES(1);
44 Data.Nndi.MinPitch = GMM_BYTES(640);
45 Data.Nndi.MaxPitch = GMM_BYTES(8192);
46 Data.Nndi.MinAllocationSize = PAGE_SIZE;
47 Data.Nndi.MinHeight = GMM_SCANLINES(200);
48 Data.Nndi.MinWidth = GMM_PIXELS(320);
49 Data.Nndi.MinDepth = 0;
50 Data.Nndi.MaxHeight = GMM_BYTES(1536);
51 Data.Nndi.MaxWidth = GMM_BYTES(2048);
52 Data.Nndi.MaxDepth = 1;
53 Data.Nndi.MaxArraySize = 1;
54
55 // --------------------------
56 // Depth Buffer Restriction. Inst Ref: 3DSTATE_DEPTH_BUFFER
57 // --------------------------
58 Data.Depth.Alignment = PAGE_SIZE;
59 Data.Depth.PitchAlignment = GMM_BYTES(64);
60 Data.Depth.RenderPitchAlignment = GMM_BYTES(64);
61 Data.Depth.LockPitchAlignment = GMM_BYTES(64);
62 Data.Depth.MinPitch = GMM_BYTES(64);
63 Data.Depth.MaxPitch = GMM_KBYTE(128); // 3DSTATE_DEPTH_BUFFER has conflicting info--but 128KB should be fine.
64 Data.Depth.MinAllocationSize = PAGE_SIZE;
65 Data.Depth.MinHeight = GMM_SCANLINES(1);
66 Data.Depth.MinWidth = GMM_PIXELS(1);
67 Data.Depth.MinDepth = 0;
68 Data.Depth.MaxHeight = GMM_KBYTE(16);
69 Data.Depth.MaxWidth = GMM_KBYTE(16);
70 Data.Depth.MaxDepth = GMM_KBYTE(2);
71 Data.Depth.MaxArraySize = GMM_KBYTE(2);
72
73 // --------------------------
74 // Stencil Buffer Restriction. Inst Ref: 3DSTATE_STENCIL_BUFFER
75 // --------------------------
76 Data.Stencil.Alignment = PAGE_SIZE;
77 Data.Stencil.PitchAlignment = GMM_BYTES(128);
78 Data.Stencil.RenderPitchAlignment = GMM_BYTES(128);
79 Data.Stencil.LockPitchAlignment = GMM_BYTES(128);
80 Data.Stencil.MinPitch = GMM_BYTES(128);
81 Data.Stencil.MaxPitch = GMM_KBYTE(128); // 3DSTATE_STENCIL_BUFFER: 2*Pitch <= 128KB (GMM client allocs 2x-width, so GMM limits to that.)
82 Data.Stencil.MinAllocationSize = PAGE_SIZE;
83 Data.Stencil.MinHeight = GMM_SCANLINES(1);
84 Data.Stencil.MinWidth = GMM_PIXELS(1);
85 Data.Stencil.MinDepth = 0;
86 Data.Stencil.MaxHeight = GMM_KBYTE(16);
87 Data.Stencil.MaxWidth = GMM_KBYTE(16);
88 Data.Stencil.MaxDepth = GMM_KBYTE(2);
89 Data.Stencil.MaxArraySize = GMM_KBYTE(2);
90
91 // --------------------------
92 // Hierarchical Depth Buffer Restriction. Inst Ref: 3DSTATE_HIER_DEPTH_BUFFER
93 // --------------------------
94 Data.HiZ.Alignment = PAGE_SIZE;
95 Data.HiZ.PitchAlignment = GMM_BYTES(128);
96 Data.HiZ.RenderPitchAlignment = GMM_BYTES(128);
97 Data.HiZ.LockPitchAlignment = GMM_BYTES(128);
98 Data.HiZ.MinPitch = GMM_BYTES(128);
99 Data.HiZ.MaxPitch = GMM_KBYTE(128);
100 Data.HiZ.MinAllocationSize = PAGE_SIZE;
101 Data.HiZ.MinHeight = GMM_SCANLINES(1);
102 Data.HiZ.MinWidth = GMM_PIXELS(1);
103 Data.HiZ.MinDepth = 0;
104 Data.HiZ.MaxHeight = GMM_KBYTE(16);
105 Data.HiZ.MaxWidth = GMM_KBYTE(16);
106 Data.HiZ.MaxDepth = GMM_KBYTE(2);
107 Data.HiZ.MaxArraySize = GMM_KBYTE(2);
108
109 // --------------------------
110 // Vertex Restriction. Inst Ref: 3DSTATE_VERTEX_BUFFER, 3DSTATE_INSTANCE_STEP_RATE
111 // Note: restrictions are expanded here for UMD flexibility.
112 // --------------------------
113 Data.Vertex.Alignment = PAGE_SIZE;
114 Data.Vertex.PitchAlignment = GMM_BYTES(1);
115 Data.Vertex.LockPitchAlignment = GMM_BYTES(1);
116 Data.Vertex.RenderPitchAlignment = GMM_BYTES(1);
117 Data.Vertex.MinPitch = GMM_BYTES(1);
118 Data.Vertex.MaxPitch = GMM_GBYTE(2);
119 Data.Vertex.MinAllocationSize = PAGE_SIZE;
120 Data.Vertex.MinHeight = GMM_SCANLINES(1);
121 Data.Vertex.MinWidth = GMM_PIXELS(1);
122 Data.Vertex.MinDepth = 0;
123 Data.Vertex.MaxHeight = GMM_MBYTE(128); //TODO(Minor): How does Media fail when we change this to 1?!
124 Data.Vertex.MaxWidth = GMM_GBYTE(2);
125 Data.Vertex.MaxDepth = GMM_KBYTE(2);
126 Data.Vertex.MaxArraySize = GMM_KBYTE(2);
127
128 // --------------------------
129 // Index Buffer Restriction. Inst Ref: 3DSTATE_INDEX_BUFFER
130 // --------------------------
131 Data.Index = Data.Vertex;
132
133 // --------------------------
134 // Linear Buffer Restriction. General purpose. Flexible.
135 // --------------------------
136 Data.Linear.Alignment = PAGE_SIZE;
137 Data.Linear.PitchAlignment = GMM_BYTES(1);
138 Data.Linear.LockPitchAlignment = GMM_BYTES(1);
139 Data.Linear.RenderPitchAlignment = GMM_BYTES(1);
140 Data.Linear.MinPitch = GMM_BYTES(1);
141 Data.Linear.MaxPitch = GMM_GBYTE(2);
142 Data.Linear.MinAllocationSize = PAGE_SIZE;
143 Data.Linear.MinHeight = GMM_SCANLINES(1);
144 Data.Linear.MinWidth = GMM_PIXELS(1);
145 Data.Linear.MinDepth = 0;
146 Data.Linear.MaxHeight = 1;
147 Data.Linear.MaxWidth = GMM_GBYTE(2);
148 Data.Linear.MaxDepth = 1;
149 Data.Linear.MaxArraySize = 1;
150
151 // --------------------------
152 // No Surface Restriction. General purpose. Flexible.
153 // --------------------------
154 Data.NoRestriction.Alignment = PAGE_SIZE;
155 Data.NoRestriction.PitchAlignment = GMM_BYTES(1);
156 Data.NoRestriction.LockPitchAlignment = GMM_BYTES(1);
157 Data.NoRestriction.RenderPitchAlignment = GMM_BYTES(1);
158 Data.NoRestriction.MinPitch = GMM_BYTES(1);
159 Data.NoRestriction.MinAllocationSize = PAGE_SIZE;
160 Data.NoRestriction.MinHeight = GMM_SCANLINES(1);
161 Data.NoRestriction.MinWidth = GMM_PIXELS(1);
162 Data.NoRestriction.MinDepth = 0;
163 Data.NoRestriction.MaxHeight = GMM_GBYTE(2);
164 Data.NoRestriction.MaxWidth = GMM_GBYTE(256);
165 Data.NoRestriction.MaxPitch = GMM_GBYTE(256);
166 Data.NoRestriction.MaxDepth = GMM_KBYTE(2);
167 Data.NoRestriction.MaxArraySize = GMM_KBYTE(2);
168
169 // --------------------------
170 // Constant Buffer Restriction.
171 // --------------------------
172 Data.Constant = Data.NoRestriction;
173
174 // --------------------------
175 // Dx9 Constant Buffer pool Restriction. Inst Ref: 3DSTATE_DX9_CONSTANT_BUFFER_POOL_ALLOC
176 // --------------------------
177 Data.StateDx9ConstantBuffer = Data.NoRestriction;
178 Data.StateDx9ConstantBuffer.Alignment = GMM_KBYTE(8);
179
180 // --------------------------
181 // MC Buffer Restriction
182 // --------------------------
183 Data.MotionComp = Data.NoRestriction;
184 Data.MotionComp.Alignment = PAGE_SIZE;
185 Data.MotionComp.PitchAlignment = GMM_BYTES(32);
186 Data.MotionComp.LockPitchAlignment = GMM_BYTES(32);
187 Data.MotionComp.RenderPitchAlignment = GMM_BYTES(32);
188 Data.MotionComp.MinPitch = GMM_BYTES(32);
189
190 // --------------------------
191 // Stream Buffer Restriction
192 // --------------------------
193 Data.Stream = Data.NoRestriction;
194
195 // --------------------------
196 // Interlace Scan Buffer Restriction
197 // --------------------------
198 Data.InterlacedScan = Data.NoRestriction;
199
200 // --------------------------
201 // Text API Buffer Restriction
202 // --------------------------
203 Data.TextApi = Data.NoRestriction;
204
205 // --------------------------
206 // Overlay Buffer Restriction. Register Ref: OVADD, OSTRIDE
207 // --------------------------
208 Data.Overlay.Alignment = PAGE_SIZE;
209 Data.Overlay.PitchAlignment = GMM_BYTES(512);
210 Data.Overlay.RenderPitchAlignment = GMM_BYTES(512);
211 Data.Overlay.LockPitchAlignment = GMM_BYTES(512);
212 Data.Overlay.MinPitch = GMM_BYTES(512);
213 Data.Overlay.MaxPitch = GMM_KBYTE(16);
214 Data.Overlay.MinAllocationSize = PAGE_SIZE;
215 Data.Overlay.MinHeight = GMM_SCANLINES(1);
216 Data.Overlay.MinWidth = GMM_PIXELS(1);
217 Data.Overlay.MinDepth = 0;
218 Data.Overlay.MaxHeight = GMM_SCANLINES(4096);
219 Data.Overlay.MaxWidth = GMM_PIXELS(4096);
220 Data.Overlay.MaxDepth = 1;
221 Data.Overlay.MaxArraySize = 1;
222
223 // --------------------------
224 // RT & Texture2DSurface restrictions. Inst Ref: SURFACE_STATE
225 // Greatest common restriction source comes from 8bpp RT
226 // --------------------------
227 Data.Texture2DSurface.Alignment = PAGE_SIZE;
228 Data.Texture2DSurface.PitchAlignment = GMM_BYTES(32);
229 Data.Texture2DSurface.LockPitchAlignment = GMM_BYTES(32);
230 Data.Texture2DSurface.RenderPitchAlignment = GMM_BYTES(32);
231 Data.Texture2DSurface.MinPitch = GMM_BYTES(32);
232 Data.Texture2DSurface.MaxPitch = (pGmmLibContext->GetWaTable().WaRestrictPitch128KB) ? GMM_KBYTE(128) : GMM_KBYTE(256);
233 Data.Texture2DSurface.MinAllocationSize = PAGE_SIZE;
234 Data.Texture2DSurface.MinHeight = GMM_SCANLINES(1);
235 Data.Texture2DSurface.MinWidth = GMM_PIXELS(1);
236 Data.Texture2DSurface.MinDepth = 0;
237 Data.Texture2DSurface.MaxHeight = GMM_KBYTE(16);
238 Data.Texture2DSurface.MaxWidth = GMM_KBYTE(16);
239 Data.Texture2DSurface.MaxDepth = GMM_FIELD_NA;
240 Data.Texture2DSurface.MaxArraySize = GMM_KBYTE(2);
241
242 {
243 // Linear surfaces accessed with Media Block Read/Write commands
244 // require 64-byte-aligned pitch. Such commands only operate on 2D
245 // resources, so we'll handle the requirement here. Though requirement
246 // applies to linear surfaces only, our up'ing the pitch alignment to
247 // 64 bytes here won't affect tiled surfaces, since their pitch
248 // alignment is never smaller than that.
249 Data.Texture2DLinearSurface = Data.Texture2DSurface;
250 Data.Texture2DLinearSurface.PitchAlignment = GFX_MAX(GMM_BYTES(64), Data.Texture2DSurface.PitchAlignment);
251 Data.Texture2DLinearSurface.LockPitchAlignment = GFX_MAX(GMM_BYTES(64), Data.Texture2DSurface.LockPitchAlignment);
252 Data.Texture2DLinearSurface.RenderPitchAlignment = GFX_MAX(GMM_BYTES(64), Data.Texture2DSurface.RenderPitchAlignment);
253 }
254
255 // --------------------------
256 // AsyncFlip Restriction. Register Ref: PRI_STRIDE, PRI_SURF, SRCSZ <-- TODO(Minor): SRCSZ correct reg for W/H req's?
257 // --------------------------
258 Data.ASyncFlipSurface.Alignment = GMM_KBYTE(256);
259 Data.ASyncFlipSurface.PitchAlignment = GMM_BYTES(64);
260 Data.ASyncFlipSurface.RenderPitchAlignment = GMM_BYTES(64);
261 Data.ASyncFlipSurface.LockPitchAlignment = GMM_BYTES(64);
262 Data.ASyncFlipSurface.MinPitch = GMM_BYTES(64);
263 Data.ASyncFlipSurface.MaxPitch = Data.Texture2DSurface.MaxPitch;
264 Data.ASyncFlipSurface.MinAllocationSize = PAGE_SIZE;
265 Data.ASyncFlipSurface.MinHeight = GMM_SCANLINES(1);
266 Data.ASyncFlipSurface.MinWidth = GMM_PIXELS(1);
267 Data.ASyncFlipSurface.MinDepth = 0;
268 Data.ASyncFlipSurface.MaxHeight = Data.Texture2DSurface.MaxHeight; // Beyond DE requirements-Necessary for mosaic framebuffers
269 Data.ASyncFlipSurface.MaxWidth = Data.Texture2DSurface.MaxWidth; // Okay since GMM isn't actual display requirement gatekeeper.
270 Data.ASyncFlipSurface.MaxDepth = 1;
271 Data.ASyncFlipSurface.MaxArraySize = GMM_KBYTE(2);
272
273 // --------------------------
274 // Hardware MBM Restriction.
275 // --------------------------
276 Data.HardwareMBM = Data.ASyncFlipSurface;
277
278 // --------------------------
279 // Video Buffer Restriction
280 // --------------------------
281 Data.Video = Data.Texture2DLinearSurface;
282
283 // --------------------------
284 // RT & CubeSurface restrictions. Inst Ref: SURFACE_STATE
285 // Greatest common restriction source comes from 8bpp RT
286 // --------------------------
287 Data.CubeSurface.Alignment = PAGE_SIZE;
288 Data.CubeSurface.PitchAlignment = GMM_BYTES(32);
289 Data.CubeSurface.LockPitchAlignment = GMM_BYTES(32);
290 Data.CubeSurface.RenderPitchAlignment = GMM_BYTES(32);
291 Data.CubeSurface.MinPitch = GMM_BYTES(32);
292 Data.CubeSurface.MaxPitch = (pGmmLibContext->GetWaTable().WaRestrictPitch128KB) ? GMM_KBYTE(128) : GMM_KBYTE(256);
293 Data.CubeSurface.MinAllocationSize = PAGE_SIZE;
294 Data.CubeSurface.MinHeight = GMM_SCANLINES(1);
295 Data.CubeSurface.MinWidth = GMM_PIXELS(1);
296 Data.CubeSurface.MinDepth = 0;
297 Data.CubeSurface.MaxHeight = GMM_KBYTE(16);
298 Data.CubeSurface.MaxWidth = GMM_KBYTE(16);
299 Data.CubeSurface.MaxDepth = 1;
300 Data.CubeSurface.MaxArraySize = GMM_KBYTE(2) / 6; // MaxElements / Cubefaces
301
302 // --------------------------
303 // RT & 3D Surface restrictions. Inst Ref: SURFACE_STATE
304 // Greatest common restriction source comes from 8bpp RT
305 // --------------------------
306 Data.Texture3DSurface.Alignment = PAGE_SIZE;
307 Data.Texture3DSurface.PitchAlignment = GMM_BYTES(32);
308 Data.Texture3DSurface.LockPitchAlignment = GMM_BYTES(32);
309 Data.Texture3DSurface.RenderPitchAlignment = GMM_BYTES(32);
310 Data.Texture3DSurface.MinPitch = GMM_BYTES(32);
311 Data.Texture3DSurface.MaxPitch = (pGmmLibContext->GetWaTable().WaRestrictPitch128KB) ? GMM_KBYTE(128) : GMM_KBYTE(256);
312 Data.Texture3DSurface.MinAllocationSize = PAGE_SIZE;
313 Data.Texture3DSurface.MinHeight = GMM_SCANLINES(1);
314 Data.Texture3DSurface.MinWidth = GMM_PIXELS(1);
315 Data.Texture3DSurface.MinDepth = 0;
316 Data.Texture3DSurface.MaxHeight = GMM_KBYTE(2);
317 Data.Texture3DSurface.MaxWidth = GMM_KBYTE(2);
318 Data.Texture3DSurface.MaxDepth = GMM_KBYTE(2);
319 Data.Texture3DSurface.MaxArraySize = GMM_FIELD_NA;
320
321 // --------------------------
322 // RT & Buffer Type restrictions. Inst Ref: SURFACE_STATE
323 // Greatest common restriction source comes from 8bpp RT
324 // --------------------------
325 Data.BufferType.Alignment = PAGE_SIZE;
326 Data.BufferType.PitchAlignment = GMM_BYTES(32);
327 Data.BufferType.LockPitchAlignment = GMM_BYTES(32);
328 Data.BufferType.RenderPitchAlignment = GMM_BYTES(32);
329 Data.BufferType.MinPitch = GMM_BYTES(32);
330 Data.BufferType.MaxPitch = GMM_GBYTE(2);
331 Data.BufferType.MinAllocationSize = PAGE_SIZE;
332 Data.BufferType.MinHeight = GMM_SCANLINES(0);
333 Data.BufferType.MinWidth = GMM_PIXELS(1);
334 Data.BufferType.MinDepth = 0;
335 Data.BufferType.MaxHeight = GMM_SCANLINES(1);
336 Data.BufferType.MaxWidth = GMM_GBYTE(2);
337 Data.BufferType.MaxDepth = GMM_FIELD_NA;
338 Data.BufferType.MaxArraySize = GMM_GBYTE(2);
339
340 // --------------------------
341 // Cursor surface restricion. Register Ref: CURACNTR, CURABASE
342 // --------------------------
343 Data.Cursor.Alignment = pGmmLibContext->GetWaTable().WaCursor16K ? GMM_KBYTE(16) : PAGE_SIZE;
344 Data.Cursor.PitchAlignment = 1;
345 Data.Cursor.LockPitchAlignment = 1;
346 Data.Cursor.RenderPitchAlignment = 1;
347 Data.Cursor.MinPitch = 1;
348 Data.Cursor.MaxPitch = 0xffffffff;
349 Data.Cursor.MinAllocationSize = 1;
350 Data.Cursor.MinHeight = GMM_SCANLINES(1);
351 Data.Cursor.MinWidth = 1;
352 Data.Cursor.MinDepth = 0;
353 Data.Cursor.MaxHeight = 0xffffffff;
354 Data.Cursor.MaxWidth = 0xffffffff;
355 Data.Cursor.MaxDepth = 0xffffffff;
356 Data.Cursor.MaxArraySize = 1;
357
358 //--------------------------
359 // Set TILE_X/Y Parameters
360 //--------------------------
361 SET_TILE_MODE_INFO(LEGACY_TILE_X, 512, 8, 1, 0, 0, 0)
362 SET_TILE_MODE_INFO(LEGACY_TILE_Y, 128, 32, 1, 0, 0, 0)
363
364 //--------------------------
365 // Fence paramaters. Register Ref: FENCE
366 //--------------------------
367 Data.NumberFenceRegisters = pGmmLibContext->GetWaTable().Wa16TileFencesOnly ? 16 : 32;
368 Data.FenceLowBoundShift = 12;
369 Data.FenceLowBoundMask = GFX_MASK(12, 31);
370 Data.MinFenceSize = GMM_MBYTE(1);
371
372 Data.PagingBufferPrivateDataSize = GMM_KBYTE(4);
373 Data.MaxLod = 14; // [0,14] --> 15 Total
374
375 Data.FBCRequiredStolenMemorySize = GMM_MBYTE(8);
376
377 // --------------------------
378 // Surface Alignment Units
379 // --------------------------
380 Data.TexAlign.CCS.Align.Width = 256;
381 Data.TexAlign.CCS.Align.Height = 128;
382 Data.TexAlign.CCS.MaxPitchinTiles = 512;
383 Data.TexAlign.Compressed.Width = 1;
384 Data.TexAlign.Compressed.Height = 1;
385 Data.TexAlign.Compressed.Depth = 1;
386 Data.TexAlign.Depth.Width = 4; // See usage for 16bpp HALIGN_8 special-casing.
387 Data.TexAlign.Depth.Height = 4;
388 Data.TexAlign.Depth_D16_UNORM_1x_4x_16x.Width = 8;
389 Data.TexAlign.Depth_D16_UNORM_1x_4x_16x.Height = Data.TexAlign.Depth.Height;
390 Data.TexAlign.Depth_D16_UNORM_2x_8x.Width = 8;
391 Data.TexAlign.Depth_D16_UNORM_2x_8x.Height = Data.TexAlign.Depth.Height;
392 Data.TexAlign.SeparateStencil.Width = 8;
393 Data.TexAlign.SeparateStencil.Height = 8;
394 Data.TexAlign.YUV422.Width = 4;
395 Data.TexAlign.YUV422.Height = 4;
396 Data.TexAlign.AllOther.Width = 16; // HALIGN_16 required for non-MSAA RT's for CCS Fast-Clear and...TBA
397 Data.TexAlign.AllOther.Height = 4; // VALIGN_4 should be sufficent.
398 Data.TexAlign.XAdapter.Height = D3DKMT_CROSS_ADAPTER_RESOURCE_HEIGHT_ALIGNMENT;
399 Data.TexAlign.XAdapter.Width = 1; //minimum should be one.
400
401 // ----------------------------------
402 // SURFACE_STATE YOffset Granularity
403 // ----------------------------------
404 Data.SurfaceStateYOffsetGranularity = 4;
405 Data.SamplerFetchGranularityHeight = 4;
406 Data.SamplerFetchGranularityWidth = 4;
407
408 // ----------------------------------
409 // Restrictions for Cross adapter resource
410 // ----------------------------------
411 Data.XAdapter.Alignment = PAGE_SIZE;
412 Data.XAdapter.PitchAlignment = GMM_BYTES(D3DKMT_CROSS_ADAPTER_RESOURCE_PITCH_ALIGNMENT);
413 Data.XAdapter.RenderPitchAlignment = GMM_BYTES(D3DKMT_CROSS_ADAPTER_RESOURCE_PITCH_ALIGNMENT);
414 Data.XAdapter.LockPitchAlignment = GMM_BYTES(D3DKMT_CROSS_ADAPTER_RESOURCE_PITCH_ALIGNMENT);
415 Data.XAdapter.MinPitch = GMM_BYTES(32);
416 Data.XAdapter.MaxPitch = (pGmmLibContext->GetWaTable().WaRestrictPitch128KB) ? GMM_KBYTE(128) : GMM_KBYTE(256);
417 Data.XAdapter.MinAllocationSize = PAGE_SIZE;
418 Data.XAdapter.MinHeight = GMM_SCANLINES(1);
419 Data.XAdapter.MinWidth = GMM_PIXELS(1);
420 Data.XAdapter.MinDepth = 0;
421 Data.XAdapter.MaxHeight = GMM_KBYTE(16);
422 Data.XAdapter.MaxWidth = GMM_KBYTE(16);
423 Data.XAdapter.MaxDepth = GMM_FIELD_NA;
424 Data.XAdapter.MaxArraySize = GMM_KBYTE(2);
425
426 //---------------------------------------------
427 //MaxSize for any surface type
428 //---------------------------------------------
429 Data.SurfaceMaxSize = GMM_GBYTE(2);
430 Data.MaxGpuVirtualAddressBitsPerResource = 31;
431 Data.MaxSLMSize = GMM_KBYTE(384);
432
433 Data.HiZPixelsPerByte = 2;
434
435 Data.ReconMaxHeight = Data.Texture2DSurface.MaxHeight; // Reconstructed surfaces require more height and width for higher resolutions.
436 Data.ReconMaxWidth = Data.Texture2DSurface.MaxWidth;
437 }
438