summaryrefslogtreecommitdiff
path: root/contrib/SDL-3.2.8/src/gpu
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-12-27 12:03:39 -0800
committer3gg <3gg@shellblade.net>2025-12-27 12:03:39 -0800
commit5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch)
tree8926ab44f168acf787d8e19608857b3af0f82758 /contrib/SDL-3.2.8/src/gpu
Initial commit
Diffstat (limited to 'contrib/SDL-3.2.8/src/gpu')
-rw-r--r--contrib/SDL-3.2.8/src/gpu/SDL_gpu.c2965
-rw-r--r--contrib/SDL-3.2.8/src/gpu/SDL_sysgpu.h998
-rw-r--r--contrib/SDL-3.2.8/src/gpu/d3d12/D3D12_Blit.h3349
-rw-r--r--contrib/SDL-3.2.8/src/gpu/d3d12/D3D_Blit.hlsl97
-rw-r--r--contrib/SDL-3.2.8/src/gpu/d3d12/SDL_gpu_d3d12.c9113
-rw-r--r--contrib/SDL-3.2.8/src/gpu/d3d12/compile_shaders.bat18
-rw-r--r--contrib/SDL-3.2.8/src/gpu/d3d12/compile_shaders_xbox.bat13
-rw-r--r--contrib/SDL-3.2.8/src/gpu/metal/Metal_Blit.h10088
-rw-r--r--contrib/SDL-3.2.8/src/gpu/metal/Metal_Blit.metal110
-rw-r--r--contrib/SDL-3.2.8/src/gpu/metal/SDL_gpu_metal.m4580
-rwxr-xr-xcontrib/SDL-3.2.8/src/gpu/metal/compile_shaders.sh68
-rw-r--r--contrib/SDL-3.2.8/src/gpu/vulkan/SDL_gpu_vulkan.c11841
-rw-r--r--contrib/SDL-3.2.8/src/gpu/vulkan/SDL_gpu_vulkan_vkfuncs.h176
13 files changed, 43416 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/gpu/SDL_gpu.c b/contrib/SDL-3.2.8/src/gpu/SDL_gpu.c
new file mode 100644
index 0000000..0897d1c
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/SDL_gpu.c
@@ -0,0 +1,2965 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22#include "SDL_sysgpu.h"
23
24// FIXME: This could probably use SDL_ObjectValid
25#define CHECK_DEVICE_MAGIC(device, retval) \
26 if (device == NULL) { \
27 SDL_SetError("Invalid GPU device"); \
28 return retval; \
29 }
30
31#define CHECK_COMMAND_BUFFER \
32 if (((CommandBufferCommonHeader *)command_buffer)->submitted) { \
33 SDL_assert_release(!"Command buffer already submitted!"); \
34 return; \
35 }
36
37#define CHECK_COMMAND_BUFFER_RETURN_FALSE \
38 if (((CommandBufferCommonHeader *)command_buffer)->submitted) { \
39 SDL_assert_release(!"Command buffer already submitted!"); \
40 return false; \
41 }
42
43#define CHECK_COMMAND_BUFFER_RETURN_NULL \
44 if (((CommandBufferCommonHeader *)command_buffer)->submitted) { \
45 SDL_assert_release(!"Command buffer already submitted!"); \
46 return NULL; \
47 }
48
49#define CHECK_ANY_PASS_IN_PROGRESS(msg, retval) \
50 if ( \
51 ((CommandBufferCommonHeader *)command_buffer)->render_pass.in_progress || \
52 ((CommandBufferCommonHeader *)command_buffer)->compute_pass.in_progress || \
53 ((CommandBufferCommonHeader *)command_buffer)->copy_pass.in_progress) { \
54 SDL_assert_release(!msg); \
55 return retval; \
56 }
57
58#define CHECK_RENDERPASS \
59 if (!((Pass *)render_pass)->in_progress) { \
60 SDL_assert_release(!"Render pass not in progress!"); \
61 return; \
62 }
63
64#define CHECK_GRAPHICS_PIPELINE_BOUND \
65 if (!((CommandBufferCommonHeader *)RENDERPASS_COMMAND_BUFFER)->graphics_pipeline_bound) { \
66 SDL_assert_release(!"Graphics pipeline not bound!"); \
67 return; \
68 }
69
70#define CHECK_COMPUTEPASS \
71 if (!((Pass *)compute_pass)->in_progress) { \
72 SDL_assert_release(!"Compute pass not in progress!"); \
73 return; \
74 }
75
76#define CHECK_COMPUTE_PIPELINE_BOUND \
77 if (!((CommandBufferCommonHeader *)COMPUTEPASS_COMMAND_BUFFER)->compute_pipeline_bound) { \
78 SDL_assert_release(!"Compute pipeline not bound!"); \
79 return; \
80 }
81
82#define CHECK_COPYPASS \
83 if (!((Pass *)copy_pass)->in_progress) { \
84 SDL_assert_release(!"Copy pass not in progress!"); \
85 return; \
86 }
87
88#define CHECK_TEXTUREFORMAT_ENUM_INVALID(enumval, retval) \
89 if (enumval <= SDL_GPU_TEXTUREFORMAT_INVALID || enumval >= SDL_GPU_TEXTUREFORMAT_MAX_ENUM_VALUE) { \
90 SDL_assert_release(!"Invalid texture format enum!"); \
91 return retval; \
92 }
93
94#define CHECK_VERTEXELEMENTFORMAT_ENUM_INVALID(enumval, retval) \
95 if (enumval <= SDL_GPU_VERTEXELEMENTFORMAT_INVALID || enumval >= SDL_GPU_VERTEXELEMENTFORMAT_MAX_ENUM_VALUE) { \
96 SDL_assert_release(!"Invalid vertex format enum!"); \
97 return retval; \
98 }
99
100#define CHECK_COMPAREOP_ENUM_INVALID(enumval, retval) \
101 if (enumval <= SDL_GPU_COMPAREOP_INVALID || enumval >= SDL_GPU_COMPAREOP_MAX_ENUM_VALUE) { \
102 SDL_assert_release(!"Invalid compare op enum!"); \
103 return retval; \
104 }
105
106#define CHECK_STENCILOP_ENUM_INVALID(enumval, retval) \
107 if (enumval <= SDL_GPU_STENCILOP_INVALID || enumval >= SDL_GPU_STENCILOP_MAX_ENUM_VALUE) { \
108 SDL_assert_release(!"Invalid stencil op enum!"); \
109 return retval; \
110 }
111
112#define CHECK_BLENDOP_ENUM_INVALID(enumval, retval) \
113 if (enumval <= SDL_GPU_BLENDOP_INVALID || enumval >= SDL_GPU_BLENDOP_MAX_ENUM_VALUE) { \
114 SDL_assert_release(!"Invalid blend op enum!"); \
115 return retval; \
116 }
117
118#define CHECK_BLENDFACTOR_ENUM_INVALID(enumval, retval) \
119 if (enumval <= SDL_GPU_BLENDFACTOR_INVALID || enumval >= SDL_GPU_BLENDFACTOR_MAX_ENUM_VALUE) { \
120 SDL_assert_release(!"Invalid blend factor enum!"); \
121 return retval; \
122 }
123
124#define CHECK_SWAPCHAINCOMPOSITION_ENUM_INVALID(enumval, retval) \
125 if (enumval < 0 || enumval >= SDL_GPU_SWAPCHAINCOMPOSITION_MAX_ENUM_VALUE) { \
126 SDL_assert_release(!"Invalid swapchain composition enum!"); \
127 return retval; \
128 }
129
130#define CHECK_PRESENTMODE_ENUM_INVALID(enumval, retval) \
131 if (enumval < 0 || enumval >= SDL_GPU_PRESENTMODE_MAX_ENUM_VALUE) { \
132 SDL_assert_release(!"Invalid present mode enum!"); \
133 return retval; \
134 }
135
136#define COMMAND_BUFFER_DEVICE \
137 ((CommandBufferCommonHeader *)command_buffer)->device
138
139#define RENDERPASS_COMMAND_BUFFER \
140 ((Pass *)render_pass)->command_buffer
141
142#define RENDERPASS_DEVICE \
143 ((CommandBufferCommonHeader *)RENDERPASS_COMMAND_BUFFER)->device
144
145#define COMPUTEPASS_COMMAND_BUFFER \
146 ((Pass *)compute_pass)->command_buffer
147
148#define COMPUTEPASS_DEVICE \
149 ((CommandBufferCommonHeader *)COMPUTEPASS_COMMAND_BUFFER)->device
150
151#define COPYPASS_COMMAND_BUFFER \
152 ((Pass *)copy_pass)->command_buffer
153
154#define COPYPASS_DEVICE \
155 ((CommandBufferCommonHeader *)COPYPASS_COMMAND_BUFFER)->device
156
157// Drivers
158
159#ifndef SDL_GPU_DISABLED
160static const SDL_GPUBootstrap *backends[] = {
161#ifdef SDL_GPU_PRIVATE
162 &PrivateGPUDriver,
163#endif
164#ifdef SDL_GPU_METAL
165 &MetalDriver,
166#endif
167#ifdef SDL_GPU_VULKAN
168 &VulkanDriver,
169#endif
170#ifdef SDL_GPU_D3D12
171 &D3D12Driver,
172#endif
173 NULL
174};
175#endif // !SDL_GPU_DISABLED
176
177// Internal Utility Functions
178
179SDL_GPUGraphicsPipeline *SDL_GPU_FetchBlitPipeline(
180 SDL_GPUDevice *device,
181 SDL_GPUTextureType source_texture_type,
182 SDL_GPUTextureFormat destination_format,
183 SDL_GPUShader *blit_vertex_shader,
184 SDL_GPUShader *blit_from_2d_shader,
185 SDL_GPUShader *blit_from_2d_array_shader,
186 SDL_GPUShader *blit_from_3d_shader,
187 SDL_GPUShader *blit_from_cube_shader,
188 SDL_GPUShader *blit_from_cube_array_shader,
189 BlitPipelineCacheEntry **blit_pipelines,
190 Uint32 *blit_pipeline_count,
191 Uint32 *blit_pipeline_capacity)
192{
193 SDL_GPUGraphicsPipelineCreateInfo blit_pipeline_create_info;
194 SDL_GPUColorTargetDescription color_target_desc;
195 SDL_GPUGraphicsPipeline *pipeline;
196
197 if (blit_pipeline_count == NULL) {
198 // use pre-created, format-agnostic pipelines
199 return (*blit_pipelines)[source_texture_type].pipeline;
200 }
201
202 for (Uint32 i = 0; i < *blit_pipeline_count; i += 1) {
203 if ((*blit_pipelines)[i].type == source_texture_type && (*blit_pipelines)[i].format == destination_format) {
204 return (*blit_pipelines)[i].pipeline;
205 }
206 }
207
208 // No pipeline found, we'll need to make one!
209 SDL_zero(blit_pipeline_create_info);
210
211 SDL_zero(color_target_desc);
212 color_target_desc.blend_state.color_write_mask = 0xF;
213 color_target_desc.format = destination_format;
214
215 blit_pipeline_create_info.target_info.color_target_descriptions = &color_target_desc;
216 blit_pipeline_create_info.target_info.num_color_targets = 1;
217 blit_pipeline_create_info.target_info.depth_stencil_format = SDL_GPU_TEXTUREFORMAT_D16_UNORM; // arbitrary
218 blit_pipeline_create_info.target_info.has_depth_stencil_target = false;
219
220 blit_pipeline_create_info.vertex_shader = blit_vertex_shader;
221 if (source_texture_type == SDL_GPU_TEXTURETYPE_CUBE) {
222 blit_pipeline_create_info.fragment_shader = blit_from_cube_shader;
223 } else if (source_texture_type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY) {
224 blit_pipeline_create_info.fragment_shader = blit_from_cube_array_shader;
225 } else if (source_texture_type == SDL_GPU_TEXTURETYPE_2D_ARRAY) {
226 blit_pipeline_create_info.fragment_shader = blit_from_2d_array_shader;
227 } else if (source_texture_type == SDL_GPU_TEXTURETYPE_3D) {
228 blit_pipeline_create_info.fragment_shader = blit_from_3d_shader;
229 } else {
230 blit_pipeline_create_info.fragment_shader = blit_from_2d_shader;
231 }
232
233 blit_pipeline_create_info.multisample_state.sample_count = SDL_GPU_SAMPLECOUNT_1;
234 blit_pipeline_create_info.multisample_state.enable_mask = false;
235
236 blit_pipeline_create_info.primitive_type = SDL_GPU_PRIMITIVETYPE_TRIANGLELIST;
237
238 pipeline = SDL_CreateGPUGraphicsPipeline(
239 device,
240 &blit_pipeline_create_info);
241
242 if (pipeline == NULL) {
243 SDL_SetError("Failed to create GPU pipeline for blit");
244 return NULL;
245 }
246
247 // Cache the new pipeline
248 EXPAND_ARRAY_IF_NEEDED(
249 (*blit_pipelines),
250 BlitPipelineCacheEntry,
251 *blit_pipeline_count + 1,
252 *blit_pipeline_capacity,
253 *blit_pipeline_capacity * 2);
254
255 (*blit_pipelines)[*blit_pipeline_count].pipeline = pipeline;
256 (*blit_pipelines)[*blit_pipeline_count].type = source_texture_type;
257 (*blit_pipelines)[*blit_pipeline_count].format = destination_format;
258 *blit_pipeline_count += 1;
259
260 return pipeline;
261}
262
263void SDL_GPU_BlitCommon(
264 SDL_GPUCommandBuffer *command_buffer,
265 const SDL_GPUBlitInfo *info,
266 SDL_GPUSampler *blit_linear_sampler,
267 SDL_GPUSampler *blit_nearest_sampler,
268 SDL_GPUShader *blit_vertex_shader,
269 SDL_GPUShader *blit_from_2d_shader,
270 SDL_GPUShader *blit_from_2d_array_shader,
271 SDL_GPUShader *blit_from_3d_shader,
272 SDL_GPUShader *blit_from_cube_shader,
273 SDL_GPUShader *blit_from_cube_array_shader,
274 BlitPipelineCacheEntry **blit_pipelines,
275 Uint32 *blit_pipeline_count,
276 Uint32 *blit_pipeline_capacity)
277{
278 CommandBufferCommonHeader *cmdbufHeader = (CommandBufferCommonHeader *)command_buffer;
279 SDL_GPURenderPass *render_pass;
280 TextureCommonHeader *src_header = (TextureCommonHeader *)info->source.texture;
281 TextureCommonHeader *dst_header = (TextureCommonHeader *)info->destination.texture;
282 SDL_GPUGraphicsPipeline *blit_pipeline;
283 SDL_GPUColorTargetInfo color_target_info;
284 SDL_GPUViewport viewport;
285 SDL_GPUTextureSamplerBinding texture_sampler_binding;
286 BlitFragmentUniforms blit_fragment_uniforms;
287 Uint32 layer_divisor;
288
289 blit_pipeline = SDL_GPU_FetchBlitPipeline(
290 cmdbufHeader->device,
291 src_header->info.type,
292 dst_header->info.format,
293 blit_vertex_shader,
294 blit_from_2d_shader,
295 blit_from_2d_array_shader,
296 blit_from_3d_shader,
297 blit_from_cube_shader,
298 blit_from_cube_array_shader,
299 blit_pipelines,
300 blit_pipeline_count,
301 blit_pipeline_capacity);
302
303 SDL_assert(blit_pipeline != NULL);
304
305 color_target_info.load_op = info->load_op;
306 color_target_info.clear_color = info->clear_color;
307 color_target_info.store_op = SDL_GPU_STOREOP_STORE;
308
309 color_target_info.texture = info->destination.texture;
310 color_target_info.mip_level = info->destination.mip_level;
311 color_target_info.layer_or_depth_plane = info->destination.layer_or_depth_plane;
312 color_target_info.cycle = info->cycle;
313
314 render_pass = SDL_BeginGPURenderPass(
315 command_buffer,
316 &color_target_info,
317 1,
318 NULL);
319
320 viewport.x = (float)info->destination.x;
321 viewport.y = (float)info->destination.y;
322 viewport.w = (float)info->destination.w;
323 viewport.h = (float)info->destination.h;
324 viewport.min_depth = 0;
325 viewport.max_depth = 1;
326
327 SDL_SetGPUViewport(
328 render_pass,
329 &viewport);
330
331 SDL_BindGPUGraphicsPipeline(
332 render_pass,
333 blit_pipeline);
334
335 texture_sampler_binding.texture = info->source.texture;
336 texture_sampler_binding.sampler =
337 info->filter == SDL_GPU_FILTER_NEAREST ? blit_nearest_sampler : blit_linear_sampler;
338
339 SDL_BindGPUFragmentSamplers(
340 render_pass,
341 0,
342 &texture_sampler_binding,
343 1);
344
345 blit_fragment_uniforms.left = (float)info->source.x / (src_header->info.width >> info->source.mip_level);
346 blit_fragment_uniforms.top = (float)info->source.y / (src_header->info.height >> info->source.mip_level);
347 blit_fragment_uniforms.width = (float)info->source.w / (src_header->info.width >> info->source.mip_level);
348 blit_fragment_uniforms.height = (float)info->source.h / (src_header->info.height >> info->source.mip_level);
349 blit_fragment_uniforms.mip_level = info->source.mip_level;
350
351 layer_divisor = (src_header->info.type == SDL_GPU_TEXTURETYPE_3D) ? src_header->info.layer_count_or_depth : 1;
352 blit_fragment_uniforms.layer_or_depth = (float)info->source.layer_or_depth_plane / layer_divisor;
353
354 if (info->flip_mode & SDL_FLIP_HORIZONTAL) {
355 blit_fragment_uniforms.left += blit_fragment_uniforms.width;
356 blit_fragment_uniforms.width *= -1;
357 }
358
359 if (info->flip_mode & SDL_FLIP_VERTICAL) {
360 blit_fragment_uniforms.top += blit_fragment_uniforms.height;
361 blit_fragment_uniforms.height *= -1;
362 }
363
364 SDL_PushGPUFragmentUniformData(
365 command_buffer,
366 0,
367 &blit_fragment_uniforms,
368 sizeof(blit_fragment_uniforms));
369
370 SDL_DrawGPUPrimitives(render_pass, 3, 1, 0, 0);
371 SDL_EndGPURenderPass(render_pass);
372}
373
374// Driver Functions
375
376#ifndef SDL_GPU_DISABLED
377static const SDL_GPUBootstrap * SDL_GPUSelectBackend(SDL_PropertiesID props)
378{
379 Uint32 i;
380 SDL_GPUShaderFormat format_flags = 0;
381 const char *gpudriver;
382 SDL_VideoDevice *_this = SDL_GetVideoDevice();
383
384 if (_this == NULL) {
385 SDL_SetError("Video subsystem not initialized");
386 return NULL;
387 }
388
389 if (SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN, false)) {
390 format_flags |= SDL_GPU_SHADERFORMAT_PRIVATE;
391 }
392 if (SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN, false)) {
393 format_flags |= SDL_GPU_SHADERFORMAT_SPIRV;
394 }
395 if (SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN, false)) {
396 format_flags |= SDL_GPU_SHADERFORMAT_DXBC;
397 }
398 if (SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN, false)) {
399 format_flags |= SDL_GPU_SHADERFORMAT_DXIL;
400 }
401 if (SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN, false)) {
402 format_flags |= SDL_GPU_SHADERFORMAT_MSL;
403 }
404 if (SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN, false)) {
405 format_flags |= SDL_GPU_SHADERFORMAT_METALLIB;
406 }
407
408 gpudriver = SDL_GetHint(SDL_HINT_GPU_DRIVER);
409 if (gpudriver == NULL) {
410 gpudriver = SDL_GetStringProperty(props, SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING, NULL);
411 }
412
413 // Environment/Properties override...
414 if (gpudriver != NULL) {
415 for (i = 0; backends[i]; i += 1) {
416 if (SDL_strcasecmp(gpudriver, backends[i]->name) == 0) {
417 if (!(backends[i]->shader_formats & format_flags)) {
418 SDL_SetError("Required shader format for backend %s not provided!", gpudriver);
419 return NULL;
420 }
421 if (backends[i]->PrepareDriver(_this)) {
422 return backends[i];
423 }
424 }
425 }
426
427 SDL_SetError("SDL_HINT_GPU_DRIVER %s unsupported!", gpudriver);
428 return NULL;
429 }
430
431 for (i = 0; backends[i]; i += 1) {
432 if ((backends[i]->shader_formats & format_flags) == 0) {
433 // Don't select a backend which doesn't support the app's shaders.
434 continue;
435 }
436 if (backends[i]->PrepareDriver(_this)) {
437 return backends[i];
438 }
439 }
440
441 SDL_SetError("No supported SDL_GPU backend found!");
442 return NULL;
443}
444
445static void SDL_GPU_FillProperties(
446 SDL_PropertiesID props,
447 SDL_GPUShaderFormat format_flags,
448 bool debug_mode,
449 const char *name)
450{
451 if (format_flags & SDL_GPU_SHADERFORMAT_PRIVATE) {
452 SDL_SetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN, true);
453 }
454 if (format_flags & SDL_GPU_SHADERFORMAT_SPIRV) {
455 SDL_SetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN, true);
456 }
457 if (format_flags & SDL_GPU_SHADERFORMAT_DXBC) {
458 SDL_SetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN, true);
459 }
460 if (format_flags & SDL_GPU_SHADERFORMAT_DXIL) {
461 SDL_SetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN, true);
462 }
463 if (format_flags & SDL_GPU_SHADERFORMAT_MSL) {
464 SDL_SetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN, true);
465 }
466 if (format_flags & SDL_GPU_SHADERFORMAT_METALLIB) {
467 SDL_SetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN, true);
468 }
469 SDL_SetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN, debug_mode);
470 SDL_SetStringProperty(props, SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING, name);
471}
472#endif // SDL_GPU_DISABLED
473
474bool SDL_GPUSupportsShaderFormats(
475 SDL_GPUShaderFormat format_flags,
476 const char *name)
477{
478#ifndef SDL_GPU_DISABLED
479 bool result;
480 SDL_PropertiesID props = SDL_CreateProperties();
481 SDL_GPU_FillProperties(props, format_flags, false, name);
482 result = SDL_GPUSupportsProperties(props);
483 SDL_DestroyProperties(props);
484 return result;
485#else
486 SDL_SetError("SDL not built with GPU support");
487 return false;
488#endif
489}
490
491bool SDL_GPUSupportsProperties(SDL_PropertiesID props)
492{
493#ifndef SDL_GPU_DISABLED
494 return (SDL_GPUSelectBackend(props) != NULL);
495#else
496 SDL_SetError("SDL not built with GPU support");
497 return false;
498#endif
499}
500
501SDL_GPUDevice *SDL_CreateGPUDevice(
502 SDL_GPUShaderFormat format_flags,
503 bool debug_mode,
504 const char *name)
505{
506#ifndef SDL_GPU_DISABLED
507 SDL_GPUDevice *result;
508 SDL_PropertiesID props = SDL_CreateProperties();
509 SDL_GPU_FillProperties(props, format_flags, debug_mode, name);
510 result = SDL_CreateGPUDeviceWithProperties(props);
511 SDL_DestroyProperties(props);
512 return result;
513#else
514 SDL_SetError("SDL not built with GPU support");
515 return NULL;
516#endif // SDL_GPU_DISABLED
517}
518
519SDL_GPUDevice *SDL_CreateGPUDeviceWithProperties(SDL_PropertiesID props)
520{
521#ifndef SDL_GPU_DISABLED
522 bool debug_mode;
523 bool preferLowPower;
524 SDL_GPUDevice *result = NULL;
525 const SDL_GPUBootstrap *selectedBackend;
526
527 selectedBackend = SDL_GPUSelectBackend(props);
528 if (selectedBackend != NULL) {
529 debug_mode = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN, true);
530 preferLowPower = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN, false);
531
532 result = selectedBackend->CreateDevice(debug_mode, preferLowPower, props);
533 if (result != NULL) {
534 result->backend = selectedBackend->name;
535 result->shader_formats = selectedBackend->shader_formats;
536 result->debug_mode = debug_mode;
537 }
538 }
539 return result;
540#else
541 SDL_SetError("SDL not built with GPU support");
542 return NULL;
543#endif // SDL_GPU_DISABLED
544}
545
546void SDL_DestroyGPUDevice(SDL_GPUDevice *device)
547{
548 CHECK_DEVICE_MAGIC(device, );
549
550 device->DestroyDevice(device);
551}
552
553int SDL_GetNumGPUDrivers(void)
554{
555#ifndef SDL_GPU_DISABLED
556 return SDL_arraysize(backends) - 1;
557#else
558 return 0;
559#endif
560}
561
562const char * SDL_GetGPUDriver(int index)
563{
564 if (index < 0 || index >= SDL_GetNumGPUDrivers()) {
565 SDL_InvalidParamError("index");
566 return NULL;
567 }
568#ifndef SDL_GPU_DISABLED
569 return backends[index]->name;
570#else
571 return NULL;
572#endif
573}
574
575const char * SDL_GetGPUDeviceDriver(SDL_GPUDevice *device)
576{
577 CHECK_DEVICE_MAGIC(device, NULL);
578
579 return device->backend;
580}
581
582SDL_GPUShaderFormat SDL_GetGPUShaderFormats(SDL_GPUDevice *device)
583{
584 CHECK_DEVICE_MAGIC(device, SDL_GPU_SHADERFORMAT_INVALID);
585
586 return device->shader_formats;
587}
588
589Uint32 SDL_GPUTextureFormatTexelBlockSize(
590 SDL_GPUTextureFormat format)
591{
592 switch (format) {
593 case SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM:
594 case SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB:
595 case SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM:
596 return 8;
597 case SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM:
598 case SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM:
599 case SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM:
600 case SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM:
601 case SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT:
602 case SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT:
603 case SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB:
604 case SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB:
605 case SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB:
606 return 16;
607 case SDL_GPU_TEXTUREFORMAT_R8_UNORM:
608 case SDL_GPU_TEXTUREFORMAT_R8_SNORM:
609 case SDL_GPU_TEXTUREFORMAT_A8_UNORM:
610 case SDL_GPU_TEXTUREFORMAT_R8_UINT:
611 case SDL_GPU_TEXTUREFORMAT_R8_INT:
612 return 1;
613 case SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM:
614 case SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM:
615 case SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM:
616 case SDL_GPU_TEXTUREFORMAT_R16_FLOAT:
617 case SDL_GPU_TEXTUREFORMAT_R8G8_SNORM:
618 case SDL_GPU_TEXTUREFORMAT_R8G8_UNORM:
619 case SDL_GPU_TEXTUREFORMAT_R8G8_UINT:
620 case SDL_GPU_TEXTUREFORMAT_R8G8_INT:
621 case SDL_GPU_TEXTUREFORMAT_R16_UNORM:
622 case SDL_GPU_TEXTUREFORMAT_R16_SNORM:
623 case SDL_GPU_TEXTUREFORMAT_R16_UINT:
624 case SDL_GPU_TEXTUREFORMAT_R16_INT:
625 case SDL_GPU_TEXTUREFORMAT_D16_UNORM:
626 return 2;
627 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM:
628 case SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM:
629 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB:
630 case SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB:
631 case SDL_GPU_TEXTUREFORMAT_R32_FLOAT:
632 case SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT:
633 case SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT:
634 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM:
635 case SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM:
636 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT:
637 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT:
638 case SDL_GPU_TEXTUREFORMAT_R16G16_UINT:
639 case SDL_GPU_TEXTUREFORMAT_R16G16_INT:
640 case SDL_GPU_TEXTUREFORMAT_R16G16_UNORM:
641 case SDL_GPU_TEXTUREFORMAT_R16G16_SNORM:
642 case SDL_GPU_TEXTUREFORMAT_D24_UNORM:
643 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT:
644 case SDL_GPU_TEXTUREFORMAT_R32_UINT:
645 case SDL_GPU_TEXTUREFORMAT_R32_INT:
646 case SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT:
647 return 4;
648 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT:
649 return 5;
650 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT:
651 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM:
652 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM:
653 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT:
654 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT:
655 case SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT:
656 case SDL_GPU_TEXTUREFORMAT_R32G32_UINT:
657 case SDL_GPU_TEXTUREFORMAT_R32G32_INT:
658 return 8;
659 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT:
660 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT:
661 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT:
662 return 16;
663 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM:
664 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM:
665 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM:
666 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM:
667 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM:
668 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM:
669 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM:
670 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM:
671 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM:
672 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM:
673 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM:
674 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM:
675 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM:
676 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM:
677 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB:
678 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB:
679 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB:
680 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB:
681 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB:
682 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB:
683 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB:
684 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB:
685 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB:
686 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB:
687 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB:
688 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB:
689 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB:
690 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB:
691 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT:
692 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT:
693 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT:
694 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT:
695 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT:
696 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT:
697 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT:
698 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT:
699 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT:
700 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT:
701 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT:
702 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT:
703 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT:
704 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT:
705 return 16;
706 default:
707 SDL_assert_release(!"Unrecognized TextureFormat!");
708 return 0;
709 }
710}
711
712bool SDL_GPUTextureSupportsFormat(
713 SDL_GPUDevice *device,
714 SDL_GPUTextureFormat format,
715 SDL_GPUTextureType type,
716 SDL_GPUTextureUsageFlags usage)
717{
718 CHECK_DEVICE_MAGIC(device, false);
719
720 if (device->debug_mode) {
721 CHECK_TEXTUREFORMAT_ENUM_INVALID(format, false)
722 }
723
724 return device->SupportsTextureFormat(
725 device->driverData,
726 format,
727 type,
728 usage);
729}
730
731bool SDL_GPUTextureSupportsSampleCount(
732 SDL_GPUDevice *device,
733 SDL_GPUTextureFormat format,
734 SDL_GPUSampleCount sample_count)
735{
736 CHECK_DEVICE_MAGIC(device, 0);
737
738 if (device->debug_mode) {
739 CHECK_TEXTUREFORMAT_ENUM_INVALID(format, 0)
740 }
741
742 return device->SupportsSampleCount(
743 device->driverData,
744 format,
745 sample_count);
746}
747
748// State Creation
749
750SDL_GPUComputePipeline *SDL_CreateGPUComputePipeline(
751 SDL_GPUDevice *device,
752 const SDL_GPUComputePipelineCreateInfo *createinfo)
753{
754 CHECK_DEVICE_MAGIC(device, NULL);
755 if (createinfo == NULL) {
756 SDL_InvalidParamError("createinfo");
757 return NULL;
758 }
759
760 if (device->debug_mode) {
761 if (createinfo->format == SDL_GPU_SHADERFORMAT_INVALID) {
762 SDL_assert_release(!"Shader format cannot be INVALID!");
763 return NULL;
764 }
765 if (!(createinfo->format & device->shader_formats)) {
766 SDL_assert_release(!"Incompatible shader format for GPU backend");
767 return NULL;
768 }
769 if (createinfo->num_readwrite_storage_textures > MAX_COMPUTE_WRITE_TEXTURES) {
770 SDL_assert_release(!"Compute pipeline write-only texture count cannot be higher than 8!");
771 return NULL;
772 }
773 if (createinfo->num_readwrite_storage_buffers > MAX_COMPUTE_WRITE_BUFFERS) {
774 SDL_assert_release(!"Compute pipeline write-only buffer count cannot be higher than 8!");
775 return NULL;
776 }
777 if (createinfo->threadcount_x == 0 ||
778 createinfo->threadcount_y == 0 ||
779 createinfo->threadcount_z == 0) {
780 SDL_assert_release(!"Compute pipeline threadCount dimensions must be at least 1!");
781 return NULL;
782 }
783 }
784
785 return device->CreateComputePipeline(
786 device->driverData,
787 createinfo);
788}
789
790SDL_GPUGraphicsPipeline *SDL_CreateGPUGraphicsPipeline(
791 SDL_GPUDevice *device,
792 const SDL_GPUGraphicsPipelineCreateInfo *graphicsPipelineCreateInfo)
793{
794 CHECK_DEVICE_MAGIC(device, NULL);
795 if (graphicsPipelineCreateInfo == NULL) {
796 SDL_InvalidParamError("graphicsPipelineCreateInfo");
797 return NULL;
798 }
799
800 if (device->debug_mode) {
801 if (graphicsPipelineCreateInfo->vertex_shader == NULL) {
802 SDL_assert_release(!"Vertex shader cannot be NULL!");
803 return NULL;
804 }
805 if (graphicsPipelineCreateInfo->fragment_shader == NULL) {
806 SDL_assert_release(!"Fragment shader cannot be NULL!");
807 return NULL;
808 }
809 if (graphicsPipelineCreateInfo->target_info.num_color_targets > 0 && graphicsPipelineCreateInfo->target_info.color_target_descriptions == NULL) {
810 SDL_assert_release(!"Color target descriptions array pointer cannot be NULL if num_color_targets is greater than zero!");
811 return NULL;
812 }
813 for (Uint32 i = 0; i < graphicsPipelineCreateInfo->target_info.num_color_targets; i += 1) {
814 CHECK_TEXTUREFORMAT_ENUM_INVALID(graphicsPipelineCreateInfo->target_info.color_target_descriptions[i].format, NULL);
815 if (IsDepthFormat(graphicsPipelineCreateInfo->target_info.color_target_descriptions[i].format)) {
816 SDL_assert_release(!"Color target formats cannot be a depth format!");
817 return NULL;
818 }
819 if (!SDL_GPUTextureSupportsFormat(device, graphicsPipelineCreateInfo->target_info.color_target_descriptions[i].format, SDL_GPU_TEXTURETYPE_2D, SDL_GPU_TEXTUREUSAGE_COLOR_TARGET)) {
820 SDL_assert_release(!"Format is not supported for color targets on this device!");
821 return NULL;
822 }
823 if (graphicsPipelineCreateInfo->target_info.color_target_descriptions[i].blend_state.enable_blend) {
824 const SDL_GPUColorTargetBlendState *blend_state = &graphicsPipelineCreateInfo->target_info.color_target_descriptions[i].blend_state;
825 CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->src_color_blendfactor, NULL)
826 CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->dst_color_blendfactor, NULL)
827 CHECK_BLENDOP_ENUM_INVALID(blend_state->color_blend_op, NULL)
828 CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->src_alpha_blendfactor, NULL)
829 CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->dst_alpha_blendfactor, NULL)
830 CHECK_BLENDOP_ENUM_INVALID(blend_state->alpha_blend_op, NULL)
831 }
832 }
833 if (graphicsPipelineCreateInfo->target_info.has_depth_stencil_target) {
834 CHECK_TEXTUREFORMAT_ENUM_INVALID(graphicsPipelineCreateInfo->target_info.depth_stencil_format, NULL);
835 if (!IsDepthFormat(graphicsPipelineCreateInfo->target_info.depth_stencil_format)) {
836 SDL_assert_release(!"Depth-stencil target format must be a depth format!");
837 return NULL;
838 }
839 if (!SDL_GPUTextureSupportsFormat(device, graphicsPipelineCreateInfo->target_info.depth_stencil_format, SDL_GPU_TEXTURETYPE_2D, SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET)) {
840 SDL_assert_release(!"Format is not supported for depth targets on this device!");
841 return NULL;
842 }
843 }
844 if (graphicsPipelineCreateInfo->vertex_input_state.num_vertex_buffers > 0 && graphicsPipelineCreateInfo->vertex_input_state.vertex_buffer_descriptions == NULL) {
845 SDL_assert_release(!"Vertex buffer descriptions array pointer cannot be NULL!");
846 return NULL;
847 }
848 if (graphicsPipelineCreateInfo->vertex_input_state.num_vertex_buffers > MAX_VERTEX_BUFFERS) {
849 SDL_assert_release(!"The number of vertex buffer descriptions in a vertex input state must not exceed 16!");
850 return NULL;
851 }
852 if (graphicsPipelineCreateInfo->vertex_input_state.num_vertex_attributes > 0 && graphicsPipelineCreateInfo->vertex_input_state.vertex_attributes == NULL) {
853 SDL_assert_release(!"Vertex attributes array pointer cannot be NULL!");
854 return NULL;
855 }
856 if (graphicsPipelineCreateInfo->vertex_input_state.num_vertex_attributes > MAX_VERTEX_ATTRIBUTES) {
857 SDL_assert_release(!"The number of vertex attributes in a vertex input state must not exceed 16!");
858 return NULL;
859 }
860 for (Uint32 i = 0; i < graphicsPipelineCreateInfo->vertex_input_state.num_vertex_buffers; i += 1) {
861 if (graphicsPipelineCreateInfo->vertex_input_state.vertex_buffer_descriptions[i].instance_step_rate != 0) {
862 SDL_assert_release(!"For all vertex buffer descriptions, instance_step_rate must be 0!");
863 return NULL;
864 }
865 }
866 Uint32 locations[MAX_VERTEX_ATTRIBUTES];
867 for (Uint32 i = 0; i < graphicsPipelineCreateInfo->vertex_input_state.num_vertex_attributes; i += 1) {
868 CHECK_VERTEXELEMENTFORMAT_ENUM_INVALID(graphicsPipelineCreateInfo->vertex_input_state.vertex_attributes[i].format, NULL);
869
870 locations[i] = graphicsPipelineCreateInfo->vertex_input_state.vertex_attributes[i].location;
871 for (Uint32 j = 0; j < i; j += 1) {
872 if (locations[j] == locations[i]) {
873 SDL_assert_release(!"Each vertex attribute location in a vertex input state must be unique!");
874 return NULL;
875 }
876 }
877 }
878 if (graphicsPipelineCreateInfo->multisample_state.enable_mask) {
879 SDL_assert_release(!"For multisample states, enable_mask must be false!");
880 return NULL;
881 }
882 if (graphicsPipelineCreateInfo->multisample_state.sample_mask != 0) {
883 SDL_assert_release(!"For multisample states, sample_mask must be 0!");
884 return NULL;
885 }
886 if (graphicsPipelineCreateInfo->depth_stencil_state.enable_depth_test) {
887 CHECK_COMPAREOP_ENUM_INVALID(graphicsPipelineCreateInfo->depth_stencil_state.compare_op, NULL)
888 }
889 if (graphicsPipelineCreateInfo->depth_stencil_state.enable_stencil_test) {
890 const SDL_GPUStencilOpState *stencil_state = &graphicsPipelineCreateInfo->depth_stencil_state.back_stencil_state;
891 CHECK_COMPAREOP_ENUM_INVALID(stencil_state->compare_op, NULL)
892 CHECK_STENCILOP_ENUM_INVALID(stencil_state->fail_op, NULL)
893 CHECK_STENCILOP_ENUM_INVALID(stencil_state->pass_op, NULL)
894 CHECK_STENCILOP_ENUM_INVALID(stencil_state->depth_fail_op, NULL)
895 }
896 }
897
898 return device->CreateGraphicsPipeline(
899 device->driverData,
900 graphicsPipelineCreateInfo);
901}
902
903SDL_GPUSampler *SDL_CreateGPUSampler(
904 SDL_GPUDevice *device,
905 const SDL_GPUSamplerCreateInfo *createinfo)
906{
907 CHECK_DEVICE_MAGIC(device, NULL);
908 if (createinfo == NULL) {
909 SDL_InvalidParamError("createinfo");
910 return NULL;
911 }
912
913 return device->CreateSampler(
914 device->driverData,
915 createinfo);
916}
917
918SDL_GPUShader *SDL_CreateGPUShader(
919 SDL_GPUDevice *device,
920 const SDL_GPUShaderCreateInfo *createinfo)
921{
922 CHECK_DEVICE_MAGIC(device, NULL);
923 if (createinfo == NULL) {
924 SDL_InvalidParamError("createinfo");
925 return NULL;
926 }
927
928 if (device->debug_mode) {
929 if (createinfo->format == SDL_GPU_SHADERFORMAT_INVALID) {
930 SDL_assert_release(!"Shader format cannot be INVALID!");
931 return NULL;
932 }
933 if (!(createinfo->format & device->shader_formats)) {
934 SDL_assert_release(!"Incompatible shader format for GPU backend");
935 return NULL;
936 }
937 }
938
939 return device->CreateShader(
940 device->driverData,
941 createinfo);
942}
943
944SDL_GPUTexture *SDL_CreateGPUTexture(
945 SDL_GPUDevice *device,
946 const SDL_GPUTextureCreateInfo *createinfo)
947{
948 CHECK_DEVICE_MAGIC(device, NULL);
949 if (createinfo == NULL) {
950 SDL_InvalidParamError("createinfo");
951 return NULL;
952 }
953
954 if (device->debug_mode) {
955 bool failed = false;
956
957 const Uint32 MAX_2D_DIMENSION = 16384;
958 const Uint32 MAX_3D_DIMENSION = 2048;
959
960 // Common checks for all texture types
961 CHECK_TEXTUREFORMAT_ENUM_INVALID(createinfo->format, NULL)
962
963 if (createinfo->width <= 0 || createinfo->height <= 0 || createinfo->layer_count_or_depth <= 0) {
964 SDL_assert_release(!"For any texture: width, height, and layer_count_or_depth must be >= 1");
965 failed = true;
966 }
967 if (createinfo->num_levels <= 0) {
968 SDL_assert_release(!"For any texture: num_levels must be >= 1");
969 failed = true;
970 }
971 if ((createinfo->usage & SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ) && (createinfo->usage & SDL_GPU_TEXTUREUSAGE_SAMPLER)) {
972 SDL_assert_release(!"For any texture: usage cannot contain both GRAPHICS_STORAGE_READ and SAMPLER");
973 failed = true;
974 }
975 if (createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1 &&
976 (createinfo->usage & (SDL_GPU_TEXTUREUSAGE_SAMPLER |
977 SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ |
978 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ |
979 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE))) {
980 SDL_assert_release(!"For multisample textures: usage cannot contain SAMPLER or STORAGE flags");
981 failed = true;
982 }
983 if (IsDepthFormat(createinfo->format) && (createinfo->usage & ~(SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET | SDL_GPU_TEXTUREUSAGE_SAMPLER))) {
984 SDL_assert_release(!"For depth textures: usage cannot contain any flags except for DEPTH_STENCIL_TARGET and SAMPLER");
985 failed = true;
986 }
987 if (IsIntegerFormat(createinfo->format) && (createinfo->usage & SDL_GPU_TEXTUREUSAGE_SAMPLER)) {
988 SDL_assert_release(!"For any texture: usage cannot contain SAMPLER for textures with an integer format");
989 failed = true;
990 }
991
992 if (createinfo->type == SDL_GPU_TEXTURETYPE_CUBE) {
993 // Cubemap validation
994 if (createinfo->width != createinfo->height) {
995 SDL_assert_release(!"For cube textures: width and height must be identical");
996 failed = true;
997 }
998 if (createinfo->width > MAX_2D_DIMENSION || createinfo->height > MAX_2D_DIMENSION) {
999 SDL_assert_release(!"For cube textures: width and height must be <= 16384");
1000 failed = true;
1001 }
1002 if (createinfo->layer_count_or_depth != 6) {
1003 SDL_assert_release(!"For cube textures: layer_count_or_depth must be 6");
1004 failed = true;
1005 }
1006 if (createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1) {
1007 SDL_assert_release(!"For cube textures: sample_count must be SDL_GPU_SAMPLECOUNT_1");
1008 failed = true;
1009 }
1010 if (!SDL_GPUTextureSupportsFormat(device, createinfo->format, SDL_GPU_TEXTURETYPE_CUBE, createinfo->usage)) {
1011 SDL_assert_release(!"For cube textures: the format is unsupported for the given usage");
1012 failed = true;
1013 }
1014 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY) {
1015 // Cubemap array validation
1016 if (createinfo->width != createinfo->height) {
1017 SDL_assert_release(!"For cube array textures: width and height must be identical");
1018 failed = true;
1019 }
1020 if (createinfo->width > MAX_2D_DIMENSION || createinfo->height > MAX_2D_DIMENSION) {
1021 SDL_assert_release(!"For cube array textures: width and height must be <= 16384");
1022 failed = true;
1023 }
1024 if (createinfo->layer_count_or_depth % 6 != 0) {
1025 SDL_assert_release(!"For cube array textures: layer_count_or_depth must be a multiple of 6");
1026 failed = true;
1027 }
1028 if (createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1) {
1029 SDL_assert_release(!"For cube array textures: sample_count must be SDL_GPU_SAMPLECOUNT_1");
1030 failed = true;
1031 }
1032 if (!SDL_GPUTextureSupportsFormat(device, createinfo->format, SDL_GPU_TEXTURETYPE_CUBE_ARRAY, createinfo->usage)) {
1033 SDL_assert_release(!"For cube array textures: the format is unsupported for the given usage");
1034 failed = true;
1035 }
1036 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_3D) {
1037 // 3D Texture Validation
1038 if (createinfo->width > MAX_3D_DIMENSION || createinfo->height > MAX_3D_DIMENSION || createinfo->layer_count_or_depth > MAX_3D_DIMENSION) {
1039 SDL_assert_release(!"For 3D textures: width, height, and layer_count_or_depth must be <= 2048");
1040 failed = true;
1041 }
1042 if (createinfo->usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET) {
1043 SDL_assert_release(!"For 3D textures: usage must not contain DEPTH_STENCIL_TARGET");
1044 failed = true;
1045 }
1046 if (createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1) {
1047 SDL_assert_release(!"For 3D textures: sample_count must be SDL_GPU_SAMPLECOUNT_1");
1048 failed = true;
1049 }
1050 if (!SDL_GPUTextureSupportsFormat(device, createinfo->format, SDL_GPU_TEXTURETYPE_3D, createinfo->usage)) {
1051 SDL_assert_release(!"For 3D textures: the format is unsupported for the given usage");
1052 failed = true;
1053 }
1054 } else {
1055 if (createinfo->type == SDL_GPU_TEXTURETYPE_2D_ARRAY) {
1056 // Array Texture Validation
1057 if (createinfo->usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET) {
1058 SDL_assert_release(!"For array textures: usage must not contain DEPTH_STENCIL_TARGET");
1059 failed = true;
1060 }
1061 if (createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1) {
1062 SDL_assert_release(!"For array textures: sample_count must be SDL_GPU_SAMPLECOUNT_1");
1063 failed = true;
1064 }
1065 }
1066 if (createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1 && createinfo->num_levels > 1) {
1067 SDL_assert_release(!"For 2D multisample textures: num_levels must be 1");
1068 failed = true;
1069 }
1070 if (!SDL_GPUTextureSupportsFormat(device, createinfo->format, SDL_GPU_TEXTURETYPE_2D, createinfo->usage)) {
1071 SDL_assert_release(!"For 2D textures: the format is unsupported for the given usage");
1072 failed = true;
1073 }
1074 }
1075
1076 if (failed) {
1077 return NULL;
1078 }
1079 }
1080
1081 return device->CreateTexture(
1082 device->driverData,
1083 createinfo);
1084}
1085
1086SDL_GPUBuffer *SDL_CreateGPUBuffer(
1087 SDL_GPUDevice *device,
1088 const SDL_GPUBufferCreateInfo *createinfo)
1089{
1090 CHECK_DEVICE_MAGIC(device, NULL);
1091 if (createinfo == NULL) {
1092 SDL_InvalidParamError("createinfo");
1093 return NULL;
1094 }
1095
1096 const char *debugName = SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING, NULL);
1097
1098 return device->CreateBuffer(
1099 device->driverData,
1100 createinfo->usage,
1101 createinfo->size,
1102 debugName);
1103}
1104
1105SDL_GPUTransferBuffer *SDL_CreateGPUTransferBuffer(
1106 SDL_GPUDevice *device,
1107 const SDL_GPUTransferBufferCreateInfo *createinfo)
1108{
1109 CHECK_DEVICE_MAGIC(device, NULL);
1110 if (createinfo == NULL) {
1111 SDL_InvalidParamError("createinfo");
1112 return NULL;
1113 }
1114
1115 const char *debugName = SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING, NULL);
1116
1117 return device->CreateTransferBuffer(
1118 device->driverData,
1119 createinfo->usage,
1120 createinfo->size,
1121 debugName);
1122}
1123
1124// Debug Naming
1125
1126void SDL_SetGPUBufferName(
1127 SDL_GPUDevice *device,
1128 SDL_GPUBuffer *buffer,
1129 const char *text)
1130{
1131 CHECK_DEVICE_MAGIC(device, );
1132 if (buffer == NULL) {
1133 SDL_InvalidParamError("buffer");
1134 return;
1135 }
1136 if (text == NULL) {
1137 SDL_InvalidParamError("text");
1138 }
1139
1140 device->SetBufferName(
1141 device->driverData,
1142 buffer,
1143 text);
1144}
1145
1146void SDL_SetGPUTextureName(
1147 SDL_GPUDevice *device,
1148 SDL_GPUTexture *texture,
1149 const char *text)
1150{
1151 CHECK_DEVICE_MAGIC(device, );
1152 if (texture == NULL) {
1153 SDL_InvalidParamError("texture");
1154 return;
1155 }
1156 if (text == NULL) {
1157 SDL_InvalidParamError("text");
1158 }
1159
1160 device->SetTextureName(
1161 device->driverData,
1162 texture,
1163 text);
1164}
1165
1166void SDL_InsertGPUDebugLabel(
1167 SDL_GPUCommandBuffer *command_buffer,
1168 const char *text)
1169{
1170 if (command_buffer == NULL) {
1171 SDL_InvalidParamError("command_buffer");
1172 return;
1173 }
1174 if (text == NULL) {
1175 SDL_InvalidParamError("text");
1176 return;
1177 }
1178
1179 if (COMMAND_BUFFER_DEVICE->debug_mode) {
1180 CHECK_COMMAND_BUFFER
1181 }
1182
1183 COMMAND_BUFFER_DEVICE->InsertDebugLabel(
1184 command_buffer,
1185 text);
1186}
1187
1188void SDL_PushGPUDebugGroup(
1189 SDL_GPUCommandBuffer *command_buffer,
1190 const char *name)
1191{
1192 if (command_buffer == NULL) {
1193 SDL_InvalidParamError("command_buffer");
1194 return;
1195 }
1196 if (name == NULL) {
1197 SDL_InvalidParamError("name");
1198 return;
1199 }
1200
1201 if (COMMAND_BUFFER_DEVICE->debug_mode) {
1202 CHECK_COMMAND_BUFFER
1203 }
1204
1205 COMMAND_BUFFER_DEVICE->PushDebugGroup(
1206 command_buffer,
1207 name);
1208}
1209
1210void SDL_PopGPUDebugGroup(
1211 SDL_GPUCommandBuffer *command_buffer)
1212{
1213 if (command_buffer == NULL) {
1214 SDL_InvalidParamError("command_buffer");
1215 return;
1216 }
1217
1218 if (COMMAND_BUFFER_DEVICE->debug_mode) {
1219 CHECK_COMMAND_BUFFER
1220 }
1221
1222 COMMAND_BUFFER_DEVICE->PopDebugGroup(
1223 command_buffer);
1224}
1225
1226// Disposal
1227
1228void SDL_ReleaseGPUTexture(
1229 SDL_GPUDevice *device,
1230 SDL_GPUTexture *texture)
1231{
1232 CHECK_DEVICE_MAGIC(device, );
1233 if (texture == NULL) {
1234 return;
1235 }
1236
1237 device->ReleaseTexture(
1238 device->driverData,
1239 texture);
1240}
1241
1242void SDL_ReleaseGPUSampler(
1243 SDL_GPUDevice *device,
1244 SDL_GPUSampler *sampler)
1245{
1246 CHECK_DEVICE_MAGIC(device, );
1247 if (sampler == NULL) {
1248 return;
1249 }
1250
1251 device->ReleaseSampler(
1252 device->driverData,
1253 sampler);
1254}
1255
1256void SDL_ReleaseGPUBuffer(
1257 SDL_GPUDevice *device,
1258 SDL_GPUBuffer *buffer)
1259{
1260 CHECK_DEVICE_MAGIC(device, );
1261 if (buffer == NULL) {
1262 return;
1263 }
1264
1265 device->ReleaseBuffer(
1266 device->driverData,
1267 buffer);
1268}
1269
1270void SDL_ReleaseGPUTransferBuffer(
1271 SDL_GPUDevice *device,
1272 SDL_GPUTransferBuffer *transfer_buffer)
1273{
1274 CHECK_DEVICE_MAGIC(device, );
1275 if (transfer_buffer == NULL) {
1276 return;
1277 }
1278
1279 device->ReleaseTransferBuffer(
1280 device->driverData,
1281 transfer_buffer);
1282}
1283
1284void SDL_ReleaseGPUShader(
1285 SDL_GPUDevice *device,
1286 SDL_GPUShader *shader)
1287{
1288 CHECK_DEVICE_MAGIC(device, );
1289 if (shader == NULL) {
1290 return;
1291 }
1292
1293 device->ReleaseShader(
1294 device->driverData,
1295 shader);
1296}
1297
1298void SDL_ReleaseGPUComputePipeline(
1299 SDL_GPUDevice *device,
1300 SDL_GPUComputePipeline *compute_pipeline)
1301{
1302 CHECK_DEVICE_MAGIC(device, );
1303 if (compute_pipeline == NULL) {
1304 return;
1305 }
1306
1307 device->ReleaseComputePipeline(
1308 device->driverData,
1309 compute_pipeline);
1310}
1311
1312void SDL_ReleaseGPUGraphicsPipeline(
1313 SDL_GPUDevice *device,
1314 SDL_GPUGraphicsPipeline *graphics_pipeline)
1315{
1316 CHECK_DEVICE_MAGIC(device, );
1317 if (graphics_pipeline == NULL) {
1318 return;
1319 }
1320
1321 device->ReleaseGraphicsPipeline(
1322 device->driverData,
1323 graphics_pipeline);
1324}
1325
1326// Command Buffer
1327
1328SDL_GPUCommandBuffer *SDL_AcquireGPUCommandBuffer(
1329 SDL_GPUDevice *device)
1330{
1331 SDL_GPUCommandBuffer *command_buffer;
1332 CommandBufferCommonHeader *commandBufferHeader;
1333
1334 CHECK_DEVICE_MAGIC(device, NULL);
1335
1336 command_buffer = device->AcquireCommandBuffer(
1337 device->driverData);
1338
1339 if (command_buffer == NULL) {
1340 return NULL;
1341 }
1342
1343 commandBufferHeader = (CommandBufferCommonHeader *)command_buffer;
1344 commandBufferHeader->device = device;
1345 commandBufferHeader->render_pass.command_buffer = command_buffer;
1346 commandBufferHeader->render_pass.in_progress = false;
1347 commandBufferHeader->graphics_pipeline_bound = false;
1348 commandBufferHeader->compute_pass.command_buffer = command_buffer;
1349 commandBufferHeader->compute_pass.in_progress = false;
1350 commandBufferHeader->compute_pipeline_bound = false;
1351 commandBufferHeader->copy_pass.command_buffer = command_buffer;
1352 commandBufferHeader->copy_pass.in_progress = false;
1353 commandBufferHeader->swapchain_texture_acquired = false;
1354 commandBufferHeader->submitted = false;
1355
1356 return command_buffer;
1357}
1358
1359// Uniforms
1360
1361void SDL_PushGPUVertexUniformData(
1362 SDL_GPUCommandBuffer *command_buffer,
1363 Uint32 slot_index,
1364 const void *data,
1365 Uint32 length)
1366{
1367 if (command_buffer == NULL) {
1368 SDL_InvalidParamError("command_buffer");
1369 return;
1370 }
1371 if (data == NULL) {
1372 SDL_InvalidParamError("data");
1373 return;
1374 }
1375
1376 if (COMMAND_BUFFER_DEVICE->debug_mode) {
1377 CHECK_COMMAND_BUFFER
1378 }
1379
1380 COMMAND_BUFFER_DEVICE->PushVertexUniformData(
1381 command_buffer,
1382 slot_index,
1383 data,
1384 length);
1385}
1386
1387void SDL_PushGPUFragmentUniformData(
1388 SDL_GPUCommandBuffer *command_buffer,
1389 Uint32 slot_index,
1390 const void *data,
1391 Uint32 length)
1392{
1393 if (command_buffer == NULL) {
1394 SDL_InvalidParamError("command_buffer");
1395 return;
1396 }
1397 if (data == NULL) {
1398 SDL_InvalidParamError("data");
1399 return;
1400 }
1401
1402 if (COMMAND_BUFFER_DEVICE->debug_mode) {
1403 CHECK_COMMAND_BUFFER
1404 }
1405
1406 COMMAND_BUFFER_DEVICE->PushFragmentUniformData(
1407 command_buffer,
1408 slot_index,
1409 data,
1410 length);
1411}
1412
1413void SDL_PushGPUComputeUniformData(
1414 SDL_GPUCommandBuffer *command_buffer,
1415 Uint32 slot_index,
1416 const void *data,
1417 Uint32 length)
1418{
1419 if (command_buffer == NULL) {
1420 SDL_InvalidParamError("command_buffer");
1421 return;
1422 }
1423 if (data == NULL) {
1424 SDL_InvalidParamError("data");
1425 return;
1426 }
1427
1428 if (COMMAND_BUFFER_DEVICE->debug_mode) {
1429 CHECK_COMMAND_BUFFER
1430 }
1431
1432 COMMAND_BUFFER_DEVICE->PushComputeUniformData(
1433 command_buffer,
1434 slot_index,
1435 data,
1436 length);
1437}
1438
1439// Render Pass
1440
1441SDL_GPURenderPass *SDL_BeginGPURenderPass(
1442 SDL_GPUCommandBuffer *command_buffer,
1443 const SDL_GPUColorTargetInfo *color_target_infos,
1444 Uint32 num_color_targets,
1445 const SDL_GPUDepthStencilTargetInfo *depth_stencil_target_info)
1446{
1447 CommandBufferCommonHeader *commandBufferHeader;
1448
1449 if (command_buffer == NULL) {
1450 SDL_InvalidParamError("command_buffer");
1451 return NULL;
1452 }
1453 if (color_target_infos == NULL && num_color_targets > 0) {
1454 SDL_InvalidParamError("color_target_infos");
1455 return NULL;
1456 }
1457
1458 if (num_color_targets > MAX_COLOR_TARGET_BINDINGS) {
1459 SDL_SetError("num_color_targets exceeds MAX_COLOR_TARGET_BINDINGS");
1460 return NULL;
1461 }
1462
1463 if (COMMAND_BUFFER_DEVICE->debug_mode) {
1464 CHECK_COMMAND_BUFFER_RETURN_NULL
1465 CHECK_ANY_PASS_IN_PROGRESS("Cannot begin render pass during another pass!", NULL)
1466
1467 for (Uint32 i = 0; i < num_color_targets; i += 1) {
1468 TextureCommonHeader *textureHeader = (TextureCommonHeader *)color_target_infos[i].texture;
1469
1470 if (color_target_infos[i].cycle && color_target_infos[i].load_op == SDL_GPU_LOADOP_LOAD) {
1471 SDL_assert_release(!"Cannot cycle color target when load op is LOAD!");
1472 }
1473
1474 if (color_target_infos[i].store_op == SDL_GPU_STOREOP_RESOLVE || color_target_infos[i].store_op == SDL_GPU_STOREOP_RESOLVE_AND_STORE) {
1475 if (color_target_infos[i].resolve_texture == NULL) {
1476 SDL_assert_release(!"Store op is RESOLVE or RESOLVE_AND_STORE but resolve_texture is NULL!");
1477 } else {
1478 TextureCommonHeader *resolveTextureHeader = (TextureCommonHeader *)color_target_infos[i].resolve_texture;
1479 if (textureHeader->info.sample_count == SDL_GPU_SAMPLECOUNT_1) {
1480 SDL_assert_release(!"Store op is RESOLVE or RESOLVE_AND_STORE but texture is not multisample!");
1481 }
1482 if (resolveTextureHeader->info.sample_count != SDL_GPU_SAMPLECOUNT_1) {
1483 SDL_assert_release(!"Resolve texture must have a sample count of 1!");
1484 }
1485 if (resolveTextureHeader->info.format != textureHeader->info.format) {
1486 SDL_assert_release(!"Resolve texture must have the same format as its corresponding color target!");
1487 }
1488 if (resolveTextureHeader->info.type == SDL_GPU_TEXTURETYPE_3D) {
1489 SDL_assert_release(!"Resolve texture must not be of TEXTURETYPE_3D!");
1490 }
1491 if (!(resolveTextureHeader->info.usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET)) {
1492 SDL_assert_release(!"Resolve texture usage must include COLOR_TARGET!");
1493 }
1494 }
1495 }
1496 }
1497
1498 if (depth_stencil_target_info != NULL) {
1499
1500 TextureCommonHeader *textureHeader = (TextureCommonHeader *)depth_stencil_target_info->texture;
1501 if (!(textureHeader->info.usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET)) {
1502 SDL_assert_release(!"Depth target must have been created with the DEPTH_STENCIL_TARGET usage flag!");
1503 }
1504
1505 if (depth_stencil_target_info->cycle && (depth_stencil_target_info->load_op == SDL_GPU_LOADOP_LOAD || depth_stencil_target_info->stencil_load_op == SDL_GPU_LOADOP_LOAD)) {
1506 SDL_assert_release(!"Cannot cycle depth target when load op or stencil load op is LOAD!");
1507 }
1508
1509 if (depth_stencil_target_info->store_op == SDL_GPU_STOREOP_RESOLVE ||
1510 depth_stencil_target_info->stencil_store_op == SDL_GPU_STOREOP_RESOLVE ||
1511 depth_stencil_target_info->store_op == SDL_GPU_STOREOP_RESOLVE_AND_STORE ||
1512 depth_stencil_target_info->stencil_store_op == SDL_GPU_STOREOP_RESOLVE_AND_STORE) {
1513 SDL_assert_release(!"RESOLVE store ops are not supported for depth-stencil targets!");
1514 }
1515 }
1516 }
1517
1518 COMMAND_BUFFER_DEVICE->BeginRenderPass(
1519 command_buffer,
1520 color_target_infos,
1521 num_color_targets,
1522 depth_stencil_target_info);
1523
1524 commandBufferHeader = (CommandBufferCommonHeader *)command_buffer;
1525 commandBufferHeader->render_pass.in_progress = true;
1526 return (SDL_GPURenderPass *)&(commandBufferHeader->render_pass);
1527}
1528
1529void SDL_BindGPUGraphicsPipeline(
1530 SDL_GPURenderPass *render_pass,
1531 SDL_GPUGraphicsPipeline *graphics_pipeline)
1532{
1533 CommandBufferCommonHeader *commandBufferHeader;
1534
1535 if (render_pass == NULL) {
1536 SDL_InvalidParamError("render_pass");
1537 return;
1538 }
1539 if (graphics_pipeline == NULL) {
1540 SDL_InvalidParamError("graphics_pipeline");
1541 return;
1542 }
1543
1544 RENDERPASS_DEVICE->BindGraphicsPipeline(
1545 RENDERPASS_COMMAND_BUFFER,
1546 graphics_pipeline);
1547
1548 commandBufferHeader = (CommandBufferCommonHeader *)RENDERPASS_COMMAND_BUFFER;
1549 commandBufferHeader->graphics_pipeline_bound = true;
1550}
1551
1552void SDL_SetGPUViewport(
1553 SDL_GPURenderPass *render_pass,
1554 const SDL_GPUViewport *viewport)
1555{
1556 if (render_pass == NULL) {
1557 SDL_InvalidParamError("render_pass");
1558 return;
1559 }
1560 if (viewport == NULL) {
1561 SDL_InvalidParamError("viewport");
1562 return;
1563 }
1564
1565 if (RENDERPASS_DEVICE->debug_mode) {
1566 CHECK_RENDERPASS
1567 }
1568
1569 RENDERPASS_DEVICE->SetViewport(
1570 RENDERPASS_COMMAND_BUFFER,
1571 viewport);
1572}
1573
1574void SDL_SetGPUScissor(
1575 SDL_GPURenderPass *render_pass,
1576 const SDL_Rect *scissor)
1577{
1578 if (render_pass == NULL) {
1579 SDL_InvalidParamError("render_pass");
1580 return;
1581 }
1582 if (scissor == NULL) {
1583 SDL_InvalidParamError("scissor");
1584 return;
1585 }
1586
1587 if (RENDERPASS_DEVICE->debug_mode) {
1588 CHECK_RENDERPASS
1589 }
1590
1591 RENDERPASS_DEVICE->SetScissor(
1592 RENDERPASS_COMMAND_BUFFER,
1593 scissor);
1594}
1595
1596void SDL_SetGPUBlendConstants(
1597 SDL_GPURenderPass *render_pass,
1598 SDL_FColor blend_constants)
1599{
1600 if (render_pass == NULL) {
1601 SDL_InvalidParamError("render_pass");
1602 return;
1603 }
1604
1605 if (RENDERPASS_DEVICE->debug_mode) {
1606 CHECK_RENDERPASS
1607 }
1608
1609 RENDERPASS_DEVICE->SetBlendConstants(
1610 RENDERPASS_COMMAND_BUFFER,
1611 blend_constants);
1612}
1613
1614void SDL_SetGPUStencilReference(
1615 SDL_GPURenderPass *render_pass,
1616 Uint8 reference)
1617{
1618 if (render_pass == NULL) {
1619 SDL_InvalidParamError("render_pass");
1620 return;
1621 }
1622
1623 if (RENDERPASS_DEVICE->debug_mode) {
1624 CHECK_RENDERPASS
1625 }
1626
1627 RENDERPASS_DEVICE->SetStencilReference(
1628 RENDERPASS_COMMAND_BUFFER,
1629 reference);
1630}
1631
1632void SDL_BindGPUVertexBuffers(
1633 SDL_GPURenderPass *render_pass,
1634 Uint32 first_binding,
1635 const SDL_GPUBufferBinding *bindings,
1636 Uint32 num_bindings)
1637{
1638 if (render_pass == NULL) {
1639 SDL_InvalidParamError("render_pass");
1640 return;
1641 }
1642 if (bindings == NULL && num_bindings > 0) {
1643 SDL_InvalidParamError("bindings");
1644 return;
1645 }
1646
1647 if (RENDERPASS_DEVICE->debug_mode) {
1648 CHECK_RENDERPASS
1649 }
1650
1651 RENDERPASS_DEVICE->BindVertexBuffers(
1652 RENDERPASS_COMMAND_BUFFER,
1653 first_binding,
1654 bindings,
1655 num_bindings);
1656}
1657
1658void SDL_BindGPUIndexBuffer(
1659 SDL_GPURenderPass *render_pass,
1660 const SDL_GPUBufferBinding *binding,
1661 SDL_GPUIndexElementSize index_element_size)
1662{
1663 if (render_pass == NULL) {
1664 SDL_InvalidParamError("render_pass");
1665 return;
1666 }
1667 if (binding == NULL) {
1668 SDL_InvalidParamError("binding");
1669 return;
1670 }
1671
1672 if (RENDERPASS_DEVICE->debug_mode) {
1673 CHECK_RENDERPASS
1674 }
1675
1676 RENDERPASS_DEVICE->BindIndexBuffer(
1677 RENDERPASS_COMMAND_BUFFER,
1678 binding,
1679 index_element_size);
1680}
1681
1682void SDL_BindGPUVertexSamplers(
1683 SDL_GPURenderPass *render_pass,
1684 Uint32 first_slot,
1685 const SDL_GPUTextureSamplerBinding *texture_sampler_bindings,
1686 Uint32 num_bindings)
1687{
1688 if (render_pass == NULL) {
1689 SDL_InvalidParamError("render_pass");
1690 return;
1691 }
1692 if (texture_sampler_bindings == NULL && num_bindings > 0) {
1693 SDL_InvalidParamError("texture_sampler_bindings");
1694 return;
1695 }
1696
1697 if (RENDERPASS_DEVICE->debug_mode) {
1698 CHECK_RENDERPASS
1699 }
1700
1701 RENDERPASS_DEVICE->BindVertexSamplers(
1702 RENDERPASS_COMMAND_BUFFER,
1703 first_slot,
1704 texture_sampler_bindings,
1705 num_bindings);
1706}
1707
1708void SDL_BindGPUVertexStorageTextures(
1709 SDL_GPURenderPass *render_pass,
1710 Uint32 first_slot,
1711 SDL_GPUTexture *const *storage_textures,
1712 Uint32 num_bindings)
1713{
1714 if (render_pass == NULL) {
1715 SDL_InvalidParamError("render_pass");
1716 return;
1717 }
1718 if (storage_textures == NULL && num_bindings > 0) {
1719 SDL_InvalidParamError("storage_textures");
1720 return;
1721 }
1722
1723 if (RENDERPASS_DEVICE->debug_mode) {
1724 CHECK_RENDERPASS
1725 }
1726
1727 RENDERPASS_DEVICE->BindVertexStorageTextures(
1728 RENDERPASS_COMMAND_BUFFER,
1729 first_slot,
1730 storage_textures,
1731 num_bindings);
1732}
1733
1734void SDL_BindGPUVertexStorageBuffers(
1735 SDL_GPURenderPass *render_pass,
1736 Uint32 first_slot,
1737 SDL_GPUBuffer *const *storage_buffers,
1738 Uint32 num_bindings)
1739{
1740 if (render_pass == NULL) {
1741 SDL_InvalidParamError("render_pass");
1742 return;
1743 }
1744 if (storage_buffers == NULL && num_bindings > 0) {
1745 SDL_InvalidParamError("storage_buffers");
1746 return;
1747 }
1748
1749 if (RENDERPASS_DEVICE->debug_mode) {
1750 CHECK_RENDERPASS
1751 }
1752
1753 RENDERPASS_DEVICE->BindVertexStorageBuffers(
1754 RENDERPASS_COMMAND_BUFFER,
1755 first_slot,
1756 storage_buffers,
1757 num_bindings);
1758}
1759
1760void SDL_BindGPUFragmentSamplers(
1761 SDL_GPURenderPass *render_pass,
1762 Uint32 first_slot,
1763 const SDL_GPUTextureSamplerBinding *texture_sampler_bindings,
1764 Uint32 num_bindings)
1765{
1766 if (render_pass == NULL) {
1767 SDL_InvalidParamError("render_pass");
1768 return;
1769 }
1770 if (texture_sampler_bindings == NULL && num_bindings > 0) {
1771 SDL_InvalidParamError("texture_sampler_bindings");
1772 return;
1773 }
1774
1775 if (RENDERPASS_DEVICE->debug_mode) {
1776 CHECK_RENDERPASS
1777 }
1778
1779 RENDERPASS_DEVICE->BindFragmentSamplers(
1780 RENDERPASS_COMMAND_BUFFER,
1781 first_slot,
1782 texture_sampler_bindings,
1783 num_bindings);
1784}
1785
1786void SDL_BindGPUFragmentStorageTextures(
1787 SDL_GPURenderPass *render_pass,
1788 Uint32 first_slot,
1789 SDL_GPUTexture *const *storage_textures,
1790 Uint32 num_bindings)
1791{
1792 if (render_pass == NULL) {
1793 SDL_InvalidParamError("render_pass");
1794 return;
1795 }
1796 if (storage_textures == NULL && num_bindings > 0) {
1797 SDL_InvalidParamError("storage_textures");
1798 return;
1799 }
1800
1801 if (RENDERPASS_DEVICE->debug_mode) {
1802 CHECK_RENDERPASS
1803 }
1804
1805 RENDERPASS_DEVICE->BindFragmentStorageTextures(
1806 RENDERPASS_COMMAND_BUFFER,
1807 first_slot,
1808 storage_textures,
1809 num_bindings);
1810}
1811
1812void SDL_BindGPUFragmentStorageBuffers(
1813 SDL_GPURenderPass *render_pass,
1814 Uint32 first_slot,
1815 SDL_GPUBuffer *const *storage_buffers,
1816 Uint32 num_bindings)
1817{
1818 if (render_pass == NULL) {
1819 SDL_InvalidParamError("render_pass");
1820 return;
1821 }
1822 if (storage_buffers == NULL && num_bindings > 0) {
1823 SDL_InvalidParamError("storage_buffers");
1824 return;
1825 }
1826
1827 if (RENDERPASS_DEVICE->debug_mode) {
1828 CHECK_RENDERPASS
1829 }
1830
1831 RENDERPASS_DEVICE->BindFragmentStorageBuffers(
1832 RENDERPASS_COMMAND_BUFFER,
1833 first_slot,
1834 storage_buffers,
1835 num_bindings);
1836}
1837
1838void SDL_DrawGPUIndexedPrimitives(
1839 SDL_GPURenderPass *render_pass,
1840 Uint32 num_indices,
1841 Uint32 num_instances,
1842 Uint32 first_index,
1843 Sint32 vertex_offset,
1844 Uint32 first_instance)
1845{
1846 if (render_pass == NULL) {
1847 SDL_InvalidParamError("render_pass");
1848 return;
1849 }
1850
1851 if (RENDERPASS_DEVICE->debug_mode) {
1852 CHECK_RENDERPASS
1853 CHECK_GRAPHICS_PIPELINE_BOUND
1854 }
1855
1856 RENDERPASS_DEVICE->DrawIndexedPrimitives(
1857 RENDERPASS_COMMAND_BUFFER,
1858 num_indices,
1859 num_instances,
1860 first_index,
1861 vertex_offset,
1862 first_instance);
1863}
1864
1865void SDL_DrawGPUPrimitives(
1866 SDL_GPURenderPass *render_pass,
1867 Uint32 num_vertices,
1868 Uint32 num_instances,
1869 Uint32 first_vertex,
1870 Uint32 first_instance)
1871{
1872 if (render_pass == NULL) {
1873 SDL_InvalidParamError("render_pass");
1874 return;
1875 }
1876
1877 if (RENDERPASS_DEVICE->debug_mode) {
1878 CHECK_RENDERPASS
1879 CHECK_GRAPHICS_PIPELINE_BOUND
1880 }
1881
1882 RENDERPASS_DEVICE->DrawPrimitives(
1883 RENDERPASS_COMMAND_BUFFER,
1884 num_vertices,
1885 num_instances,
1886 first_vertex,
1887 first_instance);
1888}
1889
1890void SDL_DrawGPUPrimitivesIndirect(
1891 SDL_GPURenderPass *render_pass,
1892 SDL_GPUBuffer *buffer,
1893 Uint32 offset,
1894 Uint32 draw_count)
1895{
1896 if (render_pass == NULL) {
1897 SDL_InvalidParamError("render_pass");
1898 return;
1899 }
1900 if (buffer == NULL) {
1901 SDL_InvalidParamError("buffer");
1902 return;
1903 }
1904
1905 if (RENDERPASS_DEVICE->debug_mode) {
1906 CHECK_RENDERPASS
1907 CHECK_GRAPHICS_PIPELINE_BOUND
1908 }
1909
1910 RENDERPASS_DEVICE->DrawPrimitivesIndirect(
1911 RENDERPASS_COMMAND_BUFFER,
1912 buffer,
1913 offset,
1914 draw_count);
1915}
1916
1917void SDL_DrawGPUIndexedPrimitivesIndirect(
1918 SDL_GPURenderPass *render_pass,
1919 SDL_GPUBuffer *buffer,
1920 Uint32 offset,
1921 Uint32 draw_count)
1922{
1923 if (render_pass == NULL) {
1924 SDL_InvalidParamError("render_pass");
1925 return;
1926 }
1927 if (buffer == NULL) {
1928 SDL_InvalidParamError("buffer");
1929 return;
1930 }
1931
1932 if (RENDERPASS_DEVICE->debug_mode) {
1933 CHECK_RENDERPASS
1934 CHECK_GRAPHICS_PIPELINE_BOUND
1935 }
1936
1937 RENDERPASS_DEVICE->DrawIndexedPrimitivesIndirect(
1938 RENDERPASS_COMMAND_BUFFER,
1939 buffer,
1940 offset,
1941 draw_count);
1942}
1943
1944void SDL_EndGPURenderPass(
1945 SDL_GPURenderPass *render_pass)
1946{
1947 CommandBufferCommonHeader *commandBufferCommonHeader;
1948
1949 if (render_pass == NULL) {
1950 SDL_InvalidParamError("render_pass");
1951 return;
1952 }
1953
1954 if (RENDERPASS_DEVICE->debug_mode) {
1955 CHECK_RENDERPASS
1956 }
1957
1958 RENDERPASS_DEVICE->EndRenderPass(
1959 RENDERPASS_COMMAND_BUFFER);
1960
1961 commandBufferCommonHeader = (CommandBufferCommonHeader *)RENDERPASS_COMMAND_BUFFER;
1962 commandBufferCommonHeader->render_pass.in_progress = false;
1963 commandBufferCommonHeader->graphics_pipeline_bound = false;
1964}
1965
1966// Compute Pass
1967
1968SDL_GPUComputePass *SDL_BeginGPUComputePass(
1969 SDL_GPUCommandBuffer *command_buffer,
1970 const SDL_GPUStorageTextureReadWriteBinding *storage_texture_bindings,
1971 Uint32 num_storage_texture_bindings,
1972 const SDL_GPUStorageBufferReadWriteBinding *storage_buffer_bindings,
1973 Uint32 num_storage_buffer_bindings)
1974{
1975 CommandBufferCommonHeader *commandBufferHeader;
1976
1977 if (command_buffer == NULL) {
1978 SDL_InvalidParamError("command_buffer");
1979 return NULL;
1980 }
1981 if (storage_texture_bindings == NULL && num_storage_texture_bindings > 0) {
1982 SDL_InvalidParamError("storage_texture_bindings");
1983 return NULL;
1984 }
1985 if (storage_buffer_bindings == NULL && num_storage_buffer_bindings > 0) {
1986 SDL_InvalidParamError("storage_buffer_bindings");
1987 return NULL;
1988 }
1989 if (num_storage_texture_bindings > MAX_COMPUTE_WRITE_TEXTURES) {
1990 SDL_InvalidParamError("num_storage_texture_bindings");
1991 return NULL;
1992 }
1993 if (num_storage_buffer_bindings > MAX_COMPUTE_WRITE_BUFFERS) {
1994 SDL_InvalidParamError("num_storage_buffer_bindings");
1995 return NULL;
1996 }
1997 if (COMMAND_BUFFER_DEVICE->debug_mode) {
1998 CHECK_COMMAND_BUFFER_RETURN_NULL
1999 CHECK_ANY_PASS_IN_PROGRESS("Cannot begin compute pass during another pass!", NULL)
2000
2001 for (Uint32 i = 0; i < num_storage_texture_bindings; i += 1) {
2002 TextureCommonHeader *header = (TextureCommonHeader *)storage_texture_bindings[i].texture;
2003 if (!(header->info.usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE) && !(header->info.usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE)) {
2004 SDL_assert_release(!"Texture must be created with COMPUTE_STORAGE_WRITE or COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE flag");
2005 return NULL;
2006 }
2007 }
2008
2009 // TODO: validate buffer usage?
2010 }
2011
2012 COMMAND_BUFFER_DEVICE->BeginComputePass(
2013 command_buffer,
2014 storage_texture_bindings,
2015 num_storage_texture_bindings,
2016 storage_buffer_bindings,
2017 num_storage_buffer_bindings);
2018
2019 commandBufferHeader = (CommandBufferCommonHeader *)command_buffer;
2020 commandBufferHeader->compute_pass.in_progress = true;
2021 return (SDL_GPUComputePass *)&(commandBufferHeader->compute_pass);
2022}
2023
2024void SDL_BindGPUComputePipeline(
2025 SDL_GPUComputePass *compute_pass,
2026 SDL_GPUComputePipeline *compute_pipeline)
2027{
2028 CommandBufferCommonHeader *commandBufferHeader;
2029
2030 if (compute_pass == NULL) {
2031 SDL_InvalidParamError("compute_pass");
2032 return;
2033 }
2034 if (compute_pipeline == NULL) {
2035 SDL_InvalidParamError("compute_pipeline");
2036 return;
2037 }
2038
2039 if (COMPUTEPASS_DEVICE->debug_mode) {
2040 CHECK_COMPUTEPASS
2041 }
2042
2043 COMPUTEPASS_DEVICE->BindComputePipeline(
2044 COMPUTEPASS_COMMAND_BUFFER,
2045 compute_pipeline);
2046
2047 commandBufferHeader = (CommandBufferCommonHeader *)COMPUTEPASS_COMMAND_BUFFER;
2048 commandBufferHeader->compute_pipeline_bound = true;
2049}
2050
2051void SDL_BindGPUComputeSamplers(
2052 SDL_GPUComputePass *compute_pass,
2053 Uint32 first_slot,
2054 const SDL_GPUTextureSamplerBinding *texture_sampler_bindings,
2055 Uint32 num_bindings)
2056{
2057 if (compute_pass == NULL) {
2058 SDL_InvalidParamError("compute_pass");
2059 return;
2060 }
2061 if (texture_sampler_bindings == NULL && num_bindings > 0) {
2062 SDL_InvalidParamError("texture_sampler_bindings");
2063 return;
2064 }
2065
2066 if (COMPUTEPASS_DEVICE->debug_mode) {
2067 CHECK_COMPUTEPASS
2068 }
2069
2070 COMPUTEPASS_DEVICE->BindComputeSamplers(
2071 COMPUTEPASS_COMMAND_BUFFER,
2072 first_slot,
2073 texture_sampler_bindings,
2074 num_bindings);
2075}
2076
2077void SDL_BindGPUComputeStorageTextures(
2078 SDL_GPUComputePass *compute_pass,
2079 Uint32 first_slot,
2080 SDL_GPUTexture *const *storage_textures,
2081 Uint32 num_bindings)
2082{
2083 if (compute_pass == NULL) {
2084 SDL_InvalidParamError("compute_pass");
2085 return;
2086 }
2087 if (storage_textures == NULL && num_bindings > 0) {
2088 SDL_InvalidParamError("storage_textures");
2089 return;
2090 }
2091
2092 if (COMPUTEPASS_DEVICE->debug_mode) {
2093 CHECK_COMPUTEPASS
2094 }
2095
2096 COMPUTEPASS_DEVICE->BindComputeStorageTextures(
2097 COMPUTEPASS_COMMAND_BUFFER,
2098 first_slot,
2099 storage_textures,
2100 num_bindings);
2101}
2102
2103void SDL_BindGPUComputeStorageBuffers(
2104 SDL_GPUComputePass *compute_pass,
2105 Uint32 first_slot,
2106 SDL_GPUBuffer *const *storage_buffers,
2107 Uint32 num_bindings)
2108{
2109 if (compute_pass == NULL) {
2110 SDL_InvalidParamError("compute_pass");
2111 return;
2112 }
2113 if (storage_buffers == NULL && num_bindings > 0) {
2114 SDL_InvalidParamError("storage_buffers");
2115 return;
2116 }
2117
2118 if (COMPUTEPASS_DEVICE->debug_mode) {
2119 CHECK_COMPUTEPASS
2120 }
2121
2122 COMPUTEPASS_DEVICE->BindComputeStorageBuffers(
2123 COMPUTEPASS_COMMAND_BUFFER,
2124 first_slot,
2125 storage_buffers,
2126 num_bindings);
2127}
2128
2129void SDL_DispatchGPUCompute(
2130 SDL_GPUComputePass *compute_pass,
2131 Uint32 groupcount_x,
2132 Uint32 groupcount_y,
2133 Uint32 groupcount_z)
2134{
2135 if (compute_pass == NULL) {
2136 SDL_InvalidParamError("compute_pass");
2137 return;
2138 }
2139
2140 if (COMPUTEPASS_DEVICE->debug_mode) {
2141 CHECK_COMPUTEPASS
2142 CHECK_COMPUTE_PIPELINE_BOUND
2143 }
2144
2145 COMPUTEPASS_DEVICE->DispatchCompute(
2146 COMPUTEPASS_COMMAND_BUFFER,
2147 groupcount_x,
2148 groupcount_y,
2149 groupcount_z);
2150}
2151
2152void SDL_DispatchGPUComputeIndirect(
2153 SDL_GPUComputePass *compute_pass,
2154 SDL_GPUBuffer *buffer,
2155 Uint32 offset)
2156{
2157 if (compute_pass == NULL) {
2158 SDL_InvalidParamError("compute_pass");
2159 return;
2160 }
2161
2162 if (COMPUTEPASS_DEVICE->debug_mode) {
2163 CHECK_COMPUTEPASS
2164 CHECK_COMPUTE_PIPELINE_BOUND
2165 }
2166
2167 COMPUTEPASS_DEVICE->DispatchComputeIndirect(
2168 COMPUTEPASS_COMMAND_BUFFER,
2169 buffer,
2170 offset);
2171}
2172
2173void SDL_EndGPUComputePass(
2174 SDL_GPUComputePass *compute_pass)
2175{
2176 CommandBufferCommonHeader *commandBufferCommonHeader;
2177
2178 if (compute_pass == NULL) {
2179 SDL_InvalidParamError("compute_pass");
2180 return;
2181 }
2182
2183 if (COMPUTEPASS_DEVICE->debug_mode) {
2184 CHECK_COMPUTEPASS
2185 }
2186
2187 COMPUTEPASS_DEVICE->EndComputePass(
2188 COMPUTEPASS_COMMAND_BUFFER);
2189
2190 commandBufferCommonHeader = (CommandBufferCommonHeader *)COMPUTEPASS_COMMAND_BUFFER;
2191 commandBufferCommonHeader->compute_pass.in_progress = false;
2192 commandBufferCommonHeader->compute_pipeline_bound = false;
2193}
2194
2195// TransferBuffer Data
2196
2197void *SDL_MapGPUTransferBuffer(
2198 SDL_GPUDevice *device,
2199 SDL_GPUTransferBuffer *transfer_buffer,
2200 bool cycle)
2201{
2202 CHECK_DEVICE_MAGIC(device, NULL);
2203 if (transfer_buffer == NULL) {
2204 SDL_InvalidParamError("transfer_buffer");
2205 return NULL;
2206 }
2207
2208 return device->MapTransferBuffer(
2209 device->driverData,
2210 transfer_buffer,
2211 cycle);
2212}
2213
2214void SDL_UnmapGPUTransferBuffer(
2215 SDL_GPUDevice *device,
2216 SDL_GPUTransferBuffer *transfer_buffer)
2217{
2218 CHECK_DEVICE_MAGIC(device, );
2219 if (transfer_buffer == NULL) {
2220 SDL_InvalidParamError("transfer_buffer");
2221 return;
2222 }
2223
2224 device->UnmapTransferBuffer(
2225 device->driverData,
2226 transfer_buffer);
2227}
2228
2229// Copy Pass
2230
2231SDL_GPUCopyPass *SDL_BeginGPUCopyPass(
2232 SDL_GPUCommandBuffer *command_buffer)
2233{
2234 CommandBufferCommonHeader *commandBufferHeader;
2235
2236 if (command_buffer == NULL) {
2237 SDL_InvalidParamError("command_buffer");
2238 return NULL;
2239 }
2240
2241 if (COMMAND_BUFFER_DEVICE->debug_mode) {
2242 CHECK_COMMAND_BUFFER_RETURN_NULL
2243 CHECK_ANY_PASS_IN_PROGRESS("Cannot begin copy pass during another pass!", NULL)
2244 }
2245
2246 COMMAND_BUFFER_DEVICE->BeginCopyPass(
2247 command_buffer);
2248
2249 commandBufferHeader = (CommandBufferCommonHeader *)command_buffer;
2250 commandBufferHeader->copy_pass.in_progress = true;
2251 return (SDL_GPUCopyPass *)&(commandBufferHeader->copy_pass);
2252}
2253
2254void SDL_UploadToGPUTexture(
2255 SDL_GPUCopyPass *copy_pass,
2256 const SDL_GPUTextureTransferInfo *source,
2257 const SDL_GPUTextureRegion *destination,
2258 bool cycle)
2259{
2260 if (copy_pass == NULL) {
2261 SDL_InvalidParamError("copy_pass");
2262 return;
2263 }
2264 if (source == NULL) {
2265 SDL_InvalidParamError("source");
2266 return;
2267 }
2268 if (destination == NULL) {
2269 SDL_InvalidParamError("destination");
2270 return;
2271 }
2272
2273 if (COPYPASS_DEVICE->debug_mode) {
2274 CHECK_COPYPASS
2275 if (source->transfer_buffer == NULL) {
2276 SDL_assert_release(!"Source transfer buffer cannot be NULL!");
2277 return;
2278 }
2279 if (destination->texture == NULL) {
2280 SDL_assert_release(!"Destination texture cannot be NULL!");
2281 return;
2282 }
2283 }
2284
2285 COPYPASS_DEVICE->UploadToTexture(
2286 COPYPASS_COMMAND_BUFFER,
2287 source,
2288 destination,
2289 cycle);
2290}
2291
2292void SDL_UploadToGPUBuffer(
2293 SDL_GPUCopyPass *copy_pass,
2294 const SDL_GPUTransferBufferLocation *source,
2295 const SDL_GPUBufferRegion *destination,
2296 bool cycle)
2297{
2298 if (copy_pass == NULL) {
2299 SDL_InvalidParamError("copy_pass");
2300 return;
2301 }
2302 if (source == NULL) {
2303 SDL_InvalidParamError("source");
2304 return;
2305 }
2306 if (destination == NULL) {
2307 SDL_InvalidParamError("destination");
2308 return;
2309 }
2310
2311 if (COPYPASS_DEVICE->debug_mode) {
2312 CHECK_COPYPASS
2313 if (source->transfer_buffer == NULL) {
2314 SDL_assert_release(!"Source transfer buffer cannot be NULL!");
2315 return;
2316 }
2317 if (destination->buffer == NULL) {
2318 SDL_assert_release(!"Destination buffer cannot be NULL!");
2319 return;
2320 }
2321 }
2322
2323 COPYPASS_DEVICE->UploadToBuffer(
2324 COPYPASS_COMMAND_BUFFER,
2325 source,
2326 destination,
2327 cycle);
2328}
2329
2330void SDL_CopyGPUTextureToTexture(
2331 SDL_GPUCopyPass *copy_pass,
2332 const SDL_GPUTextureLocation *source,
2333 const SDL_GPUTextureLocation *destination,
2334 Uint32 w,
2335 Uint32 h,
2336 Uint32 d,
2337 bool cycle)
2338{
2339 if (copy_pass == NULL) {
2340 SDL_InvalidParamError("copy_pass");
2341 return;
2342 }
2343 if (source == NULL) {
2344 SDL_InvalidParamError("source");
2345 return;
2346 }
2347 if (destination == NULL) {
2348 SDL_InvalidParamError("destination");
2349 return;
2350 }
2351
2352 if (COPYPASS_DEVICE->debug_mode) {
2353 CHECK_COPYPASS
2354 if (source->texture == NULL) {
2355 SDL_assert_release(!"Source texture cannot be NULL!");
2356 return;
2357 }
2358 if (destination->texture == NULL) {
2359 SDL_assert_release(!"Destination texture cannot be NULL!");
2360 return;
2361 }
2362 }
2363
2364 COPYPASS_DEVICE->CopyTextureToTexture(
2365 COPYPASS_COMMAND_BUFFER,
2366 source,
2367 destination,
2368 w,
2369 h,
2370 d,
2371 cycle);
2372}
2373
2374void SDL_CopyGPUBufferToBuffer(
2375 SDL_GPUCopyPass *copy_pass,
2376 const SDL_GPUBufferLocation *source,
2377 const SDL_GPUBufferLocation *destination,
2378 Uint32 size,
2379 bool cycle)
2380{
2381 if (copy_pass == NULL) {
2382 SDL_InvalidParamError("copy_pass");
2383 return;
2384 }
2385 if (source == NULL) {
2386 SDL_InvalidParamError("source");
2387 return;
2388 }
2389 if (destination == NULL) {
2390 SDL_InvalidParamError("destination");
2391 return;
2392 }
2393
2394 if (COPYPASS_DEVICE->debug_mode) {
2395 CHECK_COPYPASS
2396 if (source->buffer == NULL) {
2397 SDL_assert_release(!"Source buffer cannot be NULL!");
2398 return;
2399 }
2400 if (destination->buffer == NULL) {
2401 SDL_assert_release(!"Destination buffer cannot be NULL!");
2402 return;
2403 }
2404 }
2405
2406 COPYPASS_DEVICE->CopyBufferToBuffer(
2407 COPYPASS_COMMAND_BUFFER,
2408 source,
2409 destination,
2410 size,
2411 cycle);
2412}
2413
2414void SDL_DownloadFromGPUTexture(
2415 SDL_GPUCopyPass *copy_pass,
2416 const SDL_GPUTextureRegion *source,
2417 const SDL_GPUTextureTransferInfo *destination)
2418{
2419 if (copy_pass == NULL) {
2420 SDL_InvalidParamError("copy_pass");
2421 return;
2422 }
2423 if (source == NULL) {
2424 SDL_InvalidParamError("source");
2425 return;
2426 }
2427 if (destination == NULL) {
2428 SDL_InvalidParamError("destination");
2429 return;
2430 }
2431
2432 if (COPYPASS_DEVICE->debug_mode) {
2433 CHECK_COPYPASS
2434 if (source->texture == NULL) {
2435 SDL_assert_release(!"Source texture cannot be NULL!");
2436 return;
2437 }
2438 if (destination->transfer_buffer == NULL) {
2439 SDL_assert_release(!"Destination transfer buffer cannot be NULL!");
2440 return;
2441 }
2442 }
2443
2444 COPYPASS_DEVICE->DownloadFromTexture(
2445 COPYPASS_COMMAND_BUFFER,
2446 source,
2447 destination);
2448}
2449
2450void SDL_DownloadFromGPUBuffer(
2451 SDL_GPUCopyPass *copy_pass,
2452 const SDL_GPUBufferRegion *source,
2453 const SDL_GPUTransferBufferLocation *destination)
2454{
2455 if (copy_pass == NULL) {
2456 SDL_InvalidParamError("copy_pass");
2457 return;
2458 }
2459 if (source == NULL) {
2460 SDL_InvalidParamError("source");
2461 return;
2462 }
2463 if (destination == NULL) {
2464 SDL_InvalidParamError("destination");
2465 return;
2466 }
2467
2468 if (COPYPASS_DEVICE->debug_mode) {
2469 CHECK_COPYPASS
2470 if (source->buffer == NULL) {
2471 SDL_assert_release(!"Source buffer cannot be NULL!");
2472 return;
2473 }
2474 if (destination->transfer_buffer == NULL) {
2475 SDL_assert_release(!"Destination transfer buffer cannot be NULL!");
2476 return;
2477 }
2478 }
2479
2480 COPYPASS_DEVICE->DownloadFromBuffer(
2481 COPYPASS_COMMAND_BUFFER,
2482 source,
2483 destination);
2484}
2485
2486void SDL_EndGPUCopyPass(
2487 SDL_GPUCopyPass *copy_pass)
2488{
2489 if (copy_pass == NULL) {
2490 SDL_InvalidParamError("copy_pass");
2491 return;
2492 }
2493
2494 if (COPYPASS_DEVICE->debug_mode) {
2495 CHECK_COPYPASS
2496 }
2497
2498 COPYPASS_DEVICE->EndCopyPass(
2499 COPYPASS_COMMAND_BUFFER);
2500
2501 ((CommandBufferCommonHeader *)COPYPASS_COMMAND_BUFFER)->copy_pass.in_progress = false;
2502}
2503
2504void SDL_GenerateMipmapsForGPUTexture(
2505 SDL_GPUCommandBuffer *command_buffer,
2506 SDL_GPUTexture *texture)
2507{
2508 if (command_buffer == NULL) {
2509 SDL_InvalidParamError("command_buffer");
2510 return;
2511 }
2512 if (texture == NULL) {
2513 SDL_InvalidParamError("texture");
2514 return;
2515 }
2516
2517 if (COMMAND_BUFFER_DEVICE->debug_mode) {
2518 CHECK_COMMAND_BUFFER
2519 CHECK_ANY_PASS_IN_PROGRESS("Cannot generate mipmaps during a pass!", )
2520
2521 TextureCommonHeader *header = (TextureCommonHeader *)texture;
2522 if (header->info.num_levels <= 1) {
2523 SDL_assert_release(!"Cannot generate mipmaps for texture with num_levels <= 1!");
2524 return;
2525 }
2526
2527 if (!(header->info.usage & SDL_GPU_TEXTUREUSAGE_SAMPLER) || !(header->info.usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET)) {
2528 SDL_assert_release(!"GenerateMipmaps texture must be created with SAMPLER and COLOR_TARGET usage flags!");
2529 return;
2530 }
2531 }
2532
2533 COMMAND_BUFFER_DEVICE->GenerateMipmaps(
2534 command_buffer,
2535 texture);
2536}
2537
2538void SDL_BlitGPUTexture(
2539 SDL_GPUCommandBuffer *command_buffer,
2540 const SDL_GPUBlitInfo *info)
2541{
2542 if (command_buffer == NULL) {
2543 SDL_InvalidParamError("command_buffer");
2544 return;
2545 }
2546 if (info == NULL) {
2547 SDL_InvalidParamError("info");
2548 return;
2549 }
2550
2551 if (COMMAND_BUFFER_DEVICE->debug_mode) {
2552 CHECK_COMMAND_BUFFER
2553 CHECK_ANY_PASS_IN_PROGRESS("Cannot blit during a pass!", )
2554
2555 // Validation
2556 bool failed = false;
2557 TextureCommonHeader *srcHeader = (TextureCommonHeader *)info->source.texture;
2558 TextureCommonHeader *dstHeader = (TextureCommonHeader *)info->destination.texture;
2559
2560 if (srcHeader == NULL) {
2561 SDL_assert_release(!"Blit source texture must be non-NULL");
2562 return; // attempting to proceed will crash
2563 }
2564 if (dstHeader == NULL) {
2565 SDL_assert_release(!"Blit destination texture must be non-NULL");
2566 return; // attempting to proceed will crash
2567 }
2568 if (srcHeader->info.sample_count != SDL_GPU_SAMPLECOUNT_1) {
2569 SDL_assert_release(!"Blit source texture must have a sample count of 1");
2570 failed = true;
2571 }
2572 if ((srcHeader->info.usage & SDL_GPU_TEXTUREUSAGE_SAMPLER) == 0) {
2573 SDL_assert_release(!"Blit source texture must be created with the SAMPLER usage flag");
2574 failed = true;
2575 }
2576 if ((dstHeader->info.usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET) == 0) {
2577 SDL_assert_release(!"Blit destination texture must be created with the COLOR_TARGET usage flag");
2578 failed = true;
2579 }
2580 if (IsDepthFormat(srcHeader->info.format)) {
2581 SDL_assert_release(!"Blit source texture cannot have a depth format");
2582 failed = true;
2583 }
2584 if (info->source.w == 0 || info->source.h == 0 || info->destination.w == 0 || info->destination.h == 0) {
2585 SDL_assert_release(!"Blit source/destination regions must have non-zero width, height, and depth");
2586 failed = true;
2587 }
2588
2589 if (failed) {
2590 return;
2591 }
2592 }
2593
2594 COMMAND_BUFFER_DEVICE->Blit(
2595 command_buffer,
2596 info);
2597}
2598
2599// Submission/Presentation
2600
2601bool SDL_WindowSupportsGPUSwapchainComposition(
2602 SDL_GPUDevice *device,
2603 SDL_Window *window,
2604 SDL_GPUSwapchainComposition swapchain_composition)
2605{
2606 CHECK_DEVICE_MAGIC(device, false);
2607 if (window == NULL) {
2608 SDL_InvalidParamError("window");
2609 return false;
2610 }
2611
2612 if (device->debug_mode) {
2613 CHECK_SWAPCHAINCOMPOSITION_ENUM_INVALID(swapchain_composition, false)
2614 }
2615
2616 return device->SupportsSwapchainComposition(
2617 device->driverData,
2618 window,
2619 swapchain_composition);
2620}
2621
2622bool SDL_WindowSupportsGPUPresentMode(
2623 SDL_GPUDevice *device,
2624 SDL_Window *window,
2625 SDL_GPUPresentMode present_mode)
2626{
2627 CHECK_DEVICE_MAGIC(device, false);
2628 if (window == NULL) {
2629 SDL_InvalidParamError("window");
2630 return false;
2631 }
2632
2633 if (device->debug_mode) {
2634 CHECK_PRESENTMODE_ENUM_INVALID(present_mode, false)
2635 }
2636
2637 return device->SupportsPresentMode(
2638 device->driverData,
2639 window,
2640 present_mode);
2641}
2642
2643bool SDL_ClaimWindowForGPUDevice(
2644 SDL_GPUDevice *device,
2645 SDL_Window *window)
2646{
2647 CHECK_DEVICE_MAGIC(device, false);
2648 if (window == NULL) {
2649 SDL_InvalidParamError("window");
2650 return false;
2651 }
2652
2653 return device->ClaimWindow(
2654 device->driverData,
2655 window);
2656}
2657
2658void SDL_ReleaseWindowFromGPUDevice(
2659 SDL_GPUDevice *device,
2660 SDL_Window *window)
2661{
2662 CHECK_DEVICE_MAGIC(device, );
2663 if (window == NULL) {
2664 SDL_InvalidParamError("window");
2665 return;
2666 }
2667
2668 device->ReleaseWindow(
2669 device->driverData,
2670 window);
2671}
2672
2673bool SDL_SetGPUSwapchainParameters(
2674 SDL_GPUDevice *device,
2675 SDL_Window *window,
2676 SDL_GPUSwapchainComposition swapchain_composition,
2677 SDL_GPUPresentMode present_mode)
2678{
2679 CHECK_DEVICE_MAGIC(device, false);
2680 if (window == NULL) {
2681 SDL_InvalidParamError("window");
2682 return false;
2683 }
2684
2685 if (device->debug_mode) {
2686 CHECK_SWAPCHAINCOMPOSITION_ENUM_INVALID(swapchain_composition, false)
2687 CHECK_PRESENTMODE_ENUM_INVALID(present_mode, false)
2688 }
2689
2690 return device->SetSwapchainParameters(
2691 device->driverData,
2692 window,
2693 swapchain_composition,
2694 present_mode);
2695}
2696
2697bool SDL_SetGPUAllowedFramesInFlight(
2698 SDL_GPUDevice *device,
2699 Uint32 allowed_frames_in_flight)
2700{
2701 CHECK_DEVICE_MAGIC(device, false);
2702
2703 if (device->debug_mode) {
2704 if (allowed_frames_in_flight < 1 || allowed_frames_in_flight > 3)
2705 {
2706 SDL_assert_release(!"allowed_frames_in_flight value must be between 1 and 3!");
2707 }
2708 }
2709
2710 allowed_frames_in_flight = SDL_clamp(allowed_frames_in_flight, 1, 3);
2711 return device->SetAllowedFramesInFlight(
2712 device->driverData,
2713 allowed_frames_in_flight);
2714}
2715
2716SDL_GPUTextureFormat SDL_GetGPUSwapchainTextureFormat(
2717 SDL_GPUDevice *device,
2718 SDL_Window *window)
2719{
2720 CHECK_DEVICE_MAGIC(device, SDL_GPU_TEXTUREFORMAT_INVALID);
2721 if (window == NULL) {
2722 SDL_InvalidParamError("window");
2723 return SDL_GPU_TEXTUREFORMAT_INVALID;
2724 }
2725
2726 return device->GetSwapchainTextureFormat(
2727 device->driverData,
2728 window);
2729}
2730
2731bool SDL_AcquireGPUSwapchainTexture(
2732 SDL_GPUCommandBuffer *command_buffer,
2733 SDL_Window *window,
2734 SDL_GPUTexture **swapchain_texture,
2735 Uint32 *swapchain_texture_width,
2736 Uint32 *swapchain_texture_height)
2737{
2738 CommandBufferCommonHeader *commandBufferHeader = (CommandBufferCommonHeader *)command_buffer;
2739
2740 if (command_buffer == NULL) {
2741 return SDL_InvalidParamError("command_buffer");
2742 }
2743 if (window == NULL) {
2744 return SDL_InvalidParamError("window");
2745 }
2746 if (swapchain_texture == NULL) {
2747 return SDL_InvalidParamError("swapchain_texture");
2748 }
2749
2750 if (COMMAND_BUFFER_DEVICE->debug_mode) {
2751 CHECK_COMMAND_BUFFER_RETURN_FALSE
2752 CHECK_ANY_PASS_IN_PROGRESS("Cannot acquire a swapchain texture during a pass!", false)
2753 }
2754
2755 bool result = COMMAND_BUFFER_DEVICE->AcquireSwapchainTexture(
2756 command_buffer,
2757 window,
2758 swapchain_texture,
2759 swapchain_texture_width,
2760 swapchain_texture_height);
2761
2762 if (*swapchain_texture != NULL){
2763 commandBufferHeader->swapchain_texture_acquired = true;
2764 }
2765
2766 return result;
2767}
2768
2769bool SDL_WaitForGPUSwapchain(
2770 SDL_GPUDevice *device,
2771 SDL_Window *window)
2772{
2773 CHECK_DEVICE_MAGIC(device, false);
2774
2775 if (window == NULL) {
2776 return SDL_InvalidParamError("window");
2777 }
2778
2779 return device->WaitForSwapchain(
2780 device->driverData,
2781 window);
2782}
2783
2784bool SDL_WaitAndAcquireGPUSwapchainTexture(
2785 SDL_GPUCommandBuffer *command_buffer,
2786 SDL_Window *window,
2787 SDL_GPUTexture **swapchain_texture,
2788 Uint32 *swapchain_texture_width,
2789 Uint32 *swapchain_texture_height)
2790{
2791 CommandBufferCommonHeader *commandBufferHeader = (CommandBufferCommonHeader *)command_buffer;
2792
2793 if (command_buffer == NULL) {
2794 return SDL_InvalidParamError("command_buffer");
2795 }
2796 if (window == NULL) {
2797 return SDL_InvalidParamError("window");
2798 }
2799 if (swapchain_texture == NULL) {
2800 return SDL_InvalidParamError("swapchain_texture");
2801 }
2802
2803 if (COMMAND_BUFFER_DEVICE->debug_mode) {
2804 CHECK_COMMAND_BUFFER_RETURN_FALSE
2805 CHECK_ANY_PASS_IN_PROGRESS("Cannot acquire a swapchain texture during a pass!", false)
2806 }
2807
2808 bool result = COMMAND_BUFFER_DEVICE->WaitAndAcquireSwapchainTexture(
2809 command_buffer,
2810 window,
2811 swapchain_texture,
2812 swapchain_texture_width,
2813 swapchain_texture_height);
2814
2815 if (*swapchain_texture != NULL){
2816 commandBufferHeader->swapchain_texture_acquired = true;
2817 }
2818
2819 return result;
2820}
2821
2822bool SDL_SubmitGPUCommandBuffer(
2823 SDL_GPUCommandBuffer *command_buffer)
2824{
2825 CommandBufferCommonHeader *commandBufferHeader = (CommandBufferCommonHeader *)command_buffer;
2826
2827 if (command_buffer == NULL) {
2828 SDL_InvalidParamError("command_buffer");
2829 return false;
2830 }
2831
2832 if (COMMAND_BUFFER_DEVICE->debug_mode) {
2833 CHECK_COMMAND_BUFFER_RETURN_FALSE
2834 if (
2835 commandBufferHeader->render_pass.in_progress ||
2836 commandBufferHeader->compute_pass.in_progress ||
2837 commandBufferHeader->copy_pass.in_progress) {
2838 SDL_assert_release(!"Cannot submit command buffer while a pass is in progress!");
2839 return false;
2840 }
2841 }
2842
2843 commandBufferHeader->submitted = true;
2844
2845 return COMMAND_BUFFER_DEVICE->Submit(
2846 command_buffer);
2847}
2848
2849SDL_GPUFence *SDL_SubmitGPUCommandBufferAndAcquireFence(
2850 SDL_GPUCommandBuffer *command_buffer)
2851{
2852 CommandBufferCommonHeader *commandBufferHeader = (CommandBufferCommonHeader *)command_buffer;
2853
2854 if (command_buffer == NULL) {
2855 SDL_InvalidParamError("command_buffer");
2856 return NULL;
2857 }
2858
2859 if (COMMAND_BUFFER_DEVICE->debug_mode) {
2860 CHECK_COMMAND_BUFFER_RETURN_NULL
2861 if (
2862 commandBufferHeader->render_pass.in_progress ||
2863 commandBufferHeader->compute_pass.in_progress ||
2864 commandBufferHeader->copy_pass.in_progress) {
2865 SDL_assert_release(!"Cannot submit command buffer while a pass is in progress!");
2866 return NULL;
2867 }
2868 }
2869
2870 commandBufferHeader->submitted = true;
2871
2872 return COMMAND_BUFFER_DEVICE->SubmitAndAcquireFence(
2873 command_buffer);
2874}
2875
2876bool SDL_CancelGPUCommandBuffer(
2877 SDL_GPUCommandBuffer *command_buffer)
2878{
2879 CommandBufferCommonHeader *commandBufferHeader = (CommandBufferCommonHeader *)command_buffer;
2880
2881 if (command_buffer == NULL) {
2882 SDL_InvalidParamError("command_buffer");
2883 return false;
2884 }
2885
2886 if (COMMAND_BUFFER_DEVICE->debug_mode) {
2887 if (commandBufferHeader->swapchain_texture_acquired) {
2888 SDL_assert_release(!"Cannot cancel command buffer after a swapchain texture has been acquired!");
2889 return false;
2890 }
2891 }
2892
2893 return COMMAND_BUFFER_DEVICE->Cancel(
2894 command_buffer);
2895}
2896
2897bool SDL_WaitForGPUIdle(
2898 SDL_GPUDevice *device)
2899{
2900 CHECK_DEVICE_MAGIC(device, false);
2901
2902 return device->Wait(
2903 device->driverData);
2904}
2905
2906bool SDL_WaitForGPUFences(
2907 SDL_GPUDevice *device,
2908 bool wait_all,
2909 SDL_GPUFence *const *fences,
2910 Uint32 num_fences)
2911{
2912 CHECK_DEVICE_MAGIC(device, false);
2913 if (fences == NULL && num_fences > 0) {
2914 SDL_InvalidParamError("fences");
2915 return false;
2916 }
2917
2918 return device->WaitForFences(
2919 device->driverData,
2920 wait_all,
2921 fences,
2922 num_fences);
2923}
2924
2925bool SDL_QueryGPUFence(
2926 SDL_GPUDevice *device,
2927 SDL_GPUFence *fence)
2928{
2929 CHECK_DEVICE_MAGIC(device, false);
2930 if (fence == NULL) {
2931 SDL_InvalidParamError("fence");
2932 return false;
2933 }
2934
2935 return device->QueryFence(
2936 device->driverData,
2937 fence);
2938}
2939
2940void SDL_ReleaseGPUFence(
2941 SDL_GPUDevice *device,
2942 SDL_GPUFence *fence)
2943{
2944 CHECK_DEVICE_MAGIC(device, );
2945 if (fence == NULL) {
2946 return;
2947 }
2948
2949 device->ReleaseFence(
2950 device->driverData,
2951 fence);
2952}
2953
2954Uint32 SDL_CalculateGPUTextureFormatSize(
2955 SDL_GPUTextureFormat format,
2956 Uint32 width,
2957 Uint32 height,
2958 Uint32 depth_or_layer_count)
2959{
2960 Uint32 blockWidth = SDL_max(Texture_GetBlockWidth(format), 1);
2961 Uint32 blockHeight = SDL_max(Texture_GetBlockHeight(format), 1);
2962 Uint32 blocksPerRow = (width + blockWidth - 1) / blockWidth;
2963 Uint32 blocksPerColumn = (height + blockHeight - 1) / blockHeight;
2964 return depth_or_layer_count * blocksPerRow * blocksPerColumn * SDL_GPUTextureFormatTexelBlockSize(format);
2965}
diff --git a/contrib/SDL-3.2.8/src/gpu/SDL_sysgpu.h b/contrib/SDL-3.2.8/src/gpu/SDL_sysgpu.h
new file mode 100644
index 0000000..6de1765
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/SDL_sysgpu.h
@@ -0,0 +1,998 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "../video/SDL_sysvideo.h"
22#include "SDL_internal.h"
23
24#ifndef SDL_GPU_DRIVER_H
25#define SDL_GPU_DRIVER_H
26
27// Common Structs
28
29typedef struct Pass
30{
31 SDL_GPUCommandBuffer *command_buffer;
32 bool in_progress;
33} Pass;
34
35typedef struct CommandBufferCommonHeader
36{
37 SDL_GPUDevice *device;
38 Pass render_pass;
39 bool graphics_pipeline_bound;
40 Pass compute_pass;
41 bool compute_pipeline_bound;
42 Pass copy_pass;
43 bool swapchain_texture_acquired;
44 bool submitted;
45} CommandBufferCommonHeader;
46
47typedef struct TextureCommonHeader
48{
49 SDL_GPUTextureCreateInfo info;
50} TextureCommonHeader;
51
52typedef struct BlitFragmentUniforms
53{
54 // texcoord space
55 float left;
56 float top;
57 float width;
58 float height;
59
60 Uint32 mip_level;
61 float layer_or_depth;
62} BlitFragmentUniforms;
63
64typedef struct BlitPipelineCacheEntry
65{
66 SDL_GPUTextureType type;
67 SDL_GPUTextureFormat format;
68 SDL_GPUGraphicsPipeline *pipeline;
69} BlitPipelineCacheEntry;
70
71// Internal Helper Utilities
72
73#define SDL_GPU_TEXTUREFORMAT_MAX_ENUM_VALUE (SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT + 1)
74#define SDL_GPU_VERTEXELEMENTFORMAT_MAX_ENUM_VALUE (SDL_GPU_VERTEXELEMENTFORMAT_HALF4 + 1)
75#define SDL_GPU_COMPAREOP_MAX_ENUM_VALUE (SDL_GPU_COMPAREOP_ALWAYS + 1)
76#define SDL_GPU_STENCILOP_MAX_ENUM_VALUE (SDL_GPU_STENCILOP_DECREMENT_AND_WRAP + 1)
77#define SDL_GPU_BLENDOP_MAX_ENUM_VALUE (SDL_GPU_BLENDOP_MAX + 1)
78#define SDL_GPU_BLENDFACTOR_MAX_ENUM_VALUE (SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE + 1)
79#define SDL_GPU_SWAPCHAINCOMPOSITION_MAX_ENUM_VALUE (SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084 + 1)
80#define SDL_GPU_PRESENTMODE_MAX_ENUM_VALUE (SDL_GPU_PRESENTMODE_MAILBOX + 1)
81
82static inline Sint32 Texture_GetBlockWidth(
83 SDL_GPUTextureFormat format)
84{
85 switch (format) {
86 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM:
87 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM:
88 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB:
89 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB:
90 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT:
91 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT:
92 return 12;
93 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM:
94 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM:
95 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM:
96 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM:
97 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB:
98 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB:
99 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB:
100 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB:
101 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT:
102 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT:
103 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT:
104 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT:
105 return 10;
106 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM:
107 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM:
108 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM:
109 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB:
110 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB:
111 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB:
112 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT:
113 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT:
114 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT:
115 return 8;
116 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM:
117 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM:
118 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB:
119 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB:
120 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT:
121 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT:
122 return 6;
123 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM:
124 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM:
125 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB:
126 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB:
127 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT:
128 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT:
129 return 5;
130 case SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM:
131 case SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM:
132 case SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM:
133 case SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM:
134 case SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM:
135 case SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM:
136 case SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT:
137 case SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT:
138 case SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB:
139 case SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB:
140 case SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB:
141 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM:
142 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB:
143 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT:
144 return 4;
145 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM:
146 case SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM:
147 case SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM:
148 case SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM:
149 case SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM:
150 case SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM:
151 case SDL_GPU_TEXTUREFORMAT_R8G8_UNORM:
152 case SDL_GPU_TEXTUREFORMAT_R16G16_UNORM:
153 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM:
154 case SDL_GPU_TEXTUREFORMAT_R8_UNORM:
155 case SDL_GPU_TEXTUREFORMAT_R16_UNORM:
156 case SDL_GPU_TEXTUREFORMAT_A8_UNORM:
157 case SDL_GPU_TEXTUREFORMAT_R8_SNORM:
158 case SDL_GPU_TEXTUREFORMAT_R8G8_SNORM:
159 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM:
160 case SDL_GPU_TEXTUREFORMAT_R16_SNORM:
161 case SDL_GPU_TEXTUREFORMAT_R16G16_SNORM:
162 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM:
163 case SDL_GPU_TEXTUREFORMAT_R16_FLOAT:
164 case SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT:
165 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT:
166 case SDL_GPU_TEXTUREFORMAT_R32_FLOAT:
167 case SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT:
168 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT:
169 case SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT:
170 case SDL_GPU_TEXTUREFORMAT_R8_UINT:
171 case SDL_GPU_TEXTUREFORMAT_R8G8_UINT:
172 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT:
173 case SDL_GPU_TEXTUREFORMAT_R16_UINT:
174 case SDL_GPU_TEXTUREFORMAT_R16G16_UINT:
175 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT:
176 case SDL_GPU_TEXTUREFORMAT_R32_UINT:
177 case SDL_GPU_TEXTUREFORMAT_R32G32_UINT:
178 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT:
179 case SDL_GPU_TEXTUREFORMAT_R8_INT:
180 case SDL_GPU_TEXTUREFORMAT_R8G8_INT:
181 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT:
182 case SDL_GPU_TEXTUREFORMAT_R16_INT:
183 case SDL_GPU_TEXTUREFORMAT_R16G16_INT:
184 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT:
185 case SDL_GPU_TEXTUREFORMAT_R32_INT:
186 case SDL_GPU_TEXTUREFORMAT_R32G32_INT:
187 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT:
188 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB:
189 case SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB:
190 case SDL_GPU_TEXTUREFORMAT_D16_UNORM:
191 case SDL_GPU_TEXTUREFORMAT_D24_UNORM:
192 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT:
193 case SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT:
194 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT:
195 return 1;
196 default:
197 SDL_assert_release(!"Unrecognized TextureFormat!");
198 return 0;
199 }
200}
201
202static inline Sint32 Texture_GetBlockHeight(
203 SDL_GPUTextureFormat format)
204{
205 switch (format) {
206 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM:
207 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB:
208 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT:
209 return 12;
210 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM:
211 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB:
212 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT:
213 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM:
214 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB:
215 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT:
216 return 10;
217 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM:
218 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB:
219 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT:
220 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM:
221 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB:
222 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT:
223 return 8;
224 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM:
225 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB:
226 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT:
227 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM:
228 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB:
229 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT:
230 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM:
231 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB:
232 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT:
233 return 6;
234 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM:
235 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB:
236 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT:
237 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM:
238 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB:
239 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT:
240 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM:
241 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB:
242 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT:
243 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM:
244 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB:
245 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT:
246 return 5;
247 case SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM:
248 case SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM:
249 case SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM:
250 case SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM:
251 case SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM:
252 case SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM:
253 case SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT:
254 case SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT:
255 case SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB:
256 case SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB:
257 case SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB:
258 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM:
259 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB:
260 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT:
261 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM:
262 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB:
263 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT:
264 return 4;
265 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM:
266 case SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM:
267 case SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM:
268 case SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM:
269 case SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM:
270 case SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM:
271 case SDL_GPU_TEXTUREFORMAT_R8G8_UNORM:
272 case SDL_GPU_TEXTUREFORMAT_R16G16_UNORM:
273 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM:
274 case SDL_GPU_TEXTUREFORMAT_R8_UNORM:
275 case SDL_GPU_TEXTUREFORMAT_R16_UNORM:
276 case SDL_GPU_TEXTUREFORMAT_A8_UNORM:
277 case SDL_GPU_TEXTUREFORMAT_R8_SNORM:
278 case SDL_GPU_TEXTUREFORMAT_R8G8_SNORM:
279 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM:
280 case SDL_GPU_TEXTUREFORMAT_R16_SNORM:
281 case SDL_GPU_TEXTUREFORMAT_R16G16_SNORM:
282 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM:
283 case SDL_GPU_TEXTUREFORMAT_R16_FLOAT:
284 case SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT:
285 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT:
286 case SDL_GPU_TEXTUREFORMAT_R32_FLOAT:
287 case SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT:
288 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT:
289 case SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT:
290 case SDL_GPU_TEXTUREFORMAT_R8_UINT:
291 case SDL_GPU_TEXTUREFORMAT_R8G8_UINT:
292 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT:
293 case SDL_GPU_TEXTUREFORMAT_R16_UINT:
294 case SDL_GPU_TEXTUREFORMAT_R16G16_UINT:
295 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT:
296 case SDL_GPU_TEXTUREFORMAT_R32_UINT:
297 case SDL_GPU_TEXTUREFORMAT_R32G32_UINT:
298 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT:
299 case SDL_GPU_TEXTUREFORMAT_R8_INT:
300 case SDL_GPU_TEXTUREFORMAT_R8G8_INT:
301 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT:
302 case SDL_GPU_TEXTUREFORMAT_R16_INT:
303 case SDL_GPU_TEXTUREFORMAT_R16G16_INT:
304 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT:
305 case SDL_GPU_TEXTUREFORMAT_R32_INT:
306 case SDL_GPU_TEXTUREFORMAT_R32G32_INT:
307 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT:
308 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB:
309 case SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB:
310 case SDL_GPU_TEXTUREFORMAT_D16_UNORM:
311 case SDL_GPU_TEXTUREFORMAT_D24_UNORM:
312 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT:
313 case SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT:
314 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT:
315 return 1;
316 default:
317 SDL_assert_release(!"Unrecognized TextureFormat!");
318 return 0;
319 }
320}
321
322static inline bool IsDepthFormat(
323 SDL_GPUTextureFormat format)
324{
325 switch (format) {
326 case SDL_GPU_TEXTUREFORMAT_D16_UNORM:
327 case SDL_GPU_TEXTUREFORMAT_D24_UNORM:
328 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT:
329 case SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT:
330 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT:
331 return true;
332
333 default:
334 return false;
335 }
336}
337
338static inline bool IsStencilFormat(
339 SDL_GPUTextureFormat format)
340{
341 switch (format) {
342 case SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT:
343 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT:
344 return true;
345
346 default:
347 return false;
348 }
349}
350
351static inline bool IsIntegerFormat(
352 SDL_GPUTextureFormat format)
353{
354 switch (format) {
355 case SDL_GPU_TEXTUREFORMAT_R8_UINT:
356 case SDL_GPU_TEXTUREFORMAT_R8G8_UINT:
357 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT:
358 case SDL_GPU_TEXTUREFORMAT_R16_UINT:
359 case SDL_GPU_TEXTUREFORMAT_R16G16_UINT:
360 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT:
361 case SDL_GPU_TEXTUREFORMAT_R8_INT:
362 case SDL_GPU_TEXTUREFORMAT_R8G8_INT:
363 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT:
364 case SDL_GPU_TEXTUREFORMAT_R16_INT:
365 case SDL_GPU_TEXTUREFORMAT_R16G16_INT:
366 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT:
367 return true;
368
369 default:
370 return false;
371 }
372}
373
374static inline Uint32 IndexSize(SDL_GPUIndexElementSize size)
375{
376 return (size == SDL_GPU_INDEXELEMENTSIZE_16BIT) ? 2 : 4;
377}
378
379static inline Uint32 BytesPerRow(
380 Sint32 width,
381 SDL_GPUTextureFormat format)
382{
383 Uint32 blockWidth = Texture_GetBlockWidth(format);
384 Uint32 blocksPerRow = (width + blockWidth - 1) / blockWidth;
385 return blocksPerRow * SDL_GPUTextureFormatTexelBlockSize(format);
386}
387
388// GraphicsDevice Limits
389
390#define MAX_TEXTURE_SAMPLERS_PER_STAGE 16
391#define MAX_STORAGE_TEXTURES_PER_STAGE 8
392#define MAX_STORAGE_BUFFERS_PER_STAGE 8
393#define MAX_UNIFORM_BUFFERS_PER_STAGE 4
394#define MAX_COMPUTE_WRITE_TEXTURES 8
395#define MAX_COMPUTE_WRITE_BUFFERS 8
396#define UNIFORM_BUFFER_SIZE 32768
397#define MAX_VERTEX_BUFFERS 16
398#define MAX_VERTEX_ATTRIBUTES 16
399#define MAX_COLOR_TARGET_BINDINGS 4
400#define MAX_PRESENT_COUNT 16
401#define MAX_FRAMES_IN_FLIGHT 3
402
403// Internal Macros
404
405#define EXPAND_ARRAY_IF_NEEDED(arr, elementType, newCount, capacity, newCapacity) \
406 do { \
407 if ((newCount) >= (capacity)) { \
408 (capacity) = (newCapacity); \
409 (arr) = (elementType *)SDL_realloc( \
410 (arr), \
411 sizeof(elementType) * (capacity)); \
412 } \
413 } while (0)
414
415// Internal Declarations
416
417#ifdef __cplusplus
418extern "C" {
419#endif // __cplusplus
420
421SDL_GPUGraphicsPipeline *SDL_GPU_FetchBlitPipeline(
422 SDL_GPUDevice *device,
423 SDL_GPUTextureType sourceTextureType,
424 SDL_GPUTextureFormat destinationFormat,
425 SDL_GPUShader *blitVertexShader,
426 SDL_GPUShader *blitFrom2DShader,
427 SDL_GPUShader *blitFrom2DArrayShader,
428 SDL_GPUShader *blitFrom3DShader,
429 SDL_GPUShader *blitFromCubeShader,
430 SDL_GPUShader *blitFromCubeArrayShader,
431 BlitPipelineCacheEntry **blitPipelines,
432 Uint32 *blitPipelineCount,
433 Uint32 *blitPipelineCapacity);
434
435void SDL_GPU_BlitCommon(
436 SDL_GPUCommandBuffer *commandBuffer,
437 const SDL_GPUBlitInfo *info,
438 SDL_GPUSampler *blitLinearSampler,
439 SDL_GPUSampler *blitNearestSampler,
440 SDL_GPUShader *blitVertexShader,
441 SDL_GPUShader *blitFrom2DShader,
442 SDL_GPUShader *blitFrom2DArrayShader,
443 SDL_GPUShader *blitFrom3DShader,
444 SDL_GPUShader *blitFromCubeShader,
445 SDL_GPUShader *blitFromCubeArrayShader,
446 BlitPipelineCacheEntry **blitPipelines,
447 Uint32 *blitPipelineCount,
448 Uint32 *blitPipelineCapacity);
449
450#ifdef __cplusplus
451}
452#endif // __cplusplus
453
454// SDL_GPUDevice Definition
455
456typedef struct SDL_GPURenderer SDL_GPURenderer;
457
458struct SDL_GPUDevice
459{
460 // Quit
461
462 void (*DestroyDevice)(SDL_GPUDevice *device);
463
464 // State Creation
465
466 SDL_GPUComputePipeline *(*CreateComputePipeline)(
467 SDL_GPURenderer *driverData,
468 const SDL_GPUComputePipelineCreateInfo *createinfo);
469
470 SDL_GPUGraphicsPipeline *(*CreateGraphicsPipeline)(
471 SDL_GPURenderer *driverData,
472 const SDL_GPUGraphicsPipelineCreateInfo *createinfo);
473
474 SDL_GPUSampler *(*CreateSampler)(
475 SDL_GPURenderer *driverData,
476 const SDL_GPUSamplerCreateInfo *createinfo);
477
478 SDL_GPUShader *(*CreateShader)(
479 SDL_GPURenderer *driverData,
480 const SDL_GPUShaderCreateInfo *createinfo);
481
482 SDL_GPUTexture *(*CreateTexture)(
483 SDL_GPURenderer *driverData,
484 const SDL_GPUTextureCreateInfo *createinfo);
485
486 SDL_GPUBuffer *(*CreateBuffer)(
487 SDL_GPURenderer *driverData,
488 SDL_GPUBufferUsageFlags usageFlags,
489 Uint32 size,
490 const char *debugName);
491
492 SDL_GPUTransferBuffer *(*CreateTransferBuffer)(
493 SDL_GPURenderer *driverData,
494 SDL_GPUTransferBufferUsage usage,
495 Uint32 size,
496 const char *debugName);
497
498 // Debug Naming
499
500 void (*SetBufferName)(
501 SDL_GPURenderer *driverData,
502 SDL_GPUBuffer *buffer,
503 const char *text);
504
505 void (*SetTextureName)(
506 SDL_GPURenderer *driverData,
507 SDL_GPUTexture *texture,
508 const char *text);
509
510 void (*InsertDebugLabel)(
511 SDL_GPUCommandBuffer *commandBuffer,
512 const char *text);
513
514 void (*PushDebugGroup)(
515 SDL_GPUCommandBuffer *commandBuffer,
516 const char *name);
517
518 void (*PopDebugGroup)(
519 SDL_GPUCommandBuffer *commandBuffer);
520
521 // Disposal
522
523 void (*ReleaseTexture)(
524 SDL_GPURenderer *driverData,
525 SDL_GPUTexture *texture);
526
527 void (*ReleaseSampler)(
528 SDL_GPURenderer *driverData,
529 SDL_GPUSampler *sampler);
530
531 void (*ReleaseBuffer)(
532 SDL_GPURenderer *driverData,
533 SDL_GPUBuffer *buffer);
534
535 void (*ReleaseTransferBuffer)(
536 SDL_GPURenderer *driverData,
537 SDL_GPUTransferBuffer *transferBuffer);
538
539 void (*ReleaseShader)(
540 SDL_GPURenderer *driverData,
541 SDL_GPUShader *shader);
542
543 void (*ReleaseComputePipeline)(
544 SDL_GPURenderer *driverData,
545 SDL_GPUComputePipeline *computePipeline);
546
547 void (*ReleaseGraphicsPipeline)(
548 SDL_GPURenderer *driverData,
549 SDL_GPUGraphicsPipeline *graphicsPipeline);
550
551 // Render Pass
552
553 void (*BeginRenderPass)(
554 SDL_GPUCommandBuffer *commandBuffer,
555 const SDL_GPUColorTargetInfo *colorTargetInfos,
556 Uint32 numColorTargets,
557 const SDL_GPUDepthStencilTargetInfo *depthStencilTargetInfo);
558
559 void (*BindGraphicsPipeline)(
560 SDL_GPUCommandBuffer *commandBuffer,
561 SDL_GPUGraphicsPipeline *graphicsPipeline);
562
563 void (*SetViewport)(
564 SDL_GPUCommandBuffer *commandBuffer,
565 const SDL_GPUViewport *viewport);
566
567 void (*SetScissor)(
568 SDL_GPUCommandBuffer *commandBuffer,
569 const SDL_Rect *scissor);
570
571 void (*SetBlendConstants)(
572 SDL_GPUCommandBuffer *commandBuffer,
573 SDL_FColor blendConstants);
574
575 void (*SetStencilReference)(
576 SDL_GPUCommandBuffer *commandBuffer,
577 Uint8 reference);
578
579 void (*BindVertexBuffers)(
580 SDL_GPUCommandBuffer *commandBuffer,
581 Uint32 firstSlot,
582 const SDL_GPUBufferBinding *bindings,
583 Uint32 numBindings);
584
585 void (*BindIndexBuffer)(
586 SDL_GPUCommandBuffer *commandBuffer,
587 const SDL_GPUBufferBinding *binding,
588 SDL_GPUIndexElementSize indexElementSize);
589
590 void (*BindVertexSamplers)(
591 SDL_GPUCommandBuffer *commandBuffer,
592 Uint32 firstSlot,
593 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
594 Uint32 numBindings);
595
596 void (*BindVertexStorageTextures)(
597 SDL_GPUCommandBuffer *commandBuffer,
598 Uint32 firstSlot,
599 SDL_GPUTexture *const *storageTextures,
600 Uint32 numBindings);
601
602 void (*BindVertexStorageBuffers)(
603 SDL_GPUCommandBuffer *commandBuffer,
604 Uint32 firstSlot,
605 SDL_GPUBuffer *const *storageBuffers,
606 Uint32 numBindings);
607
608 void (*BindFragmentSamplers)(
609 SDL_GPUCommandBuffer *commandBuffer,
610 Uint32 firstSlot,
611 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
612 Uint32 numBindings);
613
614 void (*BindFragmentStorageTextures)(
615 SDL_GPUCommandBuffer *commandBuffer,
616 Uint32 firstSlot,
617 SDL_GPUTexture *const *storageTextures,
618 Uint32 numBindings);
619
620 void (*BindFragmentStorageBuffers)(
621 SDL_GPUCommandBuffer *commandBuffer,
622 Uint32 firstSlot,
623 SDL_GPUBuffer *const *storageBuffers,
624 Uint32 numBindings);
625
626 void (*PushVertexUniformData)(
627 SDL_GPUCommandBuffer *commandBuffer,
628 Uint32 slotIndex,
629 const void *data,
630 Uint32 length);
631
632 void (*PushFragmentUniformData)(
633 SDL_GPUCommandBuffer *commandBuffer,
634 Uint32 slotIndex,
635 const void *data,
636 Uint32 length);
637
638 void (*DrawIndexedPrimitives)(
639 SDL_GPUCommandBuffer *commandBuffer,
640 Uint32 numIndices,
641 Uint32 numInstances,
642 Uint32 firstIndex,
643 Sint32 vertexOffset,
644 Uint32 firstInstance);
645
646 void (*DrawPrimitives)(
647 SDL_GPUCommandBuffer *commandBuffer,
648 Uint32 numVertices,
649 Uint32 numInstances,
650 Uint32 firstVertex,
651 Uint32 firstInstance);
652
653 void (*DrawPrimitivesIndirect)(
654 SDL_GPUCommandBuffer *commandBuffer,
655 SDL_GPUBuffer *buffer,
656 Uint32 offset,
657 Uint32 drawCount);
658
659 void (*DrawIndexedPrimitivesIndirect)(
660 SDL_GPUCommandBuffer *commandBuffer,
661 SDL_GPUBuffer *buffer,
662 Uint32 offset,
663 Uint32 drawCount);
664
665 void (*EndRenderPass)(
666 SDL_GPUCommandBuffer *commandBuffer);
667
668 // Compute Pass
669
670 void (*BeginComputePass)(
671 SDL_GPUCommandBuffer *commandBuffer,
672 const SDL_GPUStorageTextureReadWriteBinding *storageTextureBindings,
673 Uint32 numStorageTextureBindings,
674 const SDL_GPUStorageBufferReadWriteBinding *storageBufferBindings,
675 Uint32 numStorageBufferBindings);
676
677 void (*BindComputePipeline)(
678 SDL_GPUCommandBuffer *commandBuffer,
679 SDL_GPUComputePipeline *computePipeline);
680
681 void (*BindComputeSamplers)(
682 SDL_GPUCommandBuffer *commandBuffer,
683 Uint32 firstSlot,
684 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
685 Uint32 numBindings);
686
687 void (*BindComputeStorageTextures)(
688 SDL_GPUCommandBuffer *commandBuffer,
689 Uint32 firstSlot,
690 SDL_GPUTexture *const *storageTextures,
691 Uint32 numBindings);
692
693 void (*BindComputeStorageBuffers)(
694 SDL_GPUCommandBuffer *commandBuffer,
695 Uint32 firstSlot,
696 SDL_GPUBuffer *const *storageBuffers,
697 Uint32 numBindings);
698
699 void (*PushComputeUniformData)(
700 SDL_GPUCommandBuffer *commandBuffer,
701 Uint32 slotIndex,
702 const void *data,
703 Uint32 length);
704
705 void (*DispatchCompute)(
706 SDL_GPUCommandBuffer *commandBuffer,
707 Uint32 groupcountX,
708 Uint32 groupcountY,
709 Uint32 groupcountZ);
710
711 void (*DispatchComputeIndirect)(
712 SDL_GPUCommandBuffer *commandBuffer,
713 SDL_GPUBuffer *buffer,
714 Uint32 offset);
715
716 void (*EndComputePass)(
717 SDL_GPUCommandBuffer *commandBuffer);
718
719 // TransferBuffer Data
720
721 void *(*MapTransferBuffer)(
722 SDL_GPURenderer *device,
723 SDL_GPUTransferBuffer *transferBuffer,
724 bool cycle);
725
726 void (*UnmapTransferBuffer)(
727 SDL_GPURenderer *device,
728 SDL_GPUTransferBuffer *transferBuffer);
729
730 // Copy Pass
731
732 void (*BeginCopyPass)(
733 SDL_GPUCommandBuffer *commandBuffer);
734
735 void (*UploadToTexture)(
736 SDL_GPUCommandBuffer *commandBuffer,
737 const SDL_GPUTextureTransferInfo *source,
738 const SDL_GPUTextureRegion *destination,
739 bool cycle);
740
741 void (*UploadToBuffer)(
742 SDL_GPUCommandBuffer *commandBuffer,
743 const SDL_GPUTransferBufferLocation *source,
744 const SDL_GPUBufferRegion *destination,
745 bool cycle);
746
747 void (*CopyTextureToTexture)(
748 SDL_GPUCommandBuffer *commandBuffer,
749 const SDL_GPUTextureLocation *source,
750 const SDL_GPUTextureLocation *destination,
751 Uint32 w,
752 Uint32 h,
753 Uint32 d,
754 bool cycle);
755
756 void (*CopyBufferToBuffer)(
757 SDL_GPUCommandBuffer *commandBuffer,
758 const SDL_GPUBufferLocation *source,
759 const SDL_GPUBufferLocation *destination,
760 Uint32 size,
761 bool cycle);
762
763 void (*GenerateMipmaps)(
764 SDL_GPUCommandBuffer *commandBuffer,
765 SDL_GPUTexture *texture);
766
767 void (*DownloadFromTexture)(
768 SDL_GPUCommandBuffer *commandBuffer,
769 const SDL_GPUTextureRegion *source,
770 const SDL_GPUTextureTransferInfo *destination);
771
772 void (*DownloadFromBuffer)(
773 SDL_GPUCommandBuffer *commandBuffer,
774 const SDL_GPUBufferRegion *source,
775 const SDL_GPUTransferBufferLocation *destination);
776
777 void (*EndCopyPass)(
778 SDL_GPUCommandBuffer *commandBuffer);
779
780 void (*Blit)(
781 SDL_GPUCommandBuffer *commandBuffer,
782 const SDL_GPUBlitInfo *info);
783
784 // Submission/Presentation
785
786 bool (*SupportsSwapchainComposition)(
787 SDL_GPURenderer *driverData,
788 SDL_Window *window,
789 SDL_GPUSwapchainComposition swapchainComposition);
790
791 bool (*SupportsPresentMode)(
792 SDL_GPURenderer *driverData,
793 SDL_Window *window,
794 SDL_GPUPresentMode presentMode);
795
796 bool (*ClaimWindow)(
797 SDL_GPURenderer *driverData,
798 SDL_Window *window);
799
800 void (*ReleaseWindow)(
801 SDL_GPURenderer *driverData,
802 SDL_Window *window);
803
804 bool (*SetSwapchainParameters)(
805 SDL_GPURenderer *driverData,
806 SDL_Window *window,
807 SDL_GPUSwapchainComposition swapchainComposition,
808 SDL_GPUPresentMode presentMode);
809
810 bool (*SetAllowedFramesInFlight)(
811 SDL_GPURenderer *driverData,
812 Uint32 allowedFramesInFlight);
813
814 SDL_GPUTextureFormat (*GetSwapchainTextureFormat)(
815 SDL_GPURenderer *driverData,
816 SDL_Window *window);
817
818 SDL_GPUCommandBuffer *(*AcquireCommandBuffer)(
819 SDL_GPURenderer *driverData);
820
821 bool (*AcquireSwapchainTexture)(
822 SDL_GPUCommandBuffer *commandBuffer,
823 SDL_Window *window,
824 SDL_GPUTexture **swapchainTexture,
825 Uint32 *swapchainTextureWidth,
826 Uint32 *swapchainTextureHeight);
827
828 bool (*WaitForSwapchain)(
829 SDL_GPURenderer *driverData,
830 SDL_Window *window);
831
832 bool (*WaitAndAcquireSwapchainTexture)(
833 SDL_GPUCommandBuffer *commandBuffer,
834 SDL_Window *window,
835 SDL_GPUTexture **swapchainTexture,
836 Uint32 *swapchainTextureWidth,
837 Uint32 *swapchainTextureHeight);
838
839 bool (*Submit)(
840 SDL_GPUCommandBuffer *commandBuffer);
841
842 SDL_GPUFence *(*SubmitAndAcquireFence)(
843 SDL_GPUCommandBuffer *commandBuffer);
844
845 bool (*Cancel)(
846 SDL_GPUCommandBuffer *commandBuffer);
847
848 bool (*Wait)(
849 SDL_GPURenderer *driverData);
850
851 bool (*WaitForFences)(
852 SDL_GPURenderer *driverData,
853 bool waitAll,
854 SDL_GPUFence *const *fences,
855 Uint32 numFences);
856
857 bool (*QueryFence)(
858 SDL_GPURenderer *driverData,
859 SDL_GPUFence *fence);
860
861 void (*ReleaseFence)(
862 SDL_GPURenderer *driverData,
863 SDL_GPUFence *fence);
864
865 // Feature Queries
866
867 bool (*SupportsTextureFormat)(
868 SDL_GPURenderer *driverData,
869 SDL_GPUTextureFormat format,
870 SDL_GPUTextureType type,
871 SDL_GPUTextureUsageFlags usage);
872
873 bool (*SupportsSampleCount)(
874 SDL_GPURenderer *driverData,
875 SDL_GPUTextureFormat format,
876 SDL_GPUSampleCount desiredSampleCount);
877
878 // Opaque pointer for the Driver
879 SDL_GPURenderer *driverData;
880
881 // Store this for SDL_GetGPUDeviceDriver()
882 const char *backend;
883
884 // Store this for SDL_GetGPUShaderFormats()
885 SDL_GPUShaderFormat shader_formats;
886
887 // Store this for SDL_gpu.c's debug layer
888 bool debug_mode;
889};
890
891#define ASSIGN_DRIVER_FUNC(func, name) \
892 result->func = name##_##func;
893#define ASSIGN_DRIVER(name) \
894 ASSIGN_DRIVER_FUNC(DestroyDevice, name) \
895 ASSIGN_DRIVER_FUNC(CreateComputePipeline, name) \
896 ASSIGN_DRIVER_FUNC(CreateGraphicsPipeline, name) \
897 ASSIGN_DRIVER_FUNC(CreateSampler, name) \
898 ASSIGN_DRIVER_FUNC(CreateShader, name) \
899 ASSIGN_DRIVER_FUNC(CreateTexture, name) \
900 ASSIGN_DRIVER_FUNC(CreateBuffer, name) \
901 ASSIGN_DRIVER_FUNC(CreateTransferBuffer, name) \
902 ASSIGN_DRIVER_FUNC(SetBufferName, name) \
903 ASSIGN_DRIVER_FUNC(SetTextureName, name) \
904 ASSIGN_DRIVER_FUNC(InsertDebugLabel, name) \
905 ASSIGN_DRIVER_FUNC(PushDebugGroup, name) \
906 ASSIGN_DRIVER_FUNC(PopDebugGroup, name) \
907 ASSIGN_DRIVER_FUNC(ReleaseTexture, name) \
908 ASSIGN_DRIVER_FUNC(ReleaseSampler, name) \
909 ASSIGN_DRIVER_FUNC(ReleaseBuffer, name) \
910 ASSIGN_DRIVER_FUNC(ReleaseTransferBuffer, name) \
911 ASSIGN_DRIVER_FUNC(ReleaseShader, name) \
912 ASSIGN_DRIVER_FUNC(ReleaseComputePipeline, name) \
913 ASSIGN_DRIVER_FUNC(ReleaseGraphicsPipeline, name) \
914 ASSIGN_DRIVER_FUNC(BeginRenderPass, name) \
915 ASSIGN_DRIVER_FUNC(BindGraphicsPipeline, name) \
916 ASSIGN_DRIVER_FUNC(SetViewport, name) \
917 ASSIGN_DRIVER_FUNC(SetScissor, name) \
918 ASSIGN_DRIVER_FUNC(SetBlendConstants, name) \
919 ASSIGN_DRIVER_FUNC(SetStencilReference, name) \
920 ASSIGN_DRIVER_FUNC(BindVertexBuffers, name) \
921 ASSIGN_DRIVER_FUNC(BindIndexBuffer, name) \
922 ASSIGN_DRIVER_FUNC(BindVertexSamplers, name) \
923 ASSIGN_DRIVER_FUNC(BindVertexStorageTextures, name) \
924 ASSIGN_DRIVER_FUNC(BindVertexStorageBuffers, name) \
925 ASSIGN_DRIVER_FUNC(BindFragmentSamplers, name) \
926 ASSIGN_DRIVER_FUNC(BindFragmentStorageTextures, name) \
927 ASSIGN_DRIVER_FUNC(BindFragmentStorageBuffers, name) \
928 ASSIGN_DRIVER_FUNC(PushVertexUniformData, name) \
929 ASSIGN_DRIVER_FUNC(PushFragmentUniformData, name) \
930 ASSIGN_DRIVER_FUNC(DrawIndexedPrimitives, name) \
931 ASSIGN_DRIVER_FUNC(DrawPrimitives, name) \
932 ASSIGN_DRIVER_FUNC(DrawPrimitivesIndirect, name) \
933 ASSIGN_DRIVER_FUNC(DrawIndexedPrimitivesIndirect, name) \
934 ASSIGN_DRIVER_FUNC(EndRenderPass, name) \
935 ASSIGN_DRIVER_FUNC(BeginComputePass, name) \
936 ASSIGN_DRIVER_FUNC(BindComputePipeline, name) \
937 ASSIGN_DRIVER_FUNC(BindComputeSamplers, name) \
938 ASSIGN_DRIVER_FUNC(BindComputeStorageTextures, name) \
939 ASSIGN_DRIVER_FUNC(BindComputeStorageBuffers, name) \
940 ASSIGN_DRIVER_FUNC(PushComputeUniformData, name) \
941 ASSIGN_DRIVER_FUNC(DispatchCompute, name) \
942 ASSIGN_DRIVER_FUNC(DispatchComputeIndirect, name) \
943 ASSIGN_DRIVER_FUNC(EndComputePass, name) \
944 ASSIGN_DRIVER_FUNC(MapTransferBuffer, name) \
945 ASSIGN_DRIVER_FUNC(UnmapTransferBuffer, name) \
946 ASSIGN_DRIVER_FUNC(BeginCopyPass, name) \
947 ASSIGN_DRIVER_FUNC(UploadToTexture, name) \
948 ASSIGN_DRIVER_FUNC(UploadToBuffer, name) \
949 ASSIGN_DRIVER_FUNC(DownloadFromTexture, name) \
950 ASSIGN_DRIVER_FUNC(DownloadFromBuffer, name) \
951 ASSIGN_DRIVER_FUNC(CopyTextureToTexture, name) \
952 ASSIGN_DRIVER_FUNC(CopyBufferToBuffer, name) \
953 ASSIGN_DRIVER_FUNC(GenerateMipmaps, name) \
954 ASSIGN_DRIVER_FUNC(EndCopyPass, name) \
955 ASSIGN_DRIVER_FUNC(Blit, name) \
956 ASSIGN_DRIVER_FUNC(SupportsSwapchainComposition, name) \
957 ASSIGN_DRIVER_FUNC(SupportsPresentMode, name) \
958 ASSIGN_DRIVER_FUNC(ClaimWindow, name) \
959 ASSIGN_DRIVER_FUNC(ReleaseWindow, name) \
960 ASSIGN_DRIVER_FUNC(SetSwapchainParameters, name) \
961 ASSIGN_DRIVER_FUNC(SetAllowedFramesInFlight, name) \
962 ASSIGN_DRIVER_FUNC(GetSwapchainTextureFormat, name) \
963 ASSIGN_DRIVER_FUNC(AcquireCommandBuffer, name) \
964 ASSIGN_DRIVER_FUNC(AcquireSwapchainTexture, name) \
965 ASSIGN_DRIVER_FUNC(WaitForSwapchain, name) \
966 ASSIGN_DRIVER_FUNC(WaitAndAcquireSwapchainTexture, name)\
967 ASSIGN_DRIVER_FUNC(Submit, name) \
968 ASSIGN_DRIVER_FUNC(SubmitAndAcquireFence, name) \
969 ASSIGN_DRIVER_FUNC(Cancel, name) \
970 ASSIGN_DRIVER_FUNC(Wait, name) \
971 ASSIGN_DRIVER_FUNC(WaitForFences, name) \
972 ASSIGN_DRIVER_FUNC(QueryFence, name) \
973 ASSIGN_DRIVER_FUNC(ReleaseFence, name) \
974 ASSIGN_DRIVER_FUNC(SupportsTextureFormat, name) \
975 ASSIGN_DRIVER_FUNC(SupportsSampleCount, name)
976
977typedef struct SDL_GPUBootstrap
978{
979 const char *name;
980 const SDL_GPUShaderFormat shader_formats;
981 bool (*PrepareDriver)(SDL_VideoDevice *_this);
982 SDL_GPUDevice *(*CreateDevice)(bool debug_mode, bool prefer_low_power, SDL_PropertiesID props);
983} SDL_GPUBootstrap;
984
985#ifdef __cplusplus
986extern "C" {
987#endif
988
989extern SDL_GPUBootstrap VulkanDriver;
990extern SDL_GPUBootstrap D3D12Driver;
991extern SDL_GPUBootstrap MetalDriver;
992extern SDL_GPUBootstrap PrivateGPUDriver;
993
994#ifdef __cplusplus
995}
996#endif
997
998#endif // SDL_GPU_DRIVER_H
diff --git a/contrib/SDL-3.2.8/src/gpu/d3d12/D3D12_Blit.h b/contrib/SDL-3.2.8/src/gpu/d3d12/D3D12_Blit.h
new file mode 100644
index 0000000..d8cfbaf
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/d3d12/D3D12_Blit.h
@@ -0,0 +1,3349 @@
1#if 0
2;
3; Input signature:
4;
5; Name Index Mask Register SysValue Format Used
6; -------------------- ----- ------ -------- -------- ------- ------
7; SV_VertexID 0 x 0 VERTID uint x
8;
9;
10; Output signature:
11;
12; Name Index Mask Register SysValue Format Used
13; -------------------- ----- ------ -------- -------- ------- ------
14; TEXCOORD 0 xy 0 NONE float xy
15; SV_Position 0 xyzw 1 POS float xyzw
16;
17; shader hash: 347572259f9a9ea84d2f90bafbd0e1ae
18;
19; Pipeline Runtime Information:
20;
21; Vertex Shader
22; OutputPositionPresent=1
23;
24;
25; Input signature:
26;
27; Name Index InterpMode DynIdx
28; -------------------- ----- ---------------------- ------
29; SV_VertexID 0
30;
31; Output signature:
32;
33; Name Index InterpMode DynIdx
34; -------------------- ----- ---------------------- ------
35; TEXCOORD 0 linear
36; SV_Position 0 noperspective
37;
38; Buffer Definitions:
39;
40;
41; Resource Bindings:
42;
43; Name Type Format Dim ID HLSL Bind Count
44; ------------------------------ ---------- ------- ----------- ------- -------------- ------
45;
46;
47; ViewId state:
48;
49; Number of inputs: 1, outputs: 8
50; Outputs dependent on ViewId: { }
51; Inputs contributing to computation of Outputs:
52; output 0 depends on inputs: { 0 }
53; output 1 depends on inputs: { 0 }
54; output 4 depends on inputs: { 0 }
55; output 5 depends on inputs: { 0 }
56;
57target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
58target triple = "dxil-ms-dx"
59
60define void @FullscreenVert() {
61 %1 = call i32 @dx.op.loadInput.i32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
62 %2 = shl i32 %1, 1
63 %3 = and i32 %2, 2
64 %4 = uitofp i32 %3 to float
65 %5 = and i32 %1, 2
66 %6 = uitofp i32 %5 to float
67 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float 0.000000e+00) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
68 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float 0.000000e+00) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
69 call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float 0.000000e+00) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
70 call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float 0.000000e+00) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
71 call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 2, float 0.000000e+00) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
72 call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 3, float 0.000000e+00) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
73 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %4) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
74 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %6) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
75 %7 = fmul fast float %4, 2.000000e+00
76 %8 = fmul fast float %6, 2.000000e+00
77 %9 = fadd fast float %7, -1.000000e+00
78 %10 = fsub fast float 1.000000e+00, %8
79 call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %9) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
80 call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %10) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
81 call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 2, float 0.000000e+00) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
82 call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 3, float 1.000000e+00) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
83 ret void
84}
85
86; Function Attrs: nounwind readnone
87declare i32 @dx.op.loadInput.i32(i32, i32, i32, i8, i32) #0
88
89; Function Attrs: nounwind
90declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1
91
92attributes #0 = { nounwind readnone }
93attributes #1 = { nounwind }
94
95!llvm.ident = !{!0}
96!dx.version = !{!1}
97!dx.valver = !{!2}
98!dx.shaderModel = !{!3}
99!dx.viewIdState = !{!4}
100!dx.entryPoints = !{!5}
101
102!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
103!1 = !{i32 1, i32 0}
104!2 = !{i32 1, i32 6}
105!3 = !{!"vs", i32 6, i32 0}
106!4 = !{[3 x i32] [i32 1, i32 8, i32 51]}
107!5 = !{void ()* @FullscreenVert, !"FullscreenVert", !6, null, null}
108!6 = !{!7, !11, null}
109!7 = !{!8}
110!8 = !{i32 0, !"SV_VertexID", i8 5, i8 1, !9, i8 0, i32 1, i8 1, i32 0, i8 0, !10}
111!9 = !{i32 0}
112!10 = !{i32 3, i32 1}
113!11 = !{!12, !14}
114!12 = !{i32 0, !"TEXCOORD", i8 9, i8 0, !9, i8 2, i32 1, i8 2, i32 0, i8 0, !13}
115!13 = !{i32 3, i32 3}
116!14 = !{i32 1, !"SV_Position", i8 9, i8 3, !9, i8 4, i32 1, i8 4, i32 1, i8 0, !15}
117!15 = !{i32 3, i32 15}
118
119#endif
120
121const unsigned char g_FullscreenVert[] = {
122 0x44, 0x58, 0x42, 0x43, 0x81, 0xc4, 0x09, 0xbf, 0x6d, 0xef, 0xac, 0x67,
123 0x8f, 0x1d, 0x64, 0xb4, 0xf2, 0x1e, 0x4b, 0xca, 0x01, 0x00, 0x00, 0x00,
124 0x4d, 0x0d, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
125 0x50, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0xf1, 0x00, 0x00, 0x00,
126 0x8d, 0x01, 0x00, 0x00, 0x1d, 0x02, 0x00, 0x00, 0xa9, 0x07, 0x00, 0x00,
127 0xc5, 0x07, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00,
128 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31,
129 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
130 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
131 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
132 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x56,
133 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x31,
134 0x5d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
135 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
136 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
137 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
138 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
139 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
140 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44,
141 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
142 0x00, 0x50, 0x53, 0x56, 0x30, 0x94, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
143 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
144 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
145 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x01, 0x02, 0x00, 0x00,
146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
147 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45,
148 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
149 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
150 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x01, 0x01, 0x00, 0x00,
151 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42,
152 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
153 0x00, 0x01, 0x01, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x33, 0x00, 0x00,
154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
155 0x00, 0x52, 0x54, 0x53, 0x30, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
156 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
157 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
158 0x00, 0x05, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
159 0x00, 0x05, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
160 0x00, 0x05, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
161 0x00, 0x44, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
162 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
163 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00,
164 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
165 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
166 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
167 0x00, 0x53, 0x54, 0x41, 0x54, 0x84, 0x05, 0x00, 0x00, 0x60, 0x00, 0x01,
168 0x00, 0x61, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00,
169 0x00, 0x10, 0x00, 0x00, 0x00, 0x6c, 0x05, 0x00, 0x00, 0x42, 0x43, 0xc0,
170 0xde, 0x21, 0x0c, 0x00, 0x00, 0x58, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20,
171 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23,
172 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84,
173 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45,
174 0x02, 0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18,
175 0x4b, 0x0a, 0x32, 0x42, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88,
176 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4,
177 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46,
178 0x06, 0x51, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0,
179 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff,
180 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00,
181 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, 0x00,
182 0x00, 0x89, 0x20, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08,
183 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22,
184 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84,
185 0x4c, 0x10, 0x3c, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x39, 0x02, 0x30, 0x98,
186 0x23, 0x40, 0x8a, 0x31, 0x33, 0x43, 0x43, 0x35, 0x03, 0x50, 0x0c, 0x98,
187 0x19, 0x3a, 0xc2, 0x81, 0x80, 0x61, 0x04, 0xe1, 0x18, 0x46, 0x20, 0x8e,
188 0xa3, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0x7f, 0x89, 0x68, 0x22, 0xae, 0xd6,
189 0x49, 0x91, 0x8b, 0x58, 0x90, 0xb0, 0x9c, 0x03, 0x03, 0x13, 0x14, 0x72,
190 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72,
191 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e,
192 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
193 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e,
194 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07,
195 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07,
196 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
197 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07,
198 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06,
199 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e,
200 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07,
201 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
202 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x05, 0x10, 0x00, 0x01, 0x00, 0x00,
203 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00,
204 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x0e, 0x00, 0x00,
205 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26,
206 0x47, 0xc6, 0x04, 0x43, 0x9a, 0x12, 0x18, 0x01, 0x28, 0x86, 0x02, 0x2a,
207 0x83, 0x42, 0x28, 0x87, 0x92, 0x28, 0x90, 0xf2, 0x28, 0x97, 0xc2, 0x20,
208 0x2a, 0x85, 0x12, 0x18, 0x01, 0x28, 0x89, 0x22, 0x28, 0x83, 0x42, 0xa0,
209 0x9e, 0x01, 0x20, 0x1f, 0x6b, 0x08, 0x90, 0x39, 0x00, 0x79, 0x18, 0x00,
210 0x00, 0x84, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13,
211 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b,
212 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b,
213 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9,
214 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13,
215 0x84, 0x61, 0x98, 0x20, 0x0c, 0xc4, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04,
216 0x41, 0xc1, 0x6e, 0x6e, 0x82, 0x30, 0x14, 0x1b, 0x86, 0x03, 0x21, 0x26,
217 0x08, 0x8d, 0x35, 0x41, 0x18, 0x0c, 0x0e, 0x74, 0x65, 0x78, 0x13, 0x84,
218 0xe1, 0x98, 0x20, 0x0c, 0x08, 0x13, 0xaa, 0x22, 0xac, 0xa1, 0xa7, 0x27,
219 0x29, 0x22, 0x98, 0x09, 0xc2, 0x90, 0x4c, 0x10, 0x06, 0x65, 0x03, 0x82,
220 0x30, 0x0d, 0xe1, 0x3c, 0x50, 0xc4, 0x01, 0xee, 0x6d, 0x6e, 0x82, 0x30,
221 0x2c, 0x5c, 0xa6, 0xac, 0xbe, 0xa0, 0x9e, 0xa6, 0x92, 0xa8, 0x92, 0x9e,
222 0x9c, 0x36, 0x20, 0xc8, 0xd4, 0x50, 0x4e, 0x05, 0x45, 0x1b, 0x86, 0x45,
223 0xb2, 0x36, 0x0c, 0x84, 0x72, 0x4d, 0x10, 0x04, 0x60, 0x03, 0xb0, 0x61,
224 0x20, 0x34, 0x6d, 0x43, 0xb0, 0x6d, 0x18, 0x86, 0x8c, 0x9b, 0x20, 0x38,
225 0xd7, 0x86, 0xc0, 0xa3, 0x63, 0x54, 0xc7, 0xc6, 0x36, 0x37, 0x26, 0x57,
226 0x56, 0xe6, 0x66, 0x55, 0x26, 0x47, 0xc7, 0x65, 0xca, 0xea, 0xcb, 0xaa,
227 0x4c, 0x8e, 0xae, 0x0c, 0x2f, 0x89, 0x68, 0x82, 0x40, 0x3c, 0x13, 0x04,
228 0x02, 0xda, 0x10, 0x10, 0x13, 0x04, 0x22, 0xda, 0x20, 0x34, 0xc3, 0x86,
229 0x85, 0x08, 0x03, 0x31, 0x18, 0x03, 0x32, 0x28, 0x83, 0x61, 0x0c, 0x88,
230 0x32, 0x30, 0x83, 0x0d, 0xc1, 0x19, 0x10, 0xa1, 0x2a, 0xc2, 0x1a, 0x7a,
231 0x7a, 0x92, 0x22, 0x9a, 0x20, 0x10, 0xd2, 0x04, 0x81, 0x98, 0x36, 0x08,
232 0x4d, 0xb3, 0x61, 0x21, 0xd2, 0x40, 0x0d, 0xca, 0x80, 0x0c, 0xd6, 0x60,
233 0x58, 0x03, 0xa2, 0x0c, 0xd8, 0x80, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb,
234 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x04, 0x81, 0xa0, 0x26, 0x08, 0x44,
235 0x35, 0x41, 0x18, 0x98, 0x0d, 0x42, 0x13, 0x07, 0x1b, 0x96, 0xc1, 0x0d,
236 0xd4, 0xe0, 0x0d, 0xc8, 0x00, 0x0e, 0x06, 0x38, 0x18, 0xca, 0x40, 0x0e,
237 0x36, 0x08, 0x6d, 0x30, 0x07, 0x1b, 0x06, 0x34, 0xa0, 0x03, 0x60, 0x43,
238 0x91, 0x81, 0x41, 0x1d, 0x00, 0x00, 0x0d, 0x33, 0xb6, 0xb7, 0x30, 0xba,
239 0x39, 0x16, 0x69, 0x6e, 0x73, 0x74, 0x73, 0x13, 0x84, 0xa1, 0xa1, 0x31,
240 0x97, 0x76, 0xf6, 0xc5, 0x46, 0x46, 0x63, 0x2e, 0xed, 0xec, 0x6b, 0x8e,
241 0x6e, 0x82, 0x30, 0x38, 0x2c, 0xea, 0xd2, 0xdc, 0xe8, 0xe6, 0x36, 0x28,
242 0x77, 0x80, 0xe0, 0x41, 0x1e, 0xe8, 0xc1, 0xb0, 0x07, 0x7c, 0xd0, 0x07,
243 0x4d, 0x15, 0x36, 0x36, 0xbb, 0x36, 0x97, 0x34, 0xb2, 0x32, 0x37, 0xba,
244 0x29, 0x41, 0x50, 0x85, 0x0c, 0xcf, 0xc5, 0xae, 0x4c, 0x6e, 0x2e, 0xed,
245 0xcd, 0x6d, 0x4a, 0x40, 0x34, 0x21, 0xc3, 0x73, 0xb1, 0x0b, 0x63, 0xb3,
246 0x2b, 0x93, 0x9b, 0x12, 0x14, 0x75, 0xc8, 0xf0, 0x5c, 0xe6, 0xd0, 0xc2,
247 0xc8, 0xca, 0xe4, 0x9a, 0xde, 0xc8, 0xca, 0xd8, 0xa6, 0x04, 0x48, 0x25,
248 0x32, 0x3c, 0x17, 0xba, 0x3c, 0xb8, 0xb2, 0x20, 0x37, 0xb7, 0x37, 0xba,
249 0x30, 0xba, 0xb4, 0x37, 0xb7, 0xb9, 0x29, 0xc2, 0xc5, 0xd5, 0x21, 0xc3,
250 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2, 0x0b, 0xa3, 0x2b,
251 0x9b, 0x12, 0x78, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2,
252 0xa0, 0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, 0x75, 0xd0, 0x85, 0x0c,
253 0xcf, 0x65, 0xec, 0xad, 0xce, 0x8d, 0xae, 0x4c, 0x6e, 0x6e, 0x4a, 0xd0,
254 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00,
255 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d,
256 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07,
257 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80,
258 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66,
259 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d,
260 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07,
261 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03,
262 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90,
263 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50,
264 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2,
265 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39,
266 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14,
267 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07,
268 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07,
269 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87,
270 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0,
271 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8,
272 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc,
273 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6,
274 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39,
275 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f,
276 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c,
277 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87,
278 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0,
279 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50,
280 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00,
281 0x00, 0x06, 0xe0, 0x7c, 0xd4, 0xb2, 0x48, 0x42, 0x44, 0x10, 0xcd, 0x4b,
282 0x44, 0x93, 0x05, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20,
283 0x36, 0x0f, 0x35, 0xf9, 0xc8, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3,
284 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d,
285 0x03, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00,
286 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x75, 0x72, 0x25, 0x9f, 0x9a, 0x9e,
287 0xa8, 0x4d, 0x2f, 0x90, 0xba, 0xfb, 0xd0, 0xe1, 0xae, 0x44, 0x58, 0x49,
288 0x4c, 0x80, 0x05, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x60, 0x01, 0x00,
289 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00,
290 0x00, 0x68, 0x05, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00,
291 0x00, 0x57, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00,
292 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04,
293 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08,
294 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02, 0x42, 0x92, 0x0b,
295 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42,
296 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32,
297 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81,
298 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06, 0x51, 0x18, 0x00,
299 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff,
300 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03,
301 0x20, 0x01, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00,
302 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00,
303 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85,
304 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90,
305 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c, 0x10, 0x30, 0x23,
306 0x00, 0x25, 0x00, 0x8a, 0x39, 0x02, 0x30, 0x98, 0x23, 0x40, 0x8a, 0x31,
307 0x33, 0x43, 0x43, 0x35, 0x03, 0x50, 0x0c, 0x98, 0x19, 0x3a, 0xc2, 0x81,
308 0x80, 0x1c, 0x18, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60,
309 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf,
310 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a,
311 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71,
312 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73,
313 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72,
314 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
315 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6,
316 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73,
317 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74,
318 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71,
319 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43,
320 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
321 0x86, 0x3c, 0x05, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
322 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
323 0x00, 0x00, 0xc8, 0x02, 0x01, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98,
324 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43,
325 0x9a, 0x12, 0x18, 0x01, 0x28, 0x86, 0x32, 0x28, 0x0f, 0xa2, 0x52, 0x28,
326 0x81, 0x11, 0x80, 0x92, 0x28, 0x82, 0x32, 0x28, 0x04, 0xda, 0xb1, 0x86,
327 0x00, 0x99, 0x03, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x51, 0x00, 0x00,
328 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63,
329 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03,
330 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a,
331 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b,
332 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x84, 0x61, 0x98, 0x20,
333 0x0c, 0xc4, 0x06, 0x61, 0x20, 0x26, 0x08, 0x43, 0xb1, 0x41, 0x18, 0x0c,
334 0x0a, 0x76, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0xcb, 0xb3, 0x21,
335 0x50, 0x26, 0x08, 0x02, 0x40, 0xc7, 0xa8, 0x8e, 0x8d, 0x6d, 0x6e, 0x4c,
336 0xae, 0xac, 0xcc, 0xcd, 0xaa, 0x4c, 0x8e, 0x8e, 0xcb, 0x94, 0xd5, 0x97,
337 0x55, 0x99, 0x1c, 0x5d, 0x19, 0x5e, 0x12, 0xd1, 0x04, 0x81, 0x40, 0x26,
338 0x08, 0x44, 0xb2, 0x21, 0x20, 0x26, 0x08, 0x84, 0x32, 0x41, 0x18, 0x8c,
339 0x0d, 0xc2, 0x34, 0x6c, 0x58, 0x08, 0xe7, 0x81, 0x22, 0x69, 0x80, 0x08,
340 0x89, 0xda, 0x10, 0x54, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4,
341 0x88, 0x26, 0x08, 0xc4, 0x32, 0x41, 0x20, 0x98, 0x0d, 0xc2, 0x34, 0x6d,
342 0x58, 0x88, 0x0b, 0x93, 0xa2, 0x6c, 0xc8, 0x08, 0x49, 0xe3, 0x32, 0x65,
343 0xf5, 0x05, 0xf5, 0x36, 0x97, 0x46, 0x97, 0xf6, 0xe6, 0x36, 0x41, 0x20,
344 0x9a, 0x09, 0x02, 0xe1, 0x4c, 0x10, 0x86, 0x63, 0x83, 0x30, 0x7d, 0x1b,
345 0x96, 0x81, 0xc3, 0xba, 0xc8, 0x1b, 0xbc, 0x41, 0x02, 0x83, 0x0d, 0xc2,
346 0x16, 0x06, 0x1b, 0x06, 0x4b, 0x0c, 0x80, 0x0d, 0x05, 0xd3, 0x8c, 0x01,
347 0x00, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3,
348 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2,
349 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36,
350 0xbb, 0x32, 0xb9, 0x29, 0x81, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d,
351 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0xd4,
352 0x21, 0xc3, 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2, 0x0b,
353 0xa3, 0x2b, 0x9b, 0x12, 0x28, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8,
354 0xe4, 0xf2, 0xa0, 0xde, 0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, 0x63, 0x00,
355 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80,
356 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84,
357 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c,
358 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42,
359 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88,
360 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c,
361 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79,
362 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70,
363 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f,
364 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4,
365 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30,
366 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc,
367 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b,
368 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70,
369 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76,
370 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72,
371 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e,
372 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1,
373 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21,
374 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8,
375 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94,
376 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc,
377 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c,
378 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e,
379 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e,
380 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00,
381 0x00, 0x71, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0xe0, 0x7c,
382 0xd4, 0xb2, 0x48, 0x42, 0x44, 0x10, 0xcd, 0x4b, 0x44, 0x93, 0x05, 0x4c,
383 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9,
384 0xc8, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44,
385 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x03, 0x61, 0x20, 0x00,
386 0x00, 0x39, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00,
387 0x00, 0x08, 0x00, 0x00, 0x00, 0x34, 0xa5, 0x50, 0x04, 0x85, 0x30, 0x03,
388 0x40, 0x37, 0x02, 0x30, 0x46, 0x00, 0x82, 0x20, 0x08, 0x82, 0xc1, 0x18,
389 0x01, 0x08, 0x82, 0x20, 0xfe, 0x8d, 0x11, 0x80, 0x20, 0x08, 0xe2, 0xbf,
390 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x50, 0x5c, 0x06, 0x45, 0x39,
391 0x45, 0x05, 0xd6, 0x55, 0x90, 0xe8, 0x05, 0x57, 0x45, 0x2c, 0x7a, 0xc1,
392 0xd5, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x9c, 0xa3, 0x69, 0x94,
393 0x32, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x08, 0xe7, 0x68, 0x5a, 0xa5,
394 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xc2, 0x39, 0x9b, 0x46, 0x29,
395 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0x70, 0xce, 0xa6, 0x55, 0xca,
396 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x9c, 0xb3, 0x69, 0x92, 0x32,
397 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x08, 0xe7, 0x6c, 0x5a, 0xa4, 0x8c,
398 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0xc2, 0x39, 0x9a, 0x46, 0x0d, 0x23,
399 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0x70, 0x8e, 0xa6, 0x55, 0x81, 0x0d,
400 0x89, 0x7c, 0x4c, 0x50, 0xe4, 0x63, 0x42, 0x02, 0x1f, 0x5b, 0x84, 0xf8,
401 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0x02, 0x06, 0xd2, 0xe7, 0x61,
402 0xc2, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x60, 0x20, 0x7d, 0x5e,
403 0x16, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0x02, 0x06, 0xd2, 0xe7,
404 0x59, 0xce, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x60, 0x20, 0x7d,
405 0x5e, 0xc5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
406};
407#if 0
408;
409; Input signature:
410;
411; Name Index Mask Register SysValue Format Used
412; -------------------- ----- ------ -------- -------- ------- ------
413; TEXCOORD 0 xy 0 NONE float xy
414; SV_Position 0 xyzw 1 POS float
415;
416;
417; Output signature:
418;
419; Name Index Mask Register SysValue Format Used
420; -------------------- ----- ------ -------- -------- ------- ------
421; SV_Target 0 xyzw 0 TARGET float xyzw
422;
423; shader hash: 964a7513a7ff5558ed84391b53971f63
424;
425; Pipeline Runtime Information:
426;
427; Pixel Shader
428; DepthOutput=0
429; SampleFrequency=0
430;
431;
432; Input signature:
433;
434; Name Index InterpMode DynIdx
435; -------------------- ----- ---------------------- ------
436; TEXCOORD 0 linear
437; SV_Position 0 noperspective
438;
439; Output signature:
440;
441; Name Index InterpMode DynIdx
442; -------------------- ----- ---------------------- ------
443; SV_Target 0
444;
445; Buffer Definitions:
446;
447; cbuffer SourceRegionBuffer
448; {
449;
450; struct SourceRegionBuffer
451; {
452;
453; float2 UVLeftTop; ; Offset: 0
454; float2 UVDimensions; ; Offset: 8
455; uint MipLevel; ; Offset: 16
456; float LayerOrDepth; ; Offset: 20
457;
458; } SourceRegionBuffer; ; Offset: 0 Size: 24
459;
460; }
461;
462;
463; Resource Bindings:
464;
465; Name Type Format Dim ID HLSL Bind Count
466; ------------------------------ ---------- ------- ----------- ------- -------------- ------
467; SourceRegionBuffer cbuffer NA NA CB0 cb0,space3 1
468; SourceSampler sampler NA NA S0 s0,space2 1
469; SourceTexture2D texture f32 2d T0 t0,space2 1
470;
471;
472; ViewId state:
473;
474; Number of inputs: 8, outputs: 4
475; Outputs dependent on ViewId: { }
476; Inputs contributing to computation of Outputs:
477; output 0 depends on inputs: { 0, 1 }
478; output 1 depends on inputs: { 0, 1 }
479; output 2 depends on inputs: { 0, 1 }
480; output 3 depends on inputs: { 0, 1 }
481;
482target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
483target triple = "dxil-ms-dx"
484
485%dx.types.Handle = type { i8* }
486%dx.types.CBufRet.f32 = type { float, float, float, float }
487%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }
488%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
489%"class.Texture2D<vector<float, 4> >" = type { <4 x float>, %"class.Texture2D<vector<float, 4> >::mips_type" }
490%"class.Texture2D<vector<float, 4> >::mips_type" = type { i32 }
491%SourceRegionBuffer = type { <2 x float>, <2 x float>, i32, float }
492%struct.SamplerState = type { i32 }
493
494define void @BlitFrom2D() {
495 %1 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
496 %2 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 3, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
497 %3 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
498 %4 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
499 %5 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
500 %6 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0) ; CBufferLoadLegacy(handle,regIndex)
501 %7 = extractvalue %dx.types.CBufRet.f32 %6, 0
502 %8 = extractvalue %dx.types.CBufRet.f32 %6, 1
503 %9 = extractvalue %dx.types.CBufRet.f32 %6, 2
504 %10 = extractvalue %dx.types.CBufRet.f32 %6, 3
505 %11 = fmul fast float %9, %4
506 %12 = fmul fast float %10, %5
507 %13 = fadd fast float %11, %7
508 %14 = fadd fast float %12, %8
509 %15 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %3, i32 1) ; CBufferLoadLegacy(handle,regIndex)
510 %16 = extractvalue %dx.types.CBufRet.i32 %15, 0
511 %17 = uitofp i32 %16 to float
512 %18 = call %dx.types.ResRet.f32 @dx.op.sampleLevel.f32(i32 62, %dx.types.Handle %1, %dx.types.Handle %2, float %13, float %14, float undef, float undef, i32 0, i32 0, i32 undef, float %17) ; SampleLevel(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,LOD)
513 %19 = extractvalue %dx.types.ResRet.f32 %18, 0
514 %20 = extractvalue %dx.types.ResRet.f32 %18, 1
515 %21 = extractvalue %dx.types.ResRet.f32 %18, 2
516 %22 = extractvalue %dx.types.ResRet.f32 %18, 3
517 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %19) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
518 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %20) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
519 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %21) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
520 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %22) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
521 ret void
522}
523
524; Function Attrs: nounwind readnone
525declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #0
526
527; Function Attrs: nounwind
528declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1
529
530; Function Attrs: nounwind readonly
531declare %dx.types.ResRet.f32 @dx.op.sampleLevel.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, float, i32, i32, i32, float) #2
532
533; Function Attrs: nounwind readonly
534declare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #2
535
536; Function Attrs: nounwind readonly
537declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #2
538
539; Function Attrs: nounwind readonly
540declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #2
541
542attributes #0 = { nounwind readnone }
543attributes #1 = { nounwind }
544attributes #2 = { nounwind readonly }
545
546!llvm.ident = !{!0}
547!dx.version = !{!1}
548!dx.valver = !{!2}
549!dx.shaderModel = !{!3}
550!dx.resources = !{!4}
551!dx.viewIdState = !{!12}
552!dx.entryPoints = !{!13}
553
554!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
555!1 = !{i32 1, i32 0}
556!2 = !{i32 1, i32 6}
557!3 = !{!"ps", i32 6, i32 0}
558!4 = !{!5, null, !8, !10}
559!5 = !{!6}
560!6 = !{i32 0, %"class.Texture2D<vector<float, 4> >"* undef, !"", i32 2, i32 0, i32 1, i32 2, i32 0, !7}
561!7 = !{i32 0, i32 9}
562!8 = !{!9}
563!9 = !{i32 0, %SourceRegionBuffer* undef, !"", i32 3, i32 0, i32 1, i32 24, null}
564!10 = !{!11}
565!11 = !{i32 0, %struct.SamplerState* undef, !"", i32 2, i32 0, i32 1, i32 0, null}
566!12 = !{[10 x i32] [i32 8, i32 4, i32 15, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0]}
567!13 = !{void ()* @BlitFrom2D, !"BlitFrom2D", !14, !4, null}
568!14 = !{!15, !20, null}
569!15 = !{!16, !19}
570!16 = !{i32 0, !"TEXCOORD", i8 9, i8 0, !17, i8 2, i32 1, i8 2, i32 0, i8 0, !18}
571!17 = !{i32 0}
572!18 = !{i32 3, i32 3}
573!19 = !{i32 1, !"SV_Position", i8 9, i8 3, !17, i8 4, i32 1, i8 4, i32 1, i8 0, null}
574!20 = !{!21}
575!21 = !{i32 0, !"SV_Target", i8 9, i8 16, !17, i8 0, i32 1, i8 4, i32 0, i8 0, !22}
576!22 = !{i32 3, i32 15}
577
578#endif
579
580const unsigned char g_BlitFrom2D[] = {
581 0x44, 0x58, 0x42, 0x43, 0x18, 0x05, 0x35, 0x74, 0x86, 0x3d, 0x7b, 0xa8,
582 0x8e, 0x1e, 0xae, 0xc3, 0xeb, 0x7f, 0x9a, 0xd9, 0x01, 0x00, 0x00, 0x00,
583 0x2b, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
584 0x50, 0x00, 0x00, 0x00, 0xb5, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00,
585 0xe7, 0x01, 0x00, 0x00, 0x77, 0x02, 0x00, 0x00, 0x5b, 0x0a, 0x00, 0x00,
586 0x77, 0x0a, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00,
587 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31,
588 0x5d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
589 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
590 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
591 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
592 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
593 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
594 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44,
595 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
596 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
597 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00,
598 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
599 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
600 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50,
601 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
602 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
603 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00,
604 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
605 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
606 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03,
607 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
608 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
609 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e,
610 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,
611 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
612 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
613 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x01,
614 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01,
615 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x03,
616 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
617 0x01, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
618 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x0f,
619 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
620 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
621 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x88,
622 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18,
623 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00,
624 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3c,
625 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x5c,
626 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x7c,
627 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03,
628 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
629 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01,
630 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
631 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
632 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03,
633 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0xdc,
634 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf7, 0x01, 0x00, 0x00, 0x44,
635 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xc4,
636 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xee,
637 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13,
638 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06,
639 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e,
640 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4,
641 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48,
642 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4,
643 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1,
644 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08,
645 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40,
646 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d,
647 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49,
648 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20,
649 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x58,
650 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13,
651 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
652 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x8c, 0xc1, 0x08, 0x40,
653 0x09, 0x00, 0x0a, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29,
654 0xc6, 0x40, 0x10, 0x44, 0x41, 0x90, 0x51, 0x0c, 0x80, 0x20, 0x88, 0x62,
655 0x20, 0xe4, 0xa6, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x7f, 0x25, 0xa4,
656 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x51, 0x31, 0x0c, 0xc3, 0x40, 0x50, 0x71,
657 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10,
658 0x28, 0x58, 0x0a, 0xa3, 0x10, 0x0c, 0x33, 0x0c, 0xc3, 0x40, 0x10, 0xc4,
659 0x40, 0xcd, 0x51, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0x3e, 0xb7, 0x51,
660 0xc5, 0x4a, 0x4c, 0x3e, 0x72, 0xdb, 0x88, 0x20, 0x08, 0x82, 0x28, 0xc4,
661 0x43, 0x30, 0x04, 0x41, 0x47, 0x0d, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9,
662 0xdc, 0x46, 0x15, 0x2b, 0x31, 0xf9, 0xc5, 0x6d, 0x23, 0x62, 0x18, 0x86,
663 0xa1, 0x10, 0x12, 0xc1, 0x10, 0x34, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0x88,
664 0x82, 0x20, 0x2a, 0xb2, 0x06, 0x02, 0x86, 0x11, 0x88, 0x61, 0xa6, 0x36,
665 0x18, 0x07, 0x76, 0x08, 0x87, 0x79, 0x98, 0x07, 0x37, 0xa0, 0x85, 0x72,
666 0xc0, 0x07, 0x7a, 0xa8, 0x07, 0x79, 0x28, 0x07, 0x39, 0x20, 0x05, 0x3e,
667 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0xe0, 0x03, 0x73,
668 0x60, 0x87, 0x77, 0x08, 0x07, 0x7a, 0x60, 0x03, 0x30, 0xa0, 0x03, 0x3f,
669 0x00, 0x03, 0x3f, 0xd0, 0x03, 0x3d, 0x68, 0x87, 0x74, 0x80, 0x87, 0x79,
670 0xf8, 0x05, 0x7a, 0xc8, 0x07, 0x78, 0x28, 0x07, 0x14, 0x10, 0x33, 0x89,
671 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94,
672 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0,
673 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98,
674 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8,
675 0x01, 0x18, 0xf8, 0x01, 0x12, 0x32, 0x8d, 0xb6, 0x61, 0x04, 0x61, 0x38,
676 0x89, 0x75, 0xa8, 0x48, 0x20, 0x56, 0xc2, 0x40, 0x9c, 0x66, 0xa3, 0x8a,
677 0x82, 0x88, 0x10, 0xd1, 0x75, 0xc4, 0x40, 0xde, 0x4d, 0xd2, 0x14, 0x51,
678 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0,
679 0x80, 0x20, 0x30, 0x15, 0x08, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87,
680 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87,
681 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00,
682 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90,
683 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0,
684 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30,
685 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20,
686 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0,
687 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60,
688 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60,
689 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0,
690 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40,
691 0x07, 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
692 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
693 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00,
694 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00,
695 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18, 0x00,
696 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30,
697 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xc7, 0x02, 0x02,
698 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2c, 0x10, 0x14,
699 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c,
700 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x4a, 0x60, 0x04, 0xa0, 0x18,
701 0x8a, 0xa0, 0x24, 0xca, 0xa0, 0x60, 0xca, 0xa1, 0x20, 0x0a, 0xa4, 0x14,
702 0x0a, 0xa5, 0x3c, 0xca, 0xa6, 0x10, 0xa8, 0x28, 0x89, 0x11, 0x80, 0x22,
703 0x28, 0x83, 0x42, 0x28, 0x10, 0xaa, 0x6a, 0x80, 0xb8, 0x19, 0x00, 0xf2,
704 0x66, 0x00, 0xe8, 0x9b, 0x01, 0xa0, 0x70, 0x06, 0x80, 0xc4, 0xb1, 0x14,
705 0x84, 0x78, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79,
706 0x18, 0x00, 0x00, 0xae, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46,
707 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b,
708 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1,
709 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa,
710 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10,
711 0x04, 0x13, 0x04, 0xe2, 0x98, 0x20, 0x10, 0xc8, 0x06, 0x61, 0x20, 0x36,
712 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x40, 0x24, 0x1b, 0x86, 0x03,
713 0x21, 0x26, 0x08, 0x5c, 0xc7, 0x67, 0xea, 0xad, 0x4e, 0x6e, 0xac, 0x8c,
714 0xaa, 0x0c, 0x8f, 0xae, 0x4e, 0xae, 0x4c, 0x86, 0x68, 0x82, 0x40, 0x28,
715 0x13, 0x04, 0x62, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16, 0x86,
716 0x18, 0x18, 0xc2, 0xd9, 0x10, 0x3c, 0x13, 0x84, 0xef, 0xa3, 0x34, 0xf5,
717 0x56, 0x27, 0x37, 0x56, 0x26, 0x55, 0x76, 0x96, 0xf6, 0xe6, 0x26, 0x54,
718 0x67, 0x66, 0x56, 0x26, 0x37, 0x41, 0x20, 0x98, 0x09, 0x02, 0xd1, 0x6c,
719 0x40, 0x88, 0x48, 0x9a, 0x88, 0x81, 0x02, 0x36, 0x04, 0xd5, 0x04, 0x21,
720 0x0c, 0xc0, 0x80, 0xcd, 0xd4, 0x5b, 0x9d, 0xdc, 0x58, 0xd9, 0x54, 0x58,
721 0x1b, 0x1c, 0x5b, 0x99, 0xdc, 0x06, 0x84, 0xb8, 0x30, 0x86, 0x18, 0x08,
722 0x60, 0x43, 0x90, 0x6d, 0x20, 0x20, 0xc0, 0xd2, 0x26, 0x08, 0x9e, 0xc7,
723 0xa4, 0xca, 0x8a, 0xa9, 0xcc, 0x8c, 0x8e, 0xea, 0x0d, 0x6e, 0x82, 0x40,
724 0x38, 0x13, 0x84, 0x8a, 0xdb, 0x80, 0x20, 0xdd, 0x44, 0x78, 0x4d, 0xf3,
725 0x91, 0xa9, 0xb2, 0x22, 0x4a, 0x6b, 0x2b, 0x73, 0x9b, 0x4b, 0x7b, 0x73,
726 0x9b, 0x9b, 0x20, 0x10, 0xcf, 0x06, 0x04, 0x09, 0x83, 0x49, 0x0c, 0xbc,
727 0xa6, 0xf9, 0x88, 0x34, 0xa5, 0xc1, 0x31, 0x95, 0xd9, 0x95, 0xb1, 0x4d,
728 0x10, 0x08, 0x68, 0x82, 0x40, 0x44, 0x1b, 0x10, 0x84, 0x0c, 0xa6, 0x32,
729 0xf0, 0xcc, 0xa0, 0xf9, 0xc8, 0x30, 0x85, 0xe5, 0x95, 0xc9, 0x3d, 0xc9,
730 0x11, 0x95, 0xc1, 0xd1, 0xa1, 0x4d, 0x10, 0x08, 0x69, 0x83, 0x81, 0xa0,
731 0xc1, 0x94, 0x06, 0x5e, 0xb3, 0xa1, 0xa0, 0xc0, 0x60, 0x0c, 0xce, 0x40,
732 0x0d, 0x36, 0x0c, 0x04, 0xb7, 0x06, 0x13, 0x04, 0x01, 0xd8, 0x00, 0x6c,
733 0x18, 0x08, 0x37, 0x70, 0x83, 0x0d, 0xc1, 0x1b, 0x6c, 0x18, 0x86, 0x36,
734 0x80, 0x83, 0x09, 0x82, 0x18, 0x84, 0xc1, 0x86, 0x40, 0x0e, 0xa8, 0x08,
735 0xb1, 0xa5, 0xd1, 0x19, 0xc9, 0xbd, 0xb5, 0xc9, 0x10, 0x11, 0xa1, 0x2a,
736 0xc2, 0x1a, 0x7a, 0x7a, 0x92, 0x22, 0x9a, 0x20, 0x14, 0xd6, 0x04, 0xa1,
737 0xb8, 0x36, 0x04, 0xc4, 0x04, 0xa1, 0xc0, 0x36, 0x08, 0xd3, 0xb4, 0x61,
738 0x21, 0xea, 0xc0, 0x0e, 0xee, 0x00, 0x0f, 0xf2, 0x60, 0xc8, 0x03, 0xe2,
739 0x0e, 0xf4, 0x80, 0xcb, 0x94, 0xd5, 0x17, 0xd4, 0xdb, 0x5c, 0x1a, 0x5d,
740 0xda, 0x9b, 0xdb, 0x04, 0xa1, 0xc8, 0x26, 0x08, 0x85, 0xb6, 0x61, 0x19,
741 0xf8, 0xc0, 0x0e, 0xfa, 0x00, 0x0f, 0xfc, 0x60, 0xf0, 0x83, 0xe1, 0x0e,
742 0x80, 0x0d, 0xc2, 0x1e, 0xfc, 0x01, 0x93, 0x29, 0xab, 0x2f, 0xaa, 0x30,
743 0xb9, 0xb3, 0x32, 0xba, 0x09, 0x42, 0xb1, 0x4d, 0x10, 0x88, 0x69, 0x83,
744 0x30, 0x8d, 0xc2, 0x86, 0x85, 0x08, 0x05, 0x3b, 0x10, 0x05, 0x3c, 0xb8,
745 0x83, 0xc1, 0x0f, 0x88, 0x3b, 0x20, 0x85, 0x0d, 0x41, 0x29, 0x6c, 0x18,
746 0x40, 0xc1, 0x14, 0x80, 0x0d, 0x45, 0x1b, 0xd0, 0xc1, 0x29, 0x6c, 0x00,
747 0x0d, 0x33, 0xb6, 0xb7, 0x30, 0xba, 0x39, 0x16, 0x69, 0x6e, 0x73, 0x74,
748 0x73, 0x13, 0x04, 0x82, 0xa2, 0x31, 0x97, 0x76, 0xf6, 0xc5, 0x46, 0x46,
749 0x63, 0x2e, 0xed, 0xec, 0x6b, 0x8e, 0x6e, 0x82, 0x40, 0x54, 0x44, 0xe8,
750 0xca, 0xf0, 0xbe, 0xdc, 0xde, 0xe4, 0xda, 0x36, 0x28, 0xa9, 0x60, 0x06,
751 0xaa, 0xb0, 0x0a, 0xac, 0xc0, 0xb4, 0x82, 0x2b, 0xbc, 0xc2, 0x50, 0x85,
752 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0x10,
753 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b,
754 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2, 0xd8, 0xec, 0xca, 0xe4,
755 0xa6, 0x04, 0x45, 0x1d, 0x32, 0x3c, 0x97, 0x39, 0xb4, 0x30, 0xb2, 0x32,
756 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x01, 0x52, 0x86, 0x0c, 0xcf,
757 0x45, 0xae, 0x6c, 0xee, 0xad, 0x4e, 0x6e, 0xac, 0x6c, 0x6e, 0x4a, 0xa0,
758 0x55, 0x22, 0xc3, 0x73, 0xa1, 0xcb, 0x83, 0x2b, 0x0b, 0x72, 0x73, 0x7b,
759 0xa3, 0x0b, 0xa3, 0x4b, 0x7b, 0x73, 0x9b, 0x9b, 0x22, 0xac, 0x01, 0x1c,
760 0xd4, 0x21, 0xc3, 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2,
761 0x0b, 0xa3, 0x2b, 0x9b, 0x12, 0xc8, 0x41, 0x1d, 0x32, 0x3c, 0x97, 0x32,
762 0x37, 0x3a, 0xb9, 0x3c, 0xa8, 0xb7, 0x34, 0x37, 0xba, 0xb9, 0x29, 0xc1,
763 0x29, 0x74, 0x21, 0xc3, 0x73, 0x19, 0x7b, 0xab, 0x73, 0xa3, 0x2b, 0x93,
764 0x9b, 0x9b, 0x12, 0xbc, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c,
765 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14,
766 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79,
767 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e,
768 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1,
769 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc,
770 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74,
771 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a,
772 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e,
773 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e,
774 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21,
775 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0,
776 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc,
777 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72,
778 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76,
779 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f,
780 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c,
781 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03,
782 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1,
783 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61,
784 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8,
785 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94,
786 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0,
787 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76,
788 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e,
789 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f,
790 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x1f,
791 0x00, 0x00, 0x00, 0x06, 0xa0, 0x6c, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0xd8,
792 0x9d, 0x15, 0x6c, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x04, 0x54, 0x51, 0x10,
793 0x51, 0xe9, 0x00, 0x43, 0x49, 0x18, 0x80, 0x80, 0xf9, 0xc5, 0x6d, 0x1b,
794 0xc1, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x40, 0x15, 0x05, 0x11, 0x95,
795 0x0e, 0x30, 0x94, 0x84, 0x01, 0x08, 0x98, 0x8f, 0xdc, 0xb6, 0x19, 0x48,
796 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30, 0x11, 0x21, 0xd0, 0x0c,
797 0x0b, 0x61, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88,
798 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x50, 0x0d, 0x97, 0xef, 0x3c,
799 0xbe, 0x04, 0x30, 0xcf, 0x42, 0x94, 0x44, 0x45, 0x2c, 0x7e, 0x71, 0xdb,
800 0x26, 0x50, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x34, 0x39, 0x11, 0x81, 0x52,
801 0xd3, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48,
802 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96,
803 0x4a, 0x75, 0x13, 0xa7, 0xff, 0x55, 0x58, 0xed, 0x84, 0x39, 0x1b, 0x53,
804 0x97, 0x1f, 0x63, 0x44, 0x58, 0x49, 0x4c, 0xac, 0x07, 0x00, 0x00, 0x60,
805 0x00, 0x00, 0x00, 0xeb, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00,
806 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x94, 0x07, 0x00, 0x00, 0x42,
807 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xe2, 0x01, 0x00, 0x00, 0x0b,
808 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07,
809 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92,
810 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80,
811 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4, 0x10, 0x32, 0x14, 0x38,
812 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43,
813 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11,
814 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04,
815 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b,
816 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84,
817 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff,
818 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03,
819 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00,
820 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x32,
821 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x23, 0xa4, 0x84, 0x04,
822 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8c, 0x8c, 0x0b,
823 0x84, 0xc4, 0x4c, 0x10, 0x8c, 0xc1, 0x08, 0x40, 0x09, 0x00, 0x0a, 0x66,
824 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x40, 0x10, 0x44,
825 0x41, 0x90, 0x51, 0x0c, 0x80, 0x20, 0x88, 0x62, 0x20, 0xe4, 0xa6, 0xe1,
826 0xf2, 0x27, 0xec, 0x21, 0x24, 0x7f, 0x25, 0xa4, 0x95, 0x98, 0xfc, 0xe2,
827 0xb6, 0x51, 0x31, 0x0c, 0xc3, 0x40, 0x50, 0x71, 0xcf, 0x70, 0xf9, 0x13,
828 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10, 0x28, 0x58, 0x0a, 0xa3,
829 0x10, 0x0c, 0x33, 0x0c, 0xc3, 0x40, 0x10, 0xc4, 0x40, 0xcd, 0x51, 0xc3,
830 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0x3e, 0xb7, 0x51, 0xc5, 0x4a, 0x4c, 0x3e,
831 0x72, 0xdb, 0x88, 0x20, 0x08, 0x82, 0x28, 0xc4, 0x43, 0x30, 0x04, 0x41,
832 0x47, 0x0d, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0xdc, 0x46, 0x15, 0x2b,
833 0x31, 0xf9, 0xc5, 0x6d, 0x23, 0x62, 0x18, 0x86, 0xa1, 0x10, 0x12, 0xc1,
834 0x10, 0x34, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0x88, 0x82, 0x20, 0x2a, 0xb2,
835 0x06, 0x02, 0x86, 0x11, 0x88, 0x61, 0xa6, 0x36, 0x18, 0x07, 0x76, 0x08,
836 0x87, 0x79, 0x98, 0x07, 0x37, 0xa0, 0x85, 0x72, 0xc0, 0x07, 0x7a, 0xa8,
837 0x07, 0x79, 0x28, 0x07, 0x39, 0x20, 0x05, 0x3e, 0xb0, 0x87, 0x72, 0x18,
838 0x07, 0x7a, 0x78, 0x07, 0x79, 0xe0, 0x03, 0x73, 0x60, 0x87, 0x77, 0x08,
839 0x07, 0x7a, 0x60, 0x03, 0x30, 0xa0, 0x03, 0x3f, 0x00, 0x03, 0x3f, 0xd0,
840 0x03, 0x3d, 0x68, 0x87, 0x74, 0x80, 0x87, 0x79, 0xf8, 0x05, 0x7a, 0xc8,
841 0x07, 0x78, 0x28, 0x07, 0x14, 0x10, 0x33, 0x89, 0xc1, 0x38, 0xb0, 0x43,
842 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43,
843 0x3d, 0xc8, 0x43, 0x39, 0xc8, 0x01, 0x29, 0xf0, 0x81, 0x3d, 0x94, 0xc3,
844 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43,
845 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x01,
846 0x12, 0x32, 0x8d, 0xb6, 0x61, 0x04, 0x61, 0x38, 0x89, 0x75, 0xa8, 0x48,
847 0x20, 0x56, 0xc2, 0x40, 0x9c, 0x66, 0xa3, 0x8a, 0x82, 0x88, 0x10, 0xd1,
848 0x75, 0xc4, 0x40, 0xde, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00,
849 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x80, 0x20, 0x30, 0x15,
850 0x08, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36,
851 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e,
852 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07,
853 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07,
854 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07,
855 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06,
856 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e,
857 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07,
858 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07,
859 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07,
860 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07,
861 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00,
862 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c,
863 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
864 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
865 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
866 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
867 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00,
868 0x00, 0x00, 0x00, 0xc0, 0x90, 0xc7, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00,
869 0x00, 0x00, 0x00, 0x00, 0x80, 0x2c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x32,
870 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6,
871 0x04, 0x43, 0x22, 0x4a, 0x60, 0x04, 0xa0, 0x18, 0x8a, 0xa0, 0x24, 0xca,
872 0xa0, 0x60, 0xca, 0x83, 0x8a, 0x92, 0x18, 0x01, 0x28, 0x82, 0x32, 0x28,
873 0x84, 0x02, 0x21, 0x6e, 0x06, 0x80, 0xbe, 0x19, 0x00, 0x0a, 0x67, 0x00,
874 0x48, 0x1c, 0x4b, 0x41, 0x88, 0xe7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
875 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x1a,
876 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73,
877 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71,
878 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a,
879 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b,
880 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xe2, 0x98, 0x20, 0x10, 0xc8,
881 0x06, 0x61, 0x20, 0x26, 0x08, 0x44, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70,
882 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0x5c, 0x45, 0x60, 0x82, 0x40,
883 0x28, 0x13, 0x04, 0x62, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84, 0x50, 0x16,
884 0x86, 0x18, 0x18, 0xc2, 0xd9, 0x10, 0x3c, 0x13, 0x84, 0xcf, 0x9a, 0x20,
885 0x10, 0xcc, 0x04, 0x81, 0x68, 0x36, 0x20, 0x44, 0xb4, 0x48, 0xc4, 0x30,
886 0x01, 0x1b, 0x02, 0x6a, 0x82, 0x10, 0x06, 0xd7, 0x06, 0x84, 0xb0, 0x16,
887 0x86, 0x18, 0x08, 0x60, 0x43, 0x70, 0x6d, 0x20, 0x20, 0xa0, 0xc2, 0x26,
888 0x08, 0x62, 0x80, 0x6d, 0x08, 0xb4, 0x09, 0x82, 0x00, 0x50, 0x11, 0x62,
889 0x4b, 0xa3, 0x33, 0x92, 0x7b, 0x6b, 0x93, 0x21, 0x22, 0x42, 0x55, 0x84,
890 0x35, 0xf4, 0xf4, 0x24, 0x45, 0x34, 0x41, 0x28, 0x9e, 0x09, 0x42, 0x01,
891 0x6d, 0x08, 0x88, 0x09, 0x42, 0x11, 0x6d, 0x10, 0x24, 0x69, 0xc3, 0x42,
892 0x78, 0x1f, 0x18, 0x84, 0x81, 0x18, 0x0c, 0x62, 0x40, 0x80, 0xc1, 0x18,
893 0x70, 0x99, 0xb2, 0xfa, 0x82, 0x7a, 0x9b, 0x4b, 0xa3, 0x4b, 0x7b, 0x73,
894 0x9b, 0x20, 0x14, 0xd2, 0x04, 0xa1, 0x98, 0x36, 0x2c, 0x43, 0x19, 0x7c,
895 0x66, 0x10, 0x06, 0x67, 0x30, 0x9c, 0xc1, 0x00, 0x06, 0xc0, 0x06, 0x81,
896 0x0c, 0xd0, 0x80, 0xc9, 0x94, 0xd5, 0x17, 0x55, 0x98, 0xdc, 0x59, 0x19,
897 0xdd, 0x04, 0xa1, 0xa0, 0x26, 0x08, 0x84, 0xb3, 0x41, 0x90, 0xd8, 0x60,
898 0xc3, 0x42, 0xa8, 0xc1, 0xb7, 0x06, 0x61, 0x00, 0x06, 0xc3, 0x19, 0x10,
899 0x60, 0xd0, 0x06, 0x1b, 0x02, 0x37, 0xd8, 0x30, 0xa4, 0xc1, 0x1b, 0x00,
900 0x1b, 0x0a, 0xae, 0x83, 0x83, 0x0c, 0xa8, 0xc2, 0xc6, 0x66, 0xd7, 0xe6,
901 0x92, 0x46, 0x56, 0xe6, 0x46, 0x37, 0x25, 0x08, 0xaa, 0x90, 0xe1, 0xb9,
902 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0x88, 0x26, 0x64,
903 0x78, 0x2e, 0x76, 0x61, 0x6c, 0x76, 0x65, 0x72, 0x53, 0x02, 0xa3, 0x0e,
904 0x19, 0x9e, 0xcb, 0x1c, 0x5a, 0x18, 0x59, 0x99, 0x5c, 0xd3, 0x1b, 0x59,
905 0x19, 0xdb, 0x94, 0x00, 0x29, 0x43, 0x86, 0xe7, 0x22, 0x57, 0x36, 0xf7,
906 0x56, 0x27, 0x37, 0x56, 0x36, 0x37, 0x25, 0xc0, 0xea, 0x90, 0xe1, 0xb9,
907 0xd8, 0xa5, 0x95, 0xdd, 0x25, 0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d,
908 0x09, 0xb4, 0x3a, 0x64, 0x78, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50,
909 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, 0x02, 0x38, 0x00, 0x00, 0x00, 0x79,
910 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
911 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
912 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
913 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
914 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
915 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d,
916 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87,
917 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87,
918 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30,
919 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde,
920 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b,
921 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c,
922 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
923 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87,
924 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87,
925 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87,
926 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0,
927 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc,
928 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4,
929 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39,
930 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38,
931 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
932 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03,
933 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0,
934 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0,
935 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71,
936 0x20, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x06, 0xa0, 0x6c, 0x0b, 0x32,
937 0x7d, 0x91, 0xc3, 0xd8, 0x9d, 0x15, 0x6c, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f,
938 0x04, 0x54, 0x51, 0x10, 0x51, 0xe9, 0x00, 0x43, 0x49, 0x18, 0x80, 0x80,
939 0xf9, 0xc5, 0x6d, 0x1b, 0xc1, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x40,
940 0x15, 0x05, 0x11, 0x95, 0x0e, 0x30, 0x94, 0x84, 0x01, 0x08, 0x98, 0x8f,
941 0xdc, 0xb6, 0x19, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30,
942 0x11, 0x21, 0xd0, 0x0c, 0x0b, 0x61, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3,
943 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x50,
944 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0x94, 0x44, 0x45,
945 0x2c, 0x7e, 0x71, 0xdb, 0x26, 0x50, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x34,
946 0x39, 0x11, 0x81, 0x52, 0xd3, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x00, 0x61,
947 0x20, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10,
948 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x54, 0x8d, 0x00, 0x10, 0x51,
949 0x0a, 0x25, 0x37, 0x03, 0x50, 0x08, 0x65, 0x57, 0x7c, 0x54, 0x94, 0x00,
950 0x0d, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82,
951 0x60, 0x60, 0x71, 0x87, 0xa4, 0x69, 0xc9, 0x88, 0x41, 0x02, 0x80, 0x20,
952 0x18, 0x58, 0x1d, 0x12, 0x6d, 0x9b, 0x32, 0x62, 0x90, 0x00, 0x20, 0x08,
953 0x06, 0x96, 0x97, 0x4c, 0x1c, 0xb7, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82,
954 0x81, 0x41, 0x06, 0x48, 0xd7, 0x55, 0xc9, 0x88, 0x41, 0x02, 0x80, 0x20,
955 0x18, 0x18, 0x65, 0x90, 0x78, 0x9e, 0xa1, 0x8c, 0x18, 0x1c, 0x00, 0x08,
956 0x82, 0xc1, 0x24, 0x06, 0xc9, 0xf0, 0x8d, 0x26, 0x04, 0xc0, 0x68, 0x82,
957 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31, 0x98, 0x70, 0xc8, 0xc7,
958 0x84, 0x43, 0x3e, 0x26, 0x18, 0xf0, 0x31, 0xc1, 0x80, 0xcf, 0x88, 0xc1,
959 0x01, 0x80, 0x20, 0x18, 0x40, 0x6c, 0x20, 0x31, 0x69, 0x30, 0x9a, 0x10,
960 0x00, 0x17, 0x0c, 0x35, 0x62, 0xf0, 0x00, 0x20, 0x08, 0x06, 0x0d, 0x1c,
961 0x50, 0x11, 0x54, 0x10, 0x92, 0xb4, 0x06, 0x6b, 0x70, 0x05, 0xa3, 0x09,
962 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c,
963 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xd8, 0x81, 0x07, 0x07, 0x70,
964 0x80, 0x06, 0xc4, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x76, 0xe0,
965 0xc1, 0x01, 0x1c, 0x60, 0xc3, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20,
966 0x76, 0xe0, 0xc1, 0x01, 0x1c, 0x9c, 0x81, 0x30, 0x62, 0x90, 0x00, 0x20,
967 0x08, 0x06, 0x88, 0x1d, 0x78, 0x70, 0x00, 0x07, 0x66, 0x10, 0x20, 0x00,
968 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
969};
970#if 0
971;
972; Input signature:
973;
974; Name Index Mask Register SysValue Format Used
975; -------------------- ----- ------ -------- -------- ------- ------
976; TEXCOORD 0 xy 0 NONE float xy
977; SV_Position 0 xyzw 1 POS float
978;
979;
980; Output signature:
981;
982; Name Index Mask Register SysValue Format Used
983; -------------------- ----- ------ -------- -------- ------- ------
984; SV_Target 0 xyzw 0 TARGET float xyzw
985;
986; shader hash: 2e13f04e8780c355f36dba74b811bc6f
987;
988; Pipeline Runtime Information:
989;
990; Pixel Shader
991; DepthOutput=0
992; SampleFrequency=0
993;
994;
995; Input signature:
996;
997; Name Index InterpMode DynIdx
998; -------------------- ----- ---------------------- ------
999; TEXCOORD 0 linear
1000; SV_Position 0 noperspective
1001;
1002; Output signature:
1003;
1004; Name Index InterpMode DynIdx
1005; -------------------- ----- ---------------------- ------
1006; SV_Target 0
1007;
1008; Buffer Definitions:
1009;
1010; cbuffer SourceRegionBuffer
1011; {
1012;
1013; struct SourceRegionBuffer
1014; {
1015;
1016; float2 UVLeftTop; ; Offset: 0
1017; float2 UVDimensions; ; Offset: 8
1018; uint MipLevel; ; Offset: 16
1019; float LayerOrDepth; ; Offset: 20
1020;
1021; } SourceRegionBuffer; ; Offset: 0 Size: 24
1022;
1023; }
1024;
1025;
1026; Resource Bindings:
1027;
1028; Name Type Format Dim ID HLSL Bind Count
1029; ------------------------------ ---------- ------- ----------- ------- -------------- ------
1030; SourceRegionBuffer cbuffer NA NA CB0 cb0,space3 1
1031; SourceSampler sampler NA NA S0 s0,space2 1
1032; SourceTexture2DArray texture f32 2darray T0 t0,space2 1
1033;
1034;
1035; ViewId state:
1036;
1037; Number of inputs: 8, outputs: 4
1038; Outputs dependent on ViewId: { }
1039; Inputs contributing to computation of Outputs:
1040; output 0 depends on inputs: { 0, 1 }
1041; output 1 depends on inputs: { 0, 1 }
1042; output 2 depends on inputs: { 0, 1 }
1043; output 3 depends on inputs: { 0, 1 }
1044;
1045target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
1046target triple = "dxil-ms-dx"
1047
1048%dx.types.Handle = type { i8* }
1049%dx.types.CBufRet.f32 = type { float, float, float, float }
1050%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }
1051%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
1052%"class.Texture2DArray<vector<float, 4> >" = type { <4 x float>, %"class.Texture2DArray<vector<float, 4> >::mips_type" }
1053%"class.Texture2DArray<vector<float, 4> >::mips_type" = type { i32 }
1054%SourceRegionBuffer = type { <2 x float>, <2 x float>, i32, float }
1055%struct.SamplerState = type { i32 }
1056
1057define void @BlitFrom2DArray() {
1058 %1 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
1059 %2 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 3, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
1060 %3 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
1061 %4 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
1062 %5 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
1063 %6 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0) ; CBufferLoadLegacy(handle,regIndex)
1064 %7 = extractvalue %dx.types.CBufRet.f32 %6, 0
1065 %8 = extractvalue %dx.types.CBufRet.f32 %6, 1
1066 %9 = extractvalue %dx.types.CBufRet.f32 %6, 2
1067 %10 = extractvalue %dx.types.CBufRet.f32 %6, 3
1068 %11 = fmul fast float %9, %4
1069 %12 = fmul fast float %10, %5
1070 %13 = fadd fast float %11, %7
1071 %14 = fadd fast float %12, %8
1072 %15 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 1) ; CBufferLoadLegacy(handle,regIndex)
1073 %16 = extractvalue %dx.types.CBufRet.f32 %15, 1
1074 %17 = fptoui float %16 to i32
1075 %18 = uitofp i32 %17 to float
1076 %19 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %3, i32 1) ; CBufferLoadLegacy(handle,regIndex)
1077 %20 = extractvalue %dx.types.CBufRet.i32 %19, 0
1078 %21 = uitofp i32 %20 to float
1079 %22 = call %dx.types.ResRet.f32 @dx.op.sampleLevel.f32(i32 62, %dx.types.Handle %1, %dx.types.Handle %2, float %13, float %14, float %18, float undef, i32 0, i32 0, i32 undef, float %21) ; SampleLevel(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,LOD)
1080 %23 = extractvalue %dx.types.ResRet.f32 %22, 0
1081 %24 = extractvalue %dx.types.ResRet.f32 %22, 1
1082 %25 = extractvalue %dx.types.ResRet.f32 %22, 2
1083 %26 = extractvalue %dx.types.ResRet.f32 %22, 3
1084 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %23) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
1085 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %24) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
1086 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %25) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
1087 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %26) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
1088 ret void
1089}
1090
1091; Function Attrs: nounwind readnone
1092declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #0
1093
1094; Function Attrs: nounwind
1095declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1
1096
1097; Function Attrs: nounwind readonly
1098declare %dx.types.ResRet.f32 @dx.op.sampleLevel.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, float, i32, i32, i32, float) #2
1099
1100; Function Attrs: nounwind readonly
1101declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #2
1102
1103; Function Attrs: nounwind readonly
1104declare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #2
1105
1106; Function Attrs: nounwind readonly
1107declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #2
1108
1109attributes #0 = { nounwind readnone }
1110attributes #1 = { nounwind }
1111attributes #2 = { nounwind readonly }
1112
1113!llvm.ident = !{!0}
1114!dx.version = !{!1}
1115!dx.valver = !{!2}
1116!dx.shaderModel = !{!3}
1117!dx.resources = !{!4}
1118!dx.viewIdState = !{!12}
1119!dx.entryPoints = !{!13}
1120
1121!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
1122!1 = !{i32 1, i32 0}
1123!2 = !{i32 1, i32 6}
1124!3 = !{!"ps", i32 6, i32 0}
1125!4 = !{!5, null, !8, !10}
1126!5 = !{!6}
1127!6 = !{i32 0, %"class.Texture2DArray<vector<float, 4> >"* undef, !"", i32 2, i32 0, i32 1, i32 7, i32 0, !7}
1128!7 = !{i32 0, i32 9}
1129!8 = !{!9}
1130!9 = !{i32 0, %SourceRegionBuffer* undef, !"", i32 3, i32 0, i32 1, i32 24, null}
1131!10 = !{!11}
1132!11 = !{i32 0, %struct.SamplerState* undef, !"", i32 2, i32 0, i32 1, i32 0, null}
1133!12 = !{[10 x i32] [i32 8, i32 4, i32 15, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0]}
1134!13 = !{void ()* @BlitFrom2DArray, !"BlitFrom2DArray", !14, !4, null}
1135!14 = !{!15, !20, null}
1136!15 = !{!16, !19}
1137!16 = !{i32 0, !"TEXCOORD", i8 9, i8 0, !17, i8 2, i32 1, i8 2, i32 0, i8 0, !18}
1138!17 = !{i32 0}
1139!18 = !{i32 3, i32 3}
1140!19 = !{i32 1, !"SV_Position", i8 9, i8 3, !17, i8 4, i32 1, i8 4, i32 1, i8 0, null}
1141!20 = !{!21}
1142!21 = !{i32 0, !"SV_Target", i8 9, i8 16, !17, i8 0, i32 1, i8 4, i32 0, i8 0, !22}
1143!22 = !{i32 3, i32 15}
1144
1145#endif
1146
1147const unsigned char g_BlitFrom2DArray[] = {
1148 0x44, 0x58, 0x42, 0x43, 0xdf, 0xde, 0xbd, 0x23, 0xe2, 0x83, 0x0e, 0x5d,
1149 0xfb, 0xe3, 0x84, 0xf0, 0x8c, 0x87, 0xbb, 0x3c, 0x01, 0x00, 0x00, 0x00,
1150 0x83, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
1151 0x50, 0x00, 0x00, 0x00, 0xb5, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00,
1152 0xe7, 0x01, 0x00, 0x00, 0x77, 0x02, 0x00, 0x00, 0x7b, 0x0a, 0x00, 0x00,
1153 0x97, 0x0a, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00,
1154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31,
1155 0x5d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
1156 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1157 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1158 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1159 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1160 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1161 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44,
1162 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
1163 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
1164 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00,
1165 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
1166 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1167 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50,
1168 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
1169 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1170 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00,
1171 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
1172 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
1173 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03,
1174 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
1175 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
1176 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e,
1177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,
1178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
1179 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
1180 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x01,
1181 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01,
1182 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x03,
1183 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
1184 0x01, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1185 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x0f,
1186 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1187 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x88,
1189 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18,
1190 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00,
1191 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3c,
1192 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x5c,
1193 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x7c,
1194 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03,
1195 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
1196 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01,
1197 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
1198 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
1199 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03,
1200 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0xfc,
1201 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0x44,
1202 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xe4,
1203 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xf6,
1204 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13,
1205 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06,
1206 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e,
1207 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4,
1208 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48,
1209 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4,
1210 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1,
1211 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08,
1212 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40,
1213 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d,
1214 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49,
1215 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20,
1216 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x5c,
1217 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13,
1218 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
1219 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x8c, 0xc1, 0x08, 0x40,
1220 0x09, 0x00, 0x0a, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29,
1221 0xc6, 0x40, 0x10, 0x44, 0x41, 0x90, 0x51, 0x0c, 0x80, 0x20, 0x88, 0x62,
1222 0x20, 0xe4, 0xa6, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x7f, 0x25, 0xa4,
1223 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x51, 0x31, 0x0c, 0xc3, 0x40, 0x50, 0x71,
1224 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10,
1225 0x28, 0x58, 0x0a, 0xa3, 0x10, 0x0c, 0x33, 0x0c, 0xc3, 0x40, 0x10, 0xc4,
1226 0x40, 0xcd, 0x51, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0x3e, 0xb7, 0x51,
1227 0xc5, 0x4a, 0x4c, 0x7e, 0x71, 0xdb, 0x88, 0x18, 0x86, 0x61, 0x28, 0xc4,
1228 0x43, 0x30, 0x04, 0x41, 0x47, 0x0d, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9,
1229 0xdc, 0x46, 0x15, 0x2b, 0x31, 0xf9, 0xc8, 0x6d, 0x23, 0x82, 0x20, 0x08,
1230 0xa2, 0x10, 0x12, 0xc1, 0x10, 0x34, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0x88,
1231 0x82, 0x20, 0x2a, 0xb2, 0x06, 0x02, 0x86, 0x11, 0x88, 0x61, 0x26, 0x39,
1232 0x18, 0x07, 0x76, 0x08, 0x87, 0x79, 0x98, 0x07, 0x37, 0xa0, 0x85, 0x72,
1233 0xc0, 0x07, 0x7a, 0xa8, 0x07, 0x79, 0x28, 0x07, 0x39, 0x20, 0x85, 0x50,
1234 0x90, 0x07, 0x79, 0x08, 0x87, 0x7c, 0xe0, 0x03, 0x7b, 0x28, 0x87, 0x71,
1235 0xa0, 0x87, 0x77, 0x90, 0x07, 0x3e, 0x30, 0x07, 0x76, 0x78, 0x87, 0x70,
1236 0xa0, 0x07, 0x36, 0x00, 0x03, 0x3a, 0xf0, 0x03, 0x30, 0xf0, 0x03, 0x3d,
1237 0xd0, 0x83, 0x76, 0x48, 0x07, 0x78, 0x98, 0x87, 0x5f, 0xa0, 0x87, 0x7c,
1238 0x80, 0x87, 0x72, 0x40, 0x01, 0x31, 0xd3, 0x19, 0x8c, 0x03, 0x3b, 0x84,
1239 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39, 0xe0, 0x03, 0x3d, 0xd4,
1240 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x42, 0x28, 0xc8, 0x83, 0x3c, 0x84,
1241 0x43, 0x3e, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8,
1242 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80,
1243 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x01, 0x12, 0x32, 0x8d, 0xb6, 0x61,
1244 0x04, 0x61, 0x38, 0x89, 0x75, 0xa8, 0x48, 0x20, 0x56, 0xc2, 0x40, 0x9c,
1245 0x66, 0xa3, 0x8a, 0x82, 0x88, 0x10, 0xd1, 0x75, 0xc4, 0x40, 0xde, 0x4d,
1246 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e,
1247 0xc0, 0x44, 0xa0, 0x80, 0x20, 0x30, 0x15, 0x08, 0x00, 0x00, 0x00, 0x13,
1248 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68,
1249 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a,
1250 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
1251 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
1252 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71,
1253 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72,
1254 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a,
1255 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73,
1256 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72,
1257 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d,
1258 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72,
1259 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00, 0x00,
1260 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01,
1261 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00,
1262 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40,
1263 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81,
1264 0x80, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8,
1265 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
1266 0x90, 0xc7, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1267 0x80, 0x2c, 0x10, 0x14, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19,
1268 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x4a,
1269 0x60, 0x04, 0xa0, 0x18, 0x8a, 0xa0, 0x1c, 0x4a, 0xa2, 0x0c, 0x0a, 0xa6,
1270 0x20, 0x0a, 0xa4, 0x14, 0x0a, 0xa5, 0x3c, 0xca, 0xa7, 0x10, 0xa8, 0x28,
1271 0x89, 0x11, 0x80, 0x22, 0x28, 0x83, 0x42, 0x28, 0x10, 0xaa, 0x6a, 0x80,
1272 0xb8, 0x19, 0x00, 0xf2, 0x66, 0x00, 0xe8, 0x9b, 0x01, 0xa0, 0x70, 0x06,
1273 0x80, 0xc4, 0xb1, 0x14, 0x84, 0x78, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00,
1274 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x1a,
1275 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73,
1276 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71,
1277 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a,
1278 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b,
1279 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xe2, 0x98, 0x20, 0x10, 0xc8,
1280 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x40,
1281 0x24, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x5c, 0x47, 0x6a, 0xea, 0xad,
1282 0x4e, 0x6e, 0xac, 0x8c, 0xaa, 0x0c, 0x8f, 0xae, 0x4e, 0xae, 0x4c, 0x86,
1283 0x28, 0x48, 0x4e, 0x2e, 0x2c, 0x6f, 0x82, 0x40, 0x28, 0x13, 0x04, 0x62,
1284 0x99, 0x20, 0x10, 0xcc, 0x06, 0x81, 0x70, 0x36, 0x24, 0x84, 0xb2, 0x30,
1285 0xc4, 0xd0, 0x10, 0xcf, 0x86, 0x00, 0x9a, 0x20, 0x7c, 0x1f, 0xa5, 0xa9,
1286 0xb7, 0x3a, 0xb9, 0xb1, 0x32, 0xa9, 0xb2, 0xb3, 0xb4, 0x37, 0x37, 0xa1,
1287 0x3a, 0x33, 0xb3, 0x32, 0xb9, 0x09, 0x02, 0xd1, 0x4c, 0x10, 0x08, 0x67,
1288 0x03, 0x42, 0x48, 0x13, 0x45, 0x0c, 0x15, 0xb0, 0x21, 0xb0, 0x26, 0x08,
1289 0x61, 0x00, 0x06, 0x6c, 0xa6, 0xde, 0xea, 0xe4, 0xc6, 0xca, 0xa6, 0xc2,
1290 0xda, 0xe0, 0xd8, 0xca, 0xe4, 0x36, 0x20, 0x04, 0x96, 0x31, 0xc4, 0x40,
1291 0x00, 0x1b, 0x02, 0x6d, 0x03, 0x11, 0x01, 0xd7, 0x36, 0x41, 0xf0, 0x3c,
1292 0x26, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f, 0x70, 0x13, 0x84,
1293 0x8a, 0xdb, 0x80, 0x20, 0x1e, 0x45, 0x34, 0x8e, 0xf3, 0x91, 0xa9, 0xb2,
1294 0x22, 0x4a, 0x6b, 0x2b, 0x73, 0x9b, 0x4b, 0x7b, 0x73, 0x9b, 0x9b, 0x20,
1295 0x10, 0xcf, 0x06, 0x04, 0x09, 0x03, 0x4a, 0x0c, 0x1a, 0xc7, 0xf9, 0x88,
1296 0x34, 0xa5, 0xc1, 0x31, 0x95, 0xd9, 0x95, 0xb1, 0x4d, 0x10, 0x08, 0x68,
1297 0x82, 0x40, 0x44, 0x1b, 0x10, 0x84, 0x0c, 0xa8, 0x32, 0x68, 0xcc, 0xc0,
1298 0xf9, 0xc8, 0x30, 0x85, 0xe5, 0x95, 0xc9, 0x3d, 0xc9, 0x11, 0x95, 0xc1,
1299 0xd1, 0xa1, 0x4d, 0x10, 0x08, 0x69, 0x03, 0x82, 0xa0, 0x01, 0x95, 0x06,
1300 0x8d, 0xe3, 0x7c, 0x1b, 0x8a, 0x0a, 0x0c, 0xc6, 0xe0, 0x0c, 0xd4, 0x60,
1301 0xc3, 0x40, 0x74, 0x6b, 0x30, 0x41, 0x10, 0x80, 0x0d, 0xc0, 0x86, 0x81,
1302 0x70, 0x03, 0x37, 0xd8, 0x10, 0xbc, 0xc1, 0x86, 0x61, 0x68, 0x03, 0x38,
1303 0x98, 0x20, 0x88, 0x41, 0x18, 0x6c, 0x08, 0xe4, 0x80, 0x8f, 0x10, 0x5b,
1304 0x1a, 0x9d, 0x91, 0xdc, 0x5b, 0x9b, 0x0c, 0x51, 0x90, 0x9c, 0x5c, 0x58,
1305 0x1e, 0x11, 0xaa, 0x22, 0xac, 0xa1, 0xa7, 0x27, 0x29, 0xa2, 0x09, 0x42,
1306 0x61, 0x4d, 0x10, 0x8a, 0x6b, 0x43, 0x40, 0x4c, 0x10, 0x0a, 0x6c, 0x83,
1307 0x40, 0x51, 0x1b, 0x16, 0xa2, 0x0e, 0xec, 0xe0, 0x0e, 0xf0, 0x20, 0x0f,
1308 0x86, 0x3c, 0x20, 0xee, 0x40, 0x0f, 0xb8, 0x4c, 0x59, 0x7d, 0x41, 0xbd,
1309 0xcd, 0xa5, 0xd1, 0xa5, 0xbd, 0xb9, 0x4d, 0x10, 0x8a, 0x6c, 0x82, 0x50,
1310 0x68, 0x1b, 0x96, 0x81, 0x0f, 0xec, 0xa0, 0x0f, 0xf0, 0xc0, 0x0f, 0x06,
1311 0x3f, 0x18, 0xee, 0x00, 0xd8, 0x20, 0xec, 0xc1, 0x1f, 0x30, 0x99, 0xb2,
1312 0xfa, 0xa2, 0x0a, 0x93, 0x3b, 0x2b, 0xa3, 0x9b, 0x20, 0x14, 0xdb, 0x04,
1313 0x81, 0x98, 0x36, 0x08, 0xd4, 0x28, 0x6c, 0x58, 0x88, 0x50, 0xb0, 0x03,
1314 0x51, 0xc0, 0x83, 0x3b, 0x18, 0xfc, 0x80, 0xb8, 0x03, 0x52, 0xd8, 0x10,
1315 0x94, 0xc2, 0x86, 0x01, 0x14, 0x4c, 0x01, 0xd8, 0x50, 0xb4, 0x01, 0x1d,
1316 0x9c, 0x02, 0x07, 0xd0, 0x30, 0x63, 0x7b, 0x0b, 0xa3, 0x9b, 0x63, 0x91,
1317 0xe6, 0x36, 0x47, 0x37, 0x37, 0x41, 0x20, 0x28, 0x1a, 0x73, 0x69, 0x67,
1318 0x5f, 0x6c, 0x64, 0x34, 0xe6, 0xd2, 0xce, 0xbe, 0xe6, 0xe8, 0x26, 0x08,
1319 0x44, 0x45, 0x84, 0xae, 0x0c, 0xef, 0xcb, 0xed, 0x4d, 0xae, 0x6d, 0x83,
1320 0x92, 0x0a, 0x8d, 0x2a, 0xac, 0x02, 0x2b, 0x30, 0xad, 0xe0, 0x0a, 0xaf,
1321 0x30, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3,
1322 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2,
1323 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36,
1324 0xbb, 0x32, 0xb9, 0x29, 0x41, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d,
1325 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80, 0x94,
1326 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b, 0x9b,
1327 0x9b, 0x12, 0x6c, 0x95, 0xc8, 0xf0, 0x5c, 0xe8, 0xf2, 0xe0, 0xca, 0x82,
1328 0xdc, 0xdc, 0xde, 0xe8, 0xc2, 0xe8, 0xd2, 0xde, 0xdc, 0xe6, 0xa6, 0x08,
1329 0x6b, 0x00, 0x07, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee, 0x92,
1330 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x72, 0x50, 0x87, 0x0c,
1331 0xcf, 0xa5, 0xcc, 0x8d, 0x4e, 0x2e, 0x0f, 0xea, 0x2d, 0xcd, 0x8d, 0x6e,
1332 0x6e, 0x4a, 0x70, 0x0a, 0x5d, 0xc8, 0xf0, 0x5c, 0xc6, 0xde, 0xea, 0xdc,
1333 0xe8, 0xca, 0xe4, 0xe6, 0xa6, 0x04, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x79,
1334 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
1335 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
1336 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
1337 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
1338 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
1339 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d,
1340 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87,
1341 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87,
1342 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30,
1343 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde,
1344 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b,
1345 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c,
1346 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
1347 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87,
1348 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87,
1349 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87,
1350 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0,
1351 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc,
1352 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4,
1353 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39,
1354 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38,
1355 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
1356 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03,
1357 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0,
1358 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0,
1359 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71,
1360 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x06, 0xf0, 0x6c, 0x0b, 0x32,
1361 0x7d, 0x91, 0xc3, 0xd8, 0x9d, 0x16, 0x45, 0x00, 0x66, 0x04, 0xdb, 0x70,
1362 0xf9, 0xce, 0xe3, 0x0b, 0x01, 0x55, 0x14, 0x44, 0x54, 0x3a, 0xc0, 0x50,
1363 0x12, 0x06, 0x20, 0x60, 0x7e, 0x71, 0xdb, 0x56, 0xb0, 0x0d, 0x97, 0xef,
1364 0x3c, 0xbe, 0x10, 0x50, 0x45, 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61,
1365 0x00, 0x02, 0xe6, 0x23, 0xb7, 0x6d, 0x06, 0xd2, 0x70, 0xf9, 0xce, 0xe3,
1366 0x0b, 0x11, 0x01, 0x4c, 0x44, 0x08, 0x34, 0xc3, 0x42, 0x58, 0xc0, 0x34,
1367 0x5c, 0xbe, 0xf3, 0xf8, 0x8b, 0x03, 0x0c, 0x62, 0xf3, 0x50, 0x93, 0x5f,
1368 0xdc, 0xb6, 0x0d, 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x01, 0xcc, 0xb3,
1369 0x10, 0x25, 0x51, 0x11, 0x8b, 0x5f, 0xdc, 0xb6, 0x09, 0x54, 0xc3, 0xe5,
1370 0x3b, 0x8f, 0x2f, 0x4d, 0x4e, 0x44, 0xa0, 0xd4, 0xf4, 0x50, 0x93, 0x5f,
1371 0xdc, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14,
1372 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x13, 0xf0, 0x4e, 0x87,
1373 0x80, 0xc3, 0x55, 0xf3, 0x6d, 0xba, 0x74, 0xb8, 0x11, 0xbc, 0x6f, 0x44,
1374 0x58, 0x49, 0x4c, 0xe4, 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf9,
1375 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10,
1376 0x00, 0x00, 0x00, 0xcc, 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21,
1377 0x0c, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02,
1378 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41,
1379 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25,
1380 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42,
1381 0x92, 0x0b, 0x42, 0xc4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a,
1382 0x32, 0x62, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00,
1383 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41,
1384 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51,
1385 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff,
1386 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff,
1387 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00,
1388 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13,
1389 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89,
1390 0x20, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20,
1391 0x64, 0x85, 0x04, 0x13, 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84,
1392 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10,
1393 0x8c, 0xc1, 0x08, 0x40, 0x09, 0x00, 0x0a, 0x66, 0x00, 0xe6, 0x08, 0xc0,
1394 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x40, 0x10, 0x44, 0x41, 0x90, 0x51, 0x0c,
1395 0x80, 0x20, 0x88, 0x62, 0x20, 0xe4, 0xa6, 0xe1, 0xf2, 0x27, 0xec, 0x21,
1396 0x24, 0x7f, 0x25, 0xa4, 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x51, 0x31, 0x0c,
1397 0xc3, 0x40, 0x50, 0x71, 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f,
1398 0x02, 0xcd, 0xb0, 0x10, 0x28, 0x58, 0x0a, 0xa3, 0x10, 0x0c, 0x33, 0x0c,
1399 0xc3, 0x40, 0x10, 0xc4, 0x40, 0xcd, 0x51, 0xc3, 0xe5, 0x4f, 0xd8, 0x43,
1400 0x48, 0x3e, 0xb7, 0x51, 0xc5, 0x4a, 0x4c, 0x7e, 0x71, 0xdb, 0x88, 0x18,
1401 0x86, 0x61, 0x28, 0xc4, 0x43, 0x30, 0x04, 0x41, 0x47, 0x0d, 0x97, 0x3f,
1402 0x61, 0x0f, 0x21, 0xf9, 0xdc, 0x46, 0x15, 0x2b, 0x31, 0xf9, 0xc8, 0x6d,
1403 0x23, 0x82, 0x20, 0x08, 0xa2, 0x10, 0x12, 0xc1, 0x10, 0x34, 0xcd, 0x11,
1404 0x04, 0xc5, 0x60, 0x88, 0x82, 0x20, 0x2a, 0xb2, 0x06, 0x02, 0x86, 0x11,
1405 0x88, 0x61, 0x26, 0x39, 0x18, 0x07, 0x76, 0x08, 0x87, 0x79, 0x98, 0x07,
1406 0x37, 0xa0, 0x85, 0x72, 0xc0, 0x07, 0x7a, 0xa8, 0x07, 0x79, 0x28, 0x07,
1407 0x39, 0x20, 0x85, 0x50, 0x90, 0x07, 0x79, 0x08, 0x87, 0x7c, 0xe0, 0x03,
1408 0x7b, 0x28, 0x87, 0x71, 0xa0, 0x87, 0x77, 0x90, 0x07, 0x3e, 0x30, 0x07,
1409 0x76, 0x78, 0x87, 0x70, 0xa0, 0x07, 0x36, 0x00, 0x03, 0x3a, 0xf0, 0x03,
1410 0x30, 0xf0, 0x03, 0x3d, 0xd0, 0x83, 0x76, 0x48, 0x07, 0x78, 0x98, 0x87,
1411 0x5f, 0xa0, 0x87, 0x7c, 0x80, 0x87, 0x72, 0x40, 0x01, 0x31, 0xd3, 0x19,
1412 0x8c, 0x03, 0x3b, 0x84, 0xc3, 0x3c, 0xcc, 0x83, 0x1b, 0xd0, 0x42, 0x39,
1413 0xe0, 0x03, 0x3d, 0xd4, 0x83, 0x3c, 0x94, 0x83, 0x1c, 0x90, 0x42, 0x28,
1414 0xc8, 0x83, 0x3c, 0x84, 0x43, 0x3e, 0xf0, 0x81, 0x3d, 0x94, 0xc3, 0x38,
1415 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98, 0x03, 0x3b, 0xbc, 0x43, 0x38,
1416 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8, 0x01, 0x18, 0xf8, 0x01, 0x12,
1417 0x32, 0x8d, 0xb6, 0x61, 0x04, 0x61, 0x38, 0x89, 0x75, 0xa8, 0x48, 0x20,
1418 0x56, 0xc2, 0x40, 0x9c, 0x66, 0xa3, 0x8a, 0x82, 0x88, 0x10, 0xd1, 0x75,
1419 0xc4, 0x40, 0xde, 0x4d, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xb3, 0x00, 0xf3,
1420 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0, 0x80, 0x20, 0x30, 0x15, 0x08,
1421 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36,
1422 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e,
1423 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07,
1424 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07,
1425 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07,
1426 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06,
1427 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e,
1428 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07,
1429 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07,
1430 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07,
1431 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07,
1432 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00,
1433 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c,
1434 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
1435 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1436 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1437 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
1438 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00,
1439 0x00, 0x00, 0x00, 0xc0, 0x90, 0xc7, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00,
1440 0x00, 0x00, 0x00, 0x00, 0x80, 0x2c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x32,
1441 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6,
1442 0x04, 0x43, 0x22, 0x4a, 0x60, 0x04, 0xa0, 0x18, 0x8a, 0xa0, 0x1c, 0x4a,
1443 0xa2, 0x0c, 0x0a, 0xa6, 0x3c, 0xa8, 0x28, 0x89, 0x11, 0x80, 0x22, 0x28,
1444 0x83, 0x42, 0x28, 0x10, 0xe2, 0x66, 0x00, 0xe8, 0x9b, 0x01, 0xa0, 0x70,
1445 0x06, 0x80, 0xc4, 0xb1, 0x14, 0x84, 0x78, 0x1e, 0x00, 0x00, 0x00, 0x00,
1446 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x1a,
1447 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73,
1448 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71,
1449 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a,
1450 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b,
1451 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xe2, 0x98, 0x20, 0x10, 0xc8,
1452 0x06, 0x61, 0x20, 0x26, 0x08, 0x44, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70,
1453 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0x9c, 0x45, 0x60, 0x82, 0x40,
1454 0x28, 0x13, 0x04, 0x62, 0x99, 0x20, 0x10, 0xcc, 0x06, 0x81, 0x70, 0x36,
1455 0x24, 0x84, 0xb2, 0x30, 0xc4, 0xd0, 0x10, 0xcf, 0x86, 0x00, 0x9a, 0x20,
1456 0x7c, 0xd7, 0x04, 0x81, 0x68, 0x26, 0x08, 0x84, 0xb3, 0x01, 0x21, 0xa4,
1457 0x65, 0x22, 0x06, 0x0a, 0xd8, 0x10, 0x54, 0x13, 0x84, 0x30, 0xc0, 0x36,
1458 0x20, 0xc4, 0xb5, 0x30, 0xc4, 0x40, 0x00, 0x1b, 0x02, 0x6c, 0x03, 0x11,
1459 0x01, 0x56, 0x36, 0x41, 0x10, 0x83, 0x6c, 0x43, 0xb0, 0x4d, 0x10, 0x04,
1460 0x80, 0x8f, 0x10, 0x5b, 0x1a, 0x9d, 0x91, 0xdc, 0x5b, 0x9b, 0x0c, 0x51,
1461 0x90, 0x9c, 0x5c, 0x58, 0x1e, 0x11, 0xaa, 0x22, 0xac, 0xa1, 0xa7, 0x27,
1462 0x29, 0xa2, 0x09, 0x42, 0x01, 0x4d, 0x10, 0x8a, 0x68, 0x43, 0x40, 0x4c,
1463 0x10, 0x0a, 0x69, 0x83, 0x30, 0x4d, 0x1b, 0x16, 0xe2, 0x03, 0x83, 0x30,
1464 0x10, 0x83, 0x31, 0x18, 0xc6, 0x80, 0x08, 0x03, 0x32, 0xe0, 0x32, 0x65,
1465 0xf5, 0x05, 0xf5, 0x36, 0x97, 0x46, 0x97, 0xf6, 0xe6, 0x36, 0x41, 0x28,
1466 0xa6, 0x09, 0x42, 0x41, 0x6d, 0x58, 0x06, 0x33, 0x00, 0x83, 0x33, 0x10,
1467 0x03, 0x34, 0x18, 0xd0, 0x60, 0x08, 0x03, 0x60, 0x83, 0x50, 0x06, 0x69,
1468 0xc0, 0x64, 0xca, 0xea, 0x8b, 0x2a, 0x4c, 0xee, 0xac, 0x8c, 0x6e, 0x82,
1469 0x50, 0x54, 0x13, 0x04, 0xe2, 0xd9, 0x20, 0x4c, 0x6d, 0xb0, 0x61, 0x21,
1470 0xd6, 0x00, 0x0c, 0xd8, 0x40, 0x0c, 0xc2, 0x60, 0x40, 0x03, 0x22, 0x0c,
1471 0xdc, 0x60, 0x43, 0xf0, 0x06, 0x1b, 0x06, 0x35, 0x80, 0x03, 0x60, 0x43,
1472 0xd1, 0x79, 0x71, 0xa0, 0x01, 0x55, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xd2,
1473 0xc8, 0xca, 0xdc, 0xe8, 0xa6, 0x04, 0x41, 0x15, 0x32, 0x3c, 0x17, 0xbb,
1474 0x32, 0xb9, 0xb9, 0xb4, 0x37, 0xb7, 0x29, 0x01, 0xd1, 0x84, 0x0c, 0xcf,
1475 0xc5, 0x2e, 0x8c, 0xcd, 0xae, 0x4c, 0x6e, 0x4a, 0x60, 0xd4, 0x21, 0xc3,
1476 0x73, 0x99, 0x43, 0x0b, 0x23, 0x2b, 0x93, 0x6b, 0x7a, 0x23, 0x2b, 0x63,
1477 0x9b, 0x12, 0x20, 0x65, 0xc8, 0xf0, 0x5c, 0xe4, 0xca, 0xe6, 0xde, 0xea,
1478 0xe4, 0xc6, 0xca, 0xe6, 0xa6, 0x04, 0x59, 0x1d, 0x32, 0x3c, 0x17, 0xbb,
1479 0xb4, 0xb2, 0xbb, 0x24, 0xb2, 0x29, 0xba, 0x30, 0xba, 0xb2, 0x29, 0xc1,
1480 0x56, 0x87, 0x0c, 0xcf, 0xa5, 0xcc, 0x8d, 0x4e, 0x2e, 0x0f, 0xea, 0x2d,
1481 0xcd, 0x8d, 0x6e, 0x6e, 0x4a, 0x10, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79,
1482 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
1483 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
1484 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
1485 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
1486 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
1487 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d,
1488 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87,
1489 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87,
1490 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30,
1491 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde,
1492 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b,
1493 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c,
1494 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
1495 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87,
1496 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87,
1497 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87,
1498 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0,
1499 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc,
1500 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4,
1501 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39,
1502 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38,
1503 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
1504 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03,
1505 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0,
1506 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0,
1507 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71,
1508 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x06, 0xf0, 0x6c, 0x0b, 0x32,
1509 0x7d, 0x91, 0xc3, 0xd8, 0x9d, 0x16, 0x45, 0x00, 0x66, 0x04, 0xdb, 0x70,
1510 0xf9, 0xce, 0xe3, 0x0b, 0x01, 0x55, 0x14, 0x44, 0x54, 0x3a, 0xc0, 0x50,
1511 0x12, 0x06, 0x20, 0x60, 0x7e, 0x71, 0xdb, 0x56, 0xb0, 0x0d, 0x97, 0xef,
1512 0x3c, 0xbe, 0x10, 0x50, 0x45, 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61,
1513 0x00, 0x02, 0xe6, 0x23, 0xb7, 0x6d, 0x06, 0xd2, 0x70, 0xf9, 0xce, 0xe3,
1514 0x0b, 0x11, 0x01, 0x4c, 0x44, 0x08, 0x34, 0xc3, 0x42, 0x58, 0xc0, 0x34,
1515 0x5c, 0xbe, 0xf3, 0xf8, 0x8b, 0x03, 0x0c, 0x62, 0xf3, 0x50, 0x93, 0x5f,
1516 0xdc, 0xb6, 0x0d, 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x01, 0xcc, 0xb3,
1517 0x10, 0x25, 0x51, 0x11, 0x8b, 0x5f, 0xdc, 0xb6, 0x09, 0x54, 0xc3, 0xe5,
1518 0x3b, 0x8f, 0x2f, 0x4d, 0x4e, 0x44, 0xa0, 0xd4, 0xf4, 0x50, 0x93, 0x5f,
1519 0xdc, 0x36, 0x00, 0x61, 0x20, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x13,
1520 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x54,
1521 0x8d, 0x00, 0x10, 0x51, 0x0a, 0x25, 0x37, 0x03, 0x50, 0x76, 0x85, 0x50,
1522 0x7c, 0x54, 0x94, 0x00, 0x0d, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
1523 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x75, 0x87, 0xb4, 0x6d, 0xc9, 0x88,
1524 0x41, 0x02, 0x80, 0x20, 0x18, 0x58, 0x1e, 0x12, 0x71, 0x9c, 0x32, 0x62,
1525 0x90, 0x00, 0x20, 0x08, 0x06, 0xd6, 0x97, 0x4c, 0x5d, 0xb7, 0x8c, 0x18,
1526 0x24, 0x00, 0x08, 0x82, 0x81, 0x51, 0x06, 0x87, 0xe7, 0x55, 0xc9, 0x88,
1527 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x66, 0x80, 0x7c, 0x9f, 0xa1, 0x8c,
1528 0x18, 0x1c, 0x00, 0x08, 0x82, 0x01, 0x44, 0x06, 0xca, 0x00, 0x06, 0xa3,
1529 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40,
1530 0x0c, 0x26, 0x1c, 0xf2, 0x31, 0xe1, 0x90, 0x8f, 0x09, 0x06, 0x7c, 0x4c,
1531 0x30, 0xe0, 0x33, 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x50, 0x1b, 0x4c,
1532 0x8c, 0x1a, 0x8c, 0x26, 0x04, 0xc1, 0x05, 0xc4, 0x5c, 0x30, 0xd4, 0x88,
1533 0xc1, 0x01, 0x80, 0x20, 0x18, 0x4c, 0x70, 0x70, 0x41, 0x6e, 0x30, 0x9a,
1534 0x10, 0x00, 0x17, 0x0c, 0x35, 0x62, 0xf0, 0x00, 0x20, 0x08, 0x06, 0x4d,
1535 0x1d, 0x60, 0x15, 0x95, 0x20, 0x84, 0x05, 0x07, 0x70, 0xb0, 0x05, 0xa3,
1536 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40,
1537 0x0c, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0xec, 0x81, 0x18, 0xd4,
1538 0x41, 0x1d, 0xb0, 0x01, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc8,
1539 0x1e, 0x88, 0x41, 0x1d, 0xd4, 0x01, 0x37, 0x8c, 0x18, 0x24, 0x00, 0x08,
1540 0x82, 0x01, 0xb2, 0x07, 0x62, 0x50, 0x07, 0x75, 0xb0, 0x06, 0xc2, 0x88,
1541 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x7b, 0x20, 0x06, 0x75, 0x50, 0x07,
1542 0x6a, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
1543};
1544#if 0
1545;
1546; Input signature:
1547;
1548; Name Index Mask Register SysValue Format Used
1549; -------------------- ----- ------ -------- -------- ------- ------
1550; TEXCOORD 0 xy 0 NONE float xy
1551; SV_Position 0 xyzw 1 POS float
1552;
1553;
1554; Output signature:
1555;
1556; Name Index Mask Register SysValue Format Used
1557; -------------------- ----- ------ -------- -------- ------- ------
1558; SV_Target 0 xyzw 0 TARGET float xyzw
1559;
1560; shader hash: 49c2f4be133400e07c3f23e9798b27f4
1561;
1562; Pipeline Runtime Information:
1563;
1564; Pixel Shader
1565; DepthOutput=0
1566; SampleFrequency=0
1567;
1568;
1569; Input signature:
1570;
1571; Name Index InterpMode DynIdx
1572; -------------------- ----- ---------------------- ------
1573; TEXCOORD 0 linear
1574; SV_Position 0 noperspective
1575;
1576; Output signature:
1577;
1578; Name Index InterpMode DynIdx
1579; -------------------- ----- ---------------------- ------
1580; SV_Target 0
1581;
1582; Buffer Definitions:
1583;
1584; cbuffer SourceRegionBuffer
1585; {
1586;
1587; struct SourceRegionBuffer
1588; {
1589;
1590; float2 UVLeftTop; ; Offset: 0
1591; float2 UVDimensions; ; Offset: 8
1592; uint MipLevel; ; Offset: 16
1593; float LayerOrDepth; ; Offset: 20
1594;
1595; } SourceRegionBuffer; ; Offset: 0 Size: 24
1596;
1597; }
1598;
1599;
1600; Resource Bindings:
1601;
1602; Name Type Format Dim ID HLSL Bind Count
1603; ------------------------------ ---------- ------- ----------- ------- -------------- ------
1604; SourceRegionBuffer cbuffer NA NA CB0 cb0,space3 1
1605; SourceSampler sampler NA NA S0 s0,space2 1
1606; SourceTexture3D texture f32 3d T0 t0,space2 1
1607;
1608;
1609; ViewId state:
1610;
1611; Number of inputs: 8, outputs: 4
1612; Outputs dependent on ViewId: { }
1613; Inputs contributing to computation of Outputs:
1614; output 0 depends on inputs: { 0, 1 }
1615; output 1 depends on inputs: { 0, 1 }
1616; output 2 depends on inputs: { 0, 1 }
1617; output 3 depends on inputs: { 0, 1 }
1618;
1619target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
1620target triple = "dxil-ms-dx"
1621
1622%dx.types.Handle = type { i8* }
1623%dx.types.CBufRet.f32 = type { float, float, float, float }
1624%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }
1625%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
1626%"class.Texture3D<vector<float, 4> >" = type { <4 x float>, %"class.Texture3D<vector<float, 4> >::mips_type" }
1627%"class.Texture3D<vector<float, 4> >::mips_type" = type { i32 }
1628%SourceRegionBuffer = type { <2 x float>, <2 x float>, i32, float }
1629%struct.SamplerState = type { i32 }
1630
1631define void @BlitFrom3D() {
1632 %1 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
1633 %2 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 3, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
1634 %3 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
1635 %4 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
1636 %5 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
1637 %6 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0) ; CBufferLoadLegacy(handle,regIndex)
1638 %7 = extractvalue %dx.types.CBufRet.f32 %6, 0
1639 %8 = extractvalue %dx.types.CBufRet.f32 %6, 1
1640 %9 = extractvalue %dx.types.CBufRet.f32 %6, 2
1641 %10 = extractvalue %dx.types.CBufRet.f32 %6, 3
1642 %11 = fmul fast float %9, %4
1643 %12 = fmul fast float %10, %5
1644 %13 = fadd fast float %11, %7
1645 %14 = fadd fast float %12, %8
1646 %15 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 1) ; CBufferLoadLegacy(handle,regIndex)
1647 %16 = extractvalue %dx.types.CBufRet.f32 %15, 1
1648 %17 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %3, i32 1) ; CBufferLoadLegacy(handle,regIndex)
1649 %18 = extractvalue %dx.types.CBufRet.i32 %17, 0
1650 %19 = uitofp i32 %18 to float
1651 %20 = call %dx.types.ResRet.f32 @dx.op.sampleLevel.f32(i32 62, %dx.types.Handle %1, %dx.types.Handle %2, float %13, float %14, float %16, float undef, i32 0, i32 0, i32 0, float %19) ; SampleLevel(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,LOD)
1652 %21 = extractvalue %dx.types.ResRet.f32 %20, 0
1653 %22 = extractvalue %dx.types.ResRet.f32 %20, 1
1654 %23 = extractvalue %dx.types.ResRet.f32 %20, 2
1655 %24 = extractvalue %dx.types.ResRet.f32 %20, 3
1656 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %21) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
1657 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %22) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
1658 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %23) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
1659 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %24) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
1660 ret void
1661}
1662
1663; Function Attrs: nounwind readnone
1664declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #0
1665
1666; Function Attrs: nounwind
1667declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1
1668
1669; Function Attrs: nounwind readonly
1670declare %dx.types.ResRet.f32 @dx.op.sampleLevel.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, float, i32, i32, i32, float) #2
1671
1672; Function Attrs: nounwind readonly
1673declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #2
1674
1675; Function Attrs: nounwind readonly
1676declare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #2
1677
1678; Function Attrs: nounwind readonly
1679declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #2
1680
1681attributes #0 = { nounwind readnone }
1682attributes #1 = { nounwind }
1683attributes #2 = { nounwind readonly }
1684
1685!llvm.ident = !{!0}
1686!dx.version = !{!1}
1687!dx.valver = !{!2}
1688!dx.shaderModel = !{!3}
1689!dx.resources = !{!4}
1690!dx.viewIdState = !{!12}
1691!dx.entryPoints = !{!13}
1692
1693!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
1694!1 = !{i32 1, i32 0}
1695!2 = !{i32 1, i32 6}
1696!3 = !{!"ps", i32 6, i32 0}
1697!4 = !{!5, null, !8, !10}
1698!5 = !{!6}
1699!6 = !{i32 0, %"class.Texture3D<vector<float, 4> >"* undef, !"", i32 2, i32 0, i32 1, i32 4, i32 0, !7}
1700!7 = !{i32 0, i32 9}
1701!8 = !{!9}
1702!9 = !{i32 0, %SourceRegionBuffer* undef, !"", i32 3, i32 0, i32 1, i32 24, null}
1703!10 = !{!11}
1704!11 = !{i32 0, %struct.SamplerState* undef, !"", i32 2, i32 0, i32 1, i32 0, null}
1705!12 = !{[10 x i32] [i32 8, i32 4, i32 15, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0]}
1706!13 = !{void ()* @BlitFrom3D, !"BlitFrom3D", !14, !4, null}
1707!14 = !{!15, !20, null}
1708!15 = !{!16, !19}
1709!16 = !{i32 0, !"TEXCOORD", i8 9, i8 0, !17, i8 2, i32 1, i8 2, i32 0, i8 0, !18}
1710!17 = !{i32 0}
1711!18 = !{i32 3, i32 3}
1712!19 = !{i32 1, !"SV_Position", i8 9, i8 3, !17, i8 4, i32 1, i8 4, i32 1, i8 0, null}
1713!20 = !{!21}
1714!21 = !{i32 0, !"SV_Target", i8 9, i8 16, !17, i8 0, i32 1, i8 4, i32 0, i8 0, !22}
1715!22 = !{i32 3, i32 15}
1716
1717#endif
1718
1719const unsigned char g_BlitFrom3D[] = {
1720 0x44, 0x58, 0x42, 0x43, 0x02, 0xc7, 0x0f, 0x7e, 0xe3, 0x5a, 0xf4, 0x9b,
1721 0xc5, 0xb2, 0xf8, 0xed, 0xa6, 0x79, 0xed, 0xf4, 0x01, 0x00, 0x00, 0x00,
1722 0x3f, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
1723 0x50, 0x00, 0x00, 0x00, 0xb5, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00,
1724 0xe7, 0x01, 0x00, 0x00, 0x77, 0x02, 0x00, 0x00, 0x5f, 0x0a, 0x00, 0x00,
1725 0x7b, 0x0a, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00,
1726 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31,
1727 0x5d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
1728 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1729 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1730 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1731 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1732 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
1733 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44,
1734 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
1735 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
1736 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00,
1737 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
1738 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1739 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50,
1740 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
1741 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1742 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00,
1743 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
1744 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
1745 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03,
1746 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
1747 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
1748 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e,
1749 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,
1750 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
1751 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
1752 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x01,
1753 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01,
1754 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x03,
1755 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
1756 0x01, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1757 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x0f,
1758 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1759 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1760 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x88,
1761 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18,
1762 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00,
1763 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3c,
1764 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x5c,
1765 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x7c,
1766 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03,
1767 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
1768 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01,
1769 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
1770 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
1771 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03,
1772 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0xe0,
1773 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x44,
1774 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xc8,
1775 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xef,
1776 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13,
1777 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06,
1778 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e,
1779 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4,
1780 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48,
1781 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4,
1782 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1,
1783 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08,
1784 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40,
1785 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d,
1786 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49,
1787 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20,
1788 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x58,
1789 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13,
1790 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
1791 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x8c, 0xc1, 0x08, 0x40,
1792 0x09, 0x00, 0x0a, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29,
1793 0xc6, 0x40, 0x10, 0x44, 0x41, 0x90, 0x51, 0x0c, 0x80, 0x20, 0x88, 0x62,
1794 0x20, 0xe4, 0xa6, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x7f, 0x25, 0xa4,
1795 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x51, 0x31, 0x0c, 0xc3, 0x40, 0x50, 0x71,
1796 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10,
1797 0x28, 0x58, 0x0a, 0xa3, 0x10, 0x0c, 0x33, 0x0c, 0xc3, 0x40, 0x10, 0xc4,
1798 0x40, 0xcd, 0x51, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0x3e, 0xb7, 0x51,
1799 0xc5, 0x4a, 0x4c, 0x7e, 0x71, 0xdb, 0x88, 0x18, 0x86, 0x61, 0x28, 0xc4,
1800 0x43, 0x30, 0x04, 0x41, 0x47, 0x0d, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9,
1801 0xdc, 0x46, 0x15, 0x2b, 0x31, 0xf9, 0xc8, 0x6d, 0x23, 0x82, 0x20, 0x08,
1802 0xa2, 0x10, 0x12, 0xc1, 0x10, 0x34, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0x88,
1803 0x82, 0x20, 0x2a, 0xb2, 0x06, 0x02, 0x86, 0x11, 0x88, 0x61, 0xa6, 0x36,
1804 0x18, 0x07, 0x76, 0x08, 0x87, 0x79, 0x98, 0x07, 0x37, 0xa0, 0x85, 0x72,
1805 0xc0, 0x07, 0x7a, 0xa8, 0x07, 0x79, 0x28, 0x87, 0x39, 0x20, 0x05, 0x3e,
1806 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0xe0, 0x03, 0x73,
1807 0x60, 0x87, 0x77, 0x08, 0x07, 0x7a, 0x60, 0x03, 0x30, 0xa0, 0x03, 0x3f,
1808 0x00, 0x03, 0x3f, 0xd0, 0x03, 0x3d, 0x68, 0x87, 0x74, 0x80, 0x87, 0x79,
1809 0xf8, 0x05, 0x7a, 0xc8, 0x07, 0x78, 0x28, 0x07, 0x14, 0x10, 0x33, 0x89,
1810 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94,
1811 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xcc, 0x01, 0x29, 0xf0,
1812 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98,
1813 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8,
1814 0x01, 0x18, 0xf8, 0x01, 0x12, 0x32, 0x8d, 0xb6, 0x61, 0x04, 0x61, 0x38,
1815 0x89, 0x75, 0xa8, 0x48, 0x20, 0x56, 0xc2, 0x40, 0x9c, 0x66, 0xa3, 0x8a,
1816 0x82, 0x88, 0x10, 0xd1, 0x75, 0xc4, 0x40, 0xde, 0x4d, 0xd2, 0x14, 0x51,
1817 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0,
1818 0x80, 0x20, 0x30, 0x15, 0x08, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87,
1819 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87,
1820 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00,
1821 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90,
1822 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0,
1823 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30,
1824 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20,
1825 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0,
1826 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60,
1827 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60,
1828 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0,
1829 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40,
1830 0x07, 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1831 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1832 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00,
1833 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00,
1834 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18, 0x00,
1835 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30,
1836 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xc7, 0x02, 0x02,
1837 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2c, 0x10, 0x14,
1838 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c,
1839 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x4a, 0x60, 0x04, 0xa0, 0x18,
1840 0x8a, 0xa0, 0x10, 0x4a, 0xa2, 0x0c, 0x0a, 0xa6, 0x1c, 0x0a, 0xa2, 0x40,
1841 0x4a, 0xa1, 0x50, 0xca, 0xa3, 0x74, 0xa8, 0x28, 0x89, 0x11, 0x80, 0x22,
1842 0x28, 0x83, 0x42, 0x28, 0x10, 0xaa, 0x6a, 0x80, 0xb8, 0x19, 0x00, 0xf2,
1843 0x66, 0x00, 0xe8, 0x9b, 0x01, 0xa0, 0x70, 0x06, 0x80, 0xc4, 0xb1, 0x14,
1844 0x84, 0x78, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79,
1845 0x18, 0x00, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46,
1846 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b,
1847 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1,
1848 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa,
1849 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10,
1850 0x04, 0x13, 0x04, 0xe2, 0x98, 0x20, 0x10, 0xc8, 0x06, 0x61, 0x20, 0x36,
1851 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x40, 0x24, 0x1b, 0x86, 0x03,
1852 0x21, 0x26, 0x08, 0x5c, 0xc7, 0x67, 0xea, 0xad, 0x4e, 0x6e, 0xac, 0x8c,
1853 0xaa, 0x0c, 0x8f, 0xae, 0x4e, 0xae, 0x6c, 0x86, 0x68, 0x82, 0x40, 0x28,
1854 0x13, 0x04, 0x62, 0x99, 0x20, 0x10, 0xcc, 0x06, 0x81, 0x70, 0x36, 0x24,
1855 0x84, 0xb2, 0x30, 0xc4, 0xd0, 0x10, 0xcf, 0x86, 0x00, 0x9a, 0x20, 0x7c,
1856 0x1f, 0xa5, 0xa9, 0xb7, 0x3a, 0xb9, 0xb1, 0x32, 0xa9, 0xb2, 0xb3, 0xb4,
1857 0x37, 0x37, 0xa1, 0x3a, 0x33, 0xb3, 0x32, 0xb9, 0x09, 0x02, 0xd1, 0x4c,
1858 0x10, 0x08, 0x67, 0x03, 0x42, 0x48, 0x13, 0x45, 0x0c, 0x15, 0xb0, 0x21,
1859 0xb0, 0x26, 0x08, 0x61, 0x00, 0x06, 0x6c, 0xa6, 0xde, 0xea, 0xe4, 0xc6,
1860 0xca, 0xa6, 0xc2, 0xda, 0xe0, 0xd8, 0xca, 0xe4, 0x36, 0x20, 0x04, 0x96,
1861 0x31, 0xc4, 0x40, 0x00, 0x1b, 0x02, 0x6d, 0x03, 0x11, 0x01, 0xd7, 0x36,
1862 0x41, 0xf0, 0x3c, 0x26, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f,
1863 0x70, 0x13, 0x04, 0xe2, 0x99, 0x20, 0x54, 0xdc, 0x06, 0x04, 0xf1, 0x28,
1864 0xe2, 0x73, 0x1c, 0x30, 0x20, 0x53, 0x65, 0x45, 0x94, 0xd6, 0x56, 0xe6,
1865 0x36, 0x97, 0xf6, 0xe6, 0x36, 0x37, 0x41, 0x20, 0xa0, 0x0d, 0x08, 0x22,
1866 0x06, 0xd4, 0x18, 0x7c, 0x8e, 0x03, 0x06, 0x44, 0x9a, 0xd2, 0xe0, 0x98,
1867 0xca, 0xec, 0xca, 0xd8, 0x26, 0x08, 0x44, 0x34, 0x41, 0x20, 0xa4, 0x0d,
1868 0x08, 0x52, 0x06, 0x94, 0x19, 0x7c, 0x67, 0xe0, 0x80, 0x01, 0x19, 0xa6,
1869 0xb0, 0xbc, 0x32, 0xb9, 0x27, 0x39, 0xa2, 0x32, 0x38, 0x3a, 0xb4, 0x09,
1870 0x02, 0x31, 0x6d, 0x40, 0x90, 0x34, 0xa0, 0xd4, 0xe0, 0x73, 0x1c, 0x30,
1871 0xd8, 0x50, 0x54, 0x61, 0x40, 0x06, 0x68, 0xb0, 0x06, 0x1b, 0x06, 0xa2,
1872 0x63, 0x83, 0x09, 0x82, 0x00, 0x6c, 0x00, 0x36, 0x0c, 0xc4, 0x1b, 0xbc,
1873 0xc1, 0x86, 0x00, 0x0e, 0x36, 0x0c, 0x83, 0x1b, 0xc4, 0xc1, 0x04, 0x41,
1874 0x0c, 0xc2, 0x60, 0x43, 0x30, 0x07, 0x54, 0x84, 0xd8, 0xd2, 0xe8, 0x8c,
1875 0xe4, 0xde, 0xda, 0x66, 0x88, 0x88, 0x50, 0x15, 0x61, 0x0d, 0x3d, 0x3d,
1876 0x49, 0x11, 0x4d, 0x10, 0x0a, 0x6b, 0x82, 0x50, 0x5c, 0x1b, 0x02, 0x62,
1877 0x82, 0x50, 0x60, 0x1b, 0x04, 0x8a, 0xda, 0xb0, 0x10, 0x76, 0x70, 0x07,
1878 0x78, 0x90, 0x07, 0x7a, 0x30, 0xe8, 0x01, 0x81, 0x07, 0x7b, 0xc0, 0x65,
1879 0xca, 0xea, 0x0b, 0xea, 0x6d, 0x2e, 0x8d, 0x2e, 0xed, 0xcd, 0x6d, 0x82,
1880 0x50, 0x64, 0x13, 0x84, 0x42, 0xdb, 0xb0, 0x0c, 0x7d, 0x70, 0x07, 0x7e,
1881 0x90, 0x07, 0x7f, 0x30, 0xfc, 0xc1, 0x80, 0x07, 0xc0, 0x06, 0x81, 0x0f,
1882 0x40, 0x81, 0xc9, 0x94, 0xd5, 0x17, 0x55, 0x98, 0xdc, 0x59, 0x19, 0xdd,
1883 0x04, 0xa1, 0xd8, 0x26, 0x08, 0x04, 0xb5, 0x41, 0xa0, 0x48, 0x61, 0xc3,
1884 0x42, 0x88, 0xc2, 0x1d, 0x8c, 0x42, 0x1e, 0xe0, 0xc1, 0xf0, 0x07, 0x04,
1885 0x1e, 0x94, 0xc2, 0x86, 0xc0, 0x14, 0x36, 0x0c, 0xa1, 0x70, 0x0a, 0xc0,
1886 0x86, 0xc2, 0x0d, 0xea, 0x00, 0x15, 0x38, 0x80, 0x86, 0x19, 0xdb, 0x5b,
1887 0x18, 0xdd, 0x1c, 0x8b, 0x34, 0xb7, 0x39, 0xba, 0xb9, 0x09, 0x02, 0x51,
1888 0xd1, 0x98, 0x4b, 0x3b, 0xfb, 0x62, 0x23, 0xa3, 0x31, 0x97, 0x76, 0xf6,
1889 0x35, 0x47, 0x47, 0x84, 0xae, 0x0c, 0xef, 0xcb, 0xed, 0x4d, 0xae, 0x6d,
1890 0x83, 0xa2, 0x0a, 0x67, 0xb0, 0x0a, 0xac, 0xd0, 0x0a, 0x8c, 0x2b, 0x34,
1891 0xaf, 0x30, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73,
1892 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6,
1893 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30,
1894 0x36, 0xbb, 0x32, 0xb9, 0x29, 0x41, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e,
1895 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c, 0x6d, 0x4a, 0x80,
1896 0x94, 0x21, 0xc3, 0x73, 0x91, 0x2b, 0x9b, 0x7b, 0xab, 0x93, 0x1b, 0x2b,
1897 0x9b, 0x9b, 0x12, 0x6c, 0x95, 0xc8, 0xf0, 0x5c, 0xe8, 0xf2, 0xe0, 0xca,
1898 0x82, 0xdc, 0xdc, 0xde, 0xe8, 0xc2, 0xe8, 0xd2, 0xde, 0xdc, 0xe6, 0xa6,
1899 0x08, 0x6c, 0x10, 0x07, 0x75, 0xc8, 0xf0, 0x5c, 0xec, 0xd2, 0xca, 0xee,
1900 0x92, 0xc8, 0xa6, 0xe8, 0xc2, 0xe8, 0xca, 0xa6, 0x04, 0x73, 0x50, 0x87,
1901 0x0c, 0xcf, 0xa5, 0xcc, 0x8d, 0x4e, 0x2e, 0x0f, 0xea, 0x2d, 0xcd, 0x8d,
1902 0x6e, 0x6e, 0x4a, 0x80, 0x0a, 0x5d, 0xc8, 0xf0, 0x5c, 0xc6, 0xde, 0xea,
1903 0xdc, 0xe8, 0xca, 0xe4, 0xe6, 0xa6, 0x04, 0xaf, 0x00, 0x00, 0x00, 0x79,
1904 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
1905 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
1906 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
1907 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
1908 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
1909 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d,
1910 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87,
1911 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87,
1912 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30,
1913 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde,
1914 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b,
1915 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c,
1916 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
1917 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87,
1918 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87,
1919 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87,
1920 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0,
1921 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc,
1922 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4,
1923 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39,
1924 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38,
1925 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
1926 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03,
1927 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0,
1928 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0,
1929 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71,
1930 0x20, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x06, 0xa0, 0x6c, 0x0b, 0x32,
1931 0x7d, 0x91, 0xc3, 0xdc, 0x9d, 0x11, 0x6c, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f,
1932 0x04, 0x54, 0x51, 0x10, 0x51, 0xe9, 0x00, 0x43, 0x49, 0x18, 0x80, 0x80,
1933 0xf9, 0xc5, 0x6d, 0x5b, 0xc1, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x40,
1934 0x15, 0x05, 0x11, 0x95, 0x0e, 0x30, 0x94, 0x84, 0x01, 0x08, 0x98, 0x8f,
1935 0xdc, 0xb6, 0x19, 0x48, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30,
1936 0x11, 0x21, 0xd0, 0x0c, 0x0b, 0x61, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3,
1937 0x2f, 0x0e, 0x30, 0x88, 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x50,
1938 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0x94, 0x44, 0x45,
1939 0x2c, 0x7e, 0x71, 0xdb, 0x26, 0x50, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x34,
1940 0x39, 0x11, 0x81, 0x52, 0xd3, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x00, 0x00,
1941 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00,
1942 0x00, 0x00, 0x00, 0x49, 0xc2, 0xf4, 0xbe, 0x13, 0x34, 0x00, 0xe0, 0x7c,
1943 0x3f, 0x23, 0xe9, 0x79, 0x8b, 0x27, 0xf4, 0x44, 0x58, 0x49, 0x4c, 0xbc,
1944 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xef, 0x01, 0x00, 0x00, 0x44,
1945 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xa4,
1946 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xe6,
1947 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13,
1948 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06,
1949 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e,
1950 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4,
1951 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48,
1952 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4,
1953 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1,
1954 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08,
1955 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40,
1956 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d,
1957 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49,
1958 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20,
1959 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x58,
1960 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13,
1961 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
1962 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x8c, 0xc1, 0x08, 0x40,
1963 0x09, 0x00, 0x0a, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29,
1964 0xc6, 0x40, 0x10, 0x44, 0x41, 0x90, 0x51, 0x0c, 0x80, 0x20, 0x88, 0x62,
1965 0x20, 0xe4, 0xa6, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x7f, 0x25, 0xa4,
1966 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x51, 0x31, 0x0c, 0xc3, 0x40, 0x50, 0x71,
1967 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10,
1968 0x28, 0x58, 0x0a, 0xa3, 0x10, 0x0c, 0x33, 0x0c, 0xc3, 0x40, 0x10, 0xc4,
1969 0x40, 0xcd, 0x51, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0x3e, 0xb7, 0x51,
1970 0xc5, 0x4a, 0x4c, 0x7e, 0x71, 0xdb, 0x88, 0x18, 0x86, 0x61, 0x28, 0xc4,
1971 0x43, 0x30, 0x04, 0x41, 0x47, 0x0d, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9,
1972 0xdc, 0x46, 0x15, 0x2b, 0x31, 0xf9, 0xc8, 0x6d, 0x23, 0x82, 0x20, 0x08,
1973 0xa2, 0x10, 0x12, 0xc1, 0x10, 0x34, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0x88,
1974 0x82, 0x20, 0x2a, 0xb2, 0x06, 0x02, 0x86, 0x11, 0x88, 0x61, 0xa6, 0x36,
1975 0x18, 0x07, 0x76, 0x08, 0x87, 0x79, 0x98, 0x07, 0x37, 0xa0, 0x85, 0x72,
1976 0xc0, 0x07, 0x7a, 0xa8, 0x07, 0x79, 0x28, 0x87, 0x39, 0x20, 0x05, 0x3e,
1977 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0xe0, 0x03, 0x73,
1978 0x60, 0x87, 0x77, 0x08, 0x07, 0x7a, 0x60, 0x03, 0x30, 0xa0, 0x03, 0x3f,
1979 0x00, 0x03, 0x3f, 0xd0, 0x03, 0x3d, 0x68, 0x87, 0x74, 0x80, 0x87, 0x79,
1980 0xf8, 0x05, 0x7a, 0xc8, 0x07, 0x78, 0x28, 0x07, 0x14, 0x10, 0x33, 0x89,
1981 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94,
1982 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39, 0xcc, 0x01, 0x29, 0xf0,
1983 0x81, 0x3d, 0x94, 0xc3, 0x38, 0xd0, 0xc3, 0x3b, 0xc8, 0x03, 0x1f, 0x98,
1984 0x03, 0x3b, 0xbc, 0x43, 0x38, 0xd0, 0x03, 0x1b, 0x80, 0x01, 0x1d, 0xf8,
1985 0x01, 0x18, 0xf8, 0x01, 0x12, 0x32, 0x8d, 0xb6, 0x61, 0x04, 0x61, 0x38,
1986 0x89, 0x75, 0xa8, 0x48, 0x20, 0x56, 0xc2, 0x40, 0x9c, 0x66, 0xa3, 0x8a,
1987 0x82, 0x88, 0x10, 0xd1, 0x75, 0xc4, 0x40, 0xde, 0x4d, 0xd2, 0x14, 0x51,
1988 0xc2, 0xe4, 0xb3, 0x00, 0xf3, 0x2c, 0x44, 0xc4, 0x4e, 0xc0, 0x44, 0xa0,
1989 0x80, 0x20, 0x30, 0x15, 0x08, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87,
1990 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87,
1991 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00,
1992 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90,
1993 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0,
1994 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30,
1995 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20,
1996 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0,
1997 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60,
1998 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60,
1999 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0,
2000 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40,
2001 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2002 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
2003 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00,
2004 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00,
2005 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18, 0x00,
2006 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30,
2007 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xc7, 0x02, 0x02,
2008 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2c, 0x10, 0x10,
2009 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c,
2010 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x4a, 0x60, 0x04, 0xa0, 0x18,
2011 0x8a, 0xa0, 0x10, 0x4a, 0xa2, 0x0c, 0x0a, 0xa6, 0x3c, 0xa8, 0x28, 0x89,
2012 0x11, 0x80, 0x22, 0x28, 0x83, 0x42, 0x28, 0x10, 0xe2, 0x66, 0x00, 0xe8,
2013 0x9b, 0x01, 0xa0, 0x70, 0x06, 0x80, 0xc4, 0xb1, 0x14, 0x84, 0x78, 0x1e,
2014 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x67,
2015 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35,
2016 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b,
2017 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b,
2018 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79,
2019 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xe2,
2020 0x98, 0x20, 0x10, 0xc8, 0x06, 0x61, 0x20, 0x26, 0x08, 0x44, 0xb2, 0x41,
2021 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0x9c,
2022 0x45, 0x60, 0x82, 0x40, 0x28, 0x13, 0x04, 0x62, 0x99, 0x20, 0x10, 0xcc,
2023 0x06, 0x81, 0x70, 0x36, 0x24, 0x84, 0xb2, 0x30, 0xc4, 0xd0, 0x10, 0xcf,
2024 0x86, 0x00, 0x9a, 0x20, 0x7c, 0xd7, 0x04, 0x81, 0x68, 0x26, 0x08, 0x84,
2025 0xb3, 0x01, 0x21, 0xa4, 0x65, 0x22, 0x06, 0x0a, 0xd8, 0x10, 0x54, 0x13,
2026 0x84, 0x30, 0xc0, 0x36, 0x20, 0xc4, 0xb5, 0x30, 0xc4, 0x40, 0x00, 0x1b,
2027 0x02, 0x6c, 0x03, 0x11, 0x01, 0x56, 0x36, 0x41, 0x10, 0x83, 0x6c, 0x43,
2028 0xb0, 0x4d, 0x10, 0x04, 0x80, 0x8a, 0x10, 0x5b, 0x1a, 0x9d, 0x91, 0xdc,
2029 0x5b, 0xdb, 0x0c, 0x11, 0x11, 0xaa, 0x22, 0xac, 0xa1, 0xa7, 0x27, 0x29,
2030 0xa2, 0x09, 0x42, 0x01, 0x4d, 0x10, 0x8a, 0x68, 0x43, 0x40, 0x4c, 0x10,
2031 0x0a, 0x69, 0x83, 0x30, 0x4d, 0x1b, 0x16, 0xe2, 0x03, 0x83, 0x30, 0x10,
2032 0x83, 0x31, 0x18, 0xc6, 0x80, 0x08, 0x03, 0x32, 0xe0, 0x32, 0x65, 0xf5,
2033 0x05, 0xf5, 0x36, 0x97, 0x46, 0x97, 0xf6, 0xe6, 0x36, 0x41, 0x28, 0xa6,
2034 0x09, 0x42, 0x41, 0x6d, 0x58, 0x06, 0x33, 0x00, 0x83, 0x33, 0x10, 0x03,
2035 0x34, 0x18, 0xd0, 0x60, 0x08, 0x03, 0x60, 0x83, 0x50, 0x06, 0x69, 0xc0,
2036 0x64, 0xca, 0xea, 0x8b, 0x2a, 0x4c, 0xee, 0xac, 0x8c, 0x6e, 0x82, 0x50,
2037 0x54, 0x13, 0x04, 0xe2, 0xd9, 0x20, 0x4c, 0x6d, 0xb0, 0x61, 0x21, 0xd6,
2038 0x00, 0x0c, 0xd8, 0x40, 0x0c, 0xc2, 0x60, 0x40, 0x03, 0x22, 0x0c, 0xdc,
2039 0x60, 0x43, 0xf0, 0x06, 0x1b, 0x06, 0x35, 0x80, 0x03, 0x60, 0x43, 0xd1,
2040 0x79, 0x71, 0xa0, 0x01, 0x55, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xd2, 0xc8,
2041 0xca, 0xdc, 0xe8, 0xa6, 0x04, 0x41, 0x15, 0x32, 0x3c, 0x17, 0xbb, 0x32,
2042 0xb9, 0xb9, 0xb4, 0x37, 0xb7, 0x29, 0x01, 0xd1, 0x84, 0x0c, 0xcf, 0xc5,
2043 0x2e, 0x8c, 0xcd, 0xae, 0x4c, 0x6e, 0x4a, 0x60, 0xd4, 0x21, 0xc3, 0x73,
2044 0x99, 0x43, 0x0b, 0x23, 0x2b, 0x93, 0x6b, 0x7a, 0x23, 0x2b, 0x63, 0x9b,
2045 0x12, 0x20, 0x65, 0xc8, 0xf0, 0x5c, 0xe4, 0xca, 0xe6, 0xde, 0xea, 0xe4,
2046 0xc6, 0xca, 0xe6, 0xa6, 0x04, 0x59, 0x1d, 0x32, 0x3c, 0x17, 0xbb, 0xb4,
2047 0xb2, 0xbb, 0x24, 0xb2, 0x29, 0xba, 0x30, 0xba, 0xb2, 0x29, 0xc1, 0x56,
2048 0x87, 0x0c, 0xcf, 0xa5, 0xcc, 0x8d, 0x4e, 0x2e, 0x0f, 0xea, 0x2d, 0xcd,
2049 0x8d, 0x6e, 0x6e, 0x4a, 0x10, 0x07, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c,
2050 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14,
2051 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79,
2052 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e,
2053 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1,
2054 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc,
2055 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74,
2056 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a,
2057 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e,
2058 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e,
2059 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21,
2060 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0,
2061 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc,
2062 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72,
2063 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76,
2064 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f,
2065 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c,
2066 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03,
2067 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1,
2068 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61,
2069 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8,
2070 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94,
2071 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0,
2072 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76,
2073 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e,
2074 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f,
2075 0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x1f,
2076 0x00, 0x00, 0x00, 0x06, 0xa0, 0x6c, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0xdc,
2077 0x9d, 0x11, 0x6c, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x04, 0x54, 0x51, 0x10,
2078 0x51, 0xe9, 0x00, 0x43, 0x49, 0x18, 0x80, 0x80, 0xf9, 0xc5, 0x6d, 0x5b,
2079 0xc1, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x40, 0x15, 0x05, 0x11, 0x95,
2080 0x0e, 0x30, 0x94, 0x84, 0x01, 0x08, 0x98, 0x8f, 0xdc, 0xb6, 0x19, 0x48,
2081 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30, 0x11, 0x21, 0xd0, 0x0c,
2082 0x0b, 0x61, 0x01, 0xd3, 0x70, 0xf9, 0xce, 0xe3, 0x2f, 0x0e, 0x30, 0x88,
2083 0xcd, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x36, 0x50, 0x0d, 0x97, 0xef, 0x3c,
2084 0xbe, 0x04, 0x30, 0xcf, 0x42, 0x94, 0x44, 0x45, 0x2c, 0x7e, 0x71, 0xdb,
2085 0x26, 0x50, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x34, 0x39, 0x11, 0x81, 0x52,
2086 0xd3, 0x43, 0x4d, 0x7e, 0x71, 0xdb, 0x00, 0x61, 0x20, 0x00, 0x00, 0x41,
2087 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05,
2088 0x00, 0x00, 0x00, 0x54, 0x8d, 0x00, 0x10, 0x51, 0x0a, 0x25, 0x57, 0x76,
2089 0x33, 0x00, 0xc5, 0x47, 0x45, 0x09, 0xd0, 0x30, 0x03, 0x00, 0x00, 0x23,
2090 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x71, 0x46, 0xa4, 0x69, 0xc8, 0x88,
2091 0x41, 0x02, 0x80, 0x20, 0x18, 0x58, 0xdd, 0x01, 0x6d, 0x5b, 0x32, 0x62,
2092 0x90, 0x00, 0x20, 0x08, 0x06, 0x96, 0x87, 0x48, 0x1c, 0xa7, 0x8c, 0x18,
2093 0x24, 0x00, 0x08, 0x82, 0x81, 0x41, 0x06, 0x5a, 0xd7, 0x51, 0xc7, 0x88,
2094 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x65, 0xb0, 0x79, 0x9e, 0x81, 0x8c,
2095 0x18, 0x1c, 0x00, 0x08, 0x82, 0x01, 0x34, 0x06, 0xca, 0xf0, 0x8d, 0x26,
2096 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02, 0x31,
2097 0x98, 0x70, 0xc8, 0xc7, 0x84, 0x43, 0x3e, 0x26, 0x18, 0xf0, 0x31, 0xc1,
2098 0x80, 0xcf, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x40, 0x6c, 0x30, 0x31,
2099 0x69, 0x30, 0x9a, 0x10, 0x04, 0x23, 0x06, 0x07, 0x00, 0x82, 0x60, 0x30,
2100 0xb5, 0x41, 0xe5, 0xac, 0xc1, 0x68, 0x42, 0x00, 0x5c, 0x30, 0xd4, 0x88,
2101 0xc1, 0x03, 0x80, 0x20, 0x18, 0x34, 0x72, 0x60, 0x4d, 0xd2, 0x61, 0x10,
2102 0x54, 0x1b, 0xb4, 0x41, 0x1b, 0x04, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20,
2103 0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x23, 0x06, 0x09, 0x00,
2104 0x82, 0x60, 0x80, 0xe0, 0xc1, 0x27, 0x07, 0x72, 0x90, 0x06, 0xc4, 0x88,
2105 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x78, 0xf0, 0xc9, 0x81, 0x1c, 0x68,
2106 0xc3, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0x78, 0xf0, 0xc9, 0x81,
2107 0x1c, 0xa0, 0x81, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x08, 0x1e,
2108 0x7c, 0x72, 0x20, 0x07, 0x67, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
2109 0x00, 0x00, 0x00
2110};
2111#if 0
2112;
2113; Input signature:
2114;
2115; Name Index Mask Register SysValue Format Used
2116; -------------------- ----- ------ -------- -------- ------- ------
2117; TEXCOORD 0 xy 0 NONE float xy
2118; SV_Position 0 xyzw 1 POS float
2119;
2120;
2121; Output signature:
2122;
2123; Name Index Mask Register SysValue Format Used
2124; -------------------- ----- ------ -------- -------- ------- ------
2125; SV_Target 0 xyzw 0 TARGET float xyzw
2126;
2127; shader hash: e88bd1fd8f6be3ae3e613ed8989b06d7
2128;
2129; Pipeline Runtime Information:
2130;
2131; Pixel Shader
2132; DepthOutput=0
2133; SampleFrequency=0
2134;
2135;
2136; Input signature:
2137;
2138; Name Index InterpMode DynIdx
2139; -------------------- ----- ---------------------- ------
2140; TEXCOORD 0 linear
2141; SV_Position 0 noperspective
2142;
2143; Output signature:
2144;
2145; Name Index InterpMode DynIdx
2146; -------------------- ----- ---------------------- ------
2147; SV_Target 0
2148;
2149; Buffer Definitions:
2150;
2151; cbuffer SourceRegionBuffer
2152; {
2153;
2154; struct SourceRegionBuffer
2155; {
2156;
2157; float2 UVLeftTop; ; Offset: 0
2158; float2 UVDimensions; ; Offset: 8
2159; uint MipLevel; ; Offset: 16
2160; float LayerOrDepth; ; Offset: 20
2161;
2162; } SourceRegionBuffer; ; Offset: 0 Size: 24
2163;
2164; }
2165;
2166;
2167; Resource Bindings:
2168;
2169; Name Type Format Dim ID HLSL Bind Count
2170; ------------------------------ ---------- ------- ----------- ------- -------------- ------
2171; SourceRegionBuffer cbuffer NA NA CB0 cb0,space3 1
2172; SourceSampler sampler NA NA S0 s0,space2 1
2173; SourceTextureCube texture f32 cube T0 t0,space2 1
2174;
2175;
2176; ViewId state:
2177;
2178; Number of inputs: 8, outputs: 4
2179; Outputs dependent on ViewId: { }
2180; Inputs contributing to computation of Outputs:
2181; output 0 depends on inputs: { 0, 1 }
2182; output 1 depends on inputs: { 0, 1 }
2183; output 2 depends on inputs: { 0, 1 }
2184; output 3 depends on inputs: { 0, 1 }
2185;
2186target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
2187target triple = "dxil-ms-dx"
2188
2189%dx.types.Handle = type { i8* }
2190%dx.types.CBufRet.f32 = type { float, float, float, float }
2191%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }
2192%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
2193%"class.TextureCube<vector<float, 4> >" = type { <4 x float> }
2194%SourceRegionBuffer = type { <2 x float>, <2 x float>, i32, float }
2195%struct.SamplerState = type { i32 }
2196
2197define void @BlitFromCube() {
2198 %1 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
2199 %2 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 3, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
2200 %3 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
2201 %4 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
2202 %5 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
2203 %6 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0) ; CBufferLoadLegacy(handle,regIndex)
2204 %7 = extractvalue %dx.types.CBufRet.f32 %6, 0
2205 %8 = extractvalue %dx.types.CBufRet.f32 %6, 1
2206 %9 = extractvalue %dx.types.CBufRet.f32 %6, 2
2207 %10 = extractvalue %dx.types.CBufRet.f32 %6, 3
2208 %11 = fmul fast float %9, %4
2209 %12 = fmul fast float %10, %5
2210 %13 = fadd fast float %11, %7
2211 %14 = fadd fast float %12, %8
2212 %15 = fmul fast float %13, 2.000000e+00
2213 %16 = fadd fast float %15, -1.000000e+00
2214 %17 = fmul fast float %14, 2.000000e+00
2215 %18 = fadd fast float %17, -1.000000e+00
2216 %19 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 1) ; CBufferLoadLegacy(handle,regIndex)
2217 %20 = extractvalue %dx.types.CBufRet.f32 %19, 1
2218 %21 = fptoui float %20 to i32
2219 switch i32 %21, label %35 [
2220 i32 0, label %22
2221 i32 1, label %25
2222 i32 2, label %27
2223 i32 3, label %29
2224 i32 4, label %30
2225 i32 5, label %32
2226 ]
2227
2228; <label>:22 ; preds = %0
2229 %23 = fsub fast float -0.000000e+00, %18
2230 %24 = fsub fast float -0.000000e+00, %16
2231 br label %35
2232
2233; <label>:25 ; preds = %0
2234 %26 = fsub fast float -0.000000e+00, %18
2235 br label %35
2236
2237; <label>:27 ; preds = %0
2238 %28 = fsub fast float -0.000000e+00, %18
2239 br label %35
2240
2241; <label>:29 ; preds = %0
2242 br label %35
2243
2244; <label>:30 ; preds = %0
2245 %31 = fsub fast float -0.000000e+00, %18
2246 br label %35
2247
2248; <label>:32 ; preds = %0
2249 %33 = fsub fast float -0.000000e+00, %16
2250 %34 = fsub fast float -0.000000e+00, %18
2251 br label %35
2252
2253; <label>:35 ; preds = %32, %30, %29, %27, %25, %22, %0
2254 %36 = phi float [ %33, %32 ], [ %16, %30 ], [ %16, %29 ], [ %16, %27 ], [ -1.000000e+00, %25 ], [ 1.000000e+00, %22 ], [ 0.000000e+00, %0 ]
2255 %37 = phi float [ %34, %32 ], [ %31, %30 ], [ -1.000000e+00, %29 ], [ 1.000000e+00, %27 ], [ %26, %25 ], [ %23, %22 ], [ 0.000000e+00, %0 ]
2256 %38 = phi float [ -1.000000e+00, %32 ], [ 1.000000e+00, %30 ], [ %18, %29 ], [ %28, %27 ], [ %16, %25 ], [ %24, %22 ], [ 0.000000e+00, %0 ]
2257 %39 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %3, i32 1) ; CBufferLoadLegacy(handle,regIndex)
2258 %40 = extractvalue %dx.types.CBufRet.i32 %39, 0
2259 %41 = uitofp i32 %40 to float
2260 %42 = call %dx.types.ResRet.f32 @dx.op.sampleLevel.f32(i32 62, %dx.types.Handle %1, %dx.types.Handle %2, float %36, float %37, float %38, float undef, i32 undef, i32 undef, i32 undef, float %41) ; SampleLevel(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,LOD)
2261 %43 = extractvalue %dx.types.ResRet.f32 %42, 0
2262 %44 = extractvalue %dx.types.ResRet.f32 %42, 1
2263 %45 = extractvalue %dx.types.ResRet.f32 %42, 2
2264 %46 = extractvalue %dx.types.ResRet.f32 %42, 3
2265 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %43) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
2266 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %44) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
2267 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %45) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
2268 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %46) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
2269 ret void
2270}
2271
2272; Function Attrs: nounwind readnone
2273declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #0
2274
2275; Function Attrs: nounwind
2276declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1
2277
2278; Function Attrs: nounwind readonly
2279declare %dx.types.ResRet.f32 @dx.op.sampleLevel.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, float, i32, i32, i32, float) #2
2280
2281; Function Attrs: nounwind readonly
2282declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #2
2283
2284; Function Attrs: nounwind readonly
2285declare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #2
2286
2287; Function Attrs: nounwind readonly
2288declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #2
2289
2290attributes #0 = { nounwind readnone }
2291attributes #1 = { nounwind }
2292attributes #2 = { nounwind readonly }
2293
2294!llvm.ident = !{!0}
2295!dx.version = !{!1}
2296!dx.valver = !{!2}
2297!dx.shaderModel = !{!3}
2298!dx.resources = !{!4}
2299!dx.viewIdState = !{!12}
2300!dx.entryPoints = !{!13}
2301
2302!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
2303!1 = !{i32 1, i32 0}
2304!2 = !{i32 1, i32 6}
2305!3 = !{!"ps", i32 6, i32 0}
2306!4 = !{!5, null, !8, !10}
2307!5 = !{!6}
2308!6 = !{i32 0, %"class.TextureCube<vector<float, 4> >"* undef, !"", i32 2, i32 0, i32 1, i32 5, i32 0, !7}
2309!7 = !{i32 0, i32 9}
2310!8 = !{!9}
2311!9 = !{i32 0, %SourceRegionBuffer* undef, !"", i32 3, i32 0, i32 1, i32 24, null}
2312!10 = !{!11}
2313!11 = !{i32 0, %struct.SamplerState* undef, !"", i32 2, i32 0, i32 1, i32 0, null}
2314!12 = !{[10 x i32] [i32 8, i32 4, i32 15, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0]}
2315!13 = !{void ()* @BlitFromCube, !"BlitFromCube", !14, !4, null}
2316!14 = !{!15, !20, null}
2317!15 = !{!16, !19}
2318!16 = !{i32 0, !"TEXCOORD", i8 9, i8 0, !17, i8 2, i32 1, i8 2, i32 0, i8 0, !18}
2319!17 = !{i32 0}
2320!18 = !{i32 3, i32 3}
2321!19 = !{i32 1, !"SV_Position", i8 9, i8 3, !17, i8 4, i32 1, i8 4, i32 1, i8 0, null}
2322!20 = !{!21}
2323!21 = !{i32 0, !"SV_Target", i8 9, i8 16, !17, i8 0, i32 1, i8 4, i32 0, i8 0, !22}
2324!22 = !{i32 3, i32 15}
2325
2326#endif
2327
2328const unsigned char g_BlitFromCube[] = {
2329 0x44, 0x58, 0x42, 0x43, 0xaf, 0x86, 0xcc, 0x12, 0xb2, 0xe2, 0x55, 0xc6,
2330 0x30, 0x3a, 0x18, 0x47, 0x98, 0xfe, 0x96, 0xb7, 0x01, 0x00, 0x00, 0x00,
2331 0x97, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
2332 0x50, 0x00, 0x00, 0x00, 0xb5, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00,
2333 0xe7, 0x01, 0x00, 0x00, 0x77, 0x02, 0x00, 0x00, 0x3b, 0x0a, 0x00, 0x00,
2334 0x57, 0x0a, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00,
2335 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31,
2336 0x5d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
2337 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2338 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2339 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2340 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
2341 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
2342 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44,
2343 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
2344 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
2345 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00,
2346 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
2347 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2348 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50,
2349 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
2350 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2351 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00,
2352 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
2353 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
2354 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03,
2355 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
2356 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
2357 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e,
2358 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,
2359 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
2360 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
2361 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x01,
2362 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01,
2363 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x03,
2364 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
2365 0x01, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2366 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x0f,
2367 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2368 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2369 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x88,
2370 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18,
2371 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00,
2372 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3c,
2373 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x5c,
2374 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x7c,
2375 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03,
2376 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
2377 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01,
2378 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
2379 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2380 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03,
2381 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0xbc,
2382 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xef, 0x01, 0x00, 0x00, 0x44,
2383 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xa4,
2384 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xe6,
2385 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13,
2386 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06,
2387 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e,
2388 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4,
2389 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48,
2390 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4,
2391 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1,
2392 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08,
2393 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40,
2394 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d,
2395 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49,
2396 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20,
2397 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x47,
2398 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13,
2399 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
2400 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x88, 0xc1, 0x08, 0x40,
2401 0x09, 0x00, 0x0a, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29,
2402 0xc6, 0x40, 0x10, 0x44, 0x41, 0x90, 0x51, 0x0c, 0x80, 0x20, 0x88, 0x62,
2403 0x20, 0xe4, 0xa6, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x7f, 0x25, 0xa4,
2404 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x51, 0x31, 0x0c, 0xc3, 0x40, 0x50, 0x71,
2405 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10,
2406 0x28, 0x58, 0x0a, 0xa3, 0x10, 0x0c, 0x33, 0x0c, 0xc3, 0x40, 0x10, 0xc4,
2407 0x40, 0xcd, 0x51, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0x3e, 0xb7, 0x51,
2408 0xc5, 0x4a, 0x4c, 0x7e, 0x71, 0xdb, 0x88, 0x18, 0x86, 0x61, 0x28, 0xc4,
2409 0x43, 0x30, 0x04, 0x41, 0x47, 0x0d, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9,
2410 0xdc, 0x46, 0x15, 0x2b, 0x31, 0xf9, 0xc8, 0x6d, 0x23, 0x82, 0x20, 0x08,
2411 0xa2, 0x10, 0x12, 0xc1, 0x10, 0x34, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0x88,
2412 0x82, 0x20, 0x2a, 0xb2, 0x06, 0x02, 0x86, 0x11, 0x88, 0x61, 0x26, 0x32,
2413 0x18, 0x07, 0x76, 0x08, 0x87, 0x79, 0x98, 0x07, 0x37, 0xa0, 0x85, 0x72,
2414 0xc0, 0x07, 0x7a, 0xa8, 0x07, 0x79, 0x28, 0x87, 0x51, 0xa8, 0x07, 0x71,
2415 0x28, 0x07, 0x3e, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79,
2416 0xe0, 0x03, 0x73, 0x60, 0x87, 0x77, 0x08, 0x07, 0x7a, 0x60, 0x03, 0x30,
2417 0xa0, 0x03, 0x3f, 0x00, 0x03, 0x3f, 0x40, 0x41, 0x46, 0xda, 0x30, 0x82,
2418 0x30, 0x9c, 0xc4, 0x3a, 0x54, 0x24, 0x10, 0x2b, 0x61, 0x20, 0x4e, 0xb3,
2419 0x51, 0x45, 0x41, 0x44, 0x88, 0xe0, 0x38, 0x62, 0xa0, 0xee, 0x26, 0x69,
2420 0x8a, 0x28, 0x61, 0xf2, 0x59, 0x80, 0x79, 0x16, 0x22, 0x62, 0x27, 0x60,
2421 0x22, 0x50, 0x40, 0xd0, 0x97, 0x0a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13,
2422 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68,
2423 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a,
2424 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
2425 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
2426 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71,
2427 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72,
2428 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a,
2429 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73,
2430 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72,
2431 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d,
2432 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72,
2433 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00, 0x00,
2434 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01,
2435 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00,
2436 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40,
2437 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81,
2438 0x80, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8,
2439 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
2440 0x90, 0xc7, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2441 0x80, 0x2c, 0x10, 0x14, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19,
2442 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x4a,
2443 0x60, 0x04, 0xa0, 0x18, 0x8a, 0xa0, 0x14, 0x4a, 0xa2, 0x0c, 0x0a, 0xa6,
2444 0x1c, 0x0a, 0xa2, 0x40, 0x0a, 0xa5, 0x3c, 0x4a, 0xa4, 0xcc, 0x0a, 0x81,
2445 0x8a, 0x92, 0x18, 0x01, 0x28, 0x82, 0x32, 0x28, 0x84, 0x02, 0xa1, 0xaa,
2446 0x06, 0x68, 0x9b, 0x01, 0xa0, 0x6e, 0x06, 0x80, 0xbc, 0x19, 0x00, 0x02,
2447 0x67, 0x00, 0x28, 0x1c, 0x4b, 0x41, 0x88, 0xe7, 0x01, 0x00, 0x00, 0x00,
2448 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x1a,
2449 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73,
2450 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71,
2451 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a,
2452 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b,
2453 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xe2, 0x98, 0x20, 0x10, 0xc8,
2454 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x40,
2455 0x24, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x9b, 0xc7, 0x68, 0xea, 0xad,
2456 0x4e, 0x6e, 0xac, 0x8c, 0xaa, 0x0c, 0x8f, 0xae, 0x4e, 0xae, 0x6c, 0xa8,
2457 0x4e, 0xac, 0x6c, 0x82, 0x40, 0x28, 0x13, 0x04, 0x62, 0x99, 0x20, 0x10,
2458 0xcc, 0x06, 0x81, 0x70, 0x36, 0x24, 0x84, 0xb2, 0x30, 0xc4, 0xd0, 0x10,
2459 0xcf, 0x86, 0x00, 0x9a, 0x20, 0x78, 0x60, 0x40, 0x69, 0xea, 0xad, 0x4e,
2460 0x6e, 0xac, 0x4c, 0xaa, 0xec, 0x2c, 0xed, 0xcd, 0x4d, 0xa8, 0xce, 0xcc,
2461 0xac, 0x4c, 0x6e, 0x82, 0x40, 0x34, 0x13, 0x04, 0xc2, 0xd9, 0x80, 0x10,
2462 0xd2, 0x44, 0x11, 0x43, 0x05, 0x6c, 0x08, 0xac, 0x09, 0x02, 0x18, 0x84,
2463 0x01, 0x9b, 0xa9, 0xb7, 0x3a, 0xb9, 0xb1, 0xb2, 0xa9, 0xb0, 0x36, 0x38,
2464 0xb6, 0x32, 0xb9, 0x0d, 0x08, 0x81, 0x65, 0x0c, 0x31, 0x10, 0xc0, 0x86,
2465 0x40, 0xdb, 0x40, 0x44, 0xc0, 0xb5, 0x4d, 0x10, 0xba, 0x8f, 0x49, 0x95,
2466 0x15, 0x53, 0x99, 0x19, 0x1d, 0xd5, 0x1b, 0xdc, 0x04, 0x81, 0x78, 0x26,
2467 0x08, 0x55, 0xb7, 0x01, 0x41, 0x3c, 0x8a, 0xf8, 0x1c, 0x07, 0x0c, 0xc8,
2468 0x54, 0x59, 0x11, 0xa5, 0xb5, 0x95, 0xb9, 0xcd, 0xa5, 0xbd, 0xb9, 0xcd,
2469 0x4d, 0x10, 0x08, 0x68, 0x03, 0x82, 0x88, 0x01, 0x35, 0x06, 0x9f, 0xe3,
2470 0x80, 0x01, 0x91, 0xa6, 0x34, 0x38, 0xa6, 0x32, 0xbb, 0x32, 0xb6, 0x09,
2471 0x02, 0x11, 0x6d, 0x40, 0x90, 0x32, 0xa0, 0xcc, 0xe0, 0x6b, 0x1c, 0x30,
2472 0x20, 0xc3, 0x14, 0x96, 0x57, 0x26, 0xf7, 0x24, 0x47, 0x54, 0x06, 0x47,
2473 0x87, 0x36, 0x41, 0x20, 0xa4, 0x0d, 0x08, 0x82, 0x06, 0x54, 0x1a, 0x7c,
2474 0x8e, 0x03, 0x06, 0x1b, 0x8a, 0x2a, 0x0c, 0xc8, 0xe0, 0x0c, 0xd4, 0x60,
2475 0xc3, 0x40, 0x74, 0x6b, 0x30, 0x41, 0x10, 0x80, 0x0d, 0xc0, 0x86, 0x81,
2476 0x70, 0x03, 0x37, 0xd8, 0x10, 0xbc, 0xc1, 0x86, 0x61, 0x68, 0x03, 0x38,
2477 0x98, 0x20, 0x84, 0x81, 0x18, 0x6c, 0x08, 0xe4, 0x80, 0x8c, 0x10, 0x5b,
2478 0x1a, 0x9d, 0x91, 0xdc, 0x5b, 0xdb, 0x50, 0x9d, 0x58, 0x19, 0x11, 0xaa,
2479 0x22, 0xac, 0xa1, 0xa7, 0x27, 0x29, 0xa2, 0x09, 0x42, 0x71, 0x4d, 0x10,
2480 0x0a, 0x6c, 0x43, 0x40, 0x4c, 0x10, 0x8a, 0x6c, 0x83, 0x40, 0x51, 0x1b,
2481 0x16, 0xa2, 0x0e, 0xec, 0xe0, 0x0e, 0xf0, 0x20, 0x0f, 0x86, 0x3c, 0x20,
2482 0xee, 0x40, 0x0f, 0xb8, 0x4c, 0x59, 0x7d, 0x41, 0xbd, 0xcd, 0xa5, 0xd1,
2483 0xa5, 0xbd, 0xb9, 0x4d, 0x10, 0x0a, 0x6d, 0x82, 0x50, 0x6c, 0x1b, 0x96,
2484 0x81, 0x0f, 0xec, 0xa0, 0x0f, 0xf0, 0xc0, 0x0f, 0x06, 0x3f, 0x18, 0xee,
2485 0x00, 0xd8, 0x20, 0xec, 0xc1, 0x1f, 0x30, 0x99, 0xb2, 0xfa, 0xa2, 0x0a,
2486 0x93, 0x3b, 0x2b, 0xa3, 0x9b, 0x20, 0x14, 0xdc, 0x04, 0x81, 0x98, 0x36,
2487 0x08, 0xd4, 0x28, 0x6c, 0x58, 0x88, 0x50, 0xb0, 0x03, 0x51, 0xc0, 0x83,
2488 0x3b, 0x18, 0xfc, 0x80, 0xb8, 0x03, 0x52, 0xd8, 0x10, 0x94, 0xc2, 0x86,
2489 0x01, 0x14, 0x4c, 0x01, 0xd8, 0x50, 0xb4, 0x01, 0x1d, 0x9c, 0x02, 0x07,
2490 0xd0, 0x30, 0x63, 0x7b, 0x0b, 0xa3, 0x9b, 0x9b, 0x20, 0x10, 0x14, 0x8b,
2491 0x34, 0xb7, 0x39, 0xba, 0xb9, 0x09, 0x02, 0x51, 0xd1, 0x98, 0x4b, 0x3b,
2492 0xfb, 0x62, 0x23, 0xa3, 0x31, 0x97, 0x76, 0xf6, 0x35, 0x47, 0x37, 0x41,
2493 0x20, 0x2c, 0x22, 0x74, 0x65, 0x78, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x1b,
2494 0x94, 0x54, 0x50, 0x85, 0x55, 0x60, 0x85, 0x56, 0x60, 0x5c, 0xe1, 0x15,
2495 0x60, 0x61, 0xa8, 0xc2, 0xc6, 0x66, 0xd7, 0xe6, 0x92, 0x46, 0x56, 0xe6,
2496 0x46, 0x37, 0x25, 0x08, 0xaa, 0x90, 0xe1, 0xb9, 0xd8, 0x95, 0xc9, 0xcd,
2497 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0x88, 0x26, 0x64, 0x78, 0x2e, 0x76, 0x61,
2498 0x6c, 0x76, 0x65, 0x72, 0x53, 0x82, 0xa2, 0x0e, 0x19, 0x9e, 0xcb, 0x1c,
2499 0x5a, 0x18, 0x59, 0x99, 0x5c, 0xd3, 0x1b, 0x59, 0x19, 0xdb, 0x94, 0x00,
2500 0x29, 0x43, 0x86, 0xe7, 0x22, 0x57, 0x36, 0xf7, 0x56, 0x27, 0x37, 0x56,
2501 0x36, 0x37, 0x25, 0xd8, 0x2a, 0x91, 0xe1, 0xb9, 0xd0, 0xe5, 0xc1, 0x95,
2502 0x05, 0xb9, 0xb9, 0xbd, 0xd1, 0x85, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d,
2503 0x11, 0xd6, 0x00, 0x0e, 0xea, 0x90, 0xe1, 0xb9, 0xd8, 0xa5, 0x95, 0xdd,
2504 0x25, 0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d, 0x09, 0xe4, 0xa0, 0x0e,
2505 0x19, 0x9e, 0x4b, 0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, 0x9a, 0x1b,
2506 0xdd, 0xdc, 0x94, 0xe0, 0x14, 0xba, 0x90, 0xe1, 0xb9, 0x8c, 0xbd, 0xd5,
2507 0xb9, 0xd1, 0x95, 0xc9, 0xcd, 0x4d, 0x09, 0x60, 0x01, 0x00, 0x00, 0x79,
2508 0x18, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
2509 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
2510 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
2511 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
2512 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
2513 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d,
2514 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87,
2515 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87,
2516 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30,
2517 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde,
2518 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b,
2519 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c,
2520 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
2521 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87,
2522 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87,
2523 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87,
2524 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0,
2525 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc,
2526 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4,
2527 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39,
2528 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38,
2529 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
2530 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03,
2531 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0,
2532 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0,
2533 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x30, 0x83, 0x81, 0xc8,
2534 0x01, 0x1f, 0xdc, 0x40, 0x1c, 0xe4, 0xa1, 0x1c, 0xc2, 0x61, 0x1d, 0xdc,
2535 0x40, 0x1c, 0xe4, 0x01, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x20,
2536 0x00, 0x00, 0x00, 0x06, 0xc0, 0x6c, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0x70,
2537 0x54, 0x40, 0x18, 0xc1, 0x36, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x40, 0x15,
2538 0x05, 0x11, 0x95, 0x0e, 0x30, 0x94, 0x84, 0x01, 0x08, 0x98, 0x5f, 0xdc,
2539 0xb6, 0x15, 0x6c, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x04, 0x54, 0x51, 0x10,
2540 0x51, 0xe9, 0x00, 0x43, 0x49, 0x18, 0x80, 0x80, 0xf9, 0xc8, 0x6d, 0x9b,
2541 0x81, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x44, 0x00, 0x13, 0x11, 0x02,
2542 0xcd, 0xb0, 0x10, 0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2, 0x00,
2543 0x83, 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x03, 0xd5, 0x70, 0xf9,
2544 0xce, 0xe3, 0x4b, 0x00, 0xf3, 0x2c, 0x44, 0x49, 0x54, 0xc4, 0xe2, 0x17,
2545 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11,
2546 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x0d, 0x00, 0x00, 0x00, 0x00,
2547 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00,
2548 0x00, 0x00, 0x00, 0xe8, 0x8b, 0xd1, 0xfd, 0x8f, 0x6b, 0xe3, 0xae, 0x3e,
2549 0x61, 0x3e, 0xd8, 0x98, 0x9b, 0x06, 0xd7, 0x44, 0x58, 0x49, 0x4c, 0x38,
2550 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x00, 0x00, 0x44,
2551 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20,
2552 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x05,
2553 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13,
2554 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06,
2555 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e,
2556 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4,
2557 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48,
2558 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4,
2559 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1,
2560 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08,
2561 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40,
2562 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d,
2563 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49,
2564 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20,
2565 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x47,
2566 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13,
2567 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
2568 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x8c, 0xc1, 0x08, 0x40,
2569 0x09, 0x00, 0x0a, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29,
2570 0xc6, 0x40, 0x10, 0x44, 0x41, 0x90, 0x51, 0x0c, 0x80, 0x20, 0x88, 0x62,
2571 0x20, 0xe4, 0xa6, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x7f, 0x25, 0xa4,
2572 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x51, 0x31, 0x0c, 0xc3, 0x40, 0x50, 0x71,
2573 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10,
2574 0x28, 0x58, 0x0a, 0xa3, 0x10, 0x0c, 0x33, 0x0c, 0xc3, 0x40, 0x10, 0xc4,
2575 0x40, 0xcd, 0x51, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0x3e, 0xb7, 0x51,
2576 0xc5, 0x4a, 0x4c, 0x7e, 0x71, 0xdb, 0x88, 0x18, 0x86, 0x61, 0x28, 0xc4,
2577 0x43, 0x30, 0x04, 0x41, 0x47, 0x0d, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9,
2578 0xdc, 0x46, 0x15, 0x2b, 0x31, 0xf9, 0xc8, 0x6d, 0x23, 0x82, 0x20, 0x08,
2579 0xa2, 0x10, 0x12, 0xc1, 0x10, 0x34, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0x88,
2580 0x82, 0x20, 0x2a, 0xb2, 0x06, 0x02, 0x86, 0x11, 0x88, 0x61, 0x26, 0x32,
2581 0x18, 0x07, 0x76, 0x08, 0x87, 0x79, 0x98, 0x07, 0x37, 0xa0, 0x85, 0x72,
2582 0xc0, 0x07, 0x7a, 0xa8, 0x07, 0x79, 0x28, 0x87, 0x51, 0xa8, 0x07, 0x71,
2583 0x28, 0x07, 0x3e, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79,
2584 0xe0, 0x03, 0x73, 0x60, 0x87, 0x77, 0x08, 0x07, 0x7a, 0x60, 0x03, 0x30,
2585 0xa0, 0x03, 0x3f, 0x00, 0x03, 0x3f, 0x40, 0x41, 0x46, 0xda, 0x30, 0x82,
2586 0x30, 0x9c, 0xc4, 0x3a, 0x54, 0x24, 0x10, 0x2b, 0x61, 0x20, 0x4e, 0xb3,
2587 0x51, 0x45, 0x41, 0x44, 0x88, 0xe0, 0x38, 0x62, 0xa0, 0xee, 0x26, 0x69,
2588 0x8a, 0x28, 0x61, 0xf2, 0x59, 0x80, 0x79, 0x16, 0x22, 0x62, 0x27, 0x60,
2589 0x22, 0x50, 0x40, 0xd0, 0x97, 0x0a, 0xc4, 0x14, 0x00, 0x00, 0x00, 0x13,
2590 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68,
2591 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a,
2592 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
2593 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
2594 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71,
2595 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72,
2596 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a,
2597 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73,
2598 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72,
2599 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d,
2600 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72,
2601 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00,
2602 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01,
2603 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00,
2604 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40,
2605 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81,
2606 0x80, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8,
2607 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
2608 0x90, 0xc7, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2609 0x80, 0x2c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19,
2610 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x4a,
2611 0x60, 0x04, 0xa0, 0x18, 0x8a, 0xa0, 0x14, 0x4a, 0xa2, 0x0c, 0x0a, 0xa6,
2612 0x3c, 0xa8, 0x28, 0x89, 0x11, 0x80, 0x22, 0x28, 0x83, 0x42, 0x28, 0x10,
2613 0xda, 0x66, 0x00, 0xc8, 0x9b, 0x01, 0x20, 0x70, 0x06, 0x80, 0xc2, 0xb1,
2614 0x14, 0x84, 0x78, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79,
2615 0x18, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46,
2616 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b,
2617 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1,
2618 0x0b, 0x3b, 0x9b, 0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa,
2619 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10,
2620 0x04, 0x13, 0x04, 0xe2, 0x98, 0x20, 0x10, 0xc8, 0x06, 0x61, 0x20, 0x26,
2621 0x08, 0x44, 0xb2, 0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4,
2622 0x20, 0x26, 0x08, 0x9b, 0x45, 0x60, 0x82, 0x40, 0x28, 0x13, 0x04, 0x62,
2623 0x99, 0x20, 0x10, 0xcc, 0x06, 0x81, 0x70, 0x36, 0x24, 0x84, 0xb2, 0x30,
2624 0xc4, 0xd0, 0x10, 0xcf, 0x86, 0x00, 0x9a, 0x20, 0x78, 0xd7, 0x04, 0x81,
2625 0x68, 0x26, 0x08, 0x84, 0xb3, 0x01, 0x21, 0xa4, 0x65, 0x22, 0x06, 0x0a,
2626 0xd8, 0x10, 0x54, 0x13, 0x04, 0x30, 0xc0, 0x36, 0x20, 0xc4, 0xb5, 0x30,
2627 0xc4, 0x40, 0x00, 0x1b, 0x02, 0x6c, 0x03, 0x11, 0x01, 0x56, 0x36, 0x41,
2628 0x08, 0x83, 0x6c, 0x43, 0xb0, 0x4d, 0x10, 0x04, 0x80, 0x8c, 0x10, 0x5b,
2629 0x1a, 0x9d, 0x91, 0xdc, 0x5b, 0xdb, 0x50, 0x9d, 0x58, 0x19, 0x11, 0xaa,
2630 0x22, 0xac, 0xa1, 0xa7, 0x27, 0x29, 0xa2, 0x09, 0x42, 0x01, 0x4d, 0x10,
2631 0x8a, 0x68, 0x43, 0x40, 0x4c, 0x10, 0x0a, 0x69, 0x83, 0x30, 0x4d, 0x1b,
2632 0x16, 0xe2, 0x03, 0x83, 0x30, 0x10, 0x83, 0x31, 0x18, 0xc6, 0x80, 0x08,
2633 0x03, 0x32, 0xe0, 0x32, 0x65, 0xf5, 0x05, 0xf5, 0x36, 0x97, 0x46, 0x97,
2634 0xf6, 0xe6, 0x36, 0x41, 0x28, 0xa6, 0x09, 0x42, 0x41, 0x6d, 0x58, 0x06,
2635 0x33, 0x00, 0x83, 0x33, 0x10, 0x03, 0x34, 0x18, 0xd0, 0x60, 0x08, 0x03,
2636 0x60, 0x83, 0x50, 0x06, 0x69, 0xc0, 0x64, 0xca, 0xea, 0x8b, 0x2a, 0x4c,
2637 0xee, 0xac, 0x8c, 0x6e, 0x82, 0x50, 0x54, 0x13, 0x04, 0xe2, 0xd9, 0x20,
2638 0x4c, 0x6d, 0xb0, 0x61, 0x21, 0xd6, 0x00, 0x0c, 0xd8, 0x40, 0x0c, 0xc2,
2639 0x60, 0x40, 0x03, 0x22, 0x0c, 0xdc, 0x60, 0x43, 0xf0, 0x06, 0x1b, 0x06,
2640 0x35, 0x80, 0x03, 0x60, 0x43, 0xd1, 0x79, 0x71, 0xa0, 0x01, 0x55, 0xd8,
2641 0xd8, 0xec, 0xda, 0x5c, 0xd2, 0xc8, 0xca, 0xdc, 0xe8, 0xa6, 0x04, 0x41,
2642 0x15, 0x32, 0x3c, 0x17, 0xbb, 0x32, 0xb9, 0xb9, 0xb4, 0x37, 0xb7, 0x29,
2643 0x01, 0xd1, 0x84, 0x0c, 0xcf, 0xc5, 0x2e, 0x8c, 0xcd, 0xae, 0x4c, 0x6e,
2644 0x4a, 0x60, 0xd4, 0x21, 0xc3, 0x73, 0x99, 0x43, 0x0b, 0x23, 0x2b, 0x93,
2645 0x6b, 0x7a, 0x23, 0x2b, 0x63, 0x9b, 0x12, 0x20, 0x65, 0xc8, 0xf0, 0x5c,
2646 0xe4, 0xca, 0xe6, 0xde, 0xea, 0xe4, 0xc6, 0xca, 0xe6, 0xa6, 0x04, 0x59,
2647 0x1d, 0x32, 0x3c, 0x17, 0xbb, 0xb4, 0xb2, 0xbb, 0x24, 0xb2, 0x29, 0xba,
2648 0x30, 0xba, 0xb2, 0x29, 0xc1, 0x56, 0x87, 0x0c, 0xcf, 0xa5, 0xcc, 0x8d,
2649 0x4e, 0x2e, 0x0f, 0xea, 0x2d, 0xcd, 0x8d, 0x6e, 0x6e, 0x4a, 0x10, 0x07,
2650 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x33,
2651 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43,
2652 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98,
2653 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33,
2654 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05,
2655 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43,
2656 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08,
2657 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78,
2658 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1,
2659 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33,
2660 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e,
2661 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03,
2662 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60,
2663 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80,
2664 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8,
2665 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18,
2666 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee,
2667 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c,
2668 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c,
2669 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43,
2670 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3,
2671 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83,
2672 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21,
2673 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1,
2674 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6,
2675 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4,
2676 0x30, 0x83, 0x81, 0xc8, 0x01, 0x1f, 0xdc, 0x40, 0x1c, 0xe4, 0xa1, 0x1c,
2677 0xc2, 0x61, 0x1d, 0xdc, 0x40, 0x1c, 0xe4, 0x01, 0x00, 0x00, 0x00, 0x71,
2678 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x06, 0xc0, 0x6c, 0x0b, 0x32,
2679 0x7d, 0x91, 0xc3, 0x70, 0x54, 0x40, 0x18, 0xc1, 0x36, 0x5c, 0xbe, 0xf3,
2680 0xf8, 0x42, 0x40, 0x15, 0x05, 0x11, 0x95, 0x0e, 0x30, 0x94, 0x84, 0x01,
2681 0x08, 0x98, 0x5f, 0xdc, 0xb6, 0x15, 0x6c, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f,
2682 0x04, 0x54, 0x51, 0x10, 0x51, 0xe9, 0x00, 0x43, 0x49, 0x18, 0x80, 0x80,
2683 0xf9, 0xc8, 0x6d, 0x9b, 0x81, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x44,
2684 0x00, 0x13, 0x11, 0x02, 0xcd, 0xb0, 0x10, 0x16, 0x30, 0x0d, 0x97, 0xef,
2685 0x3c, 0xfe, 0xe2, 0x00, 0x83, 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7, 0x6d,
2686 0x03, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x00, 0xf3, 0x2c, 0x44, 0x49,
2687 0x54, 0xc4, 0xe2, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3,
2688 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x0d,
2689 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x13,
2690 0x04, 0x48, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x54,
2691 0x8d, 0x00, 0x50, 0x51, 0x02, 0x44, 0x14, 0x5f, 0xd9, 0x15, 0x42, 0xc9,
2692 0xcd, 0x00, 0xd0, 0x30, 0x03, 0x30, 0x46, 0x00, 0x82, 0x20, 0x08, 0x82,
2693 0xc1, 0x08, 0xc0, 0x18, 0x01, 0x08, 0x82, 0x20, 0xfe, 0x8d, 0x11, 0x80,
2694 0x20, 0x08, 0xe2, 0xbf, 0x30, 0x46, 0x00, 0x82, 0x20, 0x08, 0x82, 0x02,
2695 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x85, 0x01,
2696 0x62, 0x7d, 0x5f, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x96, 0x18,
2697 0x24, 0x15, 0x18, 0x80, 0x81, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06,
2698 0xd6, 0x18, 0x28, 0x57, 0x18, 0x84, 0xc1, 0x33, 0x62, 0x90, 0x00, 0x20,
2699 0x08, 0x06, 0x46, 0x1a, 0x30, 0x62, 0x20, 0x06, 0x99, 0x32, 0x62, 0x90,
2700 0x00, 0x20, 0x08, 0x06, 0x86, 0x1a, 0x34, 0x63, 0x30, 0x06, 0xd0, 0x32,
2701 0x62, 0x70, 0x00, 0x20, 0x08, 0x06, 0x10, 0x1a, 0x3c, 0x03, 0x19, 0x8c,
2702 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26, 0x0c, 0xc2, 0x68, 0x02,
2703 0x31, 0x98, 0x70, 0xc8, 0xc7, 0x84, 0x43, 0x3e, 0x26, 0x18, 0xf0, 0x31,
2704 0xc1, 0x80, 0x8f, 0x09, 0x93, 0x7c, 0x2c, 0x88, 0xe0, 0x63, 0x43, 0x25,
2705 0x1f, 0x0b, 0x26, 0xf8, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x01, 0x54,
2706 0x07, 0x1c, 0x24, 0x07, 0xa3, 0x09, 0x41, 0x70, 0x01, 0x31, 0xc3, 0x3c,
2707 0x44, 0x70, 0x20, 0xc1, 0x21, 0x28, 0x43, 0x43, 0x78, 0xc5, 0x62, 0x98,
2708 0x45, 0xc4, 0xc7, 0xae, 0x23, 0x3e, 0xb3, 0x04, 0x87, 0x61, 0x46, 0x7c,
2709 0x66, 0x09, 0x0e, 0xcb, 0x8e, 0xf8, 0xcc, 0x12, 0x1c, 0xb3, 0x04, 0x87,
2710 0x69, 0x48, 0x7c, 0x66, 0x09, 0x0e, 0xdb, 0x96, 0xf8, 0x18, 0xa7, 0xc4,
2711 0x67, 0x96, 0xe0, 0x18, 0xe8, 0x19, 0x08, 0x43, 0x2b, 0x34, 0x42, 0x1b,
2712 0xf8, 0x40, 0xf0, 0x83, 0x00, 0x14, 0x80, 0x81, 0x9e, 0x81, 0x30, 0x90,
2713 0xc2, 0x0f, 0x08, 0x50, 0x18, 0x18, 0x01, 0x0a, 0x44, 0x01, 0x18, 0xe8,
2714 0x19, 0x40, 0xc1, 0x10, 0x85, 0x42, 0x23, 0x98, 0xc1, 0x13, 0xa0, 0x80,
2715 0x14, 0x80, 0x11, 0x83, 0x03, 0x00, 0x41, 0x30, 0x98, 0x42, 0x21, 0x0d,
2716 0xba, 0x3f, 0x18, 0x4d, 0x08, 0x80, 0x0b, 0x86, 0x1a, 0x31, 0x78, 0x00,
2717 0x10, 0x04, 0x83, 0xc6, 0x14, 0xda, 0x40, 0x0c, 0xc2, 0xc0, 0x28, 0x08,
2718 0x34, 0x48, 0x83, 0x34, 0x48, 0x83, 0x60, 0x34, 0x21, 0x00, 0x46, 0x13,
2719 0x84, 0x60, 0x34, 0x61, 0x10, 0x46, 0x13, 0x88, 0x61, 0xc4, 0x20, 0x01,
2720 0x40, 0x10, 0x0c, 0x10, 0x56, 0x18, 0x05, 0x53, 0x30, 0x85, 0x3e, 0x20,
2721 0x46, 0x0c, 0x12, 0x00, 0x04, 0xc1, 0x00, 0x61, 0x85, 0x51, 0x30, 0x05,
2722 0x53, 0x98, 0x83, 0x61, 0xc4, 0x20, 0x01, 0x40, 0x10, 0x0c, 0x10, 0x56,
2723 0x18, 0x05, 0x53, 0x30, 0x05, 0x3e, 0x10, 0x46, 0x0c, 0x12, 0x00, 0x04,
2724 0xc1, 0x00, 0x61, 0x85, 0x51, 0x30, 0x05, 0x53, 0xd8, 0x83, 0x00, 0x01,
2725 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
2726};
2727#if 0
2728;
2729; Input signature:
2730;
2731; Name Index Mask Register SysValue Format Used
2732; -------------------- ----- ------ -------- -------- ------- ------
2733; TEXCOORD 0 xy 0 NONE float xy
2734; SV_Position 0 xyzw 1 POS float
2735;
2736;
2737; Output signature:
2738;
2739; Name Index Mask Register SysValue Format Used
2740; -------------------- ----- ------ -------- -------- ------- ------
2741; SV_Target 0 xyzw 0 TARGET float xyzw
2742;
2743; shader hash: afa29d501205614a91b6ff9e9bd6cb82
2744;
2745; Pipeline Runtime Information:
2746;
2747; Pixel Shader
2748; DepthOutput=0
2749; SampleFrequency=0
2750;
2751;
2752; Input signature:
2753;
2754; Name Index InterpMode DynIdx
2755; -------------------- ----- ---------------------- ------
2756; TEXCOORD 0 linear
2757; SV_Position 0 noperspective
2758;
2759; Output signature:
2760;
2761; Name Index InterpMode DynIdx
2762; -------------------- ----- ---------------------- ------
2763; SV_Target 0
2764;
2765; Buffer Definitions:
2766;
2767; cbuffer SourceRegionBuffer
2768; {
2769;
2770; struct SourceRegionBuffer
2771; {
2772;
2773; float2 UVLeftTop; ; Offset: 0
2774; float2 UVDimensions; ; Offset: 8
2775; uint MipLevel; ; Offset: 16
2776; float LayerOrDepth; ; Offset: 20
2777;
2778; } SourceRegionBuffer; ; Offset: 0 Size: 24
2779;
2780; }
2781;
2782;
2783; Resource Bindings:
2784;
2785; Name Type Format Dim ID HLSL Bind Count
2786; ------------------------------ ---------- ------- ----------- ------- -------------- ------
2787; SourceRegionBuffer cbuffer NA NA CB0 cb0,space3 1
2788; SourceSampler sampler NA NA S0 s0,space2 1
2789; SourceTextureCubeArray texture f32 cubearray T0 t0,space2 1
2790;
2791;
2792; ViewId state:
2793;
2794; Number of inputs: 8, outputs: 4
2795; Outputs dependent on ViewId: { }
2796; Inputs contributing to computation of Outputs:
2797; output 0 depends on inputs: { 0, 1 }
2798; output 1 depends on inputs: { 0, 1 }
2799; output 2 depends on inputs: { 0, 1 }
2800; output 3 depends on inputs: { 0, 1 }
2801;
2802target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
2803target triple = "dxil-ms-dx"
2804
2805%dx.types.Handle = type { i8* }
2806%dx.types.CBufRet.f32 = type { float, float, float, float }
2807%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }
2808%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
2809%"class.TextureCubeArray<vector<float, 4> >" = type { <4 x float> }
2810%SourceRegionBuffer = type { <2 x float>, <2 x float>, i32, float }
2811%struct.SamplerState = type { i32 }
2812
2813define void @BlitFromCubeArray() {
2814 %1 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
2815 %2 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 3, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
2816 %3 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
2817 %4 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
2818 %5 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
2819 %6 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 0) ; CBufferLoadLegacy(handle,regIndex)
2820 %7 = extractvalue %dx.types.CBufRet.f32 %6, 0
2821 %8 = extractvalue %dx.types.CBufRet.f32 %6, 1
2822 %9 = extractvalue %dx.types.CBufRet.f32 %6, 2
2823 %10 = extractvalue %dx.types.CBufRet.f32 %6, 3
2824 %11 = fmul fast float %9, %4
2825 %12 = fmul fast float %10, %5
2826 %13 = fadd fast float %11, %7
2827 %14 = fadd fast float %12, %8
2828 %15 = fmul fast float %13, 2.000000e+00
2829 %16 = fadd fast float %15, -1.000000e+00
2830 %17 = fmul fast float %14, 2.000000e+00
2831 %18 = fadd fast float %17, -1.000000e+00
2832 %19 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %3, i32 1) ; CBufferLoadLegacy(handle,regIndex)
2833 %20 = extractvalue %dx.types.CBufRet.f32 %19, 1
2834 %21 = fptoui float %20 to i32
2835 %22 = udiv i32 %21, 6
2836 %23 = urem i32 %21, 6
2837 switch i32 %23, label %37 [
2838 i32 0, label %24
2839 i32 1, label %27
2840 i32 2, label %29
2841 i32 3, label %31
2842 i32 4, label %32
2843 i32 5, label %34
2844 ]
2845
2846; <label>:24 ; preds = %0
2847 %25 = fsub fast float -0.000000e+00, %18
2848 %26 = fsub fast float -0.000000e+00, %16
2849 br label %37
2850
2851; <label>:27 ; preds = %0
2852 %28 = fsub fast float -0.000000e+00, %18
2853 br label %37
2854
2855; <label>:29 ; preds = %0
2856 %30 = fsub fast float -0.000000e+00, %18
2857 br label %37
2858
2859; <label>:31 ; preds = %0
2860 br label %37
2861
2862; <label>:32 ; preds = %0
2863 %33 = fsub fast float -0.000000e+00, %18
2864 br label %37
2865
2866; <label>:34 ; preds = %0
2867 %35 = fsub fast float -0.000000e+00, %16
2868 %36 = fsub fast float -0.000000e+00, %18
2869 br label %37
2870
2871; <label>:37 ; preds = %34, %32, %31, %29, %27, %24, %0
2872 %38 = phi float [ %35, %34 ], [ %16, %32 ], [ %16, %31 ], [ %16, %29 ], [ -1.000000e+00, %27 ], [ 1.000000e+00, %24 ], [ 0.000000e+00, %0 ]
2873 %39 = phi float [ %36, %34 ], [ %33, %32 ], [ -1.000000e+00, %31 ], [ 1.000000e+00, %29 ], [ %28, %27 ], [ %25, %24 ], [ 0.000000e+00, %0 ]
2874 %40 = phi float [ -1.000000e+00, %34 ], [ 1.000000e+00, %32 ], [ %18, %31 ], [ %30, %29 ], [ %16, %27 ], [ %26, %24 ], [ 0.000000e+00, %0 ]
2875 %41 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %3, i32 1) ; CBufferLoadLegacy(handle,regIndex)
2876 %42 = extractvalue %dx.types.CBufRet.i32 %41, 0
2877 %43 = uitofp i32 %42 to float
2878 %44 = uitofp i32 %22 to float
2879 %45 = call %dx.types.ResRet.f32 @dx.op.sampleLevel.f32(i32 62, %dx.types.Handle %1, %dx.types.Handle %2, float %38, float %39, float %40, float %44, i32 undef, i32 undef, i32 undef, float %43) ; SampleLevel(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,LOD)
2880 %46 = extractvalue %dx.types.ResRet.f32 %45, 0
2881 %47 = extractvalue %dx.types.ResRet.f32 %45, 1
2882 %48 = extractvalue %dx.types.ResRet.f32 %45, 2
2883 %49 = extractvalue %dx.types.ResRet.f32 %45, 3
2884 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %46) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
2885 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %47) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
2886 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %48) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
2887 call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %49) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
2888 ret void
2889}
2890
2891; Function Attrs: nounwind readnone
2892declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #0
2893
2894; Function Attrs: nounwind
2895declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1
2896
2897; Function Attrs: nounwind readonly
2898declare %dx.types.ResRet.f32 @dx.op.sampleLevel.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, float, i32, i32, i32, float) #2
2899
2900; Function Attrs: nounwind readonly
2901declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #2
2902
2903; Function Attrs: nounwind readonly
2904declare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #2
2905
2906; Function Attrs: nounwind readonly
2907declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #2
2908
2909attributes #0 = { nounwind readnone }
2910attributes #1 = { nounwind }
2911attributes #2 = { nounwind readonly }
2912
2913!llvm.ident = !{!0}
2914!dx.version = !{!1}
2915!dx.valver = !{!2}
2916!dx.shaderModel = !{!3}
2917!dx.resources = !{!4}
2918!dx.viewIdState = !{!12}
2919!dx.entryPoints = !{!13}
2920
2921!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
2922!1 = !{i32 1, i32 0}
2923!2 = !{i32 1, i32 6}
2924!3 = !{!"ps", i32 6, i32 0}
2925!4 = !{!5, null, !8, !10}
2926!5 = !{!6}
2927!6 = !{i32 0, %"class.TextureCubeArray<vector<float, 4> >"* undef, !"", i32 2, i32 0, i32 1, i32 9, i32 0, !7}
2928!7 = !{i32 0, i32 9}
2929!8 = !{!9}
2930!9 = !{i32 0, %SourceRegionBuffer* undef, !"", i32 3, i32 0, i32 1, i32 24, null}
2931!10 = !{!11}
2932!11 = !{i32 0, %struct.SamplerState* undef, !"", i32 2, i32 0, i32 1, i32 0, null}
2933!12 = !{[10 x i32] [i32 8, i32 4, i32 15, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0]}
2934!13 = !{void ()* @BlitFromCubeArray, !"BlitFromCubeArray", !14, !4, null}
2935!14 = !{!15, !20, null}
2936!15 = !{!16, !19}
2937!16 = !{i32 0, !"TEXCOORD", i8 9, i8 0, !17, i8 2, i32 1, i8 2, i32 0, i8 0, !18}
2938!17 = !{i32 0}
2939!18 = !{i32 3, i32 3}
2940!19 = !{i32 1, !"SV_Position", i8 9, i8 3, !17, i8 4, i32 1, i8 4, i32 1, i8 0, null}
2941!20 = !{!21}
2942!21 = !{i32 0, !"SV_Target", i8 9, i8 16, !17, i8 0, i32 1, i8 4, i32 0, i8 0, !22}
2943!22 = !{i32 3, i32 15}
2944
2945#endif
2946
2947const unsigned char g_BlitFromCubeArray[] = {
2948 0x44, 0x58, 0x42, 0x43, 0x95, 0x0e, 0x7b, 0x55, 0x73, 0x94, 0x25, 0x5d,
2949 0xa7, 0xe7, 0xe6, 0x60, 0xdc, 0x5e, 0xcd, 0xfd, 0x01, 0x00, 0x00, 0x00,
2950 0xc3, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
2951 0x50, 0x00, 0x00, 0x00, 0xb5, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00,
2952 0xe7, 0x01, 0x00, 0x00, 0x77, 0x02, 0x00, 0x00, 0x53, 0x0a, 0x00, 0x00,
2953 0x6f, 0x0a, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00,
2954 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31,
2955 0x5d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
2956 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2957 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2958 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2959 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
2960 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
2961 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44,
2962 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
2963 0x00, 0x4f, 0x53, 0x47, 0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
2964 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00,
2965 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
2966 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2967 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50,
2968 0x53, 0x56, 0x30, 0xf0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
2969 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2970 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00,
2971 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
2972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
2973 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03,
2974 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
2975 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
2976 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e,
2977 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02,
2978 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
2979 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
2980 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x01,
2981 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01,
2982 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x03,
2983 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
2984 0x01, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2985 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x0f,
2986 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2987 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2988 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x54, 0x53, 0x30, 0x88,
2989 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18,
2990 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00,
2991 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3c,
2992 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x5c,
2993 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x7c,
2994 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03,
2995 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
2996 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01,
2997 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
2998 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2999 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03,
3000 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0xd4,
3001 0x07, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf5, 0x01, 0x00, 0x00, 0x44,
3002 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xbc,
3003 0x07, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xec,
3004 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13,
3005 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06,
3006 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e,
3007 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4,
3008 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48,
3009 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4,
3010 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1,
3011 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08,
3012 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40,
3013 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d,
3014 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49,
3015 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20,
3016 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x48,
3017 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13,
3018 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
3019 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x88, 0xc1, 0x08, 0x40,
3020 0x09, 0x00, 0x0a, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29,
3021 0xc6, 0x40, 0x10, 0x44, 0x41, 0x90, 0x51, 0x0c, 0x80, 0x20, 0x88, 0x62,
3022 0x20, 0xe4, 0xa6, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x7f, 0x25, 0xa4,
3023 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x51, 0x31, 0x0c, 0xc3, 0x40, 0x50, 0x71,
3024 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10,
3025 0x28, 0x58, 0x0a, 0xa3, 0x10, 0x0c, 0x33, 0x0c, 0xc3, 0x40, 0x10, 0xc4,
3026 0x40, 0xcd, 0x51, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0x3e, 0xb7, 0x51,
3027 0xc5, 0x4a, 0x4c, 0x7e, 0x71, 0xdb, 0x88, 0x18, 0x86, 0x61, 0x28, 0xc4,
3028 0x43, 0x30, 0x04, 0x41, 0x47, 0x0d, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9,
3029 0xdc, 0x46, 0x15, 0x2b, 0x31, 0xf9, 0xc8, 0x6d, 0x23, 0x82, 0x20, 0x08,
3030 0xa2, 0x10, 0x12, 0xc1, 0x10, 0x34, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0x88,
3031 0x82, 0x20, 0x2a, 0xb2, 0x06, 0x02, 0x86, 0x11, 0x88, 0x61, 0xa6, 0x34,
3032 0x18, 0x07, 0x76, 0x08, 0x87, 0x79, 0x98, 0x07, 0x37, 0xa0, 0x85, 0x72,
3033 0xc0, 0x07, 0x7a, 0xa8, 0x07, 0x79, 0x28, 0x87, 0x51, 0xa8, 0x07, 0x71,
3034 0x28, 0x87, 0x50, 0x90, 0x07, 0x79, 0x08, 0x87, 0x7c, 0xe0, 0x03, 0x7b,
3035 0x28, 0x87, 0x71, 0xa0, 0x87, 0x77, 0x90, 0x07, 0x3e, 0x30, 0x07, 0x76,
3036 0x78, 0x87, 0x70, 0xa0, 0x07, 0x36, 0x00, 0x03, 0x3a, 0xf0, 0x03, 0x30,
3037 0xf0, 0x03, 0x14, 0x64, 0xa4, 0x0d, 0x23, 0x08, 0xc3, 0x49, 0xac, 0x43,
3038 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x1b, 0x55, 0x14, 0x44, 0x84,
3039 0x08, 0x8e, 0x23, 0x06, 0xea, 0x6e, 0x92, 0xa6, 0x88, 0x12, 0x26, 0x9f,
3040 0x05, 0x98, 0x67, 0x21, 0x22, 0x76, 0x02, 0x26, 0x02, 0x05, 0x04, 0x7d,
3041 0xa9, 0x40, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36,
3042 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e,
3043 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07,
3044 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07,
3045 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07,
3046 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06,
3047 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e,
3048 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07,
3049 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07,
3050 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07,
3051 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07,
3052 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00,
3053 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c,
3054 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
3055 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3056 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3057 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
3058 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00,
3059 0x00, 0x00, 0x00, 0xc0, 0x90, 0xc7, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00,
3060 0x00, 0x00, 0x00, 0x00, 0x80, 0x2c, 0x10, 0x14, 0x00, 0x00, 0x00, 0x32,
3061 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6,
3062 0x04, 0x43, 0x22, 0x4a, 0x60, 0x04, 0xa0, 0x18, 0x8a, 0xa0, 0x24, 0xca,
3063 0xa0, 0x60, 0xca, 0xa1, 0x20, 0x0a, 0xa4, 0x14, 0x0a, 0xa5, 0x3c, 0x8a,
3064 0xa4, 0xd8, 0x0a, 0x81, 0x8a, 0x92, 0x18, 0x01, 0x28, 0x82, 0x32, 0x28,
3065 0x84, 0x02, 0xa1, 0xaa, 0x06, 0x68, 0x9b, 0x01, 0xa0, 0x6e, 0x06, 0x80,
3066 0xbc, 0x19, 0x00, 0x02, 0x67, 0x00, 0x28, 0x1c, 0x4b, 0x41, 0x88, 0xe7,
3067 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xb5,
3068 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35,
3069 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b,
3070 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b,
3071 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79,
3072 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xe2,
3073 0x98, 0x20, 0x10, 0xc8, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01,
3074 0x6e, 0x6e, 0x82, 0x40, 0x24, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x9b,
3075 0x47, 0x6b, 0xea, 0xad, 0x4e, 0x6e, 0xac, 0x8c, 0xaa, 0x0c, 0x8f, 0xae,
3076 0x4e, 0xae, 0x6c, 0xa8, 0x4e, 0xac, 0x2c, 0x48, 0x4e, 0x2e, 0x2c, 0x6f,
3077 0x82, 0x40, 0x28, 0x13, 0x04, 0x62, 0xd9, 0x20, 0x10, 0xcd, 0x86, 0x84,
3078 0x50, 0x16, 0x86, 0x18, 0x1a, 0xc2, 0xd9, 0x10, 0x3c, 0x13, 0x04, 0x0f,
3079 0x0c, 0x28, 0x4d, 0xbd, 0xd5, 0xc9, 0x8d, 0x95, 0x49, 0x95, 0x9d, 0xa5,
3080 0xbd, 0xb9, 0x09, 0xd5, 0x99, 0x99, 0x95, 0xc9, 0x4d, 0x10, 0x08, 0x66,
3081 0x82, 0x40, 0x34, 0x1b, 0x10, 0x22, 0x92, 0x26, 0x62, 0xa0, 0x80, 0x0d,
3082 0x41, 0x35, 0x41, 0x00, 0x83, 0x30, 0x60, 0x33, 0xf5, 0x56, 0x27, 0x37,
3083 0x56, 0x36, 0x15, 0xd6, 0x06, 0xc7, 0x56, 0x26, 0xb7, 0x01, 0x21, 0x2e,
3084 0x8c, 0x21, 0x06, 0x02, 0xd8, 0x10, 0x64, 0x1b, 0x08, 0x08, 0xb0, 0xb4,
3085 0x09, 0x42, 0xf7, 0x31, 0xa9, 0xb2, 0x62, 0x2a, 0x33, 0xa3, 0xa3, 0x7a,
3086 0x83, 0x9b, 0x20, 0x10, 0xce, 0x04, 0xa1, 0xea, 0x36, 0x20, 0x48, 0x37,
3087 0x11, 0x5e, 0xd3, 0x7c, 0x64, 0xaa, 0xac, 0x88, 0xd2, 0xda, 0xca, 0xdc,
3088 0xe6, 0xd2, 0xde, 0xdc, 0xe6, 0x26, 0x08, 0xc4, 0xb3, 0x01, 0x41, 0xc2,
3089 0x60, 0x12, 0x03, 0xaf, 0x69, 0x3e, 0x22, 0x4d, 0x69, 0x70, 0x4c, 0x65,
3090 0x76, 0x65, 0x6c, 0x13, 0x04, 0x02, 0x9a, 0x20, 0x10, 0xd1, 0x06, 0x04,
3091 0x21, 0x83, 0xa9, 0x0c, 0x3c, 0x33, 0x68, 0x3e, 0x32, 0x4c, 0x61, 0x79,
3092 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x13, 0x04, 0x42,
3093 0xda, 0x80, 0x20, 0x68, 0x30, 0xa5, 0x81, 0xd7, 0x34, 0xdf, 0x86, 0x82,
3094 0x02, 0x83, 0x31, 0x38, 0x03, 0x35, 0xd8, 0x30, 0x10, 0xdc, 0x1a, 0x4c,
3095 0x10, 0x04, 0x60, 0x03, 0xb0, 0x61, 0x20, 0xdc, 0xc0, 0x0d, 0x36, 0x04,
3096 0x6f, 0xb0, 0x61, 0x18, 0xda, 0x00, 0x0e, 0x26, 0x08, 0x61, 0x20, 0x06,
3097 0x1b, 0x02, 0x39, 0x60, 0x24, 0xc4, 0x96, 0x46, 0x67, 0x24, 0xf7, 0xd6,
3098 0x36, 0x54, 0x27, 0x56, 0x16, 0x24, 0x27, 0x17, 0x96, 0x47, 0x84, 0xaa,
3099 0x08, 0x6b, 0xe8, 0xe9, 0x49, 0x8a, 0x68, 0x82, 0x50, 0x5c, 0x13, 0x84,
3100 0x02, 0xdb, 0x10, 0x10, 0x13, 0x84, 0x22, 0xdb, 0x20, 0x4c, 0xd3, 0x86,
3101 0x85, 0xa8, 0x03, 0x3b, 0xb8, 0x03, 0x3c, 0xc8, 0x83, 0x21, 0x0f, 0x88,
3102 0x3b, 0xd0, 0x03, 0x2e, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74,
3103 0x69, 0x6f, 0x6e, 0x13, 0x84, 0x42, 0x9b, 0x20, 0x14, 0xdb, 0x86, 0x65,
3104 0xe0, 0x03, 0x3b, 0xe8, 0x03, 0x3c, 0xf0, 0x83, 0xc1, 0x0f, 0x86, 0x3b,
3105 0x00, 0x36, 0x08, 0x7b, 0xf0, 0x07, 0x4c, 0xa6, 0xac, 0xbe, 0xa8, 0xc2,
3106 0xe4, 0xce, 0xca, 0xe8, 0x26, 0x08, 0x05, 0x37, 0x41, 0x20, 0xa6, 0x0d,
3107 0xc2, 0x34, 0x0a, 0x1b, 0x16, 0x22, 0x14, 0xec, 0x40, 0x14, 0xf0, 0xe0,
3108 0x0e, 0x06, 0x3f, 0x20, 0xee, 0x80, 0x14, 0x36, 0x04, 0xa5, 0xb0, 0x61,
3109 0x00, 0x05, 0x53, 0x00, 0x36, 0x14, 0x6d, 0x40, 0x07, 0xa7, 0xb0, 0x01,
3110 0x34, 0xcc, 0xd8, 0xde, 0xc2, 0xe8, 0xe6, 0x26, 0x08, 0x04, 0xc5, 0x22,
3111 0xcd, 0x6d, 0x8e, 0x6e, 0x6e, 0x82, 0x40, 0x54, 0x34, 0xe6, 0xd2, 0xce,
3112 0xbe, 0xd8, 0xc8, 0x68, 0xcc, 0xa5, 0x9d, 0x7d, 0xcd, 0xd1, 0x4d, 0x10,
3113 0x08, 0x8b, 0x08, 0x5d, 0x19, 0xde, 0x97, 0xdb, 0x9b, 0x5c, 0x1b, 0x8b,
3114 0xba, 0x34, 0x37, 0xba, 0xb9, 0x0d, 0x4c, 0x2a, 0xa8, 0xc2, 0x2a, 0xb0,
3115 0x42, 0x2b, 0x30, 0xae, 0xf0, 0x0a, 0xb0, 0x30, 0xc4, 0x02, 0x53, 0x85,
3116 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0x10,
3117 0x54, 0x21, 0xc3, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b,
3118 0x12, 0x10, 0x4d, 0xc8, 0xf0, 0x5c, 0xec, 0xc2, 0xd8, 0xec, 0xca, 0xe4,
3119 0xa6, 0x04, 0x45, 0x1d, 0x32, 0x3c, 0x97, 0x39, 0xb4, 0x30, 0xb2, 0x32,
3120 0xb9, 0xa6, 0x37, 0xb2, 0x32, 0xb6, 0x29, 0x01, 0x52, 0x86, 0x0c, 0xcf,
3121 0x45, 0xae, 0x6c, 0xee, 0xad, 0x4e, 0x6e, 0xac, 0x6c, 0x6e, 0x4a, 0xa0,
3122 0x55, 0x22, 0xc3, 0x73, 0xa1, 0xcb, 0x83, 0x2b, 0x0b, 0x72, 0x73, 0x7b,
3123 0xa3, 0x0b, 0xa3, 0x4b, 0x7b, 0x73, 0x9b, 0x9b, 0x22, 0xac, 0x01, 0x1c,
3124 0xd4, 0x21, 0xc3, 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2,
3125 0x0b, 0xa3, 0x2b, 0x9b, 0x12, 0xc8, 0x41, 0x1d, 0x32, 0x3c, 0x97, 0x32,
3126 0x37, 0x3a, 0xb9, 0x3c, 0xa8, 0xb7, 0x34, 0x37, 0xba, 0xb9, 0x29, 0xc1,
3127 0x29, 0x74, 0x21, 0xc3, 0x73, 0x19, 0x7b, 0xab, 0x73, 0xa3, 0x2b, 0x93,
3128 0x9b, 0x9b, 0x12, 0xc4, 0x02, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x51,
3129 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14,
3130 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79,
3131 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e,
3132 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1,
3133 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc,
3134 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74,
3135 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a,
3136 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e,
3137 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e,
3138 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21,
3139 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0,
3140 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc,
3141 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72,
3142 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76,
3143 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f,
3144 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c,
3145 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03,
3146 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1,
3147 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61,
3148 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8,
3149 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94,
3150 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0,
3151 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76,
3152 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e,
3153 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f,
3154 0xef, 0x50, 0x0f, 0xf4, 0x30, 0x83, 0x81, 0xc8, 0x01, 0x1f, 0xdc, 0x40,
3155 0x1c, 0xe4, 0xa1, 0x1c, 0xc2, 0x61, 0x1d, 0xdc, 0x40, 0x1c, 0xe4, 0x01,
3156 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x06,
3157 0x10, 0x6d, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0x70, 0x54, 0x40, 0x68, 0x51,
3158 0x04, 0x60, 0x46, 0xb0, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x50, 0x45,
3159 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61, 0x00, 0x02, 0xe6, 0x17, 0xb7,
3160 0x6d, 0x05, 0xdb, 0x70, 0xf9, 0xce, 0xe3, 0x0b, 0x01, 0x55, 0x14, 0x44,
3161 0x54, 0x3a, 0xc0, 0x50, 0x12, 0x06, 0x20, 0x60, 0x3e, 0x72, 0xdb, 0x66,
3162 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11, 0xc0, 0x44, 0x84, 0x40,
3163 0x33, 0x2c, 0x84, 0x05, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0,
3164 0x20, 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0xdb, 0x40, 0x35, 0x5c, 0xbe,
3165 0xf3, 0xf8, 0x12, 0xc0, 0x3c, 0x0b, 0x51, 0x12, 0x15, 0xb1, 0xf8, 0xc5,
3166 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04,
3167 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x03, 0x00, 0x00, 0x00, 0x00,
3168 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00,
3169 0x00, 0x00, 0x00, 0xaf, 0xa2, 0x9d, 0x50, 0x12, 0x05, 0x61, 0x4a, 0x91,
3170 0xb6, 0xff, 0x9e, 0x9b, 0xd6, 0xcb, 0x82, 0x44, 0x58, 0x49, 0x4c, 0x4c,
3171 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0x44,
3172 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x34,
3173 0x08, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x0a,
3174 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13,
3175 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06,
3176 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e,
3177 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xc4,
3178 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48,
3179 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4,
3180 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1,
3181 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08,
3182 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40,
3183 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d,
3184 0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49,
3185 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20,
3186 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x49,
3187 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13,
3188 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
3189 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0x8c, 0xc1, 0x08, 0x40,
3190 0x09, 0x00, 0x0a, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29,
3191 0xc6, 0x40, 0x10, 0x44, 0x41, 0x90, 0x51, 0x0c, 0x80, 0x20, 0x88, 0x62,
3192 0x20, 0xe4, 0xa6, 0xe1, 0xf2, 0x27, 0xec, 0x21, 0x24, 0x7f, 0x25, 0xa4,
3193 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x51, 0x31, 0x0c, 0xc3, 0x40, 0x50, 0x71,
3194 0xcf, 0x70, 0xf9, 0x13, 0xf6, 0x10, 0x92, 0x1f, 0x02, 0xcd, 0xb0, 0x10,
3195 0x28, 0x58, 0x0a, 0xa3, 0x10, 0x0c, 0x33, 0x0c, 0xc3, 0x40, 0x10, 0xc4,
3196 0x40, 0xcd, 0x51, 0xc3, 0xe5, 0x4f, 0xd8, 0x43, 0x48, 0x3e, 0xb7, 0x51,
3197 0xc5, 0x4a, 0x4c, 0x7e, 0x71, 0xdb, 0x88, 0x18, 0x86, 0x61, 0x28, 0xc4,
3198 0x43, 0x30, 0x04, 0x41, 0x47, 0x0d, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9,
3199 0xdc, 0x46, 0x15, 0x2b, 0x31, 0xf9, 0xc8, 0x6d, 0x23, 0x82, 0x20, 0x08,
3200 0xa2, 0x10, 0x12, 0xc1, 0x10, 0x34, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0x88,
3201 0x82, 0x20, 0x2a, 0xb2, 0x06, 0x02, 0x86, 0x11, 0x88, 0x61, 0xa6, 0x34,
3202 0x18, 0x07, 0x76, 0x08, 0x87, 0x79, 0x98, 0x07, 0x37, 0xa0, 0x85, 0x72,
3203 0xc0, 0x07, 0x7a, 0xa8, 0x07, 0x79, 0x28, 0x87, 0x51, 0xa8, 0x07, 0x71,
3204 0x28, 0x87, 0x50, 0x90, 0x07, 0x79, 0x08, 0x87, 0x7c, 0xe0, 0x03, 0x7b,
3205 0x28, 0x87, 0x71, 0xa0, 0x87, 0x77, 0x90, 0x07, 0x3e, 0x30, 0x07, 0x76,
3206 0x78, 0x87, 0x70, 0xa0, 0x07, 0x36, 0x00, 0x03, 0x3a, 0xf0, 0x03, 0x30,
3207 0xf0, 0x03, 0x14, 0x64, 0xa4, 0x0d, 0x23, 0x08, 0xc3, 0x49, 0xac, 0x43,
3208 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x1b, 0x55, 0x14, 0x44, 0x84,
3209 0x08, 0x8e, 0x23, 0x06, 0xea, 0x6e, 0x92, 0xa6, 0x88, 0x12, 0x26, 0x9f,
3210 0x05, 0x98, 0x67, 0x21, 0x22, 0x76, 0x02, 0x26, 0x02, 0x05, 0x04, 0x7d,
3211 0xa9, 0x40, 0x4c, 0x01, 0x00, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87,
3212 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0, 0x87,
3213 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00,
3214 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90,
3215 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0,
3216 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30,
3217 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20,
3218 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0,
3219 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60,
3220 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60,
3221 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0,
3222 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40,
3223 0x07, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3224 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
3225 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00,
3226 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00,
3227 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x81, 0x80, 0x00, 0x18, 0x00,
3228 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x01, 0x30,
3229 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xc7, 0x02, 0x02,
3230 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2c, 0x10, 0x10,
3231 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c,
3232 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x4a, 0x60, 0x04, 0xa0, 0x18,
3233 0x8a, 0xa0, 0x24, 0xca, 0xa0, 0x60, 0xca, 0x83, 0x8a, 0x92, 0x18, 0x01,
3234 0x28, 0x82, 0x32, 0x28, 0x84, 0x02, 0xa1, 0x6d, 0x06, 0x80, 0xbc, 0x19,
3235 0x00, 0x02, 0x67, 0x00, 0x28, 0x1c, 0x4b, 0x41, 0x88, 0xe7, 0x01, 0x00,
3236 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x68,
3237 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35,
3238 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b,
3239 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b, 0x7b,
3240 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79,
3241 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xe2,
3242 0x98, 0x20, 0x10, 0xc8, 0x06, 0x61, 0x20, 0x26, 0x08, 0x44, 0xb2, 0x41,
3243 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0x5b,
3244 0x45, 0x60, 0x82, 0x40, 0x28, 0x13, 0x04, 0x62, 0xd9, 0x20, 0x10, 0xcd,
3245 0x86, 0x84, 0x50, 0x16, 0x86, 0x18, 0x1a, 0xc2, 0xd9, 0x10, 0x3c, 0x13,
3246 0x04, 0xcf, 0x9a, 0x20, 0x10, 0xcc, 0x04, 0x81, 0x68, 0x36, 0x20, 0x44,
3247 0xb4, 0x48, 0xc4, 0x30, 0x01, 0x1b, 0x02, 0x6a, 0x82, 0x00, 0x06, 0xd7,
3248 0x06, 0x84, 0xb0, 0x16, 0x86, 0x18, 0x08, 0x60, 0x43, 0x70, 0x6d, 0x20,
3249 0x20, 0xa0, 0xc2, 0x26, 0x08, 0x61, 0x80, 0x6d, 0x08, 0xb4, 0x09, 0x82,
3250 0x00, 0x30, 0x12, 0x62, 0x4b, 0xa3, 0x33, 0x92, 0x7b, 0x6b, 0x1b, 0xaa,
3251 0x13, 0x2b, 0x0b, 0x92, 0x93, 0x0b, 0xcb, 0x23, 0x42, 0x55, 0x84, 0x35,
3252 0xf4, 0xf4, 0x24, 0x45, 0x34, 0x41, 0x28, 0x9e, 0x09, 0x42, 0x01, 0x6d,
3253 0x08, 0x88, 0x09, 0x42, 0x11, 0x6d, 0x10, 0x24, 0x69, 0xc3, 0x42, 0x78,
3254 0x1f, 0x18, 0x84, 0x81, 0x18, 0x0c, 0x62, 0x40, 0x80, 0xc1, 0x18, 0x70,
3255 0x99, 0xb2, 0xfa, 0x82, 0x7a, 0x9b, 0x4b, 0xa3, 0x4b, 0x7b, 0x73, 0x9b,
3256 0x20, 0x14, 0xd2, 0x04, 0xa1, 0x98, 0x36, 0x2c, 0x43, 0x19, 0x7c, 0x66,
3257 0x10, 0x06, 0x67, 0x30, 0x9c, 0xc1, 0x00, 0x06, 0xc0, 0x06, 0x81, 0x0c,
3258 0xd0, 0x80, 0xc9, 0x94, 0xd5, 0x17, 0x55, 0x98, 0xdc, 0x59, 0x19, 0xdd,
3259 0x04, 0xa1, 0xa0, 0x26, 0x08, 0x84, 0xb3, 0x41, 0x90, 0xd8, 0x60, 0xc3,
3260 0x42, 0xa8, 0xc1, 0xb7, 0x06, 0x61, 0x00, 0x06, 0xc3, 0x19, 0x10, 0x60,
3261 0xd0, 0x06, 0x1b, 0x02, 0x37, 0xd8, 0x30, 0xa4, 0xc1, 0x1b, 0x00, 0x1b,
3262 0x0a, 0xae, 0x83, 0x83, 0x0c, 0xa8, 0xc2, 0xc6, 0x66, 0xd7, 0xe6, 0x92,
3263 0x46, 0x56, 0xe6, 0x46, 0x37, 0x25, 0x08, 0xaa, 0x90, 0xe1, 0xb9, 0xd8,
3264 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0x88, 0x26, 0x64, 0x78,
3265 0x2e, 0x76, 0x61, 0x6c, 0x76, 0x65, 0x72, 0x53, 0x02, 0xa3, 0x0e, 0x19,
3266 0x9e, 0xcb, 0x1c, 0x5a, 0x18, 0x59, 0x99, 0x5c, 0xd3, 0x1b, 0x59, 0x19,
3267 0xdb, 0x94, 0x00, 0x29, 0x43, 0x86, 0xe7, 0x22, 0x57, 0x36, 0xf7, 0x56,
3268 0x27, 0x37, 0x56, 0x36, 0x37, 0x25, 0xc0, 0xea, 0x90, 0xe1, 0xb9, 0xd8,
3269 0xa5, 0x95, 0xdd, 0x25, 0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d, 0x09,
3270 0xb4, 0x3a, 0x64, 0x78, 0x2e, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f,
3271 0x69, 0x6e, 0x74, 0x73, 0x53, 0x02, 0x38, 0x00, 0x00, 0x00, 0x00, 0x79,
3272 0x18, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
3273 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
3274 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
3275 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
3276 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
3277 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d,
3278 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87,
3279 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87,
3280 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30,
3281 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde,
3282 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b,
3283 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c,
3284 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
3285 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87,
3286 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87,
3287 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87,
3288 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0,
3289 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc,
3290 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4,
3291 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39,
3292 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38,
3293 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
3294 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03,
3295 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0,
3296 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0,
3297 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4, 0x30, 0x83, 0x81, 0xc8,
3298 0x01, 0x1f, 0xdc, 0x40, 0x1c, 0xe4, 0xa1, 0x1c, 0xc2, 0x61, 0x1d, 0xdc,
3299 0x40, 0x1c, 0xe4, 0x01, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x21,
3300 0x00, 0x00, 0x00, 0x06, 0x10, 0x6d, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0x70,
3301 0x54, 0x40, 0x68, 0x51, 0x04, 0x60, 0x46, 0xb0, 0x0d, 0x97, 0xef, 0x3c,
3302 0xbe, 0x10, 0x50, 0x45, 0x41, 0x44, 0xa5, 0x03, 0x0c, 0x25, 0x61, 0x00,
3303 0x02, 0xe6, 0x17, 0xb7, 0x6d, 0x05, 0xdb, 0x70, 0xf9, 0xce, 0xe3, 0x0b,
3304 0x01, 0x55, 0x14, 0x44, 0x54, 0x3a, 0xc0, 0x50, 0x12, 0x06, 0x20, 0x60,
3305 0x3e, 0x72, 0xdb, 0x66, 0x20, 0x0d, 0x97, 0xef, 0x3c, 0xbe, 0x10, 0x11,
3306 0xc0, 0x44, 0x84, 0x40, 0x33, 0x2c, 0x84, 0x05, 0x4c, 0xc3, 0xe5, 0x3b,
3307 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0xdb,
3308 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0x12, 0xc0, 0x3c, 0x0b, 0x51, 0x12,
3309 0x15, 0xb1, 0xf8, 0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8,
3310 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x03,
3311 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x13,
3312 0x04, 0x48, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x54,
3313 0x8d, 0x00, 0x50, 0x51, 0x02, 0x44, 0x14, 0x5f, 0xd9, 0x15, 0xc2, 0x0c,
3314 0x40, 0x29, 0x94, 0x1c, 0x0d, 0x63, 0x04, 0x20, 0x08, 0x82, 0x20, 0x18,
3315 0x8c, 0x00, 0x8c, 0x11, 0x80, 0x20, 0x08, 0xe2, 0xdf, 0x18, 0x01, 0x08,
3316 0x82, 0x20, 0xfe, 0x0b, 0x63, 0x04, 0x20, 0x08, 0x82, 0x20, 0x28, 0x00,
3317 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x81, 0x81,
3318 0x61, 0x79, 0x5e, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x56, 0x18,
3319 0x1c, 0xd5, 0xf7, 0x39, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x89,
3320 0x01, 0x72, 0x81, 0x01, 0x18, 0x3c, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60,
3321 0x60, 0xa0, 0x01, 0x13, 0x06, 0x61, 0x90, 0x2d, 0x23, 0x06, 0x09, 0x00,
3322 0x82, 0x60, 0x60, 0xa4, 0x41, 0x23, 0x06, 0x62, 0x00, 0x31, 0x23, 0x06,
3323 0x07, 0x00, 0x82, 0x60, 0x00, 0x9d, 0xc1, 0x33, 0x8c, 0xc1, 0x68, 0x42,
3324 0x00, 0x8c, 0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0x83,
3325 0x09, 0x87, 0x7c, 0x4c, 0x38, 0xe4, 0x63, 0x82, 0x01, 0x1f, 0x13, 0x0c,
3326 0xf8, 0x98, 0x30, 0xc9, 0xc7, 0x82, 0x08, 0x3e, 0x36, 0x54, 0xf2, 0xb1,
3327 0x60, 0x82, 0xcf, 0x88, 0xc1, 0x01, 0x80, 0x20, 0x18, 0x40, 0x74, 0xc0,
3328 0x41, 0x71, 0x30, 0x9a, 0x10, 0x04, 0x17, 0x10, 0x53, 0x81, 0x1c, 0x4c,
3329 0x09, 0x73, 0x50, 0xc3, 0x3c, 0x44, 0x70, 0x20, 0xc1, 0x21, 0x28, 0x03,
3330 0x43, 0x74, 0xc5, 0x67, 0x18, 0x66, 0xc4, 0xc7, 0xb2, 0x24, 0x3e, 0xb3,
3331 0x04, 0x87, 0x69, 0x48, 0x7c, 0x66, 0x09, 0x0e, 0xdb, 0x92, 0xf8, 0xcc,
3332 0x12, 0x1c, 0xb3, 0x04, 0x87, 0x71, 0x4a, 0x7c, 0x66, 0x09, 0x0e, 0xeb,
3333 0x9a, 0xf8, 0x98, 0xc7, 0xc4, 0x67, 0x96, 0xe0, 0x18, 0xe8, 0x19, 0x08,
3334 0xc3, 0x2b, 0x3c, 0xc2, 0x1b, 0x40, 0x41, 0x10, 0x85, 0x80, 0x14, 0x80,
3335 0x81, 0x9e, 0x81, 0x30, 0x90, 0x42, 0x14, 0x08, 0x52, 0x18, 0x18, 0x01,
3336 0x0a, 0x4c, 0x01, 0x18, 0xe8, 0x19, 0x48, 0xc1, 0x30, 0x85, 0xc2, 0x23,
3337 0x98, 0x41, 0x0c, 0x04, 0x28, 0x40, 0x05, 0x60, 0xc4, 0xe0, 0x00, 0x40,
3338 0x10, 0x0c, 0x26, 0x51, 0x58, 0x83, 0x0f, 0x14, 0x46, 0x13, 0x02, 0xe0,
3339 0x82, 0xa1, 0xee, 0x19, 0x6a, 0xc4, 0xe0, 0x01, 0x40, 0x10, 0x0c, 0x1a,
3340 0x54, 0x80, 0x83, 0x32, 0x20, 0x83, 0xc3, 0x28, 0x82, 0x36, 0x68, 0x83,
3341 0x36, 0x10, 0x46, 0x13, 0x02, 0x60, 0x34, 0x41, 0x08, 0x46, 0x13, 0x06,
3342 0x61, 0x34, 0x81, 0x18, 0x46, 0x0c, 0x12, 0x00, 0x04, 0xc1, 0x00, 0x71,
3343 0x85, 0x38, 0x40, 0x05, 0x54, 0x00, 0x05, 0x62, 0xc4, 0x20, 0x01, 0x40,
3344 0x10, 0x0c, 0x10, 0x57, 0x88, 0x03, 0x54, 0x40, 0x05, 0x3b, 0x18, 0x46,
3345 0x0c, 0x12, 0x00, 0x04, 0xc1, 0x00, 0x71, 0x85, 0x38, 0x40, 0x05, 0x54,
3346 0xf8, 0x03, 0x61, 0xc4, 0x20, 0x01, 0x40, 0x10, 0x0c, 0x10, 0x57, 0x88,
3347 0x03, 0x54, 0x40, 0x05, 0x3f, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
3348 0x00, 0x00, 0x00
3349};
diff --git a/contrib/SDL-3.2.8/src/gpu/d3d12/D3D_Blit.hlsl b/contrib/SDL-3.2.8/src/gpu/d3d12/D3D_Blit.hlsl
new file mode 100644
index 0000000..69748d4
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/d3d12/D3D_Blit.hlsl
@@ -0,0 +1,97 @@
1#define BlitRS \
2 "DescriptorTable ( Sampler(s0, space=2), visibility = SHADER_VISIBILITY_PIXEL ),"\
3 "DescriptorTable ( SRV(t0, space=2), visibility = SHADER_VISIBILITY_PIXEL ),"\
4 "CBV(b0, space=3, visibility = SHADER_VISIBILITY_PIXEL),"\
5
6struct VertexToPixel
7{
8 float2 tex : TEXCOORD0;
9 float4 pos : SV_POSITION;
10};
11
12cbuffer SourceRegionBuffer : register(b0, space3)
13{
14 float2 UVLeftTop;
15 float2 UVDimensions;
16 uint MipLevel;
17 float LayerOrDepth;
18};
19
20Texture2D SourceTexture2D : register(t0, space2);
21Texture2DArray SourceTexture2DArray : register(t0, space2);
22Texture3D SourceTexture3D : register(t0, space2);
23TextureCube SourceTextureCube : register(t0, space2);
24TextureCubeArray SourceTextureCubeArray : register(t0, space2);
25sampler SourceSampler : register(s0, space2);
26
27[RootSignature(BlitRS)]
28VertexToPixel FullscreenVert(uint vI : SV_VERTEXID)
29{
30 float2 inTex = float2((vI << 1) & 2, vI & 2);
31 VertexToPixel Out = (VertexToPixel)0;
32 Out.tex = inTex;
33 Out.pos = float4(inTex * float2(2.0f, -2.0f) + float2(-1.0f, 1.0f), 0.0f, 1.0f);
34 return Out;
35}
36
37[RootSignature(BlitRS)]
38float4 BlitFrom2D(VertexToPixel input) : SV_Target0
39{
40 float2 newCoord = UVLeftTop + UVDimensions * input.tex;
41 return SourceTexture2D.SampleLevel(SourceSampler, newCoord, MipLevel);
42}
43
44[RootSignature(BlitRS)]
45float4 BlitFrom2DArray(VertexToPixel input) : SV_Target0
46{
47 float3 newCoord = float3(UVLeftTop + UVDimensions * input.tex, (uint)LayerOrDepth);
48 return SourceTexture2DArray.SampleLevel(SourceSampler, newCoord, MipLevel);
49}
50
51[RootSignature(BlitRS)]
52float4 BlitFrom3D(VertexToPixel input) : SV_Target0
53{
54 float3 newCoord = float3(UVLeftTop + UVDimensions * input.tex, LayerOrDepth);
55 return SourceTexture3D.SampleLevel(SourceSampler, newCoord, MipLevel);
56}
57
58[RootSignature(BlitRS)]
59float4 BlitFromCube(VertexToPixel input) : SV_Target0
60{
61 // Thanks, Wikipedia! https://en.wikipedia.org/wiki/Cube_mapping
62 float3 newCoord;
63 float2 scaledUV = UVLeftTop + UVDimensions * input.tex;
64 float u = 2.0 * scaledUV.x - 1.0;
65 float v = 2.0 * scaledUV.y - 1.0;
66 switch ((uint)LayerOrDepth) {
67 case 0: newCoord = float3(1.0, -v, -u); break; // POSITIVE X
68 case 1: newCoord = float3(-1.0, -v, u); break; // NEGATIVE X
69 case 2: newCoord = float3(u, 1.0, -v); break; // POSITIVE Y
70 case 3: newCoord = float3(u, -1.0, v); break; // NEGATIVE Y
71 case 4: newCoord = float3(u, -v, 1.0); break; // POSITIVE Z
72 case 5: newCoord = float3(-u, -v, -1.0); break; // NEGATIVE Z
73 default: newCoord = float3(0, 0, 0); break; // silences warning
74 }
75 return SourceTextureCube.SampleLevel(SourceSampler, newCoord, MipLevel);
76}
77
78[RootSignature(BlitRS)]
79float4 BlitFromCubeArray(VertexToPixel input) : SV_Target0
80{
81 // Thanks, Wikipedia! https://en.wikipedia.org/wiki/Cube_mapping
82 float3 newCoord;
83 float2 scaledUV = UVLeftTop + UVDimensions * input.tex;
84 float u = 2.0 * scaledUV.x - 1.0;
85 float v = 2.0 * scaledUV.y - 1.0;
86 uint ArrayIndex = (uint)LayerOrDepth / 6;
87 switch ((uint)LayerOrDepth % 6) {
88 case 0: newCoord = float3(1.0, -v, -u); break; // POSITIVE X
89 case 1: newCoord = float3(-1.0, -v, u); break; // NEGATIVE X
90 case 2: newCoord = float3(u, 1.0, -v); break; // POSITIVE Y
91 case 3: newCoord = float3(u, -1.0, v); break; // NEGATIVE Y
92 case 4: newCoord = float3(u, -v, 1.0); break; // POSITIVE Z
93 case 5: newCoord = float3(-u, -v, -1.0); break; // NEGATIVE Z
94 default: newCoord = float3(0, 0, 0); break; // silences warning
95 }
96 return SourceTextureCubeArray.SampleLevel(SourceSampler, float4(newCoord, float(ArrayIndex)), MipLevel);
97}
diff --git a/contrib/SDL-3.2.8/src/gpu/d3d12/SDL_gpu_d3d12.c b/contrib/SDL-3.2.8/src/gpu/d3d12/SDL_gpu_d3d12.c
new file mode 100644
index 0000000..be13d8d
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/d3d12/SDL_gpu_d3d12.c
@@ -0,0 +1,9113 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#include "SDL_internal.h"
23
24#ifdef SDL_GPU_D3D12
25
26#include "../../core/windows/SDL_windows.h"
27#include "../../video/directx/SDL_d3d12.h"
28#include "../SDL_sysgpu.h"
29
30#ifdef __IDXGIInfoQueue_INTERFACE_DEFINED__
31#define HAVE_IDXGIINFOQUEUE
32#endif
33
34// Built-in shaders, compiled with compile_shaders.bat
35
36#define g_FullscreenVert D3D12_FullscreenVert
37#define g_BlitFrom2D D3D12_BlitFrom2D
38#define g_BlitFrom2DArray D3D12_BlitFrom2DArray
39#define g_BlitFrom3D D3D12_BlitFrom3D
40#define g_BlitFromCube D3D12_BlitFromCube
41#define g_BlitFromCubeArray D3D12_BlitFromCubeArray
42#if defined(SDL_PLATFORM_XBOXSERIES)
43#include "D3D12_Blit_Series.h"
44#elif defined(SDL_PLATFORM_XBOXONE)
45#include "D3D12_Blit_One.h"
46#else
47#include "D3D12_Blit.h"
48#endif
49#undef g_FullscreenVert
50#undef g_BlitFrom2D
51#undef g_BlitFrom2DArray
52#undef g_BlitFrom3D
53#undef g_BlitFromCube
54#undef g_BlitFromCubeArray
55
56// Macros
57
58#define SET_ERROR(fmt, msg) \
59 do { \
60 if (renderer->debug_mode) { \
61 SDL_LogError(SDL_LOG_CATEGORY_GPU, fmt, msg); \
62 } \
63 SDL_SetError(fmt, msg); \
64 } while (0)
65
66#define SET_ERROR_AND_RETURN(fmt, msg, ret) \
67 do { \
68 if (renderer->debug_mode) { \
69 SDL_LogError(SDL_LOG_CATEGORY_GPU, fmt, msg); \
70 } \
71 SDL_SetError(fmt, msg); \
72 return ret; \
73 } while (0)
74
75#define SET_STRING_ERROR_AND_RETURN(msg, ret) SET_ERROR_AND_RETURN("%s", msg, ret)
76
77#define CHECK_D3D12_ERROR_AND_RETURN(msg, ret) \
78 do { \
79 if (FAILED(res)) { \
80 D3D12_INTERNAL_SetError(renderer, msg, res); \
81 return (ret); \
82 } \
83 } while (0)
84
85// Defines
86#if defined(_WIN32)
87#if defined(SDL_PLATFORM_XBOXSERIES)
88#define D3D12_DLL "d3d12_xs.dll"
89#elif defined(SDL_PLATFORM_XBOXONE)
90#define D3D12_DLL "d3d12_x.dll"
91#else
92#define D3D12_DLL "d3d12.dll"
93#endif
94#define DXGI_DLL "dxgi.dll"
95#define DXGIDEBUG_DLL "dxgidebug.dll"
96#elif defined(__APPLE__)
97#define D3D12_DLL "libdxvk_d3d12.dylib"
98#define DXGI_DLL "libdxvk_dxgi.dylib"
99#define DXGIDEBUG_DLL "libdxvk_dxgidebug.dylib"
100#else
101#define D3D12_DLL "libdxvk_d3d12.so"
102#define DXGI_DLL "libdxvk_dxgi.so"
103#define DXGIDEBUG_DLL "libdxvk_dxgidebug.so"
104#endif
105
106#define D3D12_CREATE_DEVICE_FUNC "D3D12CreateDevice"
107#define D3D12_SERIALIZE_ROOT_SIGNATURE_FUNC "D3D12SerializeRootSignature"
108#define CREATE_DXGI_FACTORY1_FUNC "CreateDXGIFactory1"
109#define DXGI_GET_DEBUG_INTERFACE_FUNC "DXGIGetDebugInterface"
110#define D3D12_GET_DEBUG_INTERFACE_FUNC "D3D12GetDebugInterface"
111#define WINDOW_PROPERTY_DATA "SDL_GPUD3D12WindowPropertyData"
112#define D3D_FEATURE_LEVEL_CHOICE D3D_FEATURE_LEVEL_11_1
113#define D3D_FEATURE_LEVEL_CHOICE_STR "11_1"
114#define MAX_ROOT_SIGNATURE_PARAMETERS 64
115#define D3D12_FENCE_UNSIGNALED_VALUE 0
116#define D3D12_FENCE_SIGNAL_VALUE 1
117// TODO: do these need to be tuned?
118#define VIEW_GPU_DESCRIPTOR_COUNT 65536
119#define SAMPLER_GPU_DESCRIPTOR_COUNT 2048
120#define STAGING_HEAP_DESCRIPTOR_COUNT 1024
121
122#define SDL_GPU_SHADERSTAGE_COMPUTE (SDL_GPUShaderStage)2
123
124#define EXPAND_ELEMENTS_IF_NEEDED(arr, initialValue, type) \
125 if (arr->count == arr->capacity) { \
126 if (arr->capacity == 0) { \
127 arr->capacity = initialValue; \
128 } else { \
129 arr->capacity *= 2; \
130 } \
131 arr->elements = (type *)SDL_realloc( \
132 arr->elements, \
133 arr->capacity * sizeof(type)); \
134 }
135
136#ifdef _WIN32
137#define HRESULT_FMT "(0x%08lX)"
138#else
139#define HRESULT_FMT "(0x%08X)"
140#endif
141
142// Function Pointer Signatures
143typedef HRESULT(WINAPI *PFN_CREATE_DXGI_FACTORY1)(const GUID *riid, void **ppFactory);
144typedef HRESULT(WINAPI *PFN_DXGI_GET_DEBUG_INTERFACE)(const GUID *riid, void **ppDebug);
145
146// IIDs (from https://www.magnumdb.com/)
147static const IID D3D_IID_IDXGIFactory1 = { 0x770aae78, 0xf26f, 0x4dba, { 0xa8, 0x29, 0x25, 0x3c, 0x83, 0xd1, 0xb3, 0x87 } };
148static const IID D3D_IID_IDXGIFactory4 = { 0x1bc6ea02, 0xef36, 0x464f, { 0xbf, 0x0c, 0x21, 0xca, 0x39, 0xe5, 0x16, 0x8a } };
149static const IID D3D_IID_IDXGIFactory5 = { 0x7632e1f5, 0xee65, 0x4dca, { 0x87, 0xfd, 0x84, 0xcd, 0x75, 0xf8, 0x83, 0x8d } };
150static const IID D3D_IID_IDXGIFactory6 = { 0xc1b6694f, 0xff09, 0x44a9, { 0xb0, 0x3c, 0x77, 0x90, 0x0a, 0x0a, 0x1d, 0x17 } };
151static const IID D3D_IID_IDXGIAdapter1 = { 0x29038f61, 0x3839, 0x4626, { 0x91, 0xfd, 0x08, 0x68, 0x79, 0x01, 0x1a, 0x05 } };
152#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
153static const IID D3D_IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } };
154#else
155static const IID D3D_IID_IDXGIDevice = { 0x54ec77fa, 0x1377, 0x44e6, { 0x8c, 0x32, 0x88, 0xfd, 0x5f, 0x44, 0xc8, 0x4c } };
156#endif
157static const IID D3D_IID_IDXGISwapChain3 = { 0x94d99bdb, 0xf1f8, 0x4ab0, { 0xb2, 0x36, 0x7d, 0xa0, 0x17, 0x0e, 0xda, 0xb1 } };
158#ifdef HAVE_IDXGIINFOQUEUE
159static const IID D3D_IID_IDXGIDebug = { 0x119e7452, 0xde9e, 0x40fe, { 0x88, 0x06, 0x88, 0xf9, 0x0c, 0x12, 0xb4, 0x41 } };
160static const IID D3D_IID_IDXGIInfoQueue = { 0xd67441c7, 0x672a, 0x476f, { 0x9e, 0x82, 0xcd, 0x55, 0xb4, 0x49, 0x49, 0xce } };
161#endif
162static const GUID D3D_IID_DXGI_DEBUG_ALL = { 0xe48ae283, 0xda80, 0x490b, { 0x87, 0xe6, 0x43, 0xe9, 0xa9, 0xcf, 0xda, 0x08 } };
163
164static const IID D3D_IID_ID3D12Device = { 0x189819f1, 0x1db6, 0x4b57, { 0xbe, 0x54, 0x18, 0x21, 0x33, 0x9b, 0x85, 0xf7 } };
165static const IID D3D_IID_ID3D12CommandQueue = { 0x0ec870a6, 0x5d7e, 0x4c22, { 0x8c, 0xfc, 0x5b, 0xaa, 0xe0, 0x76, 0x16, 0xed } };
166static const IID D3D_IID_ID3D12DescriptorHeap = { 0x8efb471d, 0x616c, 0x4f49, { 0x90, 0xf7, 0x12, 0x7b, 0xb7, 0x63, 0xfa, 0x51 } };
167static const IID D3D_IID_ID3D12Resource = { 0x696442be, 0xa72e, 0x4059, { 0xbc, 0x79, 0x5b, 0x5c, 0x98, 0x04, 0x0f, 0xad } };
168static const IID D3D_IID_ID3D12CommandAllocator = { 0x6102dee4, 0xaf59, 0x4b09, { 0xb9, 0x99, 0xb4, 0x4d, 0x73, 0xf0, 0x9b, 0x24 } };
169static const IID D3D_IID_ID3D12CommandList = { 0x7116d91c, 0xe7e4, 0x47ce, { 0xb8, 0xc6, 0xec, 0x81, 0x68, 0xf4, 0x37, 0xe5 } };
170static const IID D3D_IID_ID3D12GraphicsCommandList = { 0x5b160d0f, 0xac1b, 0x4185, { 0x8b, 0xa8, 0xb3, 0xae, 0x42, 0xa5, 0xa4, 0x55 } };
171static const IID D3D_IID_ID3D12Fence = { 0x0a753dcf, 0xc4d8, 0x4b91, { 0xad, 0xf6, 0xbe, 0x5a, 0x60, 0xd9, 0x5a, 0x76 } };
172static const IID D3D_IID_ID3D12RootSignature = { 0xc54a6b66, 0x72df, 0x4ee8, { 0x8b, 0xe5, 0xa9, 0x46, 0xa1, 0x42, 0x92, 0x14 } };
173static const IID D3D_IID_ID3D12CommandSignature = { 0xc36a797c, 0xec80, 0x4f0a, { 0x89, 0x85, 0xa7, 0xb2, 0x47, 0x50, 0x82, 0xd1 } };
174static const IID D3D_IID_ID3D12PipelineState = { 0x765a30f3, 0xf624, 0x4c6f, { 0xa8, 0x28, 0xac, 0xe9, 0x48, 0x62, 0x24, 0x45 } };
175static const IID D3D_IID_ID3D12Debug = { 0x344488b7, 0x6846, 0x474b, { 0xb9, 0x89, 0xf0, 0x27, 0x44, 0x82, 0x45, 0xe0 } };
176static const IID D3D_IID_ID3D12InfoQueue = { 0x0742a90b, 0xc387, 0x483f, { 0xb9, 0x46, 0x30, 0xa7, 0xe4, 0xe6, 0x14, 0x58 } };
177static const IID D3D_IID_ID3D12InfoQueue1 = { 0x2852dd88, 0xb484, 0x4c0c, { 0xb6, 0xb1, 0x67, 0x16, 0x85, 0x00, 0xe6, 0x00 } };
178
179// Enums
180
181typedef enum D3D12BufferType
182{
183 D3D12_BUFFER_TYPE_GPU,
184 D3D12_BUFFER_TYPE_UNIFORM,
185 D3D12_BUFFER_TYPE_UPLOAD,
186 D3D12_BUFFER_TYPE_DOWNLOAD
187} D3D12BufferType;
188
189// Conversions
190
191static SDL_GPUTextureFormat SwapchainCompositionToSDLTextureFormat[] = {
192 SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM, // SDR
193 SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB, // SDR_LINEAR
194 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT, // HDR_EXTENDED_LINEAR
195 SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM, // HDR10_ST2084
196};
197
198static DXGI_FORMAT SwapchainCompositionToTextureFormat[] = {
199 DXGI_FORMAT_B8G8R8A8_UNORM, // SDR
200 DXGI_FORMAT_B8G8R8A8_UNORM, // SDR_LINEAR (NOTE: The RTV uses the sRGB format)
201 DXGI_FORMAT_R16G16B16A16_FLOAT, // HDR_EXTENDED_LINEAR
202 DXGI_FORMAT_R10G10B10A2_UNORM, // HDR10_ST2084
203};
204
205static DXGI_COLOR_SPACE_TYPE SwapchainCompositionToColorSpace[] = {
206 DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709, // SDR
207 DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709, // SDR_LINEAR
208 DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709, // HDR_EXTENDED_LINEAR
209 DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 // HDR10_ST2084
210};
211
212static D3D12_BLEND SDLToD3D12_BlendFactor[] = {
213 D3D12_BLEND_ZERO, // INVALID
214 D3D12_BLEND_ZERO, // ZERO
215 D3D12_BLEND_ONE, // ONE
216 D3D12_BLEND_SRC_COLOR, // SRC_COLOR
217 D3D12_BLEND_INV_SRC_COLOR, // ONE_MINUS_SRC_COLOR
218 D3D12_BLEND_DEST_COLOR, // DST_COLOR
219 D3D12_BLEND_INV_DEST_COLOR, // ONE_MINUS_DST_COLOR
220 D3D12_BLEND_SRC_ALPHA, // SRC_ALPHA
221 D3D12_BLEND_INV_SRC_ALPHA, // ONE_MINUS_SRC_ALPHA
222 D3D12_BLEND_DEST_ALPHA, // DST_ALPHA
223 D3D12_BLEND_INV_DEST_ALPHA, // ONE_MINUS_DST_ALPHA
224 D3D12_BLEND_BLEND_FACTOR, // CONSTANT_COLOR
225 D3D12_BLEND_INV_BLEND_FACTOR, // ONE_MINUS_CONSTANT_COLOR
226 D3D12_BLEND_SRC_ALPHA_SAT, // SRC_ALPHA_SATURATE
227};
228SDL_COMPILE_TIME_ASSERT(SDLToD3D12_BlendFactor, SDL_arraysize(SDLToD3D12_BlendFactor) == SDL_GPU_BLENDFACTOR_MAX_ENUM_VALUE);
229
230static D3D12_BLEND SDLToD3D12_BlendFactorAlpha[] = {
231 D3D12_BLEND_ZERO, // INVALID
232 D3D12_BLEND_ZERO, // ZERO
233 D3D12_BLEND_ONE, // ONE
234 D3D12_BLEND_SRC_ALPHA, // SRC_COLOR
235 D3D12_BLEND_INV_SRC_ALPHA, // ONE_MINUS_SRC_COLOR
236 D3D12_BLEND_DEST_ALPHA, // DST_COLOR
237 D3D12_BLEND_INV_DEST_ALPHA, // ONE_MINUS_DST_COLOR
238 D3D12_BLEND_SRC_ALPHA, // SRC_ALPHA
239 D3D12_BLEND_INV_SRC_ALPHA, // ONE_MINUS_SRC_ALPHA
240 D3D12_BLEND_DEST_ALPHA, // DST_ALPHA
241 D3D12_BLEND_INV_DEST_ALPHA, // ONE_MINUS_DST_ALPHA
242 D3D12_BLEND_BLEND_FACTOR, // CONSTANT_COLOR
243 D3D12_BLEND_INV_BLEND_FACTOR, // ONE_MINUS_CONSTANT_COLOR
244 D3D12_BLEND_SRC_ALPHA_SAT, // SRC_ALPHA_SATURATE
245};
246SDL_COMPILE_TIME_ASSERT(SDLToD3D12_BlendFactorAlpha, SDL_arraysize(SDLToD3D12_BlendFactorAlpha) == SDL_GPU_BLENDFACTOR_MAX_ENUM_VALUE);
247
248static D3D12_BLEND_OP SDLToD3D12_BlendOp[] = {
249 D3D12_BLEND_OP_ADD, // INVALID
250 D3D12_BLEND_OP_ADD, // ADD
251 D3D12_BLEND_OP_SUBTRACT, // SUBTRACT
252 D3D12_BLEND_OP_REV_SUBTRACT, // REVERSE_SUBTRACT
253 D3D12_BLEND_OP_MIN, // MIN
254 D3D12_BLEND_OP_MAX // MAX
255};
256SDL_COMPILE_TIME_ASSERT(SDLToD3D12_BlendOp, SDL_arraysize(SDLToD3D12_BlendOp) == SDL_GPU_BLENDOP_MAX_ENUM_VALUE);
257
258// These are actually color formats.
259// For some genius reason, D3D12 splits format capabilites for depth-stencil views.
260static DXGI_FORMAT SDLToD3D12_TextureFormat[] = {
261 DXGI_FORMAT_UNKNOWN, // INVALID
262 DXGI_FORMAT_A8_UNORM, // A8_UNORM
263 DXGI_FORMAT_R8_UNORM, // R8_UNORM
264 DXGI_FORMAT_R8G8_UNORM, // R8G8_UNORM
265 DXGI_FORMAT_R8G8B8A8_UNORM, // R8G8B8A8_UNORM
266 DXGI_FORMAT_R16_UNORM, // R16_UNORM
267 DXGI_FORMAT_R16G16_UNORM, // R16G16_UNORM
268 DXGI_FORMAT_R16G16B16A16_UNORM, // R16G16B16A16_UNORM
269 DXGI_FORMAT_R10G10B10A2_UNORM, // R10G10B10A2_UNORM
270 DXGI_FORMAT_B5G6R5_UNORM, // B5G6R5_UNORM
271 DXGI_FORMAT_B5G5R5A1_UNORM, // B5G5R5A1_UNORM
272 DXGI_FORMAT_B4G4R4A4_UNORM, // B4G4R4A4_UNORM
273 DXGI_FORMAT_B8G8R8A8_UNORM, // B8G8R8A8_UNORM
274 DXGI_FORMAT_BC1_UNORM, // BC1_UNORM
275 DXGI_FORMAT_BC2_UNORM, // BC2_UNORM
276 DXGI_FORMAT_BC3_UNORM, // BC3_UNORM
277 DXGI_FORMAT_BC4_UNORM, // BC4_UNORM
278 DXGI_FORMAT_BC5_UNORM, // BC5_UNORM
279 DXGI_FORMAT_BC7_UNORM, // BC7_UNORM
280 DXGI_FORMAT_BC6H_SF16, // BC6H_FLOAT
281 DXGI_FORMAT_BC6H_UF16, // BC6H_UFLOAT
282 DXGI_FORMAT_R8_SNORM, // R8_SNORM
283 DXGI_FORMAT_R8G8_SNORM, // R8G8_SNORM
284 DXGI_FORMAT_R8G8B8A8_SNORM, // R8G8B8A8_SNORM
285 DXGI_FORMAT_R16_SNORM, // R16_SNORM
286 DXGI_FORMAT_R16G16_SNORM, // R16G16_SNORM
287 DXGI_FORMAT_R16G16B16A16_SNORM, // R16G16B16A16_SNORM
288 DXGI_FORMAT_R16_FLOAT, // R16_FLOAT
289 DXGI_FORMAT_R16G16_FLOAT, // R16G16_FLOAT
290 DXGI_FORMAT_R16G16B16A16_FLOAT, // R16G16B16A16_FLOAT
291 DXGI_FORMAT_R32_FLOAT, // R32_FLOAT
292 DXGI_FORMAT_R32G32_FLOAT, // R32G32_FLOAT
293 DXGI_FORMAT_R32G32B32A32_FLOAT, // R32G32B32A32_FLOAT
294 DXGI_FORMAT_R11G11B10_FLOAT, // R11G11B10_UFLOAT
295 DXGI_FORMAT_R8_UINT, // R8_UINT
296 DXGI_FORMAT_R8G8_UINT, // R8G8_UINT
297 DXGI_FORMAT_R8G8B8A8_UINT, // R8G8B8A8_UINT
298 DXGI_FORMAT_R16_UINT, // R16_UINT
299 DXGI_FORMAT_R16G16_UINT, // R16G16_UINT
300 DXGI_FORMAT_R16G16B16A16_UINT, // R16G16B16A16_UINT
301 DXGI_FORMAT_R32_UINT, // R32_UINT
302 DXGI_FORMAT_R32G32_UINT, // R32G32_UINT
303 DXGI_FORMAT_R32G32B32A32_UINT, // R32G32B32A32_UINT
304 DXGI_FORMAT_R8_SINT, // R8_INT
305 DXGI_FORMAT_R8G8_SINT, // R8G8_INT
306 DXGI_FORMAT_R8G8B8A8_SINT, // R8G8B8A8_INT
307 DXGI_FORMAT_R16_SINT, // R16_INT
308 DXGI_FORMAT_R16G16_SINT, // R16G16_INT
309 DXGI_FORMAT_R16G16B16A16_SINT, // R16G16B16A16_INT
310 DXGI_FORMAT_R32_SINT, // R32_INT
311 DXGI_FORMAT_R32G32_SINT, // R32G32_INT
312 DXGI_FORMAT_R32G32B32A32_SINT, // R32G32B32A32_INT
313 DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, // R8G8B8A8_UNORM_SRGB
314 DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, // B8G8R8A8_UNORM_SRGB
315 DXGI_FORMAT_BC1_UNORM_SRGB, // BC1_UNORM_SRGB
316 DXGI_FORMAT_BC2_UNORM_SRGB, // BC2_UNORM_SRGB
317 DXGI_FORMAT_BC3_UNORM_SRGB, // BC3_UNORM_SRGB
318 DXGI_FORMAT_BC7_UNORM_SRGB, // BC7_UNORM_SRGB
319 DXGI_FORMAT_R16_UNORM, // D16_UNORM
320 DXGI_FORMAT_R24_UNORM_X8_TYPELESS, // D24_UNORM
321 DXGI_FORMAT_R32_FLOAT, // D32_FLOAT
322 DXGI_FORMAT_R24_UNORM_X8_TYPELESS, // D24_UNORM_S8_UINT
323 DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, // D32_FLOAT_S8_UINT
324 DXGI_FORMAT_UNKNOWN, // ASTC_4x4_UNORM
325 DXGI_FORMAT_UNKNOWN, // ASTC_5x4_UNORM
326 DXGI_FORMAT_UNKNOWN, // ASTC_5x5_UNORM
327 DXGI_FORMAT_UNKNOWN, // ASTC_6x5_UNORM
328 DXGI_FORMAT_UNKNOWN, // ASTC_6x6_UNORM
329 DXGI_FORMAT_UNKNOWN, // ASTC_8x5_UNORM
330 DXGI_FORMAT_UNKNOWN, // ASTC_8x6_UNORM
331 DXGI_FORMAT_UNKNOWN, // ASTC_8x8_UNORM
332 DXGI_FORMAT_UNKNOWN, // ASTC_10x5_UNORM
333 DXGI_FORMAT_UNKNOWN, // ASTC_10x6_UNORM
334 DXGI_FORMAT_UNKNOWN, // ASTC_10x8_UNORM
335 DXGI_FORMAT_UNKNOWN, // ASTC_10x10_UNORM
336 DXGI_FORMAT_UNKNOWN, // ASTC_12x10_UNORM
337 DXGI_FORMAT_UNKNOWN, // ASTC_12x12_UNORM
338 DXGI_FORMAT_UNKNOWN, // ASTC_4x4_UNORM_SRGB
339 DXGI_FORMAT_UNKNOWN, // ASTC_5x4_UNORM_SRGB
340 DXGI_FORMAT_UNKNOWN, // ASTC_5x5_UNORM_SRGB
341 DXGI_FORMAT_UNKNOWN, // ASTC_6x5_UNORM_SRGB
342 DXGI_FORMAT_UNKNOWN, // ASTC_6x6_UNORM_SRGB
343 DXGI_FORMAT_UNKNOWN, // ASTC_8x5_UNORM_SRGB
344 DXGI_FORMAT_UNKNOWN, // ASTC_8x6_UNORM_SRGB
345 DXGI_FORMAT_UNKNOWN, // ASTC_8x8_UNORM_SRGB
346 DXGI_FORMAT_UNKNOWN, // ASTC_10x5_UNORM_SRGB
347 DXGI_FORMAT_UNKNOWN, // ASTC_10x6_UNORM_SRGB
348 DXGI_FORMAT_UNKNOWN, // ASTC_10x8_UNORM_SRGB
349 DXGI_FORMAT_UNKNOWN, // ASTC_10x10_UNORM_SRGB
350 DXGI_FORMAT_UNKNOWN, // ASTC_12x10_UNORM_SRGB
351 DXGI_FORMAT_UNKNOWN, // ASTC_12x12_UNORM_SRGB
352 DXGI_FORMAT_UNKNOWN, // ASTC_4x4_FLOAT
353 DXGI_FORMAT_UNKNOWN, // ASTC_5x4_FLOAT
354 DXGI_FORMAT_UNKNOWN, // ASTC_5x5_FLOAT
355 DXGI_FORMAT_UNKNOWN, // ASTC_6x5_FLOAT
356 DXGI_FORMAT_UNKNOWN, // ASTC_6x6_FLOAT
357 DXGI_FORMAT_UNKNOWN, // ASTC_8x5_FLOAT
358 DXGI_FORMAT_UNKNOWN, // ASTC_8x6_FLOAT
359 DXGI_FORMAT_UNKNOWN, // ASTC_8x8_FLOAT
360 DXGI_FORMAT_UNKNOWN, // ASTC_10x5_FLOAT
361 DXGI_FORMAT_UNKNOWN, // ASTC_10x6_FLOAT
362 DXGI_FORMAT_UNKNOWN, // ASTC_10x8_FLOAT
363 DXGI_FORMAT_UNKNOWN, // ASTC_10x10_FLOAT
364 DXGI_FORMAT_UNKNOWN, // ASTC_12x10_FLOAT
365 DXGI_FORMAT_UNKNOWN, // ASTC_12x12_FLOAT
366};
367SDL_COMPILE_TIME_ASSERT(SDLToD3D12_TextureFormat, SDL_arraysize(SDLToD3D12_TextureFormat) == SDL_GPU_TEXTUREFORMAT_MAX_ENUM_VALUE);
368
369static DXGI_FORMAT SDLToD3D12_DepthFormat[] = {
370 DXGI_FORMAT_UNKNOWN, // INVALID
371 DXGI_FORMAT_UNKNOWN, // A8_UNORM
372 DXGI_FORMAT_UNKNOWN, // R8_UNORM
373 DXGI_FORMAT_UNKNOWN, // R8G8_UNORM
374 DXGI_FORMAT_UNKNOWN, // R8G8B8A8_UNORM
375 DXGI_FORMAT_UNKNOWN, // R16_UNORM
376 DXGI_FORMAT_UNKNOWN, // R16G16_UNORM
377 DXGI_FORMAT_UNKNOWN, // R16G16B16A16_UNORM
378 DXGI_FORMAT_UNKNOWN, // R10G10B10A2_UNORM
379 DXGI_FORMAT_UNKNOWN, // B5G6R5_UNORM
380 DXGI_FORMAT_UNKNOWN, // B5G5R5A1_UNORM
381 DXGI_FORMAT_UNKNOWN, // B4G4R4A4_UNORM
382 DXGI_FORMAT_UNKNOWN, // B8G8R8A8_UNORM
383 DXGI_FORMAT_UNKNOWN, // BC1_UNORM
384 DXGI_FORMAT_UNKNOWN, // BC2_UNORM
385 DXGI_FORMAT_UNKNOWN, // BC3_UNORM
386 DXGI_FORMAT_UNKNOWN, // BC4_UNORM
387 DXGI_FORMAT_UNKNOWN, // BC5_UNORM
388 DXGI_FORMAT_UNKNOWN, // BC7_UNORM
389 DXGI_FORMAT_UNKNOWN, // BC6H_FLOAT
390 DXGI_FORMAT_UNKNOWN, // BC6H_UFLOAT
391 DXGI_FORMAT_UNKNOWN, // R8_SNORM
392 DXGI_FORMAT_UNKNOWN, // R8G8_SNORM
393 DXGI_FORMAT_UNKNOWN, // R8G8B8A8_SNORM
394 DXGI_FORMAT_UNKNOWN, // R16_SNORM
395 DXGI_FORMAT_UNKNOWN, // R16G16_SNORM
396 DXGI_FORMAT_UNKNOWN, // R16G16B16A16_SNORM
397 DXGI_FORMAT_UNKNOWN, // R16_FLOAT
398 DXGI_FORMAT_UNKNOWN, // R16G16_FLOAT
399 DXGI_FORMAT_UNKNOWN, // R16G16B16A16_FLOAT
400 DXGI_FORMAT_UNKNOWN, // R32_FLOAT
401 DXGI_FORMAT_UNKNOWN, // R32G32_FLOAT
402 DXGI_FORMAT_UNKNOWN, // R32G32B32A32_FLOAT
403 DXGI_FORMAT_UNKNOWN, // R11G11B10_UFLOAT
404 DXGI_FORMAT_UNKNOWN, // R8_UINT
405 DXGI_FORMAT_UNKNOWN, // R8G8_UINT
406 DXGI_FORMAT_UNKNOWN, // R8G8B8A8_UINT
407 DXGI_FORMAT_UNKNOWN, // R16_UINT
408 DXGI_FORMAT_UNKNOWN, // R16G16_UINT
409 DXGI_FORMAT_UNKNOWN, // R16G16B16A16_UINT
410 DXGI_FORMAT_UNKNOWN, // R32_UINT
411 DXGI_FORMAT_UNKNOWN, // R32G32_UINT
412 DXGI_FORMAT_UNKNOWN, // R32G32B32A32_UINT
413 DXGI_FORMAT_UNKNOWN, // R8_INT
414 DXGI_FORMAT_UNKNOWN, // R8G8_INT
415 DXGI_FORMAT_UNKNOWN, // R8G8B8A8_INT
416 DXGI_FORMAT_UNKNOWN, // R16_INT
417 DXGI_FORMAT_UNKNOWN, // R16G16_INT
418 DXGI_FORMAT_UNKNOWN, // R16G16B16A16_INT
419 DXGI_FORMAT_UNKNOWN, // R32_INT
420 DXGI_FORMAT_UNKNOWN, // R32G32_INT
421 DXGI_FORMAT_UNKNOWN, // R32G32B32A32_INT
422 DXGI_FORMAT_UNKNOWN, // R8G8B8A8_UNORM_SRGB
423 DXGI_FORMAT_UNKNOWN, // B8G8R8A8_UNORM_SRGB
424 DXGI_FORMAT_UNKNOWN, // BC1_UNORM_SRGB
425 DXGI_FORMAT_UNKNOWN, // BC2_UNORM_SRGB
426 DXGI_FORMAT_UNKNOWN, // BC3_UNORM_SRGB
427 DXGI_FORMAT_UNKNOWN, // BC7_UNORM_SRGB
428 DXGI_FORMAT_D16_UNORM, // D16_UNORM
429 DXGI_FORMAT_D24_UNORM_S8_UINT, // D24_UNORM
430 DXGI_FORMAT_D32_FLOAT, // D32_FLOAT
431 DXGI_FORMAT_D24_UNORM_S8_UINT, // D24_UNORM_S8_UINT
432 DXGI_FORMAT_D32_FLOAT_S8X24_UINT, // D32_FLOAT_S8_UINT
433 DXGI_FORMAT_UNKNOWN, // ASTC_4x4_UNORM
434 DXGI_FORMAT_UNKNOWN, // ASTC_5x4_UNORM
435 DXGI_FORMAT_UNKNOWN, // ASTC_5x5_UNORM
436 DXGI_FORMAT_UNKNOWN, // ASTC_6x5_UNORM
437 DXGI_FORMAT_UNKNOWN, // ASTC_6x6_UNORM
438 DXGI_FORMAT_UNKNOWN, // ASTC_8x5_UNORM
439 DXGI_FORMAT_UNKNOWN, // ASTC_8x6_UNORM
440 DXGI_FORMAT_UNKNOWN, // ASTC_8x8_UNORM
441 DXGI_FORMAT_UNKNOWN, // ASTC_10x5_UNORM
442 DXGI_FORMAT_UNKNOWN, // ASTC_10x6_UNORM
443 DXGI_FORMAT_UNKNOWN, // ASTC_10x8_UNORM
444 DXGI_FORMAT_UNKNOWN, // ASTC_10x10_UNORM
445 DXGI_FORMAT_UNKNOWN, // ASTC_12x10_UNORM
446 DXGI_FORMAT_UNKNOWN, // ASTC_12x12_UNORM
447 DXGI_FORMAT_UNKNOWN, // ASTC_4x4_UNORM_SRGB
448 DXGI_FORMAT_UNKNOWN, // ASTC_5x4_UNORM_SRGB
449 DXGI_FORMAT_UNKNOWN, // ASTC_5x5_UNORM_SRGB
450 DXGI_FORMAT_UNKNOWN, // ASTC_6x5_UNORM_SRGB
451 DXGI_FORMAT_UNKNOWN, // ASTC_6x6_UNORM_SRGB
452 DXGI_FORMAT_UNKNOWN, // ASTC_8x5_UNORM_SRGB
453 DXGI_FORMAT_UNKNOWN, // ASTC_8x6_UNORM_SRGB
454 DXGI_FORMAT_UNKNOWN, // ASTC_8x8_UNORM_SRGB
455 DXGI_FORMAT_UNKNOWN, // ASTC_10x5_UNORM_SRGB
456 DXGI_FORMAT_UNKNOWN, // ASTC_10x6_UNORM_SRGB
457 DXGI_FORMAT_UNKNOWN, // ASTC_10x8_UNORM_SRGB
458 DXGI_FORMAT_UNKNOWN, // ASTC_10x10_UNORM_SRGB
459 DXGI_FORMAT_UNKNOWN, // ASTC_12x10_UNORM_SRGB
460 DXGI_FORMAT_UNKNOWN, // ASTC_12x12_UNORM_SRGB
461 DXGI_FORMAT_UNKNOWN, // ASTC_4x4_FLOAT
462 DXGI_FORMAT_UNKNOWN, // ASTC_5x4_FLOAT
463 DXGI_FORMAT_UNKNOWN, // ASTC_5x5_FLOAT
464 DXGI_FORMAT_UNKNOWN, // ASTC_6x5_FLOAT
465 DXGI_FORMAT_UNKNOWN, // ASTC_6x6_FLOAT
466 DXGI_FORMAT_UNKNOWN, // ASTC_8x5_FLOAT
467 DXGI_FORMAT_UNKNOWN, // ASTC_8x6_FLOAT
468 DXGI_FORMAT_UNKNOWN, // ASTC_8x8_FLOAT
469 DXGI_FORMAT_UNKNOWN, // ASTC_10x5_FLOAT
470 DXGI_FORMAT_UNKNOWN, // ASTC_10x6_FLOAT
471 DXGI_FORMAT_UNKNOWN, // ASTC_10x8_FLOAT
472 DXGI_FORMAT_UNKNOWN, // ASTC_10x10_FLOAT
473 DXGI_FORMAT_UNKNOWN, // ASTC_12x10_FLOAT
474 DXGI_FORMAT_UNKNOWN, // ASTC_12x12_FLOAT
475};
476SDL_COMPILE_TIME_ASSERT(SDLToD3D12_DepthFormat, SDL_arraysize(SDLToD3D12_DepthFormat) == SDL_GPU_TEXTUREFORMAT_MAX_ENUM_VALUE);
477
478static D3D12_COMPARISON_FUNC SDLToD3D12_CompareOp[] = {
479 D3D12_COMPARISON_FUNC_NEVER, // INVALID
480 D3D12_COMPARISON_FUNC_NEVER, // NEVER
481 D3D12_COMPARISON_FUNC_LESS, // LESS
482 D3D12_COMPARISON_FUNC_EQUAL, // EQUAL
483 D3D12_COMPARISON_FUNC_LESS_EQUAL, // LESS_OR_EQUAL
484 D3D12_COMPARISON_FUNC_GREATER, // GREATER
485 D3D12_COMPARISON_FUNC_NOT_EQUAL, // NOT_EQUAL
486 D3D12_COMPARISON_FUNC_GREATER_EQUAL, // GREATER_OR_EQUAL
487 D3D12_COMPARISON_FUNC_ALWAYS // ALWAYS
488};
489SDL_COMPILE_TIME_ASSERT(SDLToD3D12_CompareOp, SDL_arraysize(SDLToD3D12_CompareOp) == SDL_GPU_COMPAREOP_MAX_ENUM_VALUE);
490
491static D3D12_STENCIL_OP SDLToD3D12_StencilOp[] = {
492 D3D12_STENCIL_OP_KEEP, // INVALID
493 D3D12_STENCIL_OP_KEEP, // KEEP
494 D3D12_STENCIL_OP_ZERO, // ZERO
495 D3D12_STENCIL_OP_REPLACE, // REPLACE
496 D3D12_STENCIL_OP_INCR_SAT, // INCREMENT_AND_CLAMP
497 D3D12_STENCIL_OP_DECR_SAT, // DECREMENT_AND_CLAMP
498 D3D12_STENCIL_OP_INVERT, // INVERT
499 D3D12_STENCIL_OP_INCR, // INCREMENT_AND_WRAP
500 D3D12_STENCIL_OP_DECR // DECREMENT_AND_WRAP
501};
502SDL_COMPILE_TIME_ASSERT(SDLToD3D12_StencilOp, SDL_arraysize(SDLToD3D12_StencilOp) == SDL_GPU_STENCILOP_MAX_ENUM_VALUE);
503
504static D3D12_CULL_MODE SDLToD3D12_CullMode[] = {
505 D3D12_CULL_MODE_NONE, // NONE
506 D3D12_CULL_MODE_FRONT, // FRONT
507 D3D12_CULL_MODE_BACK // BACK
508};
509
510static D3D12_FILL_MODE SDLToD3D12_FillMode[] = {
511 D3D12_FILL_MODE_SOLID, // FILL
512 D3D12_FILL_MODE_WIREFRAME // LINE
513};
514
515static D3D12_INPUT_CLASSIFICATION SDLToD3D12_InputRate[] = {
516 D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, // VERTEX
517 D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA // INSTANCE
518};
519
520static DXGI_FORMAT SDLToD3D12_VertexFormat[] = {
521 DXGI_FORMAT_UNKNOWN, // UNKNOWN
522 DXGI_FORMAT_R32_SINT, // INT
523 DXGI_FORMAT_R32G32_SINT, // INT2
524 DXGI_FORMAT_R32G32B32_SINT, // INT3
525 DXGI_FORMAT_R32G32B32A32_SINT, // INT4
526 DXGI_FORMAT_R32_UINT, // UINT
527 DXGI_FORMAT_R32G32_UINT, // UINT2
528 DXGI_FORMAT_R32G32B32_UINT, // UINT3
529 DXGI_FORMAT_R32G32B32A32_UINT, // UINT4
530 DXGI_FORMAT_R32_FLOAT, // FLOAT
531 DXGI_FORMAT_R32G32_FLOAT, // FLOAT2
532 DXGI_FORMAT_R32G32B32_FLOAT, // FLOAT3
533 DXGI_FORMAT_R32G32B32A32_FLOAT, // FLOAT4
534 DXGI_FORMAT_R8G8_SINT, // BYTE2
535 DXGI_FORMAT_R8G8B8A8_SINT, // BYTE4
536 DXGI_FORMAT_R8G8_UINT, // UBYTE2
537 DXGI_FORMAT_R8G8B8A8_UINT, // UBYTE4
538 DXGI_FORMAT_R8G8_SNORM, // BYTE2_NORM
539 DXGI_FORMAT_R8G8B8A8_SNORM, // BYTE4_NORM
540 DXGI_FORMAT_R8G8_UNORM, // UBYTE2_NORM
541 DXGI_FORMAT_R8G8B8A8_UNORM, // UBYTE4_NORM
542 DXGI_FORMAT_R16G16_SINT, // SHORT2
543 DXGI_FORMAT_R16G16B16A16_SINT, // SHORT4
544 DXGI_FORMAT_R16G16_UINT, // USHORT2
545 DXGI_FORMAT_R16G16B16A16_UINT, // USHORT4
546 DXGI_FORMAT_R16G16_SNORM, // SHORT2_NORM
547 DXGI_FORMAT_R16G16B16A16_SNORM, // SHORT4_NORM
548 DXGI_FORMAT_R16G16_UNORM, // USHORT2_NORM
549 DXGI_FORMAT_R16G16B16A16_UNORM, // USHORT4_NORM
550 DXGI_FORMAT_R16G16_FLOAT, // HALF2
551 DXGI_FORMAT_R16G16B16A16_FLOAT // HALF4
552};
553SDL_COMPILE_TIME_ASSERT(SDLToD3D12_VertexFormat, SDL_arraysize(SDLToD3D12_VertexFormat) == SDL_GPU_VERTEXELEMENTFORMAT_MAX_ENUM_VALUE);
554
555static Uint32 SDLToD3D12_SampleCount[] = {
556 1, // SDL_GPU_SAMPLECOUNT_1
557 2, // SDL_GPU_SAMPLECOUNT_2
558 4, // SDL_GPU_SAMPLECOUNT_4
559 8, // SDL_GPU_SAMPLECOUNT_8
560};
561
562static D3D12_PRIMITIVE_TOPOLOGY SDLToD3D12_PrimitiveType[] = {
563 D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST, // TRIANGLELIST
564 D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, // TRIANGLESTRIP
565 D3D_PRIMITIVE_TOPOLOGY_LINELIST, // LINELIST
566 D3D_PRIMITIVE_TOPOLOGY_LINESTRIP, // LINESTRIP
567 D3D_PRIMITIVE_TOPOLOGY_POINTLIST // POINTLIST
568};
569
570static D3D12_PRIMITIVE_TOPOLOGY_TYPE SDLToD3D12_PrimitiveTopologyType[] = {
571 D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, // TRIANGLELIST
572 D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, // TRIANGLESTRIP
573 D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE, // LINELIST
574 D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE, // LINESTRIP
575 D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT // POINTLIST
576};
577
578static D3D12_TEXTURE_ADDRESS_MODE SDLToD3D12_SamplerAddressMode[] = {
579 D3D12_TEXTURE_ADDRESS_MODE_WRAP, // REPEAT
580 D3D12_TEXTURE_ADDRESS_MODE_MIRROR, // MIRRORED_REPEAT
581 D3D12_TEXTURE_ADDRESS_MODE_CLAMP // CLAMP_TO_EDGE
582};
583
584static D3D12_FILTER SDLToD3D12_Filter(
585 SDL_GPUFilter minFilter,
586 SDL_GPUFilter magFilter,
587 SDL_GPUSamplerMipmapMode mipmapMode,
588 bool comparisonEnabled,
589 bool anisotropyEnabled)
590{
591 D3D12_FILTER result = D3D12_ENCODE_BASIC_FILTER(
592 (minFilter == SDL_GPU_FILTER_LINEAR) ? 1 : 0,
593 (magFilter == SDL_GPU_FILTER_LINEAR) ? 1 : 0,
594 (mipmapMode == SDL_GPU_SAMPLERMIPMAPMODE_LINEAR) ? 1 : 0,
595 comparisonEnabled ? 1 : 0);
596
597 if (anisotropyEnabled) {
598 result = (D3D12_FILTER)(result | D3D12_ANISOTROPIC_FILTERING_BIT);
599 }
600
601 return result;
602}
603
604// Structures
605typedef struct D3D12Renderer D3D12Renderer;
606typedef struct D3D12CommandBufferPool D3D12CommandBufferPool;
607typedef struct D3D12CommandBuffer D3D12CommandBuffer;
608typedef struct D3D12Texture D3D12Texture;
609typedef struct D3D12Shader D3D12Shader;
610typedef struct D3D12GraphicsPipeline D3D12GraphicsPipeline;
611typedef struct D3D12ComputePipeline D3D12ComputePipeline;
612typedef struct D3D12Buffer D3D12Buffer;
613typedef struct D3D12BufferContainer D3D12BufferContainer;
614typedef struct D3D12UniformBuffer D3D12UniformBuffer;
615typedef struct D3D12DescriptorHeap D3D12DescriptorHeap;
616typedef struct D3D12StagingDescriptor D3D12StagingDescriptor;
617typedef struct D3D12TextureDownload D3D12TextureDownload;
618
619typedef struct D3D12Fence
620{
621 ID3D12Fence *handle;
622 HANDLE event; // used for blocking
623 SDL_AtomicInt referenceCount;
624} D3D12Fence;
625
626struct D3D12DescriptorHeap
627{
628 ID3D12DescriptorHeap *handle;
629 D3D12_DESCRIPTOR_HEAP_TYPE heapType;
630 D3D12_CPU_DESCRIPTOR_HANDLE descriptorHeapCPUStart;
631 D3D12_GPU_DESCRIPTOR_HANDLE descriptorHeapGPUStart; // only used by GPU heaps
632 Uint32 maxDescriptors;
633 Uint32 descriptorSize;
634 bool staging;
635
636 Uint32 currentDescriptorIndex; // only used by GPU heaps
637};
638
639typedef struct D3D12GPUDescriptorHeapPool
640{
641 Uint32 capacity;
642 Uint32 count;
643 D3D12DescriptorHeap **heaps;
644 SDL_Mutex *lock;
645} D3D12GPUDescriptorHeapPool;
646
647// The only thing we care about with staging descriptors is being able to grab a free descriptor.
648typedef struct D3D12StagingDescriptorPool
649{
650 Uint32 heapCount;
651 D3D12DescriptorHeap **heaps;
652
653 // Descriptor handles are owned by resources, so these can be thought of as descriptions of a free index within a heap.
654 Uint32 freeDescriptorCapacity;
655 Uint32 freeDescriptorCount;
656 D3D12StagingDescriptor *freeDescriptors;
657
658 SDL_Mutex *lock;
659} D3D12StagingDescriptorPool;
660
661struct D3D12StagingDescriptor
662{
663 D3D12StagingDescriptorPool *pool;
664 D3D12DescriptorHeap *heap;
665 D3D12_CPU_DESCRIPTOR_HANDLE cpuHandle;
666 Uint32 cpuHandleIndex;
667};
668
669typedef struct D3D12TextureContainer
670{
671 TextureCommonHeader header;
672
673 D3D12Texture *activeTexture;
674
675 D3D12Texture **textures;
676 Uint32 textureCapacity;
677 Uint32 textureCount;
678
679 // Swapchain images cannot be cycled
680 bool canBeCycled;
681
682 char *debugName;
683} D3D12TextureContainer;
684
685// Null views represent by heap = NULL
686typedef struct D3D12TextureSubresource
687{
688 D3D12Texture *parent;
689 Uint32 layer;
690 Uint32 level;
691 Uint32 depth;
692 Uint32 index;
693
694 // One per depth slice
695 D3D12StagingDescriptor *rtvHandles; // NULL if not a color target
696
697 D3D12StagingDescriptor uavHandle; // NULL if not a compute storage write texture
698 D3D12StagingDescriptor dsvHandle; // NULL if not a depth stencil target
699} D3D12TextureSubresource;
700
701struct D3D12Texture
702{
703 D3D12TextureContainer *container;
704 Uint32 containerIndex;
705
706 D3D12TextureSubresource *subresources;
707 Uint32 subresourceCount; /* layerCount * num_levels */
708
709 ID3D12Resource *resource;
710 D3D12StagingDescriptor srvHandle;
711
712 SDL_AtomicInt referenceCount;
713};
714
715typedef struct D3D12Sampler
716{
717 SDL_GPUSamplerCreateInfo createInfo;
718 D3D12StagingDescriptor handle;
719 SDL_AtomicInt referenceCount;
720} D3D12Sampler;
721
722typedef struct D3D12WindowData
723{
724 SDL_Window *window;
725#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
726 D3D12XBOX_FRAME_PIPELINE_TOKEN frameToken;
727#else
728 IDXGISwapChain3 *swapchain;
729#endif
730 SDL_GPUPresentMode present_mode;
731 SDL_GPUSwapchainComposition swapchainComposition;
732 DXGI_COLOR_SPACE_TYPE swapchainColorSpace;
733 Uint32 frameCounter;
734
735 D3D12TextureContainer textureContainers[MAX_FRAMES_IN_FLIGHT];
736 Uint32 swapchainTextureCount;
737
738 SDL_GPUFence *inFlightFences[MAX_FRAMES_IN_FLIGHT];
739 Uint32 width;
740 Uint32 height;
741 bool needsSwapchainRecreate;
742} D3D12WindowData;
743
744typedef struct D3D12PresentData
745{
746 D3D12WindowData *windowData;
747 Uint32 swapchainImageIndex;
748} D3D12PresentData;
749
750struct D3D12Renderer
751{
752 // Reference to the parent device
753 SDL_GPUDevice *sdlGPUDevice;
754
755#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
756 IDXGIDebug *dxgiDebug;
757 IDXGIFactory4 *factory;
758#ifdef HAVE_IDXGIINFOQUEUE
759 IDXGIInfoQueue *dxgiInfoQueue;
760#endif
761 IDXGIAdapter1 *adapter;
762 SDL_SharedObject *dxgi_dll;
763 SDL_SharedObject *dxgidebug_dll;
764#endif
765 ID3D12Debug *d3d12Debug;
766 BOOL supportsTearing;
767 SDL_SharedObject *d3d12_dll;
768 ID3D12Device *device;
769 PFN_D3D12_SERIALIZE_ROOT_SIGNATURE D3D12SerializeRootSignature_func;
770 const char *semantic;
771 SDL_iconv_t iconv;
772
773 ID3D12CommandQueue *commandQueue;
774
775 bool debug_mode;
776 bool GPUUploadHeapSupported;
777 // FIXME: these might not be necessary since we're not using custom heaps
778 bool UMA;
779 bool UMACacheCoherent;
780 Uint32 allowedFramesInFlight;
781
782 // Indirect command signatures
783 ID3D12CommandSignature *indirectDrawCommandSignature;
784 ID3D12CommandSignature *indirectIndexedDrawCommandSignature;
785 ID3D12CommandSignature *indirectDispatchCommandSignature;
786
787 // Blit
788 SDL_GPUShader *blitVertexShader;
789 SDL_GPUShader *blitFrom2DShader;
790 SDL_GPUShader *blitFrom2DArrayShader;
791 SDL_GPUShader *blitFrom3DShader;
792 SDL_GPUShader *blitFromCubeShader;
793 SDL_GPUShader *blitFromCubeArrayShader;
794
795 SDL_GPUSampler *blitNearestSampler;
796 SDL_GPUSampler *blitLinearSampler;
797
798 BlitPipelineCacheEntry *blitPipelines;
799 Uint32 blitPipelineCount;
800 Uint32 blitPipelineCapacity;
801
802 // Resources
803
804 D3D12CommandBuffer **availableCommandBuffers;
805 Uint32 availableCommandBufferCount;
806 Uint32 availableCommandBufferCapacity;
807
808 D3D12CommandBuffer **submittedCommandBuffers;
809 Uint32 submittedCommandBufferCount;
810 Uint32 submittedCommandBufferCapacity;
811
812 D3D12UniformBuffer **uniformBufferPool;
813 Uint32 uniformBufferPoolCount;
814 Uint32 uniformBufferPoolCapacity;
815
816 D3D12WindowData **claimedWindows;
817 Uint32 claimedWindowCount;
818 Uint32 claimedWindowCapacity;
819
820 D3D12Fence **availableFences;
821 Uint32 availableFenceCount;
822 Uint32 availableFenceCapacity;
823
824 D3D12StagingDescriptorPool *stagingDescriptorPools[D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES];
825 D3D12GPUDescriptorHeapPool gpuDescriptorHeapPools[2];
826
827 // Deferred resource releasing
828
829 D3D12Buffer **buffersToDestroy;
830 Uint32 buffersToDestroyCount;
831 Uint32 buffersToDestroyCapacity;
832
833 D3D12Texture **texturesToDestroy;
834 Uint32 texturesToDestroyCount;
835 Uint32 texturesToDestroyCapacity;
836
837 D3D12Sampler **samplersToDestroy;
838 Uint32 samplersToDestroyCount;
839 Uint32 samplersToDestroyCapacity;
840
841 D3D12GraphicsPipeline **graphicsPipelinesToDestroy;
842 Uint32 graphicsPipelinesToDestroyCount;
843 Uint32 graphicsPipelinesToDestroyCapacity;
844
845 D3D12ComputePipeline **computePipelinesToDestroy;
846 Uint32 computePipelinesToDestroyCount;
847 Uint32 computePipelinesToDestroyCapacity;
848
849 // Locks
850 SDL_Mutex *acquireCommandBufferLock;
851 SDL_Mutex *acquireUniformBufferLock;
852 SDL_Mutex *submitLock;
853 SDL_Mutex *windowLock;
854 SDL_Mutex *fenceLock;
855 SDL_Mutex *disposeLock;
856};
857
858struct D3D12CommandBuffer
859{
860 // reserved for SDL_gpu
861 CommandBufferCommonHeader common;
862
863 // non owning parent reference
864 D3D12Renderer *renderer;
865
866 ID3D12CommandAllocator *commandAllocator;
867 ID3D12GraphicsCommandList *graphicsCommandList;
868 D3D12Fence *inFlightFence;
869 bool autoReleaseFence;
870
871 // Presentation data
872 D3D12PresentData *presentDatas;
873 Uint32 presentDataCount;
874 Uint32 presentDataCapacity;
875
876 D3D12TextureSubresource *colorTargetSubresources[MAX_COLOR_TARGET_BINDINGS];
877 D3D12TextureSubresource *colorResolveSubresources[MAX_COLOR_TARGET_BINDINGS];
878 D3D12TextureSubresource *depthStencilTextureSubresource;
879 D3D12GraphicsPipeline *currentGraphicsPipeline;
880 D3D12ComputePipeline *currentComputePipeline;
881
882 // Set at acquire time
883 D3D12DescriptorHeap *gpuDescriptorHeaps[D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER + 1];
884
885 D3D12UniformBuffer **usedUniformBuffers;
886 Uint32 usedUniformBufferCount;
887 Uint32 usedUniformBufferCapacity;
888
889 // Resource slot state
890 bool needVertexBufferBind;
891 bool needVertexSamplerBind;
892 bool needVertexStorageTextureBind;
893 bool needVertexStorageBufferBind;
894 bool needVertexUniformBufferBind[MAX_UNIFORM_BUFFERS_PER_STAGE];
895 bool needFragmentSamplerBind;
896 bool needFragmentStorageTextureBind;
897 bool needFragmentStorageBufferBind;
898 bool needFragmentUniformBufferBind[MAX_UNIFORM_BUFFERS_PER_STAGE];
899
900 bool needComputeSamplerBind;
901 bool needComputeReadOnlyStorageTextureBind;
902 bool needComputeReadOnlyStorageBufferBind;
903 bool needComputeUniformBufferBind[MAX_UNIFORM_BUFFERS_PER_STAGE];
904
905 D3D12Buffer *vertexBuffers[MAX_VERTEX_BUFFERS];
906 Uint32 vertexBufferOffsets[MAX_VERTEX_BUFFERS];
907 Uint32 vertexBufferCount;
908
909 D3D12Texture *vertexSamplerTextures[MAX_TEXTURE_SAMPLERS_PER_STAGE];
910 D3D12Sampler *vertexSamplers[MAX_TEXTURE_SAMPLERS_PER_STAGE];
911 D3D12Texture *vertexStorageTextures[MAX_STORAGE_TEXTURES_PER_STAGE];
912 D3D12Buffer *vertexStorageBuffers[MAX_STORAGE_BUFFERS_PER_STAGE];
913 D3D12UniformBuffer *vertexUniformBuffers[MAX_UNIFORM_BUFFERS_PER_STAGE];
914
915 D3D12Texture *fragmentSamplerTextures[MAX_TEXTURE_SAMPLERS_PER_STAGE];
916 D3D12Sampler *fragmentSamplers[MAX_TEXTURE_SAMPLERS_PER_STAGE];
917 D3D12Texture *fragmentStorageTextures[MAX_STORAGE_TEXTURES_PER_STAGE];
918 D3D12Buffer *fragmentStorageBuffers[MAX_STORAGE_BUFFERS_PER_STAGE];
919 D3D12UniformBuffer *fragmentUniformBuffers[MAX_UNIFORM_BUFFERS_PER_STAGE];
920
921 D3D12Texture *computeSamplerTextures[MAX_TEXTURE_SAMPLERS_PER_STAGE];
922 D3D12Sampler *computeSamplers[MAX_TEXTURE_SAMPLERS_PER_STAGE];
923 D3D12Texture *computeReadOnlyStorageTextures[MAX_STORAGE_TEXTURES_PER_STAGE];
924 D3D12Buffer *computeReadOnlyStorageBuffers[MAX_STORAGE_BUFFERS_PER_STAGE];
925 D3D12TextureSubresource *computeReadWriteStorageTextureSubresources[MAX_COMPUTE_WRITE_TEXTURES];
926 Uint32 computeReadWriteStorageTextureSubresourceCount;
927 D3D12Buffer *computeReadWriteStorageBuffers[MAX_COMPUTE_WRITE_BUFFERS];
928 Uint32 computeReadWriteStorageBufferCount;
929 D3D12UniformBuffer *computeUniformBuffers[MAX_UNIFORM_BUFFERS_PER_STAGE];
930
931 // Resource tracking
932 D3D12Texture **usedTextures;
933 Uint32 usedTextureCount;
934 Uint32 usedTextureCapacity;
935
936 D3D12Buffer **usedBuffers;
937 Uint32 usedBufferCount;
938 Uint32 usedBufferCapacity;
939
940 D3D12Sampler **usedSamplers;
941 Uint32 usedSamplerCount;
942 Uint32 usedSamplerCapacity;
943
944 D3D12GraphicsPipeline **usedGraphicsPipelines;
945 Uint32 usedGraphicsPipelineCount;
946 Uint32 usedGraphicsPipelineCapacity;
947
948 D3D12ComputePipeline **usedComputePipelines;
949 Uint32 usedComputePipelineCount;
950 Uint32 usedComputePipelineCapacity;
951
952 // Used for texture pitch hack
953 D3D12TextureDownload **textureDownloads;
954 Uint32 textureDownloadCount;
955 Uint32 textureDownloadCapacity;
956};
957
958struct D3D12Shader
959{
960 // todo cleanup
961 void *bytecode;
962 size_t bytecodeSize;
963
964 SDL_GPUShaderStage stage;
965 Uint32 num_samplers;
966 Uint32 numUniformBuffers;
967 Uint32 numStorageBuffers;
968 Uint32 numStorageTextures;
969};
970
971typedef struct D3D12GraphicsRootSignature
972{
973 ID3D12RootSignature *handle;
974
975 Sint32 vertexSamplerRootIndex;
976 Sint32 vertexSamplerTextureRootIndex;
977 Sint32 vertexStorageTextureRootIndex;
978 Sint32 vertexStorageBufferRootIndex;
979
980 Sint32 vertexUniformBufferRootIndex[MAX_UNIFORM_BUFFERS_PER_STAGE];
981
982 Sint32 fragmentSamplerRootIndex;
983 Sint32 fragmentSamplerTextureRootIndex;
984 Sint32 fragmentStorageTextureRootIndex;
985 Sint32 fragmentStorageBufferRootIndex;
986
987 Sint32 fragmentUniformBufferRootIndex[MAX_UNIFORM_BUFFERS_PER_STAGE];
988} D3D12GraphicsRootSignature;
989
990struct D3D12GraphicsPipeline
991{
992 ID3D12PipelineState *pipelineState;
993 D3D12GraphicsRootSignature *rootSignature;
994 SDL_GPUPrimitiveType primitiveType;
995
996 Uint32 vertexStrides[MAX_VERTEX_BUFFERS];
997
998 Uint32 vertexSamplerCount;
999 Uint32 vertexUniformBufferCount;
1000 Uint32 vertexStorageBufferCount;
1001 Uint32 vertexStorageTextureCount;
1002
1003 Uint32 fragmentSamplerCount;
1004 Uint32 fragmentUniformBufferCount;
1005 Uint32 fragmentStorageBufferCount;
1006 Uint32 fragmentStorageTextureCount;
1007
1008 SDL_AtomicInt referenceCount;
1009};
1010
1011typedef struct D3D12ComputeRootSignature
1012{
1013 ID3D12RootSignature *handle;
1014
1015 Sint32 samplerRootIndex;
1016 Sint32 samplerTextureRootIndex;
1017 Sint32 readOnlyStorageTextureRootIndex;
1018 Sint32 readOnlyStorageBufferRootIndex;
1019 Sint32 readWriteStorageTextureRootIndex;
1020 Sint32 readWriteStorageBufferRootIndex;
1021 Sint32 uniformBufferRootIndex[MAX_UNIFORM_BUFFERS_PER_STAGE];
1022} D3D12ComputeRootSignature;
1023
1024struct D3D12ComputePipeline
1025{
1026 ID3D12PipelineState *pipelineState;
1027 D3D12ComputeRootSignature *rootSignature;
1028
1029 Uint32 numSamplers;
1030 Uint32 numReadOnlyStorageTextures;
1031 Uint32 numReadOnlyStorageBuffers;
1032 Uint32 numReadWriteStorageTextures;
1033 Uint32 numReadWriteStorageBuffers;
1034 Uint32 numUniformBuffers;
1035
1036 SDL_AtomicInt referenceCount;
1037};
1038
1039struct D3D12TextureDownload
1040{
1041 D3D12Buffer *destinationBuffer;
1042 D3D12Buffer *temporaryBuffer;
1043 Uint32 width;
1044 Uint32 height;
1045 Uint32 depth;
1046 Uint32 bufferOffset;
1047 Uint32 bytesPerRow;
1048 Uint32 bytesPerDepthSlice;
1049 Uint32 alignedBytesPerRow;
1050};
1051
1052struct D3D12Buffer
1053{
1054 D3D12BufferContainer *container;
1055 Uint32 containerIndex;
1056
1057 ID3D12Resource *handle;
1058 D3D12StagingDescriptor uavDescriptor;
1059 D3D12StagingDescriptor srvDescriptor;
1060 D3D12StagingDescriptor cbvDescriptor;
1061 D3D12_GPU_VIRTUAL_ADDRESS virtualAddress;
1062 Uint8 *mapPointer; // NULL except for upload buffers and fast uniform buffers
1063 SDL_AtomicInt referenceCount;
1064 bool transitioned; // used for initial resource barrier
1065};
1066
1067struct D3D12BufferContainer
1068{
1069 SDL_GPUBufferUsageFlags usage;
1070 Uint32 size;
1071 D3D12BufferType type;
1072
1073 D3D12Buffer *activeBuffer;
1074
1075 D3D12Buffer **buffers;
1076 Uint32 bufferCapacity;
1077 Uint32 bufferCount;
1078
1079 D3D12_RESOURCE_DESC bufferDesc;
1080
1081 char *debugName;
1082};
1083
1084struct D3D12UniformBuffer
1085{
1086 D3D12Buffer *buffer;
1087 Uint32 writeOffset;
1088 Uint32 drawOffset;
1089 Uint32 currentBlockSize;
1090};
1091
1092// Forward function declarations
1093
1094static void D3D12_ReleaseWindow(SDL_GPURenderer *driverData, SDL_Window *window);
1095static bool D3D12_Wait(SDL_GPURenderer *driverData);
1096static bool D3D12_WaitForFences(SDL_GPURenderer *driverData, bool waitAll, SDL_GPUFence *const *fences, Uint32 numFences);
1097static void D3D12_INTERNAL_ReleaseBlitPipelines(SDL_GPURenderer *driverData);
1098
1099// Helpers
1100
1101static Uint32 D3D12_INTERNAL_Align(Uint32 location, Uint32 alignment)
1102{
1103 return (location + (alignment - 1)) & ~(alignment - 1);
1104}
1105
1106// Xbox Hack
1107
1108#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
1109// FIXME: This is purely to work around a presentation bug when recreating the device/command queue.
1110static ID3D12Device *s_Device;
1111static ID3D12CommandQueue *s_CommandQueue;
1112#endif
1113
1114#if defined(SDL_PLATFORM_XBOXONE)
1115// These are not defined in d3d12_x.h.
1116typedef HRESULT (D3DAPI* PFN_D3D12_XBOX_CREATE_DEVICE)(_In_opt_ IGraphicsUnknown*, _In_ const D3D12XBOX_CREATE_DEVICE_PARAMETERS*, _In_ REFIID, _Outptr_opt_ void**);
1117#define D3D12_STANDARD_MULTISAMPLE_PATTERN DXGI_STANDARD_MULTISAMPLE_QUALITY_PATTERN
1118#endif
1119
1120// Logging
1121
1122static void D3D12_INTERNAL_SetError(
1123 D3D12Renderer *renderer,
1124 const char *msg,
1125 HRESULT res)
1126{
1127 #define MAX_ERROR_LEN 1024 // FIXME: Arbitrary!
1128
1129 // Buffer for text, ensure space for \0 terminator after buffer
1130 char wszMsgBuff[MAX_ERROR_LEN + 1];
1131 DWORD dwChars; // Number of chars returned.
1132
1133 if (res == DXGI_ERROR_DEVICE_REMOVED) {
1134 if (renderer->device) {
1135 res = ID3D12Device_GetDeviceRemovedReason(renderer->device);
1136 }
1137 }
1138
1139 // Try to get the message from the system errors.
1140 dwChars = FormatMessageA(
1141 FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
1142 NULL,
1143 res,
1144 0,
1145 wszMsgBuff,
1146 MAX_ERROR_LEN,
1147 NULL);
1148
1149 // No message? Screw it, just post the code.
1150 if (dwChars == 0) {
1151 if (renderer->debug_mode) {
1152 SDL_LogError(SDL_LOG_CATEGORY_GPU, "%s! Error Code: " HRESULT_FMT, msg, res);
1153 }
1154 SDL_SetError("%s! Error Code: " HRESULT_FMT, msg, res);
1155 return;
1156 }
1157
1158 // Ensure valid range
1159 dwChars = SDL_min(dwChars, MAX_ERROR_LEN);
1160
1161 // Trim whitespace from tail of message
1162 while (dwChars > 0) {
1163 if (wszMsgBuff[dwChars - 1] <= ' ') {
1164 dwChars--;
1165 } else {
1166 break;
1167 }
1168 }
1169
1170 // Ensure null-terminated string
1171 wszMsgBuff[dwChars] = '\0';
1172
1173 if (renderer->debug_mode) {
1174 SDL_LogError(SDL_LOG_CATEGORY_GPU, "%s! Error Code: %s " HRESULT_FMT, msg, wszMsgBuff, res);
1175 }
1176 SDL_SetError("%s! Error Code: %s " HRESULT_FMT, msg, wszMsgBuff, res);
1177}
1178
1179// Release / Cleanup
1180
1181static void D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
1182 D3D12Renderer *renderer,
1183 D3D12StagingDescriptor *cpuDescriptor)
1184{
1185 D3D12StagingDescriptorPool *pool = cpuDescriptor->pool;
1186
1187 if (pool != NULL) {
1188 SDL_LockMutex(pool->lock);
1189 SDL_memcpy(&pool->freeDescriptors[pool->freeDescriptorCount], cpuDescriptor, sizeof(D3D12StagingDescriptor));
1190 pool->freeDescriptorCount += 1;
1191 SDL_UnlockMutex(pool->lock);
1192 }
1193}
1194
1195static void D3D12_INTERNAL_DestroyBuffer(
1196 D3D12Renderer *renderer,
1197 D3D12Buffer *buffer)
1198{
1199 if (!buffer) {
1200 return;
1201 }
1202
1203 if (buffer->mapPointer != NULL) {
1204 ID3D12Resource_Unmap(
1205 buffer->handle,
1206 0,
1207 NULL);
1208 }
1209 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
1210 renderer,
1211 &buffer->srvDescriptor);
1212 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
1213 renderer,
1214 &buffer->uavDescriptor);
1215 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
1216 renderer,
1217 &buffer->cbvDescriptor);
1218
1219 if (buffer->handle) {
1220 ID3D12Resource_Release(buffer->handle);
1221 }
1222 SDL_free(buffer);
1223}
1224
1225static void D3D12_INTERNAL_ReleaseBuffer(
1226 D3D12Renderer *renderer,
1227 D3D12Buffer *buffer)
1228{
1229 SDL_LockMutex(renderer->disposeLock);
1230
1231 EXPAND_ARRAY_IF_NEEDED(
1232 renderer->buffersToDestroy,
1233 D3D12Buffer *,
1234 renderer->buffersToDestroyCount + 1,
1235 renderer->buffersToDestroyCapacity,
1236 renderer->buffersToDestroyCapacity * 2);
1237
1238 renderer->buffersToDestroy[renderer->buffersToDestroyCount] = buffer;
1239 renderer->buffersToDestroyCount += 1;
1240
1241 SDL_UnlockMutex(renderer->disposeLock);
1242}
1243
1244static void D3D12_INTERNAL_ReleaseBufferContainer(
1245 D3D12Renderer *renderer,
1246 D3D12BufferContainer *container)
1247{
1248 SDL_LockMutex(renderer->disposeLock);
1249
1250 for (Uint32 i = 0; i < container->bufferCount; i += 1) {
1251 D3D12_INTERNAL_ReleaseBuffer(
1252 renderer,
1253 container->buffers[i]);
1254 }
1255
1256 // Containers are just client handles, so we can free immediately
1257 if (container->debugName) {
1258 SDL_free(container->debugName);
1259 }
1260 SDL_free(container->buffers);
1261 SDL_free(container);
1262
1263 SDL_UnlockMutex(renderer->disposeLock);
1264}
1265
1266static void D3D12_INTERNAL_DestroyTexture(
1267 D3D12Renderer *renderer,
1268 D3D12Texture *texture)
1269{
1270 if (!texture) {
1271 return;
1272 }
1273 for (Uint32 i = 0; i < texture->subresourceCount; i += 1) {
1274 D3D12TextureSubresource *subresource = &texture->subresources[i];
1275 if (subresource->rtvHandles) {
1276 for (Uint32 depthIndex = 0; depthIndex < subresource->depth; depthIndex += 1) {
1277 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
1278 renderer,
1279 &subresource->rtvHandles[depthIndex]);
1280 }
1281 SDL_free(subresource->rtvHandles);
1282 }
1283
1284 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
1285 renderer,
1286 &subresource->uavHandle);
1287
1288 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
1289 renderer,
1290 &subresource->dsvHandle);
1291 }
1292 SDL_free(texture->subresources);
1293
1294 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
1295 renderer,
1296 &texture->srvHandle);
1297
1298 if (texture->resource) {
1299 ID3D12Resource_Release(texture->resource);
1300 }
1301
1302 SDL_free(texture);
1303}
1304
1305static void D3D12_INTERNAL_ReleaseTexture(
1306 D3D12Renderer *renderer,
1307 D3D12Texture *texture)
1308{
1309 SDL_LockMutex(renderer->disposeLock);
1310
1311 EXPAND_ARRAY_IF_NEEDED(
1312 renderer->texturesToDestroy,
1313 D3D12Texture *,
1314 renderer->texturesToDestroyCount + 1,
1315 renderer->texturesToDestroyCapacity,
1316 renderer->texturesToDestroyCapacity * 2);
1317
1318 renderer->texturesToDestroy[renderer->texturesToDestroyCount] = texture;
1319 renderer->texturesToDestroyCount += 1;
1320
1321 SDL_UnlockMutex(renderer->disposeLock);
1322}
1323
1324static void D3D12_INTERNAL_ReleaseTextureContainer(
1325 D3D12Renderer *renderer,
1326 D3D12TextureContainer *container)
1327{
1328 SDL_LockMutex(renderer->disposeLock);
1329
1330 for (Uint32 i = 0; i < container->textureCount; i += 1) {
1331 D3D12_INTERNAL_ReleaseTexture(
1332 renderer,
1333 container->textures[i]);
1334 }
1335
1336 // Containers are just client handles, so we can destroy immediately
1337 if (container->debugName) {
1338 SDL_free(container->debugName);
1339 }
1340 SDL_free(container->textures);
1341 SDL_free(container);
1342
1343 SDL_UnlockMutex(renderer->disposeLock);
1344}
1345
1346static void D3D12_INTERNAL_DestroySampler(
1347 D3D12Renderer *renderer,
1348 D3D12Sampler *sampler)
1349{
1350 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
1351 renderer,
1352 &sampler->handle);
1353
1354 SDL_free(sampler);
1355}
1356
1357static void D3D12_INTERNAL_DestroyGraphicsRootSignature(
1358 D3D12GraphicsRootSignature *rootSignature)
1359{
1360 if (!rootSignature) {
1361 return;
1362 }
1363 if (rootSignature->handle) {
1364 ID3D12RootSignature_Release(rootSignature->handle);
1365 }
1366 SDL_free(rootSignature);
1367}
1368
1369static void D3D12_INTERNAL_DestroyGraphicsPipeline(
1370 D3D12GraphicsPipeline *graphicsPipeline)
1371{
1372 if (graphicsPipeline->pipelineState) {
1373 ID3D12PipelineState_Release(graphicsPipeline->pipelineState);
1374 }
1375 D3D12_INTERNAL_DestroyGraphicsRootSignature(graphicsPipeline->rootSignature);
1376 SDL_free(graphicsPipeline);
1377}
1378
1379static void D3D12_INTERNAL_DestroyComputeRootSignature(
1380 D3D12ComputeRootSignature *rootSignature)
1381{
1382 if (!rootSignature) {
1383 return;
1384 }
1385 if (rootSignature->handle) {
1386 ID3D12RootSignature_Release(rootSignature->handle);
1387 }
1388 SDL_free(rootSignature);
1389}
1390
1391static void D3D12_INTERNAL_DestroyComputePipeline(
1392 D3D12ComputePipeline *computePipeline)
1393{
1394 if (computePipeline->pipelineState) {
1395 ID3D12PipelineState_Release(computePipeline->pipelineState);
1396 }
1397 D3D12_INTERNAL_DestroyComputeRootSignature(computePipeline->rootSignature);
1398 SDL_free(computePipeline);
1399}
1400
1401static void D3D12_INTERNAL_ReleaseFenceToPool(
1402 D3D12Renderer *renderer,
1403 D3D12Fence *fence)
1404{
1405 SDL_LockMutex(renderer->fenceLock);
1406
1407 EXPAND_ARRAY_IF_NEEDED(
1408 renderer->availableFences,
1409 D3D12Fence *,
1410 renderer->availableFenceCount + 1,
1411 renderer->availableFenceCapacity,
1412 renderer->availableFenceCapacity * 2);
1413
1414 renderer->availableFences[renderer->availableFenceCount] = fence;
1415 renderer->availableFenceCount += 1;
1416
1417 SDL_UnlockMutex(renderer->fenceLock);
1418}
1419
1420static void D3D12_ReleaseFence(
1421 SDL_GPURenderer *driverData,
1422 SDL_GPUFence *fence)
1423{
1424 D3D12Fence *d3d12Fence = (D3D12Fence *)fence;
1425
1426 if (SDL_AtomicDecRef(&d3d12Fence->referenceCount)) {
1427 D3D12_INTERNAL_ReleaseFenceToPool(
1428 (D3D12Renderer *)driverData,
1429 d3d12Fence);
1430 }
1431}
1432
1433static bool D3D12_QueryFence(
1434 SDL_GPURenderer *driverData,
1435 SDL_GPUFence *fence)
1436{
1437 D3D12Fence *d3d12Fence = (D3D12Fence *)fence;
1438 return ID3D12Fence_GetCompletedValue(d3d12Fence->handle) == D3D12_FENCE_SIGNAL_VALUE;
1439}
1440
1441static void D3D12_INTERNAL_DestroyDescriptorHeap(D3D12DescriptorHeap *descriptorHeap)
1442{
1443 if (!descriptorHeap) {
1444 return;
1445 }
1446 if (descriptorHeap->handle) {
1447 ID3D12DescriptorHeap_Release(descriptorHeap->handle);
1448 }
1449 SDL_free(descriptorHeap);
1450}
1451
1452static void D3D12_INTERNAL_DestroyStagingDescriptorPool(
1453 D3D12StagingDescriptorPool *pool)
1454{
1455 for (Uint32 i = 0; i < pool->heapCount; i += 1) {
1456 D3D12_INTERNAL_DestroyDescriptorHeap(pool->heaps[i]);
1457 }
1458 SDL_free(pool->heaps);
1459 SDL_free(pool->freeDescriptors);
1460 SDL_DestroyMutex(pool->lock);
1461
1462 SDL_free(pool);
1463}
1464
1465static void D3D12_INTERNAL_DestroyCommandBuffer(D3D12CommandBuffer *commandBuffer)
1466{
1467 if (!commandBuffer) {
1468 return;
1469 }
1470 if (commandBuffer->graphicsCommandList) {
1471 ID3D12GraphicsCommandList_Release(commandBuffer->graphicsCommandList);
1472 }
1473 if (commandBuffer->commandAllocator) {
1474 ID3D12CommandAllocator_Release(commandBuffer->commandAllocator);
1475 }
1476 SDL_free(commandBuffer->presentDatas);
1477 SDL_free(commandBuffer->usedTextures);
1478 SDL_free(commandBuffer->usedBuffers);
1479 SDL_free(commandBuffer->usedSamplers);
1480 SDL_free(commandBuffer->usedGraphicsPipelines);
1481 SDL_free(commandBuffer->usedComputePipelines);
1482 SDL_free(commandBuffer->usedUniformBuffers);
1483 SDL_free(commandBuffer->textureDownloads);
1484 SDL_free(commandBuffer);
1485}
1486
1487static void D3D12_INTERNAL_DestroyFence(D3D12Fence *fence)
1488{
1489 if (!fence) {
1490 return;
1491 }
1492 if (fence->handle) {
1493 ID3D12Fence_Release(fence->handle);
1494 }
1495 if (fence->event) {
1496 CloseHandle(fence->event);
1497 }
1498 SDL_free(fence);
1499}
1500
1501static void D3D12_INTERNAL_DestroyRenderer(D3D12Renderer *renderer)
1502{
1503 // Release uniform buffers
1504 for (Uint32 i = 0; i < renderer->uniformBufferPoolCount; i += 1) {
1505 D3D12_INTERNAL_DestroyBuffer(
1506 renderer,
1507 renderer->uniformBufferPool[i]->buffer);
1508 SDL_free(renderer->uniformBufferPool[i]);
1509 }
1510
1511 // Clean up descriptor heaps
1512 for (Uint32 i = 0; i < D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES; i += 1) {
1513 if (renderer->stagingDescriptorPools[i]) {
1514 D3D12_INTERNAL_DestroyStagingDescriptorPool(renderer->stagingDescriptorPools[i]);
1515 renderer->stagingDescriptorPools[i] = NULL;
1516 }
1517 }
1518
1519 for (Uint32 i = 0; i < 2; i += 1) {
1520 if (renderer->gpuDescriptorHeapPools[i].heaps) {
1521 for (Uint32 j = 0; j < renderer->gpuDescriptorHeapPools[i].count; j += 1) {
1522 if (renderer->gpuDescriptorHeapPools[i].heaps[j]) {
1523 D3D12_INTERNAL_DestroyDescriptorHeap(renderer->gpuDescriptorHeapPools[i].heaps[j]);
1524 renderer->gpuDescriptorHeapPools[i].heaps[j] = NULL;
1525 }
1526 }
1527 SDL_free(renderer->gpuDescriptorHeapPools[i].heaps);
1528 }
1529 if (renderer->gpuDescriptorHeapPools[i].lock) {
1530 SDL_DestroyMutex(renderer->gpuDescriptorHeapPools[i].lock);
1531 renderer->gpuDescriptorHeapPools[i].lock = NULL;
1532 }
1533 }
1534
1535 // Release command buffers
1536 for (Uint32 i = 0; i < renderer->availableCommandBufferCount; i += 1) {
1537 if (renderer->availableCommandBuffers[i]) {
1538 D3D12_INTERNAL_DestroyCommandBuffer(renderer->availableCommandBuffers[i]);
1539 renderer->availableCommandBuffers[i] = NULL;
1540 }
1541 }
1542
1543 // Release fences
1544 for (Uint32 i = 0; i < renderer->availableFenceCount; i += 1) {
1545 if (renderer->availableFences[i]) {
1546 D3D12_INTERNAL_DestroyFence(renderer->availableFences[i]);
1547 renderer->availableFences[i] = NULL;
1548 }
1549 }
1550
1551 // Clean up allocations
1552 SDL_free(renderer->availableCommandBuffers);
1553 SDL_free(renderer->submittedCommandBuffers);
1554 SDL_free(renderer->uniformBufferPool);
1555 SDL_free(renderer->claimedWindows);
1556 SDL_free(renderer->availableFences);
1557 SDL_free(renderer->buffersToDestroy);
1558 SDL_free(renderer->texturesToDestroy);
1559 SDL_free(renderer->samplersToDestroy);
1560 SDL_free(renderer->graphicsPipelinesToDestroy);
1561 SDL_free(renderer->computePipelinesToDestroy);
1562
1563 // Tear down D3D12 objects
1564 if (renderer->indirectDrawCommandSignature) {
1565 ID3D12CommandSignature_Release(renderer->indirectDrawCommandSignature);
1566 renderer->indirectDrawCommandSignature = NULL;
1567 }
1568 if (renderer->indirectIndexedDrawCommandSignature) {
1569 ID3D12CommandSignature_Release(renderer->indirectIndexedDrawCommandSignature);
1570 renderer->indirectIndexedDrawCommandSignature = NULL;
1571 }
1572 if (renderer->indirectDispatchCommandSignature) {
1573 ID3D12CommandSignature_Release(renderer->indirectDispatchCommandSignature);
1574 renderer->indirectDispatchCommandSignature = NULL;
1575 }
1576#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
1577 if (renderer->commandQueue) {
1578 ID3D12CommandQueue_Release(renderer->commandQueue);
1579 renderer->commandQueue = NULL;
1580 }
1581 if (renderer->device) {
1582 ID3D12Device_Release(renderer->device);
1583 renderer->device = NULL;
1584 }
1585 if (renderer->adapter) {
1586 IDXGIAdapter1_Release(renderer->adapter);
1587 renderer->adapter = NULL;
1588 }
1589 if (renderer->factory) {
1590 IDXGIFactory4_Release(renderer->factory);
1591 renderer->factory = NULL;
1592 }
1593 if (renderer->dxgiDebug) {
1594 IDXGIDebug_ReportLiveObjects(
1595 renderer->dxgiDebug,
1596 D3D_IID_DXGI_DEBUG_ALL,
1597 (DXGI_DEBUG_RLO_FLAGS)(DXGI_DEBUG_RLO_SUMMARY | DXGI_DEBUG_RLO_DETAIL));
1598 IDXGIDebug_Release(renderer->dxgiDebug);
1599 renderer->dxgiDebug = NULL;
1600 }
1601#endif
1602 if (renderer->d3d12_dll) {
1603 SDL_UnloadObject(renderer->d3d12_dll);
1604 renderer->d3d12_dll = NULL;
1605 }
1606#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
1607 if (renderer->dxgi_dll) {
1608 SDL_UnloadObject(renderer->dxgi_dll);
1609 renderer->dxgi_dll = NULL;
1610 }
1611 if (renderer->dxgidebug_dll) {
1612 SDL_UnloadObject(renderer->dxgidebug_dll);
1613 renderer->dxgidebug_dll = NULL;
1614 }
1615#endif
1616 renderer->D3D12SerializeRootSignature_func = NULL;
1617
1618 if (renderer->iconv) {
1619 SDL_iconv_close(renderer->iconv);
1620 }
1621
1622 SDL_DestroyMutex(renderer->acquireCommandBufferLock);
1623 SDL_DestroyMutex(renderer->acquireUniformBufferLock);
1624 SDL_DestroyMutex(renderer->submitLock);
1625 SDL_DestroyMutex(renderer->windowLock);
1626 SDL_DestroyMutex(renderer->fenceLock);
1627 SDL_DestroyMutex(renderer->disposeLock);
1628 SDL_free(renderer);
1629}
1630
1631static void D3D12_DestroyDevice(SDL_GPUDevice *device)
1632{
1633 D3D12Renderer *renderer = (D3D12Renderer *)device->driverData;
1634
1635 // Release blit pipeline structures
1636 D3D12_INTERNAL_ReleaseBlitPipelines((SDL_GPURenderer *)renderer);
1637
1638 // Flush any remaining GPU work...
1639 D3D12_Wait((SDL_GPURenderer *)renderer);
1640
1641 // Release window data
1642 for (Sint32 i = renderer->claimedWindowCount - 1; i >= 0; i -= 1) {
1643 D3D12_ReleaseWindow((SDL_GPURenderer *)renderer, renderer->claimedWindows[i]->window);
1644 }
1645
1646 D3D12_INTERNAL_DestroyRenderer(renderer);
1647 SDL_free(device);
1648}
1649
1650// Barriers
1651
1652static inline Uint32 D3D12_INTERNAL_CalcSubresource(
1653 Uint32 mipLevel,
1654 Uint32 layer,
1655 Uint32 numLevels)
1656{
1657 return mipLevel + (layer * numLevels);
1658}
1659
1660static void D3D12_INTERNAL_ResourceBarrier(
1661 D3D12CommandBuffer *commandBuffer,
1662 D3D12_RESOURCE_STATES sourceState,
1663 D3D12_RESOURCE_STATES destinationState,
1664 ID3D12Resource *resource,
1665 Uint32 subresourceIndex,
1666 bool needsUavBarrier)
1667{
1668 D3D12_RESOURCE_BARRIER barrierDesc[2];
1669 Uint32 numBarriers = 0;
1670
1671 // No transition barrier is needed if the state is not changing.
1672 if (sourceState != destinationState) {
1673 barrierDesc[numBarriers].Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
1674 barrierDesc[numBarriers].Flags = (D3D12_RESOURCE_BARRIER_FLAGS)0;
1675 barrierDesc[numBarriers].Transition.StateBefore = sourceState;
1676 barrierDesc[numBarriers].Transition.StateAfter = destinationState;
1677 barrierDesc[numBarriers].Transition.pResource = resource;
1678 barrierDesc[numBarriers].Transition.Subresource = subresourceIndex;
1679
1680 numBarriers += 1;
1681 }
1682
1683 if (needsUavBarrier) {
1684 barrierDesc[numBarriers].Type = D3D12_RESOURCE_BARRIER_TYPE_UAV;
1685 barrierDesc[numBarriers].Flags = (D3D12_RESOURCE_BARRIER_FLAGS)0;
1686 barrierDesc[numBarriers].UAV.pResource = resource;
1687
1688 numBarriers += 1;
1689 }
1690
1691 if (numBarriers > 0) {
1692 ID3D12GraphicsCommandList_ResourceBarrier(
1693 commandBuffer->graphicsCommandList,
1694 numBarriers,
1695 barrierDesc);
1696 }
1697}
1698
1699static void D3D12_INTERNAL_TextureSubresourceBarrier(
1700 D3D12CommandBuffer *commandBuffer,
1701 D3D12_RESOURCE_STATES sourceState,
1702 D3D12_RESOURCE_STATES destinationState,
1703 D3D12TextureSubresource *textureSubresource)
1704{
1705 bool needsUAVBarrier =
1706 (textureSubresource->parent->container->header.info.usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE) ||
1707 (textureSubresource->parent->container->header.info.usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE);
1708
1709 D3D12_INTERNAL_ResourceBarrier(
1710 commandBuffer,
1711 sourceState,
1712 destinationState,
1713 textureSubresource->parent->resource,
1714 textureSubresource->index,
1715 needsUAVBarrier);
1716}
1717
1718static D3D12_RESOURCE_STATES D3D12_INTERNAL_DefaultTextureResourceState(
1719 SDL_GPUTextureUsageFlags usageFlags)
1720{
1721 // NOTE: order matters here!
1722
1723 if (usageFlags & SDL_GPU_TEXTUREUSAGE_SAMPLER) {
1724 return D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE;
1725 } else if (usageFlags & SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ) {
1726 return D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE;
1727 } else if (usageFlags & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET) {
1728 return D3D12_RESOURCE_STATE_RENDER_TARGET;
1729 } else if (usageFlags & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET) {
1730 return D3D12_RESOURCE_STATE_DEPTH_WRITE;
1731 } else if (usageFlags & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ) {
1732 return D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
1733 } else if (usageFlags & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE) {
1734 return D3D12_RESOURCE_STATE_UNORDERED_ACCESS;
1735 } else if (usageFlags & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE) {
1736 return D3D12_RESOURCE_STATE_UNORDERED_ACCESS;
1737 } else {
1738 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Texture has no default usage mode!");
1739 return D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE;
1740 }
1741}
1742
1743static void D3D12_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
1744 D3D12CommandBuffer *commandBuffer,
1745 D3D12_RESOURCE_STATES destinationUsageMode,
1746 D3D12TextureSubresource *textureSubresource)
1747{
1748 D3D12_INTERNAL_TextureSubresourceBarrier(
1749 commandBuffer,
1750 D3D12_INTERNAL_DefaultTextureResourceState(textureSubresource->parent->container->header.info.usage),
1751 destinationUsageMode,
1752 textureSubresource);
1753}
1754
1755static void D3D12_INTERNAL_TextureTransitionFromDefaultUsage(
1756 D3D12CommandBuffer *commandBuffer,
1757 D3D12_RESOURCE_STATES destinationUsageMode,
1758 D3D12Texture *texture)
1759{
1760 for (Uint32 i = 0; i < texture->subresourceCount; i += 1) {
1761 D3D12_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
1762 commandBuffer,
1763 destinationUsageMode,
1764 &texture->subresources[i]);
1765 }
1766}
1767
1768static void D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
1769 D3D12CommandBuffer *commandBuffer,
1770 D3D12_RESOURCE_STATES sourceUsageMode,
1771 D3D12TextureSubresource *textureSubresource)
1772{
1773 D3D12_INTERNAL_TextureSubresourceBarrier(
1774 commandBuffer,
1775 sourceUsageMode,
1776 D3D12_INTERNAL_DefaultTextureResourceState(textureSubresource->parent->container->header.info.usage),
1777 textureSubresource);
1778}
1779
1780static void D3D12_INTERNAL_TextureTransitionToDefaultUsage(
1781 D3D12CommandBuffer *commandBuffer,
1782 D3D12_RESOURCE_STATES sourceUsageMode,
1783 D3D12Texture *texture)
1784{
1785 for (Uint32 i = 0; i < texture->subresourceCount; i += 1) {
1786 D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
1787 commandBuffer,
1788 sourceUsageMode,
1789 &texture->subresources[i]);
1790 }
1791}
1792
1793static D3D12_RESOURCE_STATES D3D12_INTERNAL_DefaultBufferResourceState(
1794 D3D12Buffer *buffer)
1795{
1796 if (buffer->container->usage & SDL_GPU_BUFFERUSAGE_VERTEX) {
1797 return D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER;
1798 } else if (buffer->container->usage & SDL_GPU_BUFFERUSAGE_INDEX) {
1799 return D3D12_RESOURCE_STATE_INDEX_BUFFER;
1800 } else if (buffer->container->usage & SDL_GPU_BUFFERUSAGE_INDIRECT) {
1801 return D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT;
1802 } else if (buffer->container->usage & SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ) {
1803 return D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE;
1804 } else if (buffer->container->usage & SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ) {
1805 return D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
1806 } else if (buffer->container->usage & SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE) {
1807 return D3D12_RESOURCE_STATE_UNORDERED_ACCESS;
1808 } else {
1809 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Buffer has no default usage mode!");
1810 return D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER;
1811 }
1812}
1813
1814static void D3D12_INTERNAL_BufferBarrier(
1815 D3D12CommandBuffer *commandBuffer,
1816 D3D12_RESOURCE_STATES sourceState,
1817 D3D12_RESOURCE_STATES destinationState,
1818 D3D12Buffer *buffer)
1819{
1820 D3D12_INTERNAL_ResourceBarrier(
1821 commandBuffer,
1822 buffer->transitioned ? sourceState : D3D12_RESOURCE_STATE_COMMON,
1823 destinationState,
1824 buffer->handle,
1825 0,
1826 buffer->container->usage & SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE);
1827
1828 buffer->transitioned = true;
1829}
1830
1831static void D3D12_INTERNAL_BufferTransitionFromDefaultUsage(
1832 D3D12CommandBuffer *commandBuffer,
1833 D3D12_RESOURCE_STATES destinationState,
1834 D3D12Buffer *buffer)
1835{
1836 D3D12_INTERNAL_BufferBarrier(
1837 commandBuffer,
1838 D3D12_INTERNAL_DefaultBufferResourceState(buffer),
1839 destinationState,
1840 buffer);
1841}
1842
1843static void D3D12_INTERNAL_BufferTransitionToDefaultUsage(
1844 D3D12CommandBuffer *commandBuffer,
1845 D3D12_RESOURCE_STATES sourceState,
1846 D3D12Buffer *buffer)
1847{
1848 D3D12_INTERNAL_BufferBarrier(
1849 commandBuffer,
1850 sourceState,
1851 D3D12_INTERNAL_DefaultBufferResourceState(buffer),
1852 buffer);
1853}
1854
1855// Resource tracking
1856
1857#define TRACK_RESOURCE(resource, type, array, count, capacity) \
1858 Uint32 i; \
1859 \
1860 for (i = 0; i < commandBuffer->count; i += 1) { \
1861 if (commandBuffer->array[i] == resource) { \
1862 return; \
1863 } \
1864 } \
1865 \
1866 if (commandBuffer->count == commandBuffer->capacity) { \
1867 commandBuffer->capacity += 1; \
1868 commandBuffer->array = (type *)SDL_realloc( \
1869 commandBuffer->array, \
1870 commandBuffer->capacity * sizeof(type)); \
1871 } \
1872 commandBuffer->array[commandBuffer->count] = resource; \
1873 commandBuffer->count += 1; \
1874 SDL_AtomicIncRef(&resource->referenceCount);
1875
1876static void D3D12_INTERNAL_TrackTexture(
1877 D3D12CommandBuffer *commandBuffer,
1878 D3D12Texture *texture)
1879{
1880 TRACK_RESOURCE(
1881 texture,
1882 D3D12Texture *,
1883 usedTextures,
1884 usedTextureCount,
1885 usedTextureCapacity)
1886}
1887
1888static void D3D12_INTERNAL_TrackBuffer(
1889 D3D12CommandBuffer *commandBuffer,
1890 D3D12Buffer *buffer)
1891{
1892 TRACK_RESOURCE(
1893 buffer,
1894 D3D12Buffer *,
1895 usedBuffers,
1896 usedBufferCount,
1897 usedBufferCapacity)
1898}
1899
1900static void D3D12_INTERNAL_TrackSampler(
1901 D3D12CommandBuffer *commandBuffer,
1902 D3D12Sampler *sampler)
1903{
1904 TRACK_RESOURCE(
1905 sampler,
1906 D3D12Sampler *,
1907 usedSamplers,
1908 usedSamplerCount,
1909 usedSamplerCapacity)
1910}
1911
1912static void D3D12_INTERNAL_TrackGraphicsPipeline(
1913 D3D12CommandBuffer *commandBuffer,
1914 D3D12GraphicsPipeline *graphicsPipeline)
1915{
1916 TRACK_RESOURCE(
1917 graphicsPipeline,
1918 D3D12GraphicsPipeline *,
1919 usedGraphicsPipelines,
1920 usedGraphicsPipelineCount,
1921 usedGraphicsPipelineCapacity)
1922}
1923
1924static void D3D12_INTERNAL_TrackComputePipeline(
1925 D3D12CommandBuffer *commandBuffer,
1926 D3D12ComputePipeline *computePipeline)
1927{
1928 TRACK_RESOURCE(
1929 computePipeline,
1930 D3D12ComputePipeline *,
1931 usedComputePipelines,
1932 usedComputePipelineCount,
1933 usedComputePipelineCapacity)
1934}
1935
1936#undef TRACK_RESOURCE
1937
1938// Debug Naming
1939
1940static void D3D12_INTERNAL_SetPipelineStateName(
1941 D3D12Renderer *renderer,
1942 ID3D12PipelineState *pipelineState,
1943 const char *text
1944) {
1945 if (renderer->debug_mode && text != NULL) {
1946 WCHAR *wchar_text = WIN_UTF8ToStringW(text);
1947 ID3D12PipelineState_SetName(
1948 pipelineState,
1949 wchar_text);
1950 SDL_free(wchar_text);
1951 }
1952}
1953
1954static void D3D12_INTERNAL_SetResourceName(
1955 D3D12Renderer *renderer,
1956 ID3D12Resource *resource,
1957 const char *text
1958) {
1959 if (renderer->debug_mode && text != NULL) {
1960 WCHAR *wchar_text = WIN_UTF8ToStringW(text);
1961 ID3D12Resource_SetName(
1962 resource,
1963 wchar_text);
1964 SDL_free(wchar_text);
1965 }
1966}
1967
1968static void D3D12_SetBufferName(
1969 SDL_GPURenderer *driverData,
1970 SDL_GPUBuffer *buffer,
1971 const char *text)
1972{
1973 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
1974 D3D12BufferContainer *container = (D3D12BufferContainer *)buffer;
1975
1976 if (renderer->debug_mode && text != NULL) {
1977 if (container->debugName != NULL) {
1978 SDL_free(container->debugName);
1979 }
1980
1981 container->debugName = SDL_strdup(text);
1982
1983 for (Uint32 i = 0; i < container->bufferCount; i += 1) {
1984 D3D12_INTERNAL_SetResourceName(
1985 renderer,
1986 container->buffers[i]->handle,
1987 text);
1988 }
1989 }
1990}
1991
1992static void D3D12_SetTextureName(
1993 SDL_GPURenderer *driverData,
1994 SDL_GPUTexture *texture,
1995 const char *text)
1996{
1997 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
1998 D3D12TextureContainer *container = (D3D12TextureContainer *)texture;
1999
2000 if (renderer->debug_mode && text != NULL) {
2001 if (container->debugName != NULL) {
2002 SDL_free(container->debugName);
2003 }
2004
2005 container->debugName = SDL_strdup(text);
2006
2007 for (Uint32 i = 0; i < container->textureCount; i += 1) {
2008 D3D12_INTERNAL_SetResourceName(
2009 renderer,
2010 container->textures[i]->resource,
2011 text);
2012 }
2013 }
2014}
2015
2016/* These debug functions are all marked as "for internal usage only"
2017 * on D3D12... works on renderdoc!
2018 */
2019
2020static void D3D12_InsertDebugLabel(
2021 SDL_GPUCommandBuffer *commandBuffer,
2022 const char *text)
2023{
2024 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
2025 WCHAR *wchar_text = WIN_UTF8ToStringW(text);
2026
2027 ID3D12GraphicsCommandList_SetMarker(
2028 d3d12CommandBuffer->graphicsCommandList,
2029 0,
2030 wchar_text,
2031 (UINT)SDL_wcslen(wchar_text) * sizeof(WCHAR));
2032
2033 SDL_free(wchar_text);
2034}
2035
2036static void D3D12_PushDebugGroup(
2037 SDL_GPUCommandBuffer *commandBuffer,
2038 const char *name)
2039{
2040 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
2041 WCHAR *wchar_text = WIN_UTF8ToStringW(name);
2042
2043 ID3D12GraphicsCommandList_BeginEvent(
2044 d3d12CommandBuffer->graphicsCommandList,
2045 0,
2046 wchar_text,
2047 (UINT)SDL_wcslen(wchar_text) * sizeof(WCHAR));
2048
2049 SDL_free(wchar_text);
2050}
2051
2052static void D3D12_PopDebugGroup(
2053 SDL_GPUCommandBuffer *commandBuffer)
2054{
2055 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
2056 ID3D12GraphicsCommandList_EndEvent(d3d12CommandBuffer->graphicsCommandList);
2057}
2058
2059// State Creation
2060
2061static D3D12DescriptorHeap *D3D12_INTERNAL_CreateDescriptorHeap(
2062 D3D12Renderer *renderer,
2063 D3D12_DESCRIPTOR_HEAP_TYPE type,
2064 Uint32 descriptorCount,
2065 bool staging)
2066{
2067 D3D12DescriptorHeap *heap;
2068 ID3D12DescriptorHeap *handle;
2069 D3D12_DESCRIPTOR_HEAP_DESC heapDesc;
2070 HRESULT res;
2071
2072 heap = (D3D12DescriptorHeap *)SDL_calloc(1, sizeof(D3D12DescriptorHeap));
2073 if (!heap) {
2074 return NULL;
2075 }
2076
2077 heap->currentDescriptorIndex = 0;
2078
2079 heapDesc.NumDescriptors = descriptorCount;
2080 heapDesc.Type = type;
2081 heapDesc.Flags = staging ? D3D12_DESCRIPTOR_HEAP_FLAG_NONE : D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
2082 heapDesc.NodeMask = 0;
2083
2084 res = ID3D12Device_CreateDescriptorHeap(
2085 renderer->device,
2086 &heapDesc,
2087 D3D_GUID(D3D_IID_ID3D12DescriptorHeap),
2088 (void **)&handle);
2089
2090 if (FAILED(res)) {
2091 D3D12_INTERNAL_SetError(renderer, "Failed to create descriptor heap!", res);
2092 D3D12_INTERNAL_DestroyDescriptorHeap(heap);
2093 return NULL;
2094 }
2095
2096 heap->handle = handle;
2097 heap->heapType = type;
2098 heap->maxDescriptors = descriptorCount;
2099 heap->staging = staging;
2100 heap->descriptorSize = ID3D12Device_GetDescriptorHandleIncrementSize(renderer->device, type);
2101 D3D_CALL_RET(handle, GetCPUDescriptorHandleForHeapStart, &heap->descriptorHeapCPUStart);
2102 if (!staging) {
2103 D3D_CALL_RET(handle, GetGPUDescriptorHandleForHeapStart, &heap->descriptorHeapGPUStart);
2104 }
2105
2106 return heap;
2107}
2108
2109static D3D12StagingDescriptorPool *D3D12_INTERNAL_CreateStagingDescriptorPool(
2110 D3D12Renderer *renderer,
2111 D3D12_DESCRIPTOR_HEAP_TYPE heapType
2112) {
2113 D3D12DescriptorHeap *heap = D3D12_INTERNAL_CreateDescriptorHeap(
2114 renderer,
2115 heapType,
2116 STAGING_HEAP_DESCRIPTOR_COUNT,
2117 true);
2118
2119 if (!heap) {
2120 return NULL;
2121 }
2122
2123 D3D12StagingDescriptorPool *pool = (D3D12StagingDescriptorPool*) SDL_calloc(1, sizeof(D3D12StagingDescriptorPool));
2124
2125 pool->heapCount = 1;
2126 pool->heaps = (D3D12DescriptorHeap**) SDL_malloc(sizeof(D3D12DescriptorHeap*));
2127 pool->heaps[0] = heap;
2128
2129 pool->freeDescriptorCapacity = STAGING_HEAP_DESCRIPTOR_COUNT;
2130 pool->freeDescriptorCount = STAGING_HEAP_DESCRIPTOR_COUNT;
2131 pool->freeDescriptors = (D3D12StagingDescriptor*) SDL_malloc(STAGING_HEAP_DESCRIPTOR_COUNT * sizeof(D3D12StagingDescriptor));
2132
2133 for (Uint32 i = 0; i < STAGING_HEAP_DESCRIPTOR_COUNT; i += 1) {
2134 pool->freeDescriptors[i].pool = pool;
2135 pool->freeDescriptors[i].heap = heap;
2136 pool->freeDescriptors[i].cpuHandleIndex = i;
2137 pool->freeDescriptors[i].cpuHandle.ptr = heap->descriptorHeapCPUStart.ptr + (i * heap->descriptorSize);
2138 }
2139
2140 pool->lock = SDL_CreateMutex();
2141
2142 return pool;
2143}
2144
2145/* If the pool is empty, we need to refill it! */
2146static bool D3D12_INTERNAL_ExpandStagingDescriptorPool(
2147 D3D12Renderer *renderer,
2148 D3D12StagingDescriptorPool *pool
2149) {
2150 D3D12DescriptorHeap *heap = D3D12_INTERNAL_CreateDescriptorHeap(
2151 renderer,
2152 pool->heaps[0]->heapType,
2153 STAGING_HEAP_DESCRIPTOR_COUNT,
2154 true);
2155
2156 if (!heap) {
2157 return false;
2158 }
2159
2160 pool->heapCount += 1;
2161 pool->heaps = (D3D12DescriptorHeap**) SDL_realloc(pool->heaps, pool->heapCount * sizeof(D3D12DescriptorHeap*));
2162 pool->heaps[pool->heapCount - 1] = heap;
2163
2164 pool->freeDescriptorCapacity += STAGING_HEAP_DESCRIPTOR_COUNT;
2165 pool->freeDescriptorCount += STAGING_HEAP_DESCRIPTOR_COUNT;
2166 pool->freeDescriptors = (D3D12StagingDescriptor*) SDL_realloc(pool->freeDescriptors, pool->freeDescriptorCapacity * sizeof(D3D12StagingDescriptor));
2167
2168 for (Uint32 i = 0; i < STAGING_HEAP_DESCRIPTOR_COUNT; i += 1) {
2169 pool->freeDescriptors[i].pool = pool;
2170 pool->freeDescriptors[i].heap = heap;
2171 pool->freeDescriptors[i].cpuHandleIndex = i;
2172 pool->freeDescriptors[i].cpuHandle.ptr = heap->descriptorHeapCPUStart.ptr + (i * heap->descriptorSize);
2173 }
2174
2175 return true;
2176}
2177
2178static D3D12DescriptorHeap *D3D12_INTERNAL_AcquireGPUDescriptorHeapFromPool(
2179 D3D12CommandBuffer *commandBuffer,
2180 D3D12_DESCRIPTOR_HEAP_TYPE descriptorHeapType)
2181{
2182 D3D12DescriptorHeap *result;
2183 D3D12Renderer *renderer = commandBuffer->renderer;
2184 D3D12GPUDescriptorHeapPool *pool = &renderer->gpuDescriptorHeapPools[descriptorHeapType];
2185
2186 SDL_LockMutex(pool->lock);
2187 if (pool->count > 0) {
2188 result = pool->heaps[pool->count - 1];
2189 pool->count -= 1;
2190 } else {
2191 result = D3D12_INTERNAL_CreateDescriptorHeap(
2192 renderer,
2193 descriptorHeapType,
2194 descriptorHeapType == D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV ? VIEW_GPU_DESCRIPTOR_COUNT : SAMPLER_GPU_DESCRIPTOR_COUNT,
2195 false);
2196 }
2197 SDL_UnlockMutex(pool->lock);
2198
2199 return result;
2200}
2201
2202static void D3D12_INTERNAL_ReturnGPUDescriptorHeapToPool(
2203 D3D12Renderer *renderer,
2204 D3D12DescriptorHeap *heap)
2205{
2206 if (heap == NULL) {
2207 return;
2208 }
2209
2210 D3D12GPUDescriptorHeapPool *pool = &renderer->gpuDescriptorHeapPools[heap->heapType];
2211
2212 heap->currentDescriptorIndex = 0;
2213
2214 SDL_LockMutex(pool->lock);
2215 if (pool->count >= pool->capacity) {
2216 pool->capacity *= 2;
2217 pool->heaps = (D3D12DescriptorHeap **)SDL_realloc(
2218 pool->heaps,
2219 pool->capacity * sizeof(D3D12DescriptorHeap *));
2220 }
2221
2222 pool->heaps[pool->count] = heap;
2223 pool->count += 1;
2224 SDL_UnlockMutex(pool->lock);
2225}
2226
2227/*
2228 * The root signature lets us define "root parameters" which are essentially bind points for resources.
2229 * These let us define the register ranges as well as the register "space".
2230 * The register space is akin to the descriptor set index in Vulkan, which allows us to group resources
2231 * by stage so that the registers from the vertex and fragment shaders don't clobber each other.
2232 *
2233 * Most of our root parameters are implemented as "descriptor tables" so we can
2234 * copy and then point to contiguous descriptor regions.
2235 * Uniform buffers are the exception - these have to be implemented as raw "root descriptors" so
2236 * that we can dynamically update the address that the constant buffer view points to.
2237 *
2238 * The root signature has a maximum size of 64 DWORDs.
2239 * A descriptor table uses 1 DWORD.
2240 * A root descriptor uses 2 DWORDS.
2241 * This means our biggest root signature uses 24 DWORDs total, well under the limit.
2242 *
2243 * The root parameter indices are created dynamically and stored in the D3D12GraphicsRootSignature struct.
2244 */
2245static D3D12GraphicsRootSignature *D3D12_INTERNAL_CreateGraphicsRootSignature(
2246 D3D12Renderer *renderer,
2247 D3D12Shader *vertexShader,
2248 D3D12Shader *fragmentShader)
2249{
2250 // FIXME: I think the max can be smaller...
2251 D3D12_ROOT_PARAMETER rootParameters[MAX_ROOT_SIGNATURE_PARAMETERS];
2252 D3D12_DESCRIPTOR_RANGE descriptorRanges[MAX_ROOT_SIGNATURE_PARAMETERS];
2253 Uint32 parameterCount = 0;
2254 Uint32 rangeCount = 0;
2255 D3D12_DESCRIPTOR_RANGE descriptorRange;
2256 D3D12_ROOT_PARAMETER rootParameter;
2257 D3D12GraphicsRootSignature *d3d12GraphicsRootSignature =
2258 (D3D12GraphicsRootSignature *)SDL_calloc(1, sizeof(D3D12GraphicsRootSignature));
2259 if (!d3d12GraphicsRootSignature) {
2260 return NULL;
2261 }
2262
2263 SDL_zeroa(rootParameters);
2264 SDL_zeroa(descriptorRanges);
2265 SDL_zero(rootParameter);
2266
2267 d3d12GraphicsRootSignature->vertexSamplerRootIndex = -1;
2268 d3d12GraphicsRootSignature->vertexSamplerTextureRootIndex = -1;
2269 d3d12GraphicsRootSignature->vertexStorageTextureRootIndex = -1;
2270 d3d12GraphicsRootSignature->vertexStorageBufferRootIndex = -1;
2271
2272 d3d12GraphicsRootSignature->fragmentSamplerRootIndex = -1;
2273 d3d12GraphicsRootSignature->fragmentSamplerTextureRootIndex = -1;
2274 d3d12GraphicsRootSignature->fragmentStorageTextureRootIndex = -1;
2275 d3d12GraphicsRootSignature->fragmentStorageBufferRootIndex = -1;
2276
2277 for (Uint32 i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
2278 d3d12GraphicsRootSignature->vertexUniformBufferRootIndex[i] = -1;
2279 d3d12GraphicsRootSignature->fragmentUniformBufferRootIndex[i] = -1;
2280 }
2281
2282 if (vertexShader->num_samplers > 0) {
2283 // Vertex Samplers
2284 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER;
2285 descriptorRange.NumDescriptors = vertexShader->num_samplers;
2286 descriptorRange.BaseShaderRegister = 0;
2287 descriptorRange.RegisterSpace = 0;
2288 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2289 descriptorRanges[rangeCount] = descriptorRange;
2290
2291 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2292 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2293 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2294 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_VERTEX;
2295 rootParameters[parameterCount] = rootParameter;
2296 d3d12GraphicsRootSignature->vertexSamplerRootIndex = parameterCount;
2297 rangeCount += 1;
2298 parameterCount += 1;
2299
2300 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
2301 descriptorRange.NumDescriptors = vertexShader->num_samplers;
2302 descriptorRange.BaseShaderRegister = 0;
2303 descriptorRange.RegisterSpace = 0;
2304 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2305 descriptorRanges[rangeCount] = descriptorRange;
2306
2307 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2308 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2309 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2310 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_VERTEX;
2311 rootParameters[parameterCount] = rootParameter;
2312 d3d12GraphicsRootSignature->vertexSamplerTextureRootIndex = parameterCount;
2313 rangeCount += 1;
2314 parameterCount += 1;
2315 }
2316
2317 if (vertexShader->numStorageTextures) {
2318 // Vertex storage textures
2319 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
2320 descriptorRange.NumDescriptors = vertexShader->numStorageTextures;
2321 descriptorRange.BaseShaderRegister = vertexShader->num_samplers;
2322 descriptorRange.RegisterSpace = 0;
2323 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2324 descriptorRanges[rangeCount] = descriptorRange;
2325
2326 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2327 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2328 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2329 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_VERTEX;
2330 rootParameters[parameterCount] = rootParameter;
2331 d3d12GraphicsRootSignature->vertexStorageTextureRootIndex = parameterCount;
2332 rangeCount += 1;
2333 parameterCount += 1;
2334 }
2335
2336 if (vertexShader->numStorageBuffers) {
2337
2338 // Vertex storage buffers
2339 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
2340 descriptorRange.NumDescriptors = vertexShader->numStorageBuffers;
2341 descriptorRange.BaseShaderRegister = vertexShader->num_samplers + vertexShader->numStorageTextures;
2342 descriptorRange.RegisterSpace = 0;
2343 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2344 descriptorRanges[rangeCount] = descriptorRange;
2345
2346 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2347 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2348 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2349 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_VERTEX;
2350 rootParameters[parameterCount] = rootParameter;
2351 d3d12GraphicsRootSignature->vertexStorageBufferRootIndex = parameterCount;
2352 rangeCount += 1;
2353 parameterCount += 1;
2354 }
2355
2356 // Vertex Uniforms
2357 for (Uint32 i = 0; i < vertexShader->numUniformBuffers; i += 1) {
2358 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
2359 rootParameter.Descriptor.ShaderRegister = i;
2360 rootParameter.Descriptor.RegisterSpace = 1;
2361 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_VERTEX;
2362 rootParameters[parameterCount] = rootParameter;
2363 d3d12GraphicsRootSignature->vertexUniformBufferRootIndex[i] = parameterCount;
2364 parameterCount += 1;
2365 }
2366
2367 if (fragmentShader->num_samplers) {
2368 // Fragment Samplers
2369 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER;
2370 descriptorRange.NumDescriptors = fragmentShader->num_samplers;
2371 descriptorRange.BaseShaderRegister = 0;
2372 descriptorRange.RegisterSpace = 2;
2373 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2374 descriptorRanges[rangeCount] = descriptorRange;
2375
2376 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2377 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2378 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2379 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
2380 rootParameters[parameterCount] = rootParameter;
2381 d3d12GraphicsRootSignature->fragmentSamplerRootIndex = parameterCount;
2382 rangeCount += 1;
2383 parameterCount += 1;
2384
2385 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
2386 descriptorRange.NumDescriptors = fragmentShader->num_samplers;
2387 descriptorRange.BaseShaderRegister = 0;
2388 descriptorRange.RegisterSpace = 2;
2389 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2390 descriptorRanges[rangeCount] = descriptorRange;
2391
2392 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2393 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2394 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2395 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
2396 rootParameters[parameterCount] = rootParameter;
2397 d3d12GraphicsRootSignature->fragmentSamplerTextureRootIndex = parameterCount;
2398 rangeCount += 1;
2399 parameterCount += 1;
2400 }
2401
2402 if (fragmentShader->numStorageTextures) {
2403 // Fragment Storage Textures
2404 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
2405 descriptorRange.NumDescriptors = fragmentShader->numStorageTextures;
2406 descriptorRange.BaseShaderRegister = fragmentShader->num_samplers;
2407 descriptorRange.RegisterSpace = 2;
2408 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2409 descriptorRanges[rangeCount] = descriptorRange;
2410
2411 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2412 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2413 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2414 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
2415 rootParameters[parameterCount] = rootParameter;
2416 d3d12GraphicsRootSignature->fragmentStorageTextureRootIndex = parameterCount;
2417 rangeCount += 1;
2418 parameterCount += 1;
2419 }
2420
2421 if (fragmentShader->numStorageBuffers) {
2422 // Fragment Storage Buffers
2423 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
2424 descriptorRange.NumDescriptors = fragmentShader->numStorageBuffers;
2425 descriptorRange.BaseShaderRegister = fragmentShader->num_samplers + fragmentShader->numStorageTextures;
2426 descriptorRange.RegisterSpace = 2;
2427 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2428 descriptorRanges[rangeCount] = descriptorRange;
2429
2430 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2431 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2432 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2433 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
2434 rootParameters[parameterCount] = rootParameter;
2435 d3d12GraphicsRootSignature->fragmentStorageBufferRootIndex = parameterCount;
2436 rangeCount += 1;
2437 parameterCount += 1;
2438 }
2439
2440 // Fragment Uniforms
2441 for (Uint32 i = 0; i < fragmentShader->numUniformBuffers; i += 1) {
2442 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
2443 rootParameter.Descriptor.ShaderRegister = i;
2444 rootParameter.Descriptor.RegisterSpace = 3;
2445 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
2446 rootParameters[parameterCount] = rootParameter;
2447 d3d12GraphicsRootSignature->fragmentUniformBufferRootIndex[i] = parameterCount;
2448 parameterCount += 1;
2449 }
2450
2451 // FIXME: shouldn't have to assert here
2452 SDL_assert(parameterCount <= MAX_ROOT_SIGNATURE_PARAMETERS);
2453 SDL_assert(rangeCount <= MAX_ROOT_SIGNATURE_PARAMETERS);
2454
2455 // Create the root signature description
2456 D3D12_ROOT_SIGNATURE_DESC rootSignatureDesc;
2457 rootSignatureDesc.NumParameters = parameterCount;
2458 rootSignatureDesc.pParameters = rootParameters;
2459 rootSignatureDesc.NumStaticSamplers = 0;
2460 rootSignatureDesc.pStaticSamplers = NULL;
2461 rootSignatureDesc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;
2462
2463 // Serialize the root signature
2464 ID3DBlob *serializedRootSignature;
2465 ID3DBlob *errorBlob;
2466 HRESULT res = renderer->D3D12SerializeRootSignature_func(&rootSignatureDesc, D3D_ROOT_SIGNATURE_VERSION_1, &serializedRootSignature, &errorBlob);
2467
2468 if (FAILED(res)) {
2469 if (errorBlob) {
2470 SET_ERROR("Failed to serialize RootSignature: %s", (const char *)ID3D10Blob_GetBufferPointer(errorBlob));
2471 ID3D10Blob_Release(errorBlob);
2472 }
2473 D3D12_INTERNAL_DestroyGraphicsRootSignature(d3d12GraphicsRootSignature);
2474 return NULL;
2475 }
2476
2477 // Create the root signature
2478 ID3D12RootSignature *rootSignature;
2479
2480 res = ID3D12Device_CreateRootSignature(
2481 renderer->device,
2482 0,
2483 ID3D10Blob_GetBufferPointer(serializedRootSignature),
2484 ID3D10Blob_GetBufferSize(serializedRootSignature),
2485 D3D_GUID(D3D_IID_ID3D12RootSignature),
2486 (void **)&rootSignature);
2487
2488 if (FAILED(res)) {
2489 if (errorBlob) {
2490 SET_ERROR("Failed to create RootSignature: %s", (const char *)ID3D10Blob_GetBufferPointer(errorBlob));
2491 ID3D10Blob_Release(errorBlob);
2492 }
2493 D3D12_INTERNAL_DestroyGraphicsRootSignature(d3d12GraphicsRootSignature);
2494 return NULL;
2495 }
2496
2497 d3d12GraphicsRootSignature->handle = rootSignature;
2498 return d3d12GraphicsRootSignature;
2499}
2500
2501static bool D3D12_INTERNAL_CreateShaderBytecode(
2502 D3D12Renderer *renderer,
2503 Uint32 stage,
2504 SDL_GPUShaderFormat format,
2505 const Uint8 *code,
2506 size_t codeSize,
2507 const char *entrypointName,
2508 void **pBytecode,
2509 size_t *pBytecodeSize)
2510{
2511 if (pBytecode != NULL) {
2512 *pBytecode = SDL_malloc(codeSize);
2513 if (!*pBytecode) {
2514 return false;
2515 }
2516 SDL_memcpy(*pBytecode, code, codeSize);
2517 *pBytecodeSize = codeSize;
2518 }
2519
2520 return true;
2521}
2522
2523static D3D12ComputeRootSignature *D3D12_INTERNAL_CreateComputeRootSignature(
2524 D3D12Renderer *renderer,
2525 const SDL_GPUComputePipelineCreateInfo *createInfo)
2526{
2527 // FIXME: I think the max can be smaller...
2528 D3D12_ROOT_PARAMETER rootParameters[MAX_ROOT_SIGNATURE_PARAMETERS];
2529 D3D12_DESCRIPTOR_RANGE descriptorRanges[MAX_ROOT_SIGNATURE_PARAMETERS];
2530 Uint32 parameterCount = 0;
2531 Uint32 rangeCount = 0;
2532 D3D12_DESCRIPTOR_RANGE descriptorRange;
2533 D3D12_ROOT_PARAMETER rootParameter;
2534 D3D12ComputeRootSignature *d3d12ComputeRootSignature =
2535 (D3D12ComputeRootSignature *)SDL_calloc(1, sizeof(D3D12ComputeRootSignature));
2536 if (!d3d12ComputeRootSignature) {
2537 return NULL;
2538 }
2539
2540 SDL_zeroa(rootParameters);
2541 SDL_zeroa(descriptorRanges);
2542 SDL_zero(rootParameter);
2543
2544 d3d12ComputeRootSignature->samplerRootIndex = -1;
2545 d3d12ComputeRootSignature->samplerTextureRootIndex = -1;
2546 d3d12ComputeRootSignature->readOnlyStorageTextureRootIndex = -1;
2547 d3d12ComputeRootSignature->readOnlyStorageBufferRootIndex = -1;
2548 d3d12ComputeRootSignature->readWriteStorageTextureRootIndex = -1;
2549 d3d12ComputeRootSignature->readWriteStorageBufferRootIndex = -1;
2550
2551 for (Uint32 i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
2552 d3d12ComputeRootSignature->uniformBufferRootIndex[i] = -1;
2553 }
2554
2555 if (createInfo->num_samplers) {
2556 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER;
2557 descriptorRange.NumDescriptors = createInfo->num_samplers;
2558 descriptorRange.BaseShaderRegister = 0;
2559 descriptorRange.RegisterSpace = 0;
2560 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2561 descriptorRanges[rangeCount] = descriptorRange;
2562
2563 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2564 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2565 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2566 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; // ALL is used for compute
2567 rootParameters[parameterCount] = rootParameter;
2568 d3d12ComputeRootSignature->samplerRootIndex = parameterCount;
2569 rangeCount += 1;
2570 parameterCount += 1;
2571
2572 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
2573 descriptorRange.NumDescriptors = createInfo->num_samplers;
2574 descriptorRange.BaseShaderRegister = 0;
2575 descriptorRange.RegisterSpace = 0;
2576 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2577 descriptorRanges[rangeCount] = descriptorRange;
2578
2579 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2580 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2581 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2582 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; // ALL is used for compute
2583 rootParameters[parameterCount] = rootParameter;
2584 d3d12ComputeRootSignature->samplerTextureRootIndex = parameterCount;
2585 rangeCount += 1;
2586 parameterCount += 1;
2587 }
2588
2589 if (createInfo->num_readonly_storage_textures) {
2590 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
2591 descriptorRange.NumDescriptors = createInfo->num_readonly_storage_textures;
2592 descriptorRange.BaseShaderRegister = createInfo->num_samplers;
2593 descriptorRange.RegisterSpace = 0;
2594 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2595 descriptorRanges[rangeCount] = descriptorRange;
2596
2597 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2598 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2599 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2600 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; // ALL is used for compute
2601 rootParameters[parameterCount] = rootParameter;
2602 d3d12ComputeRootSignature->readOnlyStorageTextureRootIndex = parameterCount;
2603 rangeCount += 1;
2604 parameterCount += 1;
2605 }
2606
2607 if (createInfo->num_readonly_storage_buffers) {
2608 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
2609 descriptorRange.NumDescriptors = createInfo->num_readonly_storage_buffers;
2610 descriptorRange.BaseShaderRegister = createInfo->num_samplers + createInfo->num_readonly_storage_textures;
2611 descriptorRange.RegisterSpace = 0;
2612 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2613 descriptorRanges[rangeCount] = descriptorRange;
2614
2615 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2616 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2617 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2618 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; // ALL is used for compute
2619 rootParameters[parameterCount] = rootParameter;
2620 d3d12ComputeRootSignature->readOnlyStorageBufferRootIndex = parameterCount;
2621 rangeCount += 1;
2622 parameterCount += 1;
2623 }
2624
2625 if (createInfo->num_readwrite_storage_textures) {
2626 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_UAV;
2627 descriptorRange.NumDescriptors = createInfo->num_readwrite_storage_textures;
2628 descriptorRange.BaseShaderRegister = 0;
2629 descriptorRange.RegisterSpace = 1;
2630 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2631 descriptorRanges[rangeCount] = descriptorRange;
2632
2633 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2634 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2635 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2636 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; // ALL is used for compute
2637 rootParameters[parameterCount] = rootParameter;
2638 d3d12ComputeRootSignature->readWriteStorageTextureRootIndex = parameterCount;
2639 rangeCount += 1;
2640 parameterCount += 1;
2641 }
2642
2643 if (createInfo->num_readwrite_storage_buffers) {
2644 descriptorRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_UAV;
2645 descriptorRange.NumDescriptors = createInfo->num_readwrite_storage_buffers;
2646 descriptorRange.BaseShaderRegister = createInfo->num_readwrite_storage_textures;
2647 descriptorRange.RegisterSpace = 1;
2648 descriptorRange.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
2649 descriptorRanges[rangeCount] = descriptorRange;
2650
2651 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
2652 rootParameter.DescriptorTable.NumDescriptorRanges = 1;
2653 rootParameter.DescriptorTable.pDescriptorRanges = &descriptorRanges[rangeCount];
2654 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; // ALL is used for compute
2655 rootParameters[parameterCount] = rootParameter;
2656 d3d12ComputeRootSignature->readWriteStorageBufferRootIndex = parameterCount;
2657 rangeCount += 1;
2658 parameterCount += 1;
2659 }
2660
2661 for (Uint32 i = 0; i < createInfo->num_uniform_buffers; i += 1) {
2662 rootParameter.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
2663 rootParameter.Descriptor.ShaderRegister = i;
2664 rootParameter.Descriptor.RegisterSpace = 2;
2665 rootParameter.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL; // ALL is used for compute
2666 rootParameters[parameterCount] = rootParameter;
2667 d3d12ComputeRootSignature->uniformBufferRootIndex[i] = parameterCount;
2668 parameterCount += 1;
2669 }
2670
2671 D3D12_ROOT_SIGNATURE_DESC rootSignatureDesc;
2672 rootSignatureDesc.NumParameters = parameterCount;
2673 rootSignatureDesc.pParameters = rootParameters;
2674 rootSignatureDesc.NumStaticSamplers = 0;
2675 rootSignatureDesc.pStaticSamplers = NULL;
2676 rootSignatureDesc.Flags = (D3D12_ROOT_SIGNATURE_FLAGS)0;
2677
2678 ID3DBlob *serializedRootSignature;
2679 ID3DBlob *errorBlob;
2680 HRESULT res = renderer->D3D12SerializeRootSignature_func(
2681 &rootSignatureDesc,
2682 D3D_ROOT_SIGNATURE_VERSION_1,
2683 &serializedRootSignature,
2684 &errorBlob);
2685
2686 if (FAILED(res)) {
2687 if (errorBlob) {
2688 SET_ERROR("Failed to serialize RootSignature: %s", (const char *)ID3D10Blob_GetBufferPointer(errorBlob));
2689 ID3D10Blob_Release(errorBlob);
2690 }
2691 D3D12_INTERNAL_DestroyComputeRootSignature(d3d12ComputeRootSignature);
2692 return NULL;
2693 }
2694
2695 ID3D12RootSignature *rootSignature;
2696
2697 res = ID3D12Device_CreateRootSignature(
2698 renderer->device,
2699 0,
2700 ID3D10Blob_GetBufferPointer(serializedRootSignature),
2701 ID3D10Blob_GetBufferSize(serializedRootSignature),
2702 D3D_GUID(D3D_IID_ID3D12RootSignature),
2703 (void **)&rootSignature);
2704
2705 if (FAILED(res)) {
2706 if (errorBlob) {
2707 SET_ERROR("Failed to create RootSignature: %s", (const char *)ID3D10Blob_GetBufferPointer(errorBlob));
2708 ID3D10Blob_Release(errorBlob);
2709 }
2710 D3D12_INTERNAL_DestroyComputeRootSignature(d3d12ComputeRootSignature);
2711 return NULL;
2712 }
2713
2714 d3d12ComputeRootSignature->handle = rootSignature;
2715 return d3d12ComputeRootSignature;
2716}
2717
2718static SDL_GPUComputePipeline *D3D12_CreateComputePipeline(
2719 SDL_GPURenderer *driverData,
2720 const SDL_GPUComputePipelineCreateInfo *createinfo)
2721{
2722 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
2723 void *bytecode;
2724 size_t bytecodeSize;
2725 ID3D12PipelineState *pipelineState;
2726
2727 if (!D3D12_INTERNAL_CreateShaderBytecode(
2728 renderer,
2729 SDL_GPU_SHADERSTAGE_COMPUTE,
2730 createinfo->format,
2731 createinfo->code,
2732 createinfo->code_size,
2733 createinfo->entrypoint,
2734 &bytecode,
2735 &bytecodeSize)) {
2736 return NULL;
2737 }
2738
2739 D3D12ComputeRootSignature *rootSignature = D3D12_INTERNAL_CreateComputeRootSignature(
2740 renderer,
2741 createinfo);
2742
2743 if (rootSignature == NULL) {
2744 SDL_free(bytecode);
2745 SET_STRING_ERROR_AND_RETURN("Could not create root signature!", NULL);
2746 }
2747
2748 D3D12_COMPUTE_PIPELINE_STATE_DESC pipelineDesc;
2749 pipelineDesc.CS.pShaderBytecode = bytecode;
2750 pipelineDesc.CS.BytecodeLength = bytecodeSize;
2751 pipelineDesc.pRootSignature = rootSignature->handle;
2752 pipelineDesc.CachedPSO.CachedBlobSizeInBytes = 0;
2753 pipelineDesc.CachedPSO.pCachedBlob = NULL;
2754 pipelineDesc.Flags = D3D12_PIPELINE_STATE_FLAG_NONE;
2755 pipelineDesc.NodeMask = 0;
2756
2757 HRESULT res = ID3D12Device_CreateComputePipelineState(
2758 renderer->device,
2759 &pipelineDesc,
2760 D3D_GUID(D3D_IID_ID3D12PipelineState),
2761 (void **)&pipelineState);
2762
2763 if (FAILED(res)) {
2764 D3D12_INTERNAL_SetError(renderer, "Could not create compute pipeline state", res);
2765 SDL_free(bytecode);
2766 return NULL;
2767 }
2768
2769 D3D12ComputePipeline *computePipeline =
2770 (D3D12ComputePipeline *)SDL_calloc(1, sizeof(D3D12ComputePipeline));
2771
2772 if (!computePipeline) {
2773 ID3D12PipelineState_Release(pipelineState);
2774 SDL_free(bytecode);
2775 return NULL;
2776 }
2777
2778 computePipeline->pipelineState = pipelineState;
2779 computePipeline->rootSignature = rootSignature;
2780 computePipeline->numSamplers = createinfo->num_samplers;
2781 computePipeline->numReadOnlyStorageTextures = createinfo->num_readonly_storage_textures;
2782 computePipeline->numReadOnlyStorageBuffers = createinfo->num_readonly_storage_buffers;
2783 computePipeline->numReadWriteStorageTextures = createinfo->num_readwrite_storage_textures;
2784 computePipeline->numReadWriteStorageBuffers = createinfo->num_readwrite_storage_buffers;
2785 computePipeline->numUniformBuffers = createinfo->num_uniform_buffers;
2786 SDL_SetAtomicInt(&computePipeline->referenceCount, 0);
2787
2788 if (renderer->debug_mode && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING)) {
2789 D3D12_INTERNAL_SetPipelineStateName(
2790 renderer,
2791 computePipeline->pipelineState,
2792 SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING, NULL));
2793 }
2794
2795 return (SDL_GPUComputePipeline *)computePipeline;
2796}
2797
2798static bool D3D12_INTERNAL_ConvertRasterizerState(SDL_GPURasterizerState rasterizerState, D3D12_RASTERIZER_DESC *desc)
2799{
2800 if (!desc) {
2801 return false;
2802 }
2803
2804 desc->FillMode = SDLToD3D12_FillMode[rasterizerState.fill_mode];
2805 desc->CullMode = SDLToD3D12_CullMode[rasterizerState.cull_mode];
2806
2807 switch (rasterizerState.front_face) {
2808 case SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE:
2809 desc->FrontCounterClockwise = TRUE;
2810 break;
2811 case SDL_GPU_FRONTFACE_CLOCKWISE:
2812 desc->FrontCounterClockwise = FALSE;
2813 break;
2814 default:
2815 return false;
2816 }
2817
2818 if (rasterizerState.enable_depth_bias) {
2819 desc->DepthBias = SDL_lroundf(rasterizerState.depth_bias_constant_factor);
2820 desc->DepthBiasClamp = rasterizerState.depth_bias_clamp;
2821 desc->SlopeScaledDepthBias = rasterizerState.depth_bias_slope_factor;
2822 } else {
2823 desc->DepthBias = 0;
2824 desc->DepthBiasClamp = 0.0f;
2825 desc->SlopeScaledDepthBias = 0.0f;
2826 }
2827
2828 desc->DepthClipEnable = rasterizerState.enable_depth_clip;
2829 desc->MultisampleEnable = FALSE;
2830 desc->AntialiasedLineEnable = FALSE;
2831 desc->ForcedSampleCount = 0;
2832 desc->ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
2833
2834 return true;
2835}
2836
2837static bool D3D12_INTERNAL_ConvertBlendState(
2838 const SDL_GPUGraphicsPipelineCreateInfo *pipelineInfo,
2839 D3D12_BLEND_DESC *blendDesc)
2840{
2841 if (!blendDesc) {
2842 return false;
2843 }
2844
2845 SDL_zerop(blendDesc);
2846 blendDesc->AlphaToCoverageEnable = FALSE;
2847 blendDesc->IndependentBlendEnable = FALSE;
2848
2849 for (UINT i = 0; i < MAX_COLOR_TARGET_BINDINGS; i += 1) {
2850 D3D12_RENDER_TARGET_BLEND_DESC rtBlendDesc;
2851 rtBlendDesc.BlendEnable = FALSE;
2852 rtBlendDesc.LogicOpEnable = FALSE;
2853 rtBlendDesc.SrcBlend = D3D12_BLEND_ONE;
2854 rtBlendDesc.DestBlend = D3D12_BLEND_ZERO;
2855 rtBlendDesc.BlendOp = D3D12_BLEND_OP_ADD;
2856 rtBlendDesc.SrcBlendAlpha = D3D12_BLEND_ONE;
2857 rtBlendDesc.DestBlendAlpha = D3D12_BLEND_ZERO;
2858 rtBlendDesc.BlendOpAlpha = D3D12_BLEND_OP_ADD;
2859 rtBlendDesc.LogicOp = D3D12_LOGIC_OP_NOOP;
2860 rtBlendDesc.RenderTargetWriteMask = D3D12_COLOR_WRITE_ENABLE_ALL;
2861
2862 // If target_info has more blend states, you can set IndependentBlendEnable to TRUE and assign different blend states to each render target slot
2863 if (i < pipelineInfo->target_info.num_color_targets) {
2864 SDL_GPUColorTargetBlendState sdlBlendState = pipelineInfo->target_info.color_target_descriptions[i].blend_state;
2865 SDL_GPUColorComponentFlags colorWriteMask = sdlBlendState.enable_color_write_mask ?
2866 sdlBlendState.color_write_mask :
2867 0xF;
2868
2869 rtBlendDesc.BlendEnable = sdlBlendState.enable_blend;
2870 rtBlendDesc.SrcBlend = SDLToD3D12_BlendFactor[sdlBlendState.src_color_blendfactor];
2871 rtBlendDesc.DestBlend = SDLToD3D12_BlendFactor[sdlBlendState.dst_color_blendfactor];
2872 rtBlendDesc.BlendOp = SDLToD3D12_BlendOp[sdlBlendState.color_blend_op];
2873 rtBlendDesc.SrcBlendAlpha = SDLToD3D12_BlendFactorAlpha[sdlBlendState.src_alpha_blendfactor];
2874 rtBlendDesc.DestBlendAlpha = SDLToD3D12_BlendFactorAlpha[sdlBlendState.dst_alpha_blendfactor];
2875 rtBlendDesc.BlendOpAlpha = SDLToD3D12_BlendOp[sdlBlendState.alpha_blend_op];
2876 rtBlendDesc.RenderTargetWriteMask = colorWriteMask;
2877
2878 if (i > 0) {
2879 blendDesc->IndependentBlendEnable = TRUE;
2880 }
2881 }
2882
2883 blendDesc->RenderTarget[i] = rtBlendDesc;
2884 }
2885
2886 return true;
2887}
2888
2889static bool D3D12_INTERNAL_ConvertDepthStencilState(SDL_GPUDepthStencilState depthStencilState, D3D12_DEPTH_STENCIL_DESC *desc)
2890{
2891 if (desc == NULL) {
2892 return false;
2893 }
2894
2895 desc->DepthEnable = depthStencilState.enable_depth_test == true ? TRUE : FALSE;
2896 desc->DepthWriteMask = depthStencilState.enable_depth_write == true ? D3D12_DEPTH_WRITE_MASK_ALL : D3D12_DEPTH_WRITE_MASK_ZERO;
2897 desc->DepthFunc = SDLToD3D12_CompareOp[depthStencilState.compare_op];
2898 desc->StencilEnable = depthStencilState.enable_stencil_test == true ? TRUE : FALSE;
2899 desc->StencilReadMask = depthStencilState.compare_mask;
2900 desc->StencilWriteMask = depthStencilState.write_mask;
2901
2902 desc->FrontFace.StencilFailOp = SDLToD3D12_StencilOp[depthStencilState.front_stencil_state.fail_op];
2903 desc->FrontFace.StencilDepthFailOp = SDLToD3D12_StencilOp[depthStencilState.front_stencil_state.depth_fail_op];
2904 desc->FrontFace.StencilPassOp = SDLToD3D12_StencilOp[depthStencilState.front_stencil_state.pass_op];
2905 desc->FrontFace.StencilFunc = SDLToD3D12_CompareOp[depthStencilState.front_stencil_state.compare_op];
2906
2907 desc->BackFace.StencilFailOp = SDLToD3D12_StencilOp[depthStencilState.back_stencil_state.fail_op];
2908 desc->BackFace.StencilDepthFailOp = SDLToD3D12_StencilOp[depthStencilState.back_stencil_state.depth_fail_op];
2909 desc->BackFace.StencilPassOp = SDLToD3D12_StencilOp[depthStencilState.back_stencil_state.pass_op];
2910 desc->BackFace.StencilFunc = SDLToD3D12_CompareOp[depthStencilState.back_stencil_state.compare_op];
2911
2912 return true;
2913}
2914
2915static bool D3D12_INTERNAL_ConvertVertexInputState(SDL_GPUVertexInputState vertexInputState, D3D12_INPUT_ELEMENT_DESC *desc, const char *semantic)
2916{
2917 if (desc == NULL || vertexInputState.num_vertex_attributes == 0) {
2918 return false;
2919 }
2920
2921 for (Uint32 i = 0; i < vertexInputState.num_vertex_attributes; i += 1) {
2922 SDL_GPUVertexAttribute attribute = vertexInputState.vertex_attributes[i];
2923
2924 desc[i].SemanticName = semantic;
2925 desc[i].SemanticIndex = attribute.location;
2926 desc[i].Format = SDLToD3D12_VertexFormat[attribute.format];
2927 desc[i].InputSlot = attribute.buffer_slot;
2928 desc[i].AlignedByteOffset = attribute.offset;
2929 desc[i].InputSlotClass = SDLToD3D12_InputRate[vertexInputState.vertex_buffer_descriptions[attribute.buffer_slot].input_rate];
2930 desc[i].InstanceDataStepRate = (vertexInputState.vertex_buffer_descriptions[attribute.buffer_slot].input_rate == SDL_GPU_VERTEXINPUTRATE_INSTANCE)
2931 ? 1
2932 : 0;
2933 }
2934
2935 return true;
2936}
2937
2938static bool D3D12_INTERNAL_AssignStagingDescriptorHandle(
2939 D3D12Renderer *renderer,
2940 D3D12_DESCRIPTOR_HEAP_TYPE heapType,
2941 D3D12StagingDescriptor *cpuDescriptor)
2942{
2943 D3D12StagingDescriptor *descriptor;
2944 D3D12StagingDescriptorPool *pool = renderer->stagingDescriptorPools[heapType];
2945
2946 SDL_LockMutex(pool->lock);
2947
2948 if (pool->freeDescriptorCount == 0) {
2949 if (!D3D12_INTERNAL_ExpandStagingDescriptorPool(renderer, pool))
2950 {
2951 SDL_UnlockMutex(pool->lock);
2952 return false;
2953 }
2954 }
2955
2956 descriptor = &pool->freeDescriptors[pool->freeDescriptorCount - 1];
2957 SDL_memcpy(cpuDescriptor, descriptor, sizeof(D3D12StagingDescriptor));
2958 pool->freeDescriptorCount -= 1;
2959
2960 SDL_UnlockMutex(pool->lock);
2961
2962 return true;
2963}
2964
2965static SDL_GPUGraphicsPipeline *D3D12_CreateGraphicsPipeline(
2966 SDL_GPURenderer *driverData,
2967 const SDL_GPUGraphicsPipelineCreateInfo *createinfo)
2968{
2969 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
2970 D3D12Shader *vertShader = (D3D12Shader *)createinfo->vertex_shader;
2971 D3D12Shader *fragShader = (D3D12Shader *)createinfo->fragment_shader;
2972
2973 if (renderer->debug_mode) {
2974 if (vertShader->stage != SDL_GPU_SHADERSTAGE_VERTEX) {
2975 SDL_assert_release(!"CreateGraphicsPipeline was passed a fragment shader for the vertex stage");
2976 }
2977 if (fragShader->stage != SDL_GPU_SHADERSTAGE_FRAGMENT) {
2978 SDL_assert_release(!"CreateGraphicsPipeline was passed a vertex shader for the fragment stage");
2979 }
2980 }
2981
2982 D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc;
2983 SDL_zero(psoDesc);
2984 psoDesc.VS.pShaderBytecode = vertShader->bytecode;
2985 psoDesc.VS.BytecodeLength = vertShader->bytecodeSize;
2986 psoDesc.PS.pShaderBytecode = fragShader->bytecode;
2987 psoDesc.PS.BytecodeLength = fragShader->bytecodeSize;
2988
2989 D3D12_INPUT_ELEMENT_DESC inputElementDescs[D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT];
2990 if (createinfo->vertex_input_state.num_vertex_attributes > 0) {
2991 psoDesc.InputLayout.pInputElementDescs = inputElementDescs;
2992 psoDesc.InputLayout.NumElements = createinfo->vertex_input_state.num_vertex_attributes;
2993 D3D12_INTERNAL_ConvertVertexInputState(createinfo->vertex_input_state, inputElementDescs, renderer->semantic);
2994 }
2995
2996 psoDesc.PrimitiveTopologyType = SDLToD3D12_PrimitiveTopologyType[createinfo->primitive_type];
2997
2998 if (!D3D12_INTERNAL_ConvertRasterizerState(createinfo->rasterizer_state, &psoDesc.RasterizerState)) {
2999 return NULL;
3000 }
3001 if (!D3D12_INTERNAL_ConvertBlendState(createinfo, &psoDesc.BlendState)) {
3002 return NULL;
3003 }
3004 if (!D3D12_INTERNAL_ConvertDepthStencilState(createinfo->depth_stencil_state, &psoDesc.DepthStencilState)) {
3005 return NULL;
3006 }
3007
3008 D3D12GraphicsPipeline *pipeline = (D3D12GraphicsPipeline *)SDL_calloc(1, sizeof(D3D12GraphicsPipeline));
3009 if (!pipeline) {
3010 return NULL;
3011 }
3012
3013 psoDesc.SampleMask = 0xFFFFFFFF;
3014 psoDesc.SampleDesc.Count = SDLToD3D12_SampleCount[createinfo->multisample_state.sample_count];
3015 psoDesc.SampleDesc.Quality = (createinfo->multisample_state.sample_count > SDL_GPU_SAMPLECOUNT_1) ? D3D12_STANDARD_MULTISAMPLE_PATTERN : 0;
3016
3017 if (createinfo->target_info.has_depth_stencil_target) {
3018 psoDesc.DSVFormat = SDLToD3D12_DepthFormat[createinfo->target_info.depth_stencil_format];
3019 }
3020 psoDesc.NumRenderTargets = createinfo->target_info.num_color_targets;
3021 for (uint32_t i = 0; i < createinfo->target_info.num_color_targets; i += 1) {
3022 psoDesc.RTVFormats[i] = SDLToD3D12_TextureFormat[createinfo->target_info.color_target_descriptions[i].format];
3023 }
3024
3025 // Assuming some default values or further initialization
3026 psoDesc.Flags = D3D12_PIPELINE_STATE_FLAG_NONE;
3027 psoDesc.CachedPSO.CachedBlobSizeInBytes = 0;
3028 psoDesc.CachedPSO.pCachedBlob = NULL;
3029
3030 psoDesc.NodeMask = 0;
3031
3032 D3D12GraphicsRootSignature *rootSignature = D3D12_INTERNAL_CreateGraphicsRootSignature(
3033 renderer,
3034 vertShader,
3035 fragShader);
3036
3037 if (rootSignature == NULL) {
3038 D3D12_INTERNAL_DestroyGraphicsPipeline(pipeline);
3039 return NULL;
3040 }
3041 pipeline->rootSignature = rootSignature;
3042
3043 psoDesc.pRootSignature = rootSignature->handle;
3044 ID3D12PipelineState *pipelineState;
3045
3046 HRESULT res = ID3D12Device_CreateGraphicsPipelineState(
3047 renderer->device,
3048 &psoDesc,
3049 D3D_GUID(D3D_IID_ID3D12PipelineState),
3050 (void **)&pipelineState);
3051 if (FAILED(res)) {
3052 D3D12_INTERNAL_SetError(renderer, "Could not create graphics pipeline state", res);
3053 D3D12_INTERNAL_DestroyGraphicsPipeline(pipeline);
3054 return NULL;
3055 }
3056
3057 pipeline->pipelineState = pipelineState;
3058
3059 for (Uint32 i = 0; i < createinfo->vertex_input_state.num_vertex_buffers; i += 1) {
3060 pipeline->vertexStrides[createinfo->vertex_input_state.vertex_buffer_descriptions[i].slot] =
3061 createinfo->vertex_input_state.vertex_buffer_descriptions[i].pitch;
3062 }
3063
3064 pipeline->primitiveType = createinfo->primitive_type;
3065
3066 pipeline->vertexSamplerCount = vertShader->num_samplers;
3067 pipeline->vertexStorageTextureCount = vertShader->numStorageTextures;
3068 pipeline->vertexStorageBufferCount = vertShader->numStorageBuffers;
3069 pipeline->vertexUniformBufferCount = vertShader->numUniformBuffers;
3070
3071 pipeline->fragmentSamplerCount = fragShader->num_samplers;
3072 pipeline->fragmentStorageTextureCount = fragShader->numStorageTextures;
3073 pipeline->fragmentStorageBufferCount = fragShader->numStorageBuffers;
3074 pipeline->fragmentUniformBufferCount = fragShader->numUniformBuffers;
3075
3076 SDL_SetAtomicInt(&pipeline->referenceCount, 0);
3077
3078 if (renderer->debug_mode && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING)) {
3079 D3D12_INTERNAL_SetPipelineStateName(
3080 renderer,
3081 pipeline->pipelineState,
3082 SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING, NULL));
3083 }
3084
3085 return (SDL_GPUGraphicsPipeline *)pipeline;
3086}
3087
3088static SDL_GPUSampler *D3D12_CreateSampler(
3089 SDL_GPURenderer *driverData,
3090 const SDL_GPUSamplerCreateInfo *createinfo)
3091{
3092 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
3093 D3D12Sampler *sampler = (D3D12Sampler *)SDL_calloc(1, sizeof(D3D12Sampler));
3094 if (!sampler) {
3095 return NULL;
3096 }
3097 D3D12_SAMPLER_DESC samplerDesc;
3098
3099 samplerDesc.Filter = SDLToD3D12_Filter(
3100 createinfo->min_filter,
3101 createinfo->mag_filter,
3102 createinfo->mipmap_mode,
3103 createinfo->enable_compare,
3104 createinfo->enable_anisotropy);
3105 samplerDesc.AddressU = SDLToD3D12_SamplerAddressMode[createinfo->address_mode_u];
3106 samplerDesc.AddressV = SDLToD3D12_SamplerAddressMode[createinfo->address_mode_v];
3107 samplerDesc.AddressW = SDLToD3D12_SamplerAddressMode[createinfo->address_mode_w];
3108 samplerDesc.MaxAnisotropy = (Uint32)createinfo->max_anisotropy;
3109 samplerDesc.ComparisonFunc = SDLToD3D12_CompareOp[createinfo->compare_op];
3110 samplerDesc.MinLOD = createinfo->min_lod;
3111 samplerDesc.MaxLOD = createinfo->max_lod;
3112 samplerDesc.MipLODBias = createinfo->mip_lod_bias;
3113 samplerDesc.BorderColor[0] = 0;
3114 samplerDesc.BorderColor[1] = 0;
3115 samplerDesc.BorderColor[2] = 0;
3116 samplerDesc.BorderColor[3] = 0;
3117
3118 D3D12_INTERNAL_AssignStagingDescriptorHandle(
3119 renderer,
3120 D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER,
3121 &sampler->handle);
3122
3123 ID3D12Device_CreateSampler(
3124 renderer->device,
3125 &samplerDesc,
3126 sampler->handle.cpuHandle);
3127
3128 sampler->createInfo = *createinfo;
3129 SDL_SetAtomicInt(&sampler->referenceCount, 0);
3130
3131 // Ignore name property because it is not applicable to D3D12.
3132
3133 return (SDL_GPUSampler *)sampler;
3134}
3135
3136static SDL_GPUShader *D3D12_CreateShader(
3137 SDL_GPURenderer *driverData,
3138 const SDL_GPUShaderCreateInfo *createinfo)
3139{
3140 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
3141 void *bytecode;
3142 size_t bytecodeSize;
3143 D3D12Shader *shader;
3144
3145 if (!D3D12_INTERNAL_CreateShaderBytecode(
3146 renderer,
3147 createinfo->stage,
3148 createinfo->format,
3149 createinfo->code,
3150 createinfo->code_size,
3151 createinfo->entrypoint,
3152 &bytecode,
3153 &bytecodeSize)) {
3154 return NULL;
3155 }
3156 shader = (D3D12Shader *)SDL_calloc(1, sizeof(D3D12Shader));
3157 if (!shader) {
3158 SDL_free(bytecode);
3159 return NULL;
3160 }
3161 shader->stage = createinfo->stage;
3162 shader->num_samplers = createinfo->num_samplers;
3163 shader->numStorageBuffers = createinfo->num_storage_buffers;
3164 shader->numStorageTextures = createinfo->num_storage_textures;
3165 shader->numUniformBuffers = createinfo->num_uniform_buffers;
3166
3167 shader->bytecode = bytecode;
3168 shader->bytecodeSize = bytecodeSize;
3169
3170 // Ignore name property because it is not applicable to D3D12.
3171
3172 return (SDL_GPUShader *)shader;
3173}
3174
3175static D3D12Texture *D3D12_INTERNAL_CreateTexture(
3176 D3D12Renderer *renderer,
3177 const SDL_GPUTextureCreateInfo *createinfo,
3178 bool isSwapchainTexture,
3179 const char *debugName)
3180{
3181 D3D12Texture *texture;
3182 ID3D12Resource *handle;
3183 D3D12_HEAP_PROPERTIES heapProperties;
3184 D3D12_HEAP_FLAGS heapFlags = (D3D12_HEAP_FLAGS)0;
3185 D3D12_RESOURCE_DESC desc;
3186 D3D12_RESOURCE_FLAGS resourceFlags = (D3D12_RESOURCE_FLAGS)0;
3187 D3D12_RESOURCE_STATES initialState = (D3D12_RESOURCE_STATES)0;
3188 D3D12_CLEAR_VALUE clearValue;
3189 DXGI_FORMAT format;
3190 bool useClearValue = false;
3191 bool needsUAV =
3192 (createinfo->usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE) ||
3193 (createinfo->usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE);
3194 HRESULT res;
3195
3196 texture = (D3D12Texture *)SDL_calloc(1, sizeof(D3D12Texture));
3197 if (!texture) {
3198 return NULL;
3199 }
3200
3201 Uint32 layerCount = createinfo->type == SDL_GPU_TEXTURETYPE_3D ? 1 : createinfo->layer_count_or_depth;
3202 Uint32 depth = createinfo->type == SDL_GPU_TEXTURETYPE_3D ? createinfo->layer_count_or_depth : 1;
3203 bool isMultisample = createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1;
3204
3205 format = SDLToD3D12_TextureFormat[createinfo->format];
3206
3207 if (createinfo->usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET) {
3208 resourceFlags |= D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET;
3209 useClearValue = true;
3210 clearValue.Color[0] = SDL_GetFloatProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT, 0);
3211 clearValue.Color[1] = SDL_GetFloatProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT, 0);
3212 clearValue.Color[2] = SDL_GetFloatProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT, 0);
3213 clearValue.Color[3] = SDL_GetFloatProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT, 0);
3214 }
3215
3216 if (createinfo->usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET) {
3217 resourceFlags |= D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL;
3218 useClearValue = true;
3219 clearValue.DepthStencil.Depth = SDL_GetFloatProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT, 0);
3220 clearValue.DepthStencil.Stencil = (UINT8)SDL_GetNumberProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_UINT8, 0);
3221 format = SDLToD3D12_DepthFormat[createinfo->format];
3222 }
3223
3224 if (needsUAV) {
3225 resourceFlags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
3226 }
3227
3228 heapProperties.Type = D3D12_HEAP_TYPE_DEFAULT;
3229 heapProperties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
3230 heapProperties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
3231 heapProperties.CreationNodeMask = 0; // We don't do multi-adapter operation
3232 heapProperties.VisibleNodeMask = 0; // We don't do multi-adapter operation
3233
3234 heapFlags = isSwapchainTexture ? D3D12_HEAP_FLAG_ALLOW_DISPLAY : D3D12_HEAP_FLAG_NONE;
3235
3236 if (createinfo->type != SDL_GPU_TEXTURETYPE_3D) {
3237 desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
3238 desc.Alignment = isSwapchainTexture ? 0 : D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
3239 desc.Width = createinfo->width;
3240 desc.Height = createinfo->height;
3241 desc.DepthOrArraySize = (UINT16)createinfo->layer_count_or_depth;
3242 desc.MipLevels = (UINT16)createinfo->num_levels;
3243 desc.Format = format;
3244 desc.SampleDesc.Count = SDLToD3D12_SampleCount[createinfo->sample_count];
3245 desc.SampleDesc.Quality = isMultisample ? D3D12_STANDARD_MULTISAMPLE_PATTERN : 0;
3246 desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN; // Apparently this is the most efficient choice
3247 desc.Flags = resourceFlags;
3248 } else {
3249 desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE3D;
3250 desc.Alignment = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
3251 desc.Width = createinfo->width;
3252 desc.Height = createinfo->height;
3253 desc.DepthOrArraySize = (UINT16)createinfo->layer_count_or_depth;
3254 desc.MipLevels = (UINT16)createinfo->num_levels;
3255 desc.Format = format;
3256 desc.SampleDesc.Count = 1;
3257 desc.SampleDesc.Quality = 0;
3258 desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
3259 desc.Flags = resourceFlags;
3260 }
3261
3262 initialState = isSwapchainTexture ? D3D12_RESOURCE_STATE_PRESENT : D3D12_INTERNAL_DefaultTextureResourceState(createinfo->usage);
3263 clearValue.Format = desc.Format;
3264
3265 res = ID3D12Device_CreateCommittedResource(
3266 renderer->device,
3267 &heapProperties,
3268 heapFlags,
3269 &desc,
3270 initialState,
3271 useClearValue ? &clearValue : NULL,
3272 D3D_GUID(D3D_IID_ID3D12Resource),
3273 (void **)&handle);
3274 if (FAILED(res)) {
3275 D3D12_INTERNAL_SetError(renderer, "Failed to create texture!", res);
3276 D3D12_INTERNAL_DestroyTexture(renderer, texture);
3277 return NULL;
3278 }
3279
3280 texture->resource = handle;
3281
3282 // Create the SRV if applicable
3283 if ((createinfo->usage & SDL_GPU_TEXTUREUSAGE_SAMPLER) ||
3284 (createinfo->usage & SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ) ||
3285 (createinfo->usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ)) {
3286 D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc;
3287
3288 D3D12_INTERNAL_AssignStagingDescriptorHandle(
3289 renderer,
3290 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
3291 &texture->srvHandle);
3292
3293 srvDesc.Format = SDLToD3D12_TextureFormat[createinfo->format];
3294 srvDesc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
3295
3296 if (createinfo->type == SDL_GPU_TEXTURETYPE_CUBE) {
3297 srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURECUBE;
3298 srvDesc.TextureCube.MipLevels = createinfo->num_levels;
3299 srvDesc.TextureCube.MostDetailedMip = 0;
3300 srvDesc.TextureCube.ResourceMinLODClamp = 0;
3301 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY) {
3302 srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURECUBEARRAY;
3303 srvDesc.TextureCubeArray.MipLevels = createinfo->num_levels;
3304 srvDesc.TextureCubeArray.MostDetailedMip = 0;
3305 srvDesc.TextureCubeArray.First2DArrayFace = 0;
3306 srvDesc.TextureCubeArray.NumCubes = createinfo->layer_count_or_depth / 6;
3307 srvDesc.TextureCubeArray.ResourceMinLODClamp = 0;
3308 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_2D_ARRAY) {
3309 srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2DARRAY;
3310 srvDesc.Texture2DArray.MipLevels = createinfo->num_levels;
3311 srvDesc.Texture2DArray.MostDetailedMip = 0;
3312 srvDesc.Texture2DArray.FirstArraySlice = 0;
3313 srvDesc.Texture2DArray.ArraySize = layerCount;
3314 srvDesc.Texture2DArray.ResourceMinLODClamp = 0;
3315 srvDesc.Texture2DArray.PlaneSlice = 0;
3316 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_3D) {
3317 srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE3D;
3318 srvDesc.Texture3D.MipLevels = createinfo->num_levels;
3319 srvDesc.Texture3D.MostDetailedMip = 0;
3320 srvDesc.Texture3D.ResourceMinLODClamp = 0; // default behavior
3321 } else {
3322 srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
3323 srvDesc.Texture2D.MipLevels = createinfo->num_levels;
3324 srvDesc.Texture2D.MostDetailedMip = 0;
3325 srvDesc.Texture2D.PlaneSlice = 0;
3326 srvDesc.Texture2D.ResourceMinLODClamp = 0; // default behavior
3327 }
3328
3329 ID3D12Device_CreateShaderResourceView(
3330 renderer->device,
3331 handle,
3332 &srvDesc,
3333 texture->srvHandle.cpuHandle);
3334 }
3335
3336 SDL_SetAtomicInt(&texture->referenceCount, 0);
3337
3338 texture->subresourceCount = createinfo->num_levels * layerCount;
3339 texture->subresources = (D3D12TextureSubresource *)SDL_calloc(
3340 texture->subresourceCount, sizeof(D3D12TextureSubresource));
3341 if (!texture->subresources) {
3342 D3D12_INTERNAL_DestroyTexture(renderer, texture);
3343 return NULL;
3344 }
3345 for (Uint32 layerIndex = 0; layerIndex < layerCount; layerIndex += 1) {
3346 for (Uint32 levelIndex = 0; levelIndex < createinfo->num_levels; levelIndex += 1) {
3347 Uint32 subresourceIndex = D3D12_INTERNAL_CalcSubresource(
3348 levelIndex,
3349 layerIndex,
3350 createinfo->num_levels);
3351
3352 texture->subresources[subresourceIndex].parent = texture;
3353 texture->subresources[subresourceIndex].layer = layerIndex;
3354 texture->subresources[subresourceIndex].level = levelIndex;
3355 texture->subresources[subresourceIndex].depth = depth;
3356 texture->subresources[subresourceIndex].index = subresourceIndex;
3357
3358 texture->subresources[subresourceIndex].rtvHandles = NULL;
3359 texture->subresources[subresourceIndex].uavHandle.heap = NULL;
3360 texture->subresources[subresourceIndex].dsvHandle.heap = NULL;
3361
3362 // Create RTV if needed
3363 if (createinfo->usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET) {
3364 texture->subresources[subresourceIndex].rtvHandles = (D3D12StagingDescriptor *)SDL_calloc(depth, sizeof(D3D12StagingDescriptor));
3365
3366 for (Uint32 depthIndex = 0; depthIndex < depth; depthIndex += 1) {
3367 D3D12_RENDER_TARGET_VIEW_DESC rtvDesc;
3368
3369 D3D12_INTERNAL_AssignStagingDescriptorHandle(
3370 renderer,
3371 D3D12_DESCRIPTOR_HEAP_TYPE_RTV,
3372 &texture->subresources[subresourceIndex].rtvHandles[depthIndex]);
3373
3374 rtvDesc.Format = SDLToD3D12_TextureFormat[createinfo->format];
3375
3376 if (createinfo->type == SDL_GPU_TEXTURETYPE_2D_ARRAY || createinfo->type == SDL_GPU_TEXTURETYPE_CUBE || createinfo->type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY) {
3377 rtvDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DARRAY;
3378 rtvDesc.Texture2DArray.MipSlice = levelIndex;
3379 rtvDesc.Texture2DArray.FirstArraySlice = layerIndex;
3380 rtvDesc.Texture2DArray.ArraySize = 1;
3381 rtvDesc.Texture2DArray.PlaneSlice = 0;
3382 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_3D) {
3383 rtvDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE3D;
3384 rtvDesc.Texture3D.MipSlice = levelIndex;
3385 rtvDesc.Texture3D.FirstWSlice = depthIndex;
3386 rtvDesc.Texture3D.WSize = 1;
3387 } else if (isMultisample) {
3388 rtvDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DMS;
3389 } else {
3390 rtvDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D;
3391 rtvDesc.Texture2D.MipSlice = levelIndex;
3392 rtvDesc.Texture2D.PlaneSlice = 0;
3393 }
3394
3395 ID3D12Device_CreateRenderTargetView(
3396 renderer->device,
3397 texture->resource,
3398 &rtvDesc,
3399 texture->subresources[subresourceIndex].rtvHandles[depthIndex].cpuHandle);
3400 }
3401 }
3402
3403 // Create DSV if needed
3404 if (createinfo->usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET) {
3405 D3D12_DEPTH_STENCIL_VIEW_DESC dsvDesc;
3406
3407 D3D12_INTERNAL_AssignStagingDescriptorHandle(
3408 renderer,
3409 D3D12_DESCRIPTOR_HEAP_TYPE_DSV,
3410 &texture->subresources[subresourceIndex].dsvHandle);
3411
3412 dsvDesc.Format = SDLToD3D12_DepthFormat[createinfo->format];
3413 dsvDesc.Flags = (D3D12_DSV_FLAGS)0;
3414
3415 if (isMultisample) {
3416 dsvDesc.ViewDimension = D3D12_DSV_DIMENSION_TEXTURE2DMS;
3417 } else {
3418 dsvDesc.ViewDimension = D3D12_DSV_DIMENSION_TEXTURE2D;
3419 dsvDesc.Texture2D.MipSlice = levelIndex;
3420 }
3421
3422 ID3D12Device_CreateDepthStencilView(
3423 renderer->device,
3424 texture->resource,
3425 &dsvDesc,
3426 texture->subresources[subresourceIndex].dsvHandle.cpuHandle);
3427 }
3428
3429 // Create subresource UAV if necessary
3430 if (needsUAV) {
3431 D3D12_UNORDERED_ACCESS_VIEW_DESC uavDesc;
3432
3433 D3D12_INTERNAL_AssignStagingDescriptorHandle(
3434 renderer,
3435 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
3436 &texture->subresources[subresourceIndex].uavHandle);
3437
3438 uavDesc.Format = SDLToD3D12_TextureFormat[createinfo->format];
3439
3440 if (createinfo->type == SDL_GPU_TEXTURETYPE_2D_ARRAY || createinfo->type == SDL_GPU_TEXTURETYPE_CUBE || createinfo->type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY) {
3441 uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2DARRAY;
3442 uavDesc.Texture2DArray.MipSlice = levelIndex;
3443 uavDesc.Texture2DArray.FirstArraySlice = layerIndex;
3444 uavDesc.Texture2DArray.ArraySize = 1;
3445 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_3D) {
3446 uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE3D;
3447 uavDesc.Texture3D.MipSlice = levelIndex;
3448 uavDesc.Texture3D.FirstWSlice = 0;
3449 uavDesc.Texture3D.WSize = depth;
3450 } else {
3451 uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2D;
3452 uavDesc.Texture2D.MipSlice = levelIndex;
3453 uavDesc.Texture2D.PlaneSlice = 0;
3454 }
3455
3456 ID3D12Device_CreateUnorderedAccessView(
3457 renderer->device,
3458 texture->resource,
3459 NULL,
3460 &uavDesc,
3461 texture->subresources[subresourceIndex].uavHandle.cpuHandle);
3462 }
3463 }
3464 }
3465
3466 D3D12_INTERNAL_SetResourceName(
3467 renderer,
3468 texture->resource,
3469 debugName);
3470
3471 return texture;
3472}
3473
3474static SDL_GPUTexture *D3D12_CreateTexture(
3475 SDL_GPURenderer *driverData,
3476 const SDL_GPUTextureCreateInfo *createinfo)
3477{
3478 D3D12TextureContainer *container = (D3D12TextureContainer *)SDL_calloc(1, sizeof(D3D12TextureContainer));
3479 if (!container) {
3480 return NULL;
3481 }
3482
3483 // Copy properties so we don't lose information when the client destroys them
3484 container->header.info = *createinfo;
3485 container->header.info.props = SDL_CreateProperties();
3486 SDL_CopyProperties(createinfo->props, container->header.info.props);
3487
3488 container->textureCapacity = 1;
3489 container->textureCount = 1;
3490 container->textures = (D3D12Texture **)SDL_calloc(
3491 container->textureCapacity, sizeof(D3D12Texture *));
3492
3493 if (!container->textures) {
3494 SDL_free(container);
3495 return NULL;
3496 }
3497
3498 container->debugName = NULL;
3499 if (SDL_HasProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING)) {
3500 container->debugName = SDL_strdup(SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING, NULL));
3501 }
3502
3503 container->canBeCycled = true;
3504
3505 D3D12Texture *texture = D3D12_INTERNAL_CreateTexture(
3506 (D3D12Renderer *)driverData,
3507 createinfo,
3508 false,
3509 container->debugName);
3510
3511 if (!texture) {
3512 SDL_free(container->textures);
3513 SDL_free(container);
3514 return NULL;
3515 }
3516
3517 container->textures[0] = texture;
3518 container->activeTexture = texture;
3519
3520 texture->container = container;
3521 texture->containerIndex = 0;
3522
3523 return (SDL_GPUTexture *)container;
3524}
3525
3526static D3D12Buffer *D3D12_INTERNAL_CreateBuffer(
3527 D3D12Renderer *renderer,
3528 SDL_GPUBufferUsageFlags usageFlags,
3529 Uint32 size,
3530 D3D12BufferType type,
3531 const char *debugName)
3532{
3533 D3D12Buffer *buffer;
3534 ID3D12Resource *handle;
3535 D3D12_UNORDERED_ACCESS_VIEW_DESC uavDesc;
3536 D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc;
3537 D3D12_CONSTANT_BUFFER_VIEW_DESC cbvDesc;
3538 D3D12_HEAP_PROPERTIES heapProperties;
3539 D3D12_RESOURCE_DESC desc;
3540 D3D12_HEAP_FLAGS heapFlags = (D3D12_HEAP_FLAGS)0;
3541 D3D12_RESOURCE_FLAGS resourceFlags = (D3D12_RESOURCE_FLAGS)0;
3542 D3D12_RESOURCE_STATES initialState = D3D12_RESOURCE_STATE_COMMON;
3543 HRESULT res;
3544
3545 buffer = (D3D12Buffer *)SDL_calloc(1, sizeof(D3D12Buffer));
3546
3547 if (!buffer) {
3548 return NULL;
3549 }
3550
3551 if (usageFlags & SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE) {
3552 resourceFlags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
3553 }
3554#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
3555 if (usageFlags & SDL_GPU_BUFFERUSAGE_INDIRECT) {
3556 resourceFlags |= D3D12XBOX_RESOURCE_FLAG_ALLOW_INDIRECT_BUFFER;
3557 }
3558#endif
3559
3560 heapProperties.CreationNodeMask = 0; // We don't do multi-adapter operation
3561 heapProperties.VisibleNodeMask = 0; // We don't do multi-adapter operation
3562
3563 if (type == D3D12_BUFFER_TYPE_GPU) {
3564 heapProperties.Type = D3D12_HEAP_TYPE_DEFAULT;
3565 heapProperties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
3566 heapProperties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
3567 heapFlags = D3D12_HEAP_FLAG_NONE;
3568 } else if (type == D3D12_BUFFER_TYPE_UPLOAD) {
3569 heapProperties.Type = D3D12_HEAP_TYPE_UPLOAD;
3570 heapProperties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
3571 heapProperties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
3572 heapFlags = D3D12_HEAP_FLAG_NONE;
3573 initialState = D3D12_RESOURCE_STATE_GENERIC_READ;
3574 } else if (type == D3D12_BUFFER_TYPE_DOWNLOAD) {
3575 heapProperties.Type = D3D12_HEAP_TYPE_READBACK;
3576 heapProperties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
3577 heapProperties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
3578 heapFlags = D3D12_HEAP_FLAG_NONE;
3579 initialState = D3D12_RESOURCE_STATE_COPY_DEST;
3580 } else if (type == D3D12_BUFFER_TYPE_UNIFORM) {
3581 // D3D12 is badly designed, so we have to check if the fast path for uniform buffers is enabled
3582 if (renderer->GPUUploadHeapSupported) {
3583 heapProperties.Type = D3D12_HEAP_TYPE_GPU_UPLOAD;
3584 heapProperties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
3585 heapProperties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
3586 } else {
3587 heapProperties.Type = D3D12_HEAP_TYPE_UPLOAD;
3588 heapProperties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
3589 heapProperties.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
3590 initialState = D3D12_RESOURCE_STATE_GENERIC_READ;
3591 }
3592 heapFlags = D3D12_HEAP_FLAG_NONE;
3593 } else {
3594 SET_STRING_ERROR_AND_RETURN("Unrecognized buffer type!", NULL);
3595 }
3596
3597 desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
3598 desc.Alignment = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
3599 desc.Width = size;
3600 desc.Height = 1;
3601 desc.DepthOrArraySize = 1;
3602 desc.MipLevels = 1;
3603 desc.Format = DXGI_FORMAT_UNKNOWN;
3604 desc.SampleDesc.Count = 1;
3605 desc.SampleDesc.Quality = 0;
3606 desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
3607 desc.Flags = resourceFlags;
3608
3609 res = ID3D12Device_CreateCommittedResource(
3610 renderer->device,
3611 &heapProperties,
3612 heapFlags,
3613 &desc,
3614 initialState,
3615 NULL,
3616 D3D_GUID(D3D_IID_ID3D12Resource),
3617 (void **)&handle);
3618 if (FAILED(res)) {
3619 D3D12_INTERNAL_SetError(renderer, "Could not create buffer!", res);
3620 D3D12_INTERNAL_DestroyBuffer(renderer, buffer);
3621 return NULL;
3622 }
3623
3624 buffer->handle = handle;
3625 SDL_SetAtomicInt(&buffer->referenceCount, 0);
3626
3627 buffer->uavDescriptor.heap = NULL;
3628 buffer->srvDescriptor.heap = NULL;
3629 buffer->cbvDescriptor.heap = NULL;
3630
3631 if (usageFlags & SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE) {
3632 D3D12_INTERNAL_AssignStagingDescriptorHandle(
3633 renderer,
3634 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
3635 &buffer->uavDescriptor);
3636
3637 uavDesc.ViewDimension = D3D12_UAV_DIMENSION_BUFFER;
3638 uavDesc.Format = DXGI_FORMAT_R32_TYPELESS;
3639 uavDesc.Buffer.FirstElement = 0;
3640 uavDesc.Buffer.NumElements = size / sizeof(Uint32);
3641 uavDesc.Buffer.Flags = D3D12_BUFFER_UAV_FLAG_RAW;
3642 uavDesc.Buffer.CounterOffsetInBytes = 0; // TODO: support counters?
3643 uavDesc.Buffer.StructureByteStride = 0;
3644
3645 // Create UAV
3646 ID3D12Device_CreateUnorderedAccessView(
3647 renderer->device,
3648 handle,
3649 NULL, // TODO: support counters?
3650 &uavDesc,
3651 buffer->uavDescriptor.cpuHandle);
3652 }
3653
3654 if (
3655 (usageFlags & SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ) ||
3656 (usageFlags & SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ)) {
3657 D3D12_INTERNAL_AssignStagingDescriptorHandle(
3658 renderer,
3659 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
3660 &buffer->srvDescriptor);
3661
3662 srvDesc.Format = DXGI_FORMAT_R32_TYPELESS;
3663 srvDesc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
3664 srvDesc.ViewDimension = D3D12_SRV_DIMENSION_BUFFER;
3665 srvDesc.Buffer.FirstElement = 0;
3666 srvDesc.Buffer.NumElements = size / sizeof(Uint32);
3667 srvDesc.Buffer.Flags = D3D12_BUFFER_SRV_FLAG_RAW;
3668 srvDesc.Buffer.StructureByteStride = 0;
3669
3670 // Create SRV
3671 ID3D12Device_CreateShaderResourceView(
3672 renderer->device,
3673 handle,
3674 &srvDesc,
3675 buffer->srvDescriptor.cpuHandle);
3676 }
3677
3678 // FIXME: we may not need a CBV since we use root descriptors
3679 if (type == D3D12_BUFFER_TYPE_UNIFORM) {
3680 D3D12_INTERNAL_AssignStagingDescriptorHandle(
3681 renderer,
3682 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
3683 &buffer->cbvDescriptor);
3684
3685 cbvDesc.BufferLocation = ID3D12Resource_GetGPUVirtualAddress(handle);
3686 cbvDesc.SizeInBytes = size;
3687
3688 // Create CBV
3689 ID3D12Device_CreateConstantBufferView(
3690 renderer->device,
3691 &cbvDesc,
3692 buffer->cbvDescriptor.cpuHandle);
3693 }
3694
3695 buffer->virtualAddress = 0;
3696 if (type == D3D12_BUFFER_TYPE_GPU || type == D3D12_BUFFER_TYPE_UNIFORM) {
3697 buffer->virtualAddress = ID3D12Resource_GetGPUVirtualAddress(buffer->handle);
3698 }
3699
3700 buffer->mapPointer = NULL;
3701 // Persistently map upload buffers
3702 if (type == D3D12_BUFFER_TYPE_UPLOAD) {
3703 res = ID3D12Resource_Map(
3704 buffer->handle,
3705 0,
3706 NULL,
3707 (void **)&buffer->mapPointer);
3708 if (FAILED(res)) {
3709 D3D12_INTERNAL_SetError(renderer, "Failed to map upload buffer!", res);
3710 D3D12_INTERNAL_DestroyBuffer(renderer, buffer);
3711 return NULL;
3712 }
3713 }
3714
3715 buffer->container = NULL;
3716 buffer->containerIndex = 0;
3717
3718 buffer->transitioned = initialState != D3D12_RESOURCE_STATE_COMMON;
3719 SDL_SetAtomicInt(&buffer->referenceCount, 0);
3720
3721 D3D12_INTERNAL_SetResourceName(
3722 renderer,
3723 buffer->handle,
3724 debugName);
3725
3726 return buffer;
3727}
3728
3729static D3D12BufferContainer *D3D12_INTERNAL_CreateBufferContainer(
3730 D3D12Renderer *renderer,
3731 SDL_GPUBufferUsageFlags usageFlags,
3732 Uint32 size,
3733 D3D12BufferType type,
3734 const char *debugName)
3735{
3736 D3D12BufferContainer *container;
3737 D3D12Buffer *buffer;
3738
3739 container = (D3D12BufferContainer *)SDL_calloc(1, sizeof(D3D12BufferContainer));
3740 if (!container) {
3741 return NULL;
3742 }
3743
3744 container->usage = usageFlags;
3745 container->size = size;
3746 container->type = type;
3747
3748 container->bufferCapacity = 1;
3749 container->bufferCount = 1;
3750 container->buffers = (D3D12Buffer **)SDL_calloc(
3751 container->bufferCapacity, sizeof(D3D12Buffer *));
3752 if (!container->buffers) {
3753 SDL_free(container);
3754 return NULL;
3755 }
3756 container->debugName = NULL;
3757
3758 buffer = D3D12_INTERNAL_CreateBuffer(
3759 renderer,
3760 usageFlags,
3761 size,
3762 type,
3763 debugName);
3764
3765 if (buffer == NULL) {
3766 SDL_free(container->buffers);
3767 SDL_free(container);
3768 return NULL;
3769 }
3770
3771 container->activeBuffer = buffer;
3772 container->buffers[0] = buffer;
3773 buffer->container = container;
3774 buffer->containerIndex = 0;
3775
3776 if (debugName != NULL) {
3777 container->debugName = SDL_strdup(debugName);
3778 }
3779
3780 return container;
3781}
3782
3783static SDL_GPUBuffer *D3D12_CreateBuffer(
3784 SDL_GPURenderer *driverData,
3785 SDL_GPUBufferUsageFlags usageFlags,
3786 Uint32 size,
3787 const char *debugName)
3788{
3789 return (SDL_GPUBuffer *)D3D12_INTERNAL_CreateBufferContainer(
3790 (D3D12Renderer *)driverData,
3791 usageFlags,
3792 size,
3793 D3D12_BUFFER_TYPE_GPU,
3794 debugName);
3795}
3796
3797static SDL_GPUTransferBuffer *D3D12_CreateTransferBuffer(
3798 SDL_GPURenderer *driverData,
3799 SDL_GPUTransferBufferUsage usage,
3800 Uint32 size,
3801 const char *debugName)
3802{
3803 return (SDL_GPUTransferBuffer *)D3D12_INTERNAL_CreateBufferContainer(
3804 (D3D12Renderer *)driverData,
3805 0,
3806 size,
3807 usage == SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD ? D3D12_BUFFER_TYPE_UPLOAD : D3D12_BUFFER_TYPE_DOWNLOAD,
3808 debugName);
3809}
3810
3811// Disposal
3812
3813static void D3D12_ReleaseTexture(
3814 SDL_GPURenderer *driverData,
3815 SDL_GPUTexture *texture)
3816{
3817 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
3818 D3D12TextureContainer *container = (D3D12TextureContainer *)texture;
3819
3820 D3D12_INTERNAL_ReleaseTextureContainer(
3821 renderer,
3822 container);
3823}
3824
3825static void D3D12_ReleaseSampler(
3826 SDL_GPURenderer *driverData,
3827 SDL_GPUSampler *sampler)
3828{
3829 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
3830 D3D12Sampler *d3d12Sampler = (D3D12Sampler *)sampler;
3831
3832 SDL_LockMutex(renderer->disposeLock);
3833
3834 EXPAND_ARRAY_IF_NEEDED(
3835 renderer->samplersToDestroy,
3836 D3D12Sampler *,
3837 renderer->samplersToDestroyCount + 1,
3838 renderer->samplersToDestroyCapacity,
3839 renderer->samplersToDestroyCapacity * 2);
3840
3841 renderer->samplersToDestroy[renderer->samplersToDestroyCount] = d3d12Sampler;
3842 renderer->samplersToDestroyCount += 1;
3843
3844 SDL_UnlockMutex(renderer->disposeLock);
3845}
3846
3847static void D3D12_ReleaseBuffer(
3848 SDL_GPURenderer *driverData,
3849 SDL_GPUBuffer *buffer)
3850{
3851 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
3852 D3D12BufferContainer *bufferContainer = (D3D12BufferContainer *)buffer;
3853
3854 D3D12_INTERNAL_ReleaseBufferContainer(
3855 renderer,
3856 bufferContainer);
3857}
3858
3859static void D3D12_ReleaseTransferBuffer(
3860 SDL_GPURenderer *driverData,
3861 SDL_GPUTransferBuffer *transferBuffer)
3862{
3863 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
3864 D3D12BufferContainer *transferBufferContainer = (D3D12BufferContainer *)transferBuffer;
3865
3866 D3D12_INTERNAL_ReleaseBufferContainer(
3867 renderer,
3868 transferBufferContainer);
3869}
3870
3871static void D3D12_ReleaseShader(
3872 SDL_GPURenderer *driverData,
3873 SDL_GPUShader *shader)
3874{
3875 /* D3D12Renderer *renderer = (D3D12Renderer *)driverData; */
3876 D3D12Shader *d3d12shader = (D3D12Shader *)shader;
3877
3878 if (d3d12shader->bytecode) {
3879 SDL_free(d3d12shader->bytecode);
3880 d3d12shader->bytecode = NULL;
3881 }
3882 SDL_free(d3d12shader);
3883}
3884
3885static void D3D12_ReleaseComputePipeline(
3886 SDL_GPURenderer *driverData,
3887 SDL_GPUComputePipeline *computePipeline)
3888{
3889 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
3890 D3D12ComputePipeline *d3d12ComputePipeline = (D3D12ComputePipeline *)computePipeline;
3891
3892 SDL_LockMutex(renderer->disposeLock);
3893
3894 EXPAND_ARRAY_IF_NEEDED(
3895 renderer->computePipelinesToDestroy,
3896 D3D12ComputePipeline *,
3897 renderer->computePipelinesToDestroyCount + 1,
3898 renderer->computePipelinesToDestroyCapacity,
3899 renderer->computePipelinesToDestroyCapacity * 2);
3900
3901 renderer->computePipelinesToDestroy[renderer->computePipelinesToDestroyCount] = d3d12ComputePipeline;
3902 renderer->computePipelinesToDestroyCount += 1;
3903
3904 SDL_UnlockMutex(renderer->disposeLock);
3905}
3906
3907static void D3D12_ReleaseGraphicsPipeline(
3908 SDL_GPURenderer *driverData,
3909 SDL_GPUGraphicsPipeline *graphicsPipeline)
3910{
3911 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
3912 D3D12GraphicsPipeline *d3d12GraphicsPipeline = (D3D12GraphicsPipeline *)graphicsPipeline;
3913
3914 SDL_LockMutex(renderer->disposeLock);
3915
3916 EXPAND_ARRAY_IF_NEEDED(
3917 renderer->graphicsPipelinesToDestroy,
3918 D3D12GraphicsPipeline *,
3919 renderer->graphicsPipelinesToDestroyCount + 1,
3920 renderer->graphicsPipelinesToDestroyCapacity,
3921 renderer->graphicsPipelinesToDestroyCapacity * 2);
3922
3923 renderer->graphicsPipelinesToDestroy[renderer->graphicsPipelinesToDestroyCount] = d3d12GraphicsPipeline;
3924 renderer->graphicsPipelinesToDestroyCount += 1;
3925
3926 SDL_UnlockMutex(renderer->disposeLock);
3927}
3928
3929static void D3D12_INTERNAL_ReleaseBlitPipelines(SDL_GPURenderer *driverData)
3930{
3931 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
3932 D3D12_ReleaseSampler(driverData, renderer->blitLinearSampler);
3933 D3D12_ReleaseSampler(driverData, renderer->blitNearestSampler);
3934 D3D12_ReleaseShader(driverData, renderer->blitVertexShader);
3935 D3D12_ReleaseShader(driverData, renderer->blitFrom2DShader);
3936 D3D12_ReleaseShader(driverData, renderer->blitFrom2DArrayShader);
3937 D3D12_ReleaseShader(driverData, renderer->blitFrom3DShader);
3938 D3D12_ReleaseShader(driverData, renderer->blitFromCubeShader);
3939 D3D12_ReleaseShader(driverData, renderer->blitFromCubeArrayShader);
3940
3941 for (Uint32 i = 0; i < renderer->blitPipelineCount; i += 1) {
3942 D3D12_ReleaseGraphicsPipeline(driverData, renderer->blitPipelines[i].pipeline);
3943 }
3944 SDL_free(renderer->blitPipelines);
3945}
3946
3947// Render Pass
3948
3949static void D3D12_SetViewport(
3950 SDL_GPUCommandBuffer *commandBuffer,
3951 const SDL_GPUViewport *viewport)
3952{
3953 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
3954 D3D12_VIEWPORT d3d12Viewport;
3955 d3d12Viewport.TopLeftX = viewport->x;
3956 d3d12Viewport.TopLeftY = viewport->y;
3957 d3d12Viewport.Width = viewport->w;
3958 d3d12Viewport.Height = viewport->h;
3959 d3d12Viewport.MinDepth = viewport->min_depth;
3960 d3d12Viewport.MaxDepth = viewport->max_depth;
3961 ID3D12GraphicsCommandList_RSSetViewports(d3d12CommandBuffer->graphicsCommandList, 1, &d3d12Viewport);
3962}
3963
3964static void D3D12_SetScissor(
3965 SDL_GPUCommandBuffer *commandBuffer,
3966 const SDL_Rect *scissor)
3967{
3968 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
3969 D3D12_RECT scissorRect;
3970 scissorRect.left = scissor->x;
3971 scissorRect.top = scissor->y;
3972 scissorRect.right = scissor->x + scissor->w;
3973 scissorRect.bottom = scissor->y + scissor->h;
3974 ID3D12GraphicsCommandList_RSSetScissorRects(d3d12CommandBuffer->graphicsCommandList, 1, &scissorRect);
3975}
3976
3977static void D3D12_SetBlendConstants(
3978 SDL_GPUCommandBuffer *commandBuffer,
3979 SDL_FColor blendConstants)
3980{
3981 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
3982 FLOAT blendFactor[4] = { blendConstants.r, blendConstants.g, blendConstants.b, blendConstants.a };
3983 ID3D12GraphicsCommandList_OMSetBlendFactor(d3d12CommandBuffer->graphicsCommandList, blendFactor);
3984}
3985
3986static void D3D12_SetStencilReference(
3987 SDL_GPUCommandBuffer *commandBuffer,
3988 Uint8 reference
3989) {
3990 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
3991 ID3D12GraphicsCommandList_OMSetStencilRef(d3d12CommandBuffer->graphicsCommandList, reference);
3992}
3993
3994static D3D12TextureSubresource *D3D12_INTERNAL_FetchTextureSubresource(
3995 D3D12TextureContainer *container,
3996 Uint32 layer,
3997 Uint32 level)
3998{
3999 Uint32 index = D3D12_INTERNAL_CalcSubresource(
4000 level,
4001 layer,
4002 container->header.info.num_levels);
4003 return &container->activeTexture->subresources[index];
4004}
4005
4006static void D3D12_INTERNAL_CycleActiveTexture(
4007 D3D12Renderer *renderer,
4008 D3D12TextureContainer *container)
4009{
4010 D3D12Texture *texture;
4011
4012 // If a previously-cycled texture is available, we can use that.
4013 for (Uint32 i = 0; i < container->textureCount; i += 1) {
4014 texture = container->textures[i];
4015
4016 if (SDL_GetAtomicInt(&texture->referenceCount) == 0) {
4017 container->activeTexture = texture;
4018 return;
4019 }
4020 }
4021
4022 // No texture is available, generate a new one.
4023 texture = D3D12_INTERNAL_CreateTexture(
4024 renderer,
4025 &container->header.info,
4026 false,
4027 container->debugName);
4028
4029 if (!texture) {
4030 return;
4031 }
4032
4033 EXPAND_ARRAY_IF_NEEDED(
4034 container->textures,
4035 D3D12Texture *,
4036 container->textureCount + 1,
4037 container->textureCapacity,
4038 container->textureCapacity * 2);
4039
4040 container->textures[container->textureCount] = texture;
4041 texture->container = container;
4042 texture->containerIndex = container->textureCount;
4043 container->textureCount += 1;
4044
4045 container->activeTexture = texture;
4046}
4047
4048static D3D12TextureSubresource *D3D12_INTERNAL_PrepareTextureSubresourceForWrite(
4049 D3D12CommandBuffer *commandBuffer,
4050 D3D12TextureContainer *container,
4051 Uint32 layer,
4052 Uint32 level,
4053 bool cycle,
4054 D3D12_RESOURCE_STATES destinationUsageMode)
4055{
4056 D3D12TextureSubresource *subresource = D3D12_INTERNAL_FetchTextureSubresource(
4057 container,
4058 layer,
4059 level);
4060
4061 if (
4062 container->canBeCycled &&
4063 cycle &&
4064 SDL_GetAtomicInt(&subresource->parent->referenceCount) > 0) {
4065 D3D12_INTERNAL_CycleActiveTexture(
4066 commandBuffer->renderer,
4067 container);
4068
4069 subresource = D3D12_INTERNAL_FetchTextureSubresource(
4070 container,
4071 layer,
4072 level);
4073 }
4074
4075 D3D12_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
4076 commandBuffer,
4077 destinationUsageMode,
4078 subresource);
4079
4080 return subresource;
4081}
4082
4083static void D3D12_INTERNAL_CycleActiveBuffer(
4084 D3D12Renderer *renderer,
4085 D3D12BufferContainer *container)
4086{
4087 // If a previously-cycled buffer is available, we can use that.
4088 for (Uint32 i = 0; i < container->bufferCount; i += 1) {
4089 D3D12Buffer *buffer = container->buffers[i];
4090 if (SDL_GetAtomicInt(&buffer->referenceCount) == 0) {
4091 container->activeBuffer = buffer;
4092 return;
4093 }
4094 }
4095
4096 // No buffer handle is available, create a new one.
4097 D3D12Buffer *buffer = D3D12_INTERNAL_CreateBuffer(
4098 renderer,
4099 container->usage,
4100 container->size,
4101 container->type,
4102 container->debugName);
4103
4104 if (!buffer) {
4105 return;
4106 }
4107
4108 EXPAND_ARRAY_IF_NEEDED(
4109 container->buffers,
4110 D3D12Buffer *,
4111 container->bufferCount + 1,
4112 container->bufferCapacity,
4113 container->bufferCapacity * 2);
4114
4115 container->buffers[container->bufferCount] = buffer;
4116 buffer->container = container;
4117 buffer->containerIndex = container->bufferCount;
4118 container->bufferCount += 1;
4119
4120 container->activeBuffer = buffer;
4121
4122 if (renderer->debug_mode && container->debugName != NULL) {
4123 D3D12_INTERNAL_SetResourceName(
4124 renderer,
4125 container->activeBuffer->handle,
4126 container->debugName);
4127 }
4128}
4129
4130static D3D12Buffer *D3D12_INTERNAL_PrepareBufferForWrite(
4131 D3D12CommandBuffer *commandBuffer,
4132 D3D12BufferContainer *container,
4133 bool cycle,
4134 D3D12_RESOURCE_STATES destinationState)
4135{
4136 if (
4137 cycle &&
4138 SDL_GetAtomicInt(&container->activeBuffer->referenceCount) > 0) {
4139 D3D12_INTERNAL_CycleActiveBuffer(
4140 commandBuffer->renderer,
4141 container);
4142 }
4143
4144 D3D12_INTERNAL_BufferTransitionFromDefaultUsage(
4145 commandBuffer,
4146 destinationState,
4147 container->activeBuffer);
4148
4149 return container->activeBuffer;
4150}
4151
4152static void D3D12_BeginRenderPass(
4153 SDL_GPUCommandBuffer *commandBuffer,
4154 const SDL_GPUColorTargetInfo *colorTargetInfos,
4155 Uint32 numColorTargets,
4156 const SDL_GPUDepthStencilTargetInfo *depthStencilTargetInfo)
4157{
4158 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4159
4160 Uint32 framebufferWidth = SDL_MAX_UINT32;
4161 Uint32 framebufferHeight = SDL_MAX_UINT32;
4162
4163 for (Uint32 i = 0; i < numColorTargets; i += 1) {
4164 D3D12TextureContainer *container = (D3D12TextureContainer *)colorTargetInfos[i].texture;
4165 Uint32 h = container->header.info.height >> colorTargetInfos[i].mip_level;
4166 Uint32 w = container->header.info.width >> colorTargetInfos[i].mip_level;
4167
4168 // The framebuffer cannot be larger than the smallest target.
4169
4170 if (w < framebufferWidth) {
4171 framebufferWidth = w;
4172 }
4173
4174 if (h < framebufferHeight) {
4175 framebufferHeight = h;
4176 }
4177 }
4178
4179 if (depthStencilTargetInfo != NULL) {
4180 D3D12TextureContainer *container = (D3D12TextureContainer *)depthStencilTargetInfo->texture;
4181
4182 Uint32 h = container->header.info.height;
4183 Uint32 w = container->header.info.width;
4184
4185 // The framebuffer cannot be larger than the smallest target.
4186
4187 if (w < framebufferWidth) {
4188 framebufferWidth = w;
4189 }
4190
4191 if (h < framebufferHeight) {
4192 framebufferHeight = h;
4193 }
4194 }
4195
4196 D3D12_CPU_DESCRIPTOR_HANDLE rtvs[MAX_COLOR_TARGET_BINDINGS];
4197
4198 for (Uint32 i = 0; i < numColorTargets; i += 1) {
4199 D3D12TextureContainer *container = (D3D12TextureContainer *)colorTargetInfos[i].texture;
4200 D3D12TextureSubresource *subresource = D3D12_INTERNAL_PrepareTextureSubresourceForWrite(
4201 d3d12CommandBuffer,
4202 container,
4203 container->header.info.type == SDL_GPU_TEXTURETYPE_3D ? 0 : colorTargetInfos[i].layer_or_depth_plane,
4204 colorTargetInfos[i].mip_level,
4205 colorTargetInfos[i].cycle,
4206 D3D12_RESOURCE_STATE_RENDER_TARGET);
4207
4208 Uint32 rtvIndex = container->header.info.type == SDL_GPU_TEXTURETYPE_3D ? colorTargetInfos[i].layer_or_depth_plane : 0;
4209 D3D12_CPU_DESCRIPTOR_HANDLE rtv = subresource->rtvHandles[rtvIndex].cpuHandle;
4210
4211 if (colorTargetInfos[i].load_op == SDL_GPU_LOADOP_CLEAR) {
4212 float clearColor[4];
4213 clearColor[0] = colorTargetInfos[i].clear_color.r;
4214 clearColor[1] = colorTargetInfos[i].clear_color.g;
4215 clearColor[2] = colorTargetInfos[i].clear_color.b;
4216 clearColor[3] = colorTargetInfos[i].clear_color.a;
4217
4218 ID3D12GraphicsCommandList_ClearRenderTargetView(
4219 d3d12CommandBuffer->graphicsCommandList,
4220 rtv,
4221 clearColor,
4222 0,
4223 NULL);
4224 }
4225
4226 rtvs[i] = rtv;
4227 d3d12CommandBuffer->colorTargetSubresources[i] = subresource;
4228
4229 D3D12_INTERNAL_TrackTexture(d3d12CommandBuffer, subresource->parent);
4230
4231 if (colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE || colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE_AND_STORE) {
4232 D3D12TextureContainer *resolveContainer = (D3D12TextureContainer *)colorTargetInfos[i].resolve_texture;
4233 D3D12TextureSubresource *resolveSubresource = D3D12_INTERNAL_PrepareTextureSubresourceForWrite(
4234 d3d12CommandBuffer,
4235 resolveContainer,
4236 colorTargetInfos[i].resolve_layer,
4237 colorTargetInfos[i].resolve_mip_level,
4238 colorTargetInfos[i].cycle_resolve_texture,
4239 D3D12_RESOURCE_STATE_RESOLVE_DEST);
4240
4241 d3d12CommandBuffer->colorResolveSubresources[i] = resolveSubresource;
4242 D3D12_INTERNAL_TrackTexture(d3d12CommandBuffer, resolveSubresource->parent);
4243 }
4244 }
4245
4246 D3D12_CPU_DESCRIPTOR_HANDLE dsv;
4247 if (depthStencilTargetInfo != NULL) {
4248 D3D12TextureContainer *container = (D3D12TextureContainer *)depthStencilTargetInfo->texture;
4249 D3D12TextureSubresource *subresource = D3D12_INTERNAL_PrepareTextureSubresourceForWrite(
4250 d3d12CommandBuffer,
4251 container,
4252 0,
4253 0,
4254 depthStencilTargetInfo->cycle,
4255 D3D12_RESOURCE_STATE_DEPTH_WRITE);
4256
4257 if (
4258 depthStencilTargetInfo->load_op == SDL_GPU_LOADOP_CLEAR ||
4259 depthStencilTargetInfo->stencil_load_op == SDL_GPU_LOADOP_CLEAR) {
4260 D3D12_CLEAR_FLAGS clearFlags = (D3D12_CLEAR_FLAGS)0;
4261 if (depthStencilTargetInfo->load_op == SDL_GPU_LOADOP_CLEAR) {
4262 clearFlags |= D3D12_CLEAR_FLAG_DEPTH;
4263 }
4264 if (depthStencilTargetInfo->stencil_load_op == SDL_GPU_LOADOP_CLEAR) {
4265 clearFlags |= D3D12_CLEAR_FLAG_STENCIL;
4266 }
4267
4268 ID3D12GraphicsCommandList_ClearDepthStencilView(
4269 d3d12CommandBuffer->graphicsCommandList,
4270 subresource->dsvHandle.cpuHandle,
4271 clearFlags,
4272 depthStencilTargetInfo->clear_depth,
4273 depthStencilTargetInfo->clear_stencil,
4274 0,
4275 NULL);
4276 }
4277
4278 dsv = subresource->dsvHandle.cpuHandle;
4279 d3d12CommandBuffer->depthStencilTextureSubresource = subresource;
4280 D3D12_INTERNAL_TrackTexture(d3d12CommandBuffer, subresource->parent);
4281 }
4282
4283 ID3D12GraphicsCommandList_OMSetRenderTargets(
4284 d3d12CommandBuffer->graphicsCommandList,
4285 numColorTargets,
4286 rtvs,
4287 false,
4288 (depthStencilTargetInfo == NULL) ? NULL : &dsv);
4289
4290 // Set sensible default states
4291 SDL_GPUViewport defaultViewport;
4292 defaultViewport.x = 0;
4293 defaultViewport.y = 0;
4294 defaultViewport.w = (float)framebufferWidth;
4295 defaultViewport.h = (float)framebufferHeight;
4296 defaultViewport.min_depth = 0;
4297 defaultViewport.max_depth = 1;
4298
4299 D3D12_SetViewport(
4300 commandBuffer,
4301 &defaultViewport);
4302
4303 SDL_Rect defaultScissor;
4304 defaultScissor.x = 0;
4305 defaultScissor.y = 0;
4306 defaultScissor.w = (Sint32)framebufferWidth;
4307 defaultScissor.h = (Sint32)framebufferHeight;
4308
4309 D3D12_SetScissor(
4310 commandBuffer,
4311 &defaultScissor);
4312
4313 D3D12_SetStencilReference(
4314 commandBuffer,
4315 0);
4316
4317 SDL_FColor blendConstants;
4318 blendConstants.r = 1.0f;
4319 blendConstants.g = 1.0f;
4320 blendConstants.b = 1.0f;
4321 blendConstants.a = 1.0f;
4322
4323 D3D12_SetBlendConstants(
4324 commandBuffer,
4325 blendConstants);
4326}
4327
4328static void D3D12_INTERNAL_TrackUniformBuffer(
4329 D3D12CommandBuffer *commandBuffer,
4330 D3D12UniformBuffer *uniformBuffer)
4331{
4332 Uint32 i;
4333 for (i = 0; i < commandBuffer->usedUniformBufferCount; i += 1) {
4334 if (commandBuffer->usedUniformBuffers[i] == uniformBuffer) {
4335 return;
4336 }
4337 }
4338
4339 if (commandBuffer->usedUniformBufferCount == commandBuffer->usedUniformBufferCapacity) {
4340 commandBuffer->usedUniformBufferCapacity += 1;
4341 commandBuffer->usedUniformBuffers = (D3D12UniformBuffer **)SDL_realloc(
4342 commandBuffer->usedUniformBuffers,
4343 commandBuffer->usedUniformBufferCapacity * sizeof(D3D12UniformBuffer *));
4344 }
4345
4346 commandBuffer->usedUniformBuffers[commandBuffer->usedUniformBufferCount] = uniformBuffer;
4347 commandBuffer->usedUniformBufferCount += 1;
4348
4349 D3D12_INTERNAL_TrackBuffer(
4350 commandBuffer,
4351 uniformBuffer->buffer);
4352}
4353
4354static D3D12UniformBuffer *D3D12_INTERNAL_AcquireUniformBufferFromPool(
4355 D3D12CommandBuffer *commandBuffer)
4356{
4357 D3D12Renderer *renderer = commandBuffer->renderer;
4358 D3D12UniformBuffer *uniformBuffer;
4359
4360 SDL_LockMutex(renderer->acquireUniformBufferLock);
4361
4362 if (renderer->uniformBufferPoolCount > 0) {
4363 uniformBuffer = renderer->uniformBufferPool[renderer->uniformBufferPoolCount - 1];
4364 renderer->uniformBufferPoolCount -= 1;
4365 } else {
4366 uniformBuffer = (D3D12UniformBuffer *)SDL_calloc(1, sizeof(D3D12UniformBuffer));
4367 if (!uniformBuffer) {
4368 SDL_UnlockMutex(renderer->acquireUniformBufferLock);
4369 return NULL;
4370 }
4371
4372 uniformBuffer->buffer = D3D12_INTERNAL_CreateBuffer(
4373 renderer,
4374 0,
4375 UNIFORM_BUFFER_SIZE,
4376 D3D12_BUFFER_TYPE_UNIFORM,
4377 NULL);
4378 if (!uniformBuffer->buffer) {
4379 SDL_UnlockMutex(renderer->acquireUniformBufferLock);
4380 return NULL;
4381 }
4382 }
4383
4384 SDL_UnlockMutex(renderer->acquireUniformBufferLock);
4385
4386 uniformBuffer->currentBlockSize = 0;
4387 uniformBuffer->drawOffset = 0;
4388 uniformBuffer->writeOffset = 0;
4389
4390 HRESULT res = ID3D12Resource_Map(
4391 uniformBuffer->buffer->handle,
4392 0,
4393 NULL,
4394 (void **)&uniformBuffer->buffer->mapPointer);
4395 CHECK_D3D12_ERROR_AND_RETURN("Failed to map buffer pool!", NULL);
4396
4397 D3D12_INTERNAL_TrackUniformBuffer(commandBuffer, uniformBuffer);
4398
4399 return uniformBuffer;
4400}
4401
4402static void D3D12_INTERNAL_ReturnUniformBufferToPool(
4403 D3D12Renderer *renderer,
4404 D3D12UniformBuffer *uniformBuffer)
4405{
4406 if (renderer->uniformBufferPoolCount >= renderer->uniformBufferPoolCapacity) {
4407 renderer->uniformBufferPoolCapacity *= 2;
4408 renderer->uniformBufferPool = (D3D12UniformBuffer **)SDL_realloc(
4409 renderer->uniformBufferPool,
4410 renderer->uniformBufferPoolCapacity * sizeof(D3D12UniformBuffer *));
4411 }
4412
4413 renderer->uniformBufferPool[renderer->uniformBufferPoolCount] = uniformBuffer;
4414 renderer->uniformBufferPoolCount += 1;
4415}
4416
4417static void D3D12_INTERNAL_PushUniformData(
4418 D3D12CommandBuffer *commandBuffer,
4419 SDL_GPUShaderStage shaderStage,
4420 Uint32 slotIndex,
4421 const void *data,
4422 Uint32 length)
4423{
4424 D3D12UniformBuffer *uniformBuffer;
4425
4426 if (shaderStage == SDL_GPU_SHADERSTAGE_VERTEX) {
4427 if (commandBuffer->vertexUniformBuffers[slotIndex] == NULL) {
4428 commandBuffer->vertexUniformBuffers[slotIndex] = D3D12_INTERNAL_AcquireUniformBufferFromPool(
4429 commandBuffer);
4430 }
4431 uniformBuffer = commandBuffer->vertexUniformBuffers[slotIndex];
4432 } else if (shaderStage == SDL_GPU_SHADERSTAGE_FRAGMENT) {
4433 if (commandBuffer->fragmentUniformBuffers[slotIndex] == NULL) {
4434 commandBuffer->fragmentUniformBuffers[slotIndex] = D3D12_INTERNAL_AcquireUniformBufferFromPool(
4435 commandBuffer);
4436 }
4437 uniformBuffer = commandBuffer->fragmentUniformBuffers[slotIndex];
4438 } else if (shaderStage == SDL_GPU_SHADERSTAGE_COMPUTE) {
4439 if (commandBuffer->computeUniformBuffers[slotIndex] == NULL) {
4440 commandBuffer->computeUniformBuffers[slotIndex] = D3D12_INTERNAL_AcquireUniformBufferFromPool(
4441 commandBuffer);
4442 }
4443 uniformBuffer = commandBuffer->computeUniformBuffers[slotIndex];
4444 } else {
4445 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized shader stage!");
4446 return;
4447 }
4448
4449 uniformBuffer->currentBlockSize =
4450 D3D12_INTERNAL_Align(
4451 length,
4452 256);
4453
4454 // If there is no more room, acquire a new uniform buffer
4455 if (uniformBuffer->writeOffset + uniformBuffer->currentBlockSize >= UNIFORM_BUFFER_SIZE) {
4456 ID3D12Resource_Unmap(
4457 uniformBuffer->buffer->handle,
4458 0,
4459 NULL);
4460 uniformBuffer->buffer->mapPointer = NULL;
4461
4462 uniformBuffer = D3D12_INTERNAL_AcquireUniformBufferFromPool(commandBuffer);
4463
4464 uniformBuffer->drawOffset = 0;
4465 uniformBuffer->writeOffset = 0;
4466
4467 if (shaderStage == SDL_GPU_SHADERSTAGE_VERTEX) {
4468 commandBuffer->vertexUniformBuffers[slotIndex] = uniformBuffer;
4469 } else if (shaderStage == SDL_GPU_SHADERSTAGE_FRAGMENT) {
4470 commandBuffer->fragmentUniformBuffers[slotIndex] = uniformBuffer;
4471 } else if (shaderStage == SDL_GPU_SHADERSTAGE_COMPUTE) {
4472 commandBuffer->computeUniformBuffers[slotIndex] = uniformBuffer;
4473 } else {
4474 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized shader stage!");
4475 }
4476 }
4477
4478 uniformBuffer->drawOffset = uniformBuffer->writeOffset;
4479
4480 SDL_memcpy(
4481 (Uint8 *)uniformBuffer->buffer->mapPointer + uniformBuffer->writeOffset,
4482 data,
4483 length);
4484
4485 uniformBuffer->writeOffset += uniformBuffer->currentBlockSize;
4486
4487 if (shaderStage == SDL_GPU_SHADERSTAGE_VERTEX) {
4488 commandBuffer->needVertexUniformBufferBind[slotIndex] = true;
4489 } else if (shaderStage == SDL_GPU_SHADERSTAGE_FRAGMENT) {
4490 commandBuffer->needFragmentUniformBufferBind[slotIndex] = true;
4491 } else if (shaderStage == SDL_GPU_SHADERSTAGE_COMPUTE) {
4492 commandBuffer->needComputeUniformBufferBind[slotIndex] = true;
4493 } else {
4494 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized shader stage!");
4495 }
4496}
4497
4498static void D3D12_BindGraphicsPipeline(
4499 SDL_GPUCommandBuffer *commandBuffer,
4500 SDL_GPUGraphicsPipeline *graphicsPipeline)
4501{
4502 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4503 D3D12GraphicsPipeline *pipeline = (D3D12GraphicsPipeline *)graphicsPipeline;
4504 Uint32 i;
4505
4506 d3d12CommandBuffer->currentGraphicsPipeline = pipeline;
4507
4508 // Set the pipeline state
4509 ID3D12GraphicsCommandList_SetPipelineState(d3d12CommandBuffer->graphicsCommandList, pipeline->pipelineState);
4510 ID3D12GraphicsCommandList_SetGraphicsRootSignature(d3d12CommandBuffer->graphicsCommandList, pipeline->rootSignature->handle);
4511 ID3D12GraphicsCommandList_IASetPrimitiveTopology(d3d12CommandBuffer->graphicsCommandList, SDLToD3D12_PrimitiveType[pipeline->primitiveType]);
4512
4513 // Mark that bindings are needed
4514 d3d12CommandBuffer->needVertexSamplerBind = true;
4515 d3d12CommandBuffer->needVertexStorageTextureBind = true;
4516 d3d12CommandBuffer->needVertexStorageBufferBind = true;
4517 d3d12CommandBuffer->needFragmentSamplerBind = true;
4518 d3d12CommandBuffer->needFragmentStorageTextureBind = true;
4519 d3d12CommandBuffer->needFragmentStorageBufferBind = true;
4520
4521 for (i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
4522 d3d12CommandBuffer->needVertexUniformBufferBind[i] = true;
4523 d3d12CommandBuffer->needFragmentUniformBufferBind[i] = true;
4524 }
4525
4526 for (i = 0; i < pipeline->vertexUniformBufferCount; i += 1) {
4527 if (d3d12CommandBuffer->vertexUniformBuffers[i] == NULL) {
4528 d3d12CommandBuffer->vertexUniformBuffers[i] = D3D12_INTERNAL_AcquireUniformBufferFromPool(
4529 d3d12CommandBuffer);
4530 }
4531 }
4532
4533 for (i = 0; i < pipeline->fragmentUniformBufferCount; i += 1) {
4534 if (d3d12CommandBuffer->fragmentUniformBuffers[i] == NULL) {
4535 d3d12CommandBuffer->fragmentUniformBuffers[i] = D3D12_INTERNAL_AcquireUniformBufferFromPool(
4536 d3d12CommandBuffer);
4537 }
4538 }
4539
4540 D3D12_INTERNAL_TrackGraphicsPipeline(d3d12CommandBuffer, pipeline);
4541}
4542
4543static void D3D12_BindVertexBuffers(
4544 SDL_GPUCommandBuffer *commandBuffer,
4545 Uint32 firstSlot,
4546 const SDL_GPUBufferBinding *bindings,
4547 Uint32 numBindings)
4548{
4549 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4550
4551 for (Uint32 i = 0; i < numBindings; i += 1) {
4552 D3D12Buffer *currentBuffer = ((D3D12BufferContainer *)bindings[i].buffer)->activeBuffer;
4553
4554 if (d3d12CommandBuffer->vertexBuffers[firstSlot + i] != currentBuffer || d3d12CommandBuffer->vertexBufferOffsets[firstSlot + i] != bindings[i].offset) {
4555 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, currentBuffer);
4556
4557 d3d12CommandBuffer->vertexBuffers[firstSlot + i] = currentBuffer;
4558 d3d12CommandBuffer->vertexBufferOffsets[firstSlot + i] = bindings[i].offset;
4559 d3d12CommandBuffer->needVertexBufferBind = true;
4560 }
4561 }
4562
4563 d3d12CommandBuffer->vertexBufferCount =
4564 SDL_max(d3d12CommandBuffer->vertexBufferCount, firstSlot + numBindings);
4565}
4566
4567static void D3D12_BindIndexBuffer(
4568 SDL_GPUCommandBuffer *commandBuffer,
4569 const SDL_GPUBufferBinding *binding,
4570 SDL_GPUIndexElementSize indexElementSize)
4571{
4572 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4573 D3D12Buffer *buffer = ((D3D12BufferContainer *)binding->buffer)->activeBuffer;
4574 D3D12_INDEX_BUFFER_VIEW view;
4575
4576 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, buffer);
4577
4578 view.BufferLocation = buffer->virtualAddress + binding->offset;
4579 view.SizeInBytes = buffer->container->size - binding->offset;
4580 view.Format =
4581 indexElementSize == SDL_GPU_INDEXELEMENTSIZE_16BIT ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT;
4582
4583 ID3D12GraphicsCommandList_IASetIndexBuffer(
4584 d3d12CommandBuffer->graphicsCommandList,
4585 &view);
4586}
4587
4588static void D3D12_BindVertexSamplers(
4589 SDL_GPUCommandBuffer *commandBuffer,
4590 Uint32 firstSlot,
4591 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
4592 Uint32 numBindings)
4593{
4594 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4595
4596 for (Uint32 i = 0; i < numBindings; i += 1) {
4597 D3D12TextureContainer *container = (D3D12TextureContainer *)textureSamplerBindings[i].texture;
4598 D3D12Sampler *sampler = (D3D12Sampler *)textureSamplerBindings[i].sampler;
4599
4600 if (d3d12CommandBuffer->vertexSamplers[firstSlot + i] != sampler) {
4601 D3D12_INTERNAL_TrackSampler(
4602 d3d12CommandBuffer,
4603 sampler);
4604
4605 d3d12CommandBuffer->vertexSamplers[firstSlot + i] = sampler;
4606 d3d12CommandBuffer->needVertexSamplerBind = true;
4607 }
4608
4609 if (d3d12CommandBuffer->vertexSamplerTextures[firstSlot + i] != container->activeTexture) {
4610 D3D12_INTERNAL_TrackTexture(
4611 d3d12CommandBuffer,
4612 container->activeTexture);
4613
4614 d3d12CommandBuffer->vertexSamplerTextures[firstSlot + i] = container->activeTexture;
4615 d3d12CommandBuffer->needVertexSamplerBind = true;
4616 }
4617 }
4618}
4619
4620static void D3D12_BindVertexStorageTextures(
4621 SDL_GPUCommandBuffer *commandBuffer,
4622 Uint32 firstSlot,
4623 SDL_GPUTexture *const *storageTextures,
4624 Uint32 numBindings)
4625{
4626 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4627
4628 for (Uint32 i = 0; i < numBindings; i += 1) {
4629 D3D12TextureContainer *container = (D3D12TextureContainer *)storageTextures[i];
4630 D3D12Texture *texture = container->activeTexture;
4631
4632 if (d3d12CommandBuffer->vertexStorageTextures[firstSlot + i] != texture) {
4633 D3D12_INTERNAL_TrackTexture(d3d12CommandBuffer, texture);
4634
4635 d3d12CommandBuffer->vertexStorageTextures[firstSlot + i] = texture;
4636 d3d12CommandBuffer->needVertexStorageTextureBind = true;
4637 }
4638 }
4639}
4640
4641static void D3D12_BindVertexStorageBuffers(
4642 SDL_GPUCommandBuffer *commandBuffer,
4643 Uint32 firstSlot,
4644 SDL_GPUBuffer *const *storageBuffers,
4645 Uint32 numBindings)
4646{
4647 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4648
4649 for (Uint32 i = 0; i < numBindings; i += 1) {
4650 D3D12BufferContainer *container = (D3D12BufferContainer *)storageBuffers[i];
4651 if (d3d12CommandBuffer->vertexStorageBuffers[firstSlot + i] != container->activeBuffer) {
4652 D3D12_INTERNAL_TrackBuffer(
4653 d3d12CommandBuffer,
4654 container->activeBuffer);
4655
4656 d3d12CommandBuffer->vertexStorageBuffers[firstSlot + i] = container->activeBuffer;
4657 d3d12CommandBuffer->needVertexStorageBufferBind = true;
4658 }
4659 }
4660}
4661
4662static void D3D12_BindFragmentSamplers(
4663 SDL_GPUCommandBuffer *commandBuffer,
4664 Uint32 firstSlot,
4665 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
4666 Uint32 numBindings)
4667{
4668 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4669
4670 for (Uint32 i = 0; i < numBindings; i += 1) {
4671 D3D12TextureContainer *container = (D3D12TextureContainer *)textureSamplerBindings[i].texture;
4672 D3D12Sampler *sampler = (D3D12Sampler *)textureSamplerBindings[i].sampler;
4673
4674 if (d3d12CommandBuffer->fragmentSamplers[firstSlot + i] != sampler) {
4675 D3D12_INTERNAL_TrackSampler(
4676 d3d12CommandBuffer,
4677 sampler);
4678
4679 d3d12CommandBuffer->fragmentSamplers[firstSlot + i] = sampler;
4680 d3d12CommandBuffer->needFragmentSamplerBind = true;
4681 }
4682
4683 if (d3d12CommandBuffer->fragmentSamplerTextures[firstSlot + i] != container->activeTexture) {
4684 D3D12_INTERNAL_TrackTexture(
4685 d3d12CommandBuffer,
4686 container->activeTexture);
4687
4688 d3d12CommandBuffer->fragmentSamplerTextures[firstSlot + i] = container->activeTexture;
4689 d3d12CommandBuffer->needFragmentSamplerBind = true;
4690 }
4691 }
4692}
4693
4694static void D3D12_BindFragmentStorageTextures(
4695 SDL_GPUCommandBuffer *commandBuffer,
4696 Uint32 firstSlot,
4697 SDL_GPUTexture *const *storageTextures,
4698 Uint32 numBindings)
4699{
4700 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4701
4702 for (Uint32 i = 0; i < numBindings; i += 1) {
4703 D3D12TextureContainer *container = (D3D12TextureContainer *)storageTextures[i];
4704 D3D12Texture *texture = container->activeTexture;
4705
4706 if (d3d12CommandBuffer->fragmentStorageTextures[firstSlot + i] != texture) {
4707 D3D12_INTERNAL_TrackTexture(d3d12CommandBuffer, texture);
4708
4709 d3d12CommandBuffer->fragmentStorageTextures[firstSlot + i] = texture;
4710 d3d12CommandBuffer->needFragmentStorageTextureBind = true;
4711 }
4712 }
4713}
4714
4715static void D3D12_BindFragmentStorageBuffers(
4716 SDL_GPUCommandBuffer *commandBuffer,
4717 Uint32 firstSlot,
4718 SDL_GPUBuffer *const *storageBuffers,
4719 Uint32 numBindings)
4720{
4721 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4722
4723 for (Uint32 i = 0; i < numBindings; i += 1) {
4724 D3D12BufferContainer *container = (D3D12BufferContainer *)storageBuffers[i];
4725
4726 if (d3d12CommandBuffer->fragmentStorageBuffers[firstSlot + i] != container->activeBuffer) {
4727 D3D12_INTERNAL_TrackBuffer(
4728 d3d12CommandBuffer,
4729 container->activeBuffer);
4730
4731 d3d12CommandBuffer->fragmentStorageBuffers[firstSlot + i] = container->activeBuffer;
4732 d3d12CommandBuffer->needFragmentStorageBufferBind = true;
4733 }
4734 }
4735}
4736
4737static void D3D12_PushVertexUniformData(
4738 SDL_GPUCommandBuffer *commandBuffer,
4739 Uint32 slotIndex,
4740 const void *data,
4741 Uint32 length)
4742{
4743 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4744
4745 D3D12_INTERNAL_PushUniformData(
4746 d3d12CommandBuffer,
4747 SDL_GPU_SHADERSTAGE_VERTEX,
4748 slotIndex,
4749 data,
4750 length);
4751}
4752
4753static void D3D12_PushFragmentUniformData(
4754 SDL_GPUCommandBuffer *commandBuffer,
4755 Uint32 slotIndex,
4756 const void *data,
4757 Uint32 length)
4758{
4759 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
4760
4761 D3D12_INTERNAL_PushUniformData(
4762 d3d12CommandBuffer,
4763 SDL_GPU_SHADERSTAGE_FRAGMENT,
4764 slotIndex,
4765 data,
4766 length);
4767}
4768
4769static void D3D12_INTERNAL_SetGPUDescriptorHeaps(D3D12CommandBuffer *commandBuffer)
4770{
4771 ID3D12DescriptorHeap *heaps[2];
4772 D3D12DescriptorHeap *viewHeap;
4773 D3D12DescriptorHeap *samplerHeap;
4774
4775 viewHeap = D3D12_INTERNAL_AcquireGPUDescriptorHeapFromPool(commandBuffer, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
4776 samplerHeap = D3D12_INTERNAL_AcquireGPUDescriptorHeapFromPool(commandBuffer, D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER);
4777
4778 commandBuffer->gpuDescriptorHeaps[0] = viewHeap;
4779 commandBuffer->gpuDescriptorHeaps[1] = samplerHeap;
4780
4781 heaps[0] = viewHeap->handle;
4782 heaps[1] = samplerHeap->handle;
4783
4784 ID3D12GraphicsCommandList_SetDescriptorHeaps(
4785 commandBuffer->graphicsCommandList,
4786 2,
4787 heaps);
4788}
4789
4790static void D3D12_INTERNAL_WriteGPUDescriptors(
4791 D3D12CommandBuffer *commandBuffer,
4792 D3D12_DESCRIPTOR_HEAP_TYPE heapType,
4793 D3D12_CPU_DESCRIPTOR_HANDLE *resourceDescriptorHandles,
4794 Uint32 resourceHandleCount,
4795 D3D12_GPU_DESCRIPTOR_HANDLE *gpuBaseDescriptor)
4796{
4797 D3D12DescriptorHeap *heap;
4798 D3D12_CPU_DESCRIPTOR_HANDLE gpuHeapCpuHandle;
4799
4800 /* Descriptor overflow, acquire new heaps */
4801 if (commandBuffer->gpuDescriptorHeaps[heapType]->currentDescriptorIndex >= commandBuffer->gpuDescriptorHeaps[heapType]->maxDescriptors) {
4802 D3D12_INTERNAL_SetGPUDescriptorHeaps(commandBuffer);
4803 }
4804
4805 heap = commandBuffer->gpuDescriptorHeaps[heapType];
4806
4807 // FIXME: need to error on overflow
4808 gpuHeapCpuHandle.ptr = heap->descriptorHeapCPUStart.ptr + (heap->currentDescriptorIndex * heap->descriptorSize);
4809 gpuBaseDescriptor->ptr = heap->descriptorHeapGPUStart.ptr + (heap->currentDescriptorIndex * heap->descriptorSize);
4810
4811 for (Uint32 i = 0; i < resourceHandleCount; i += 1) {
4812 ID3D12Device_CopyDescriptorsSimple(
4813 commandBuffer->renderer->device,
4814 1,
4815 gpuHeapCpuHandle,
4816 resourceDescriptorHandles[i],
4817 heapType);
4818
4819 heap->currentDescriptorIndex += 1;
4820 gpuHeapCpuHandle.ptr += heap->descriptorSize;
4821 }
4822}
4823
4824static void D3D12_INTERNAL_BindGraphicsResources(
4825 D3D12CommandBuffer *commandBuffer)
4826{
4827 D3D12GraphicsPipeline *graphicsPipeline = commandBuffer->currentGraphicsPipeline;
4828
4829 /* Acquire GPU descriptor heaps if we haven't yet */
4830 if (commandBuffer->gpuDescriptorHeaps[0] == NULL) {
4831 D3D12_INTERNAL_SetGPUDescriptorHeaps(commandBuffer);
4832 }
4833
4834 D3D12_CPU_DESCRIPTOR_HANDLE cpuHandles[MAX_TEXTURE_SAMPLERS_PER_STAGE];
4835 D3D12_GPU_DESCRIPTOR_HANDLE gpuDescriptorHandle;
4836 D3D12_VERTEX_BUFFER_VIEW vertexBufferViews[MAX_VERTEX_BUFFERS];
4837
4838 if (commandBuffer->needVertexBufferBind) {
4839 for (Uint32 i = 0; i < commandBuffer->vertexBufferCount; i += 1) {
4840 vertexBufferViews[i].BufferLocation = commandBuffer->vertexBuffers[i]->virtualAddress + commandBuffer->vertexBufferOffsets[i];
4841 vertexBufferViews[i].SizeInBytes = commandBuffer->vertexBuffers[i]->container->size - commandBuffer->vertexBufferOffsets[i];
4842 vertexBufferViews[i].StrideInBytes = graphicsPipeline->vertexStrides[i];
4843 }
4844
4845 ID3D12GraphicsCommandList_IASetVertexBuffers(
4846 commandBuffer->graphicsCommandList,
4847 0,
4848 commandBuffer->vertexBufferCount,
4849 vertexBufferViews);
4850 }
4851
4852 if (commandBuffer->needVertexSamplerBind) {
4853 if (graphicsPipeline->vertexSamplerCount > 0) {
4854 for (Uint32 i = 0; i < graphicsPipeline->vertexSamplerCount; i += 1) {
4855 cpuHandles[i] = commandBuffer->vertexSamplers[i]->handle.cpuHandle;
4856 }
4857
4858 D3D12_INTERNAL_WriteGPUDescriptors(
4859 commandBuffer,
4860 D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER,
4861 cpuHandles,
4862 graphicsPipeline->vertexSamplerCount,
4863 &gpuDescriptorHandle);
4864
4865 ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(
4866 commandBuffer->graphicsCommandList,
4867 graphicsPipeline->rootSignature->vertexSamplerRootIndex,
4868 gpuDescriptorHandle);
4869
4870 for (Uint32 i = 0; i < graphicsPipeline->vertexSamplerCount; i += 1) {
4871 cpuHandles[i] = commandBuffer->vertexSamplerTextures[i]->srvHandle.cpuHandle;
4872 }
4873
4874 D3D12_INTERNAL_WriteGPUDescriptors(
4875 commandBuffer,
4876 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
4877 cpuHandles,
4878 graphicsPipeline->vertexSamplerCount,
4879 &gpuDescriptorHandle);
4880
4881 ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(
4882 commandBuffer->graphicsCommandList,
4883 graphicsPipeline->rootSignature->vertexSamplerTextureRootIndex,
4884 gpuDescriptorHandle);
4885 }
4886 commandBuffer->needVertexSamplerBind = false;
4887 }
4888
4889 if (commandBuffer->needVertexStorageTextureBind) {
4890 if (graphicsPipeline->vertexStorageTextureCount > 0) {
4891 for (Uint32 i = 0; i < graphicsPipeline->vertexStorageTextureCount; i += 1) {
4892 cpuHandles[i] = commandBuffer->vertexStorageTextures[i]->srvHandle.cpuHandle;
4893 }
4894
4895 D3D12_INTERNAL_WriteGPUDescriptors(
4896 commandBuffer,
4897 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
4898 cpuHandles,
4899 graphicsPipeline->vertexStorageTextureCount,
4900 &gpuDescriptorHandle);
4901
4902 ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(
4903 commandBuffer->graphicsCommandList,
4904 graphicsPipeline->rootSignature->vertexStorageTextureRootIndex,
4905 gpuDescriptorHandle);
4906 }
4907 commandBuffer->needVertexStorageTextureBind = false;
4908 }
4909
4910 if (commandBuffer->needVertexStorageBufferBind) {
4911 if (graphicsPipeline->vertexStorageBufferCount > 0) {
4912 for (Uint32 i = 0; i < graphicsPipeline->vertexStorageBufferCount; i += 1) {
4913 cpuHandles[i] = commandBuffer->vertexStorageBuffers[i]->srvDescriptor.cpuHandle;
4914 }
4915
4916 D3D12_INTERNAL_WriteGPUDescriptors(
4917 commandBuffer,
4918 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
4919 cpuHandles,
4920 graphicsPipeline->vertexStorageBufferCount,
4921 &gpuDescriptorHandle);
4922
4923 ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(
4924 commandBuffer->graphicsCommandList,
4925 graphicsPipeline->rootSignature->vertexStorageBufferRootIndex,
4926 gpuDescriptorHandle);
4927 }
4928 commandBuffer->needVertexStorageBufferBind = false;
4929 }
4930
4931 for (Uint32 i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
4932 if (commandBuffer->needVertexUniformBufferBind[i]) {
4933 if (graphicsPipeline->vertexUniformBufferCount > i) {
4934 ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(
4935 commandBuffer->graphicsCommandList,
4936 graphicsPipeline->rootSignature->vertexUniformBufferRootIndex[i],
4937 commandBuffer->vertexUniformBuffers[i]->buffer->virtualAddress + commandBuffer->vertexUniformBuffers[i]->drawOffset);
4938 }
4939 commandBuffer->needVertexUniformBufferBind[i] = false;
4940 }
4941 }
4942
4943 if (commandBuffer->needFragmentSamplerBind) {
4944 if (graphicsPipeline->fragmentSamplerCount > 0) {
4945 for (Uint32 i = 0; i < graphicsPipeline->fragmentSamplerCount; i += 1) {
4946 cpuHandles[i] = commandBuffer->fragmentSamplers[i]->handle.cpuHandle;
4947 }
4948
4949 D3D12_INTERNAL_WriteGPUDescriptors(
4950 commandBuffer,
4951 D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER,
4952 cpuHandles,
4953 graphicsPipeline->fragmentSamplerCount,
4954 &gpuDescriptorHandle);
4955
4956 ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(
4957 commandBuffer->graphicsCommandList,
4958 graphicsPipeline->rootSignature->fragmentSamplerRootIndex,
4959 gpuDescriptorHandle);
4960
4961 for (Uint32 i = 0; i < graphicsPipeline->fragmentSamplerCount; i += 1) {
4962 cpuHandles[i] = commandBuffer->fragmentSamplerTextures[i]->srvHandle.cpuHandle;
4963 }
4964
4965 D3D12_INTERNAL_WriteGPUDescriptors(
4966 commandBuffer,
4967 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
4968 cpuHandles,
4969 graphicsPipeline->fragmentSamplerCount,
4970 &gpuDescriptorHandle);
4971
4972 ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(
4973 commandBuffer->graphicsCommandList,
4974 graphicsPipeline->rootSignature->fragmentSamplerTextureRootIndex,
4975 gpuDescriptorHandle);
4976 }
4977 commandBuffer->needFragmentSamplerBind = false;
4978 }
4979
4980 if (commandBuffer->needFragmentStorageTextureBind) {
4981 if (graphicsPipeline->fragmentStorageTextureCount > 0) {
4982 for (Uint32 i = 0; i < graphicsPipeline->fragmentStorageTextureCount; i += 1) {
4983 cpuHandles[i] = commandBuffer->fragmentStorageTextures[i]->srvHandle.cpuHandle;
4984 }
4985
4986 D3D12_INTERNAL_WriteGPUDescriptors(
4987 commandBuffer,
4988 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
4989 cpuHandles,
4990 graphicsPipeline->fragmentStorageTextureCount,
4991 &gpuDescriptorHandle);
4992
4993 ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(
4994 commandBuffer->graphicsCommandList,
4995 graphicsPipeline->rootSignature->fragmentStorageTextureRootIndex,
4996 gpuDescriptorHandle);
4997 }
4998 commandBuffer->needFragmentStorageTextureBind = false;
4999 }
5000
5001 if (commandBuffer->needFragmentStorageBufferBind) {
5002 if (graphicsPipeline->fragmentStorageBufferCount > 0) {
5003 for (Uint32 i = 0; i < graphicsPipeline->fragmentStorageBufferCount; i += 1) {
5004 cpuHandles[i] = commandBuffer->fragmentStorageBuffers[i]->srvDescriptor.cpuHandle;
5005 }
5006
5007 D3D12_INTERNAL_WriteGPUDescriptors(
5008 commandBuffer,
5009 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
5010 cpuHandles,
5011 graphicsPipeline->fragmentStorageBufferCount,
5012 &gpuDescriptorHandle);
5013
5014 ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(
5015 commandBuffer->graphicsCommandList,
5016 graphicsPipeline->rootSignature->fragmentStorageBufferRootIndex,
5017 gpuDescriptorHandle);
5018 }
5019 commandBuffer->needFragmentStorageBufferBind = false;
5020 }
5021
5022 for (Uint32 i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
5023 if (commandBuffer->needFragmentUniformBufferBind[i]) {
5024 if (graphicsPipeline->fragmentUniformBufferCount > i) {
5025 ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(
5026 commandBuffer->graphicsCommandList,
5027 graphicsPipeline->rootSignature->fragmentUniformBufferRootIndex[i],
5028 commandBuffer->fragmentUniformBuffers[i]->buffer->virtualAddress + commandBuffer->fragmentUniformBuffers[i]->drawOffset);
5029 }
5030 commandBuffer->needFragmentUniformBufferBind[i] = false;
5031 }
5032 }
5033}
5034
5035static void D3D12_DrawIndexedPrimitives(
5036 SDL_GPUCommandBuffer *commandBuffer,
5037 Uint32 numIndices,
5038 Uint32 numInstances,
5039 Uint32 firstIndex,
5040 Sint32 vertexOffset,
5041 Uint32 firstInstance)
5042{
5043 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5044 D3D12_INTERNAL_BindGraphicsResources(d3d12CommandBuffer);
5045
5046 ID3D12GraphicsCommandList_DrawIndexedInstanced(
5047 d3d12CommandBuffer->graphicsCommandList,
5048 numIndices,
5049 numInstances,
5050 firstIndex,
5051 vertexOffset,
5052 firstInstance);
5053}
5054
5055static void D3D12_DrawPrimitives(
5056 SDL_GPUCommandBuffer *commandBuffer,
5057 Uint32 numVertices,
5058 Uint32 numInstances,
5059 Uint32 firstVertex,
5060 Uint32 firstInstance)
5061{
5062 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5063 D3D12_INTERNAL_BindGraphicsResources(d3d12CommandBuffer);
5064
5065 ID3D12GraphicsCommandList_DrawInstanced(
5066 d3d12CommandBuffer->graphicsCommandList,
5067 numVertices,
5068 numInstances,
5069 firstVertex,
5070 firstInstance);
5071}
5072
5073static void D3D12_DrawPrimitivesIndirect(
5074 SDL_GPUCommandBuffer *commandBuffer,
5075 SDL_GPUBuffer *buffer,
5076 Uint32 offset,
5077 Uint32 drawCount)
5078{
5079 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5080 D3D12Buffer *d3d12Buffer = ((D3D12BufferContainer *)buffer)->activeBuffer;
5081
5082 D3D12_INTERNAL_BindGraphicsResources(d3d12CommandBuffer);
5083
5084 ID3D12GraphicsCommandList_ExecuteIndirect(
5085 d3d12CommandBuffer->graphicsCommandList,
5086 d3d12CommandBuffer->renderer->indirectDrawCommandSignature,
5087 drawCount,
5088 d3d12Buffer->handle,
5089 offset,
5090 NULL,
5091 0);
5092
5093 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, d3d12Buffer);
5094}
5095
5096static void D3D12_DrawIndexedPrimitivesIndirect(
5097 SDL_GPUCommandBuffer *commandBuffer,
5098 SDL_GPUBuffer *buffer,
5099 Uint32 offset,
5100 Uint32 drawCount)
5101{
5102 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5103 D3D12Buffer *d3d12Buffer = ((D3D12BufferContainer *)buffer)->activeBuffer;
5104
5105 D3D12_INTERNAL_BindGraphicsResources(d3d12CommandBuffer);
5106
5107 ID3D12GraphicsCommandList_ExecuteIndirect(
5108 d3d12CommandBuffer->graphicsCommandList,
5109 d3d12CommandBuffer->renderer->indirectIndexedDrawCommandSignature,
5110 drawCount,
5111 d3d12Buffer->handle,
5112 offset,
5113 NULL,
5114 0);
5115
5116 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, d3d12Buffer);
5117}
5118
5119static void D3D12_EndRenderPass(
5120 SDL_GPUCommandBuffer *commandBuffer)
5121{
5122 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5123 Uint32 i;
5124
5125 for (i = 0; i < MAX_COLOR_TARGET_BINDINGS; i += 1) {
5126 if (d3d12CommandBuffer->colorTargetSubresources[i] != NULL) {
5127 if (d3d12CommandBuffer->colorResolveSubresources[i] != NULL) {
5128 // Resolving requires some extra barriers
5129 D3D12_INTERNAL_TextureSubresourceBarrier(
5130 d3d12CommandBuffer,
5131 D3D12_RESOURCE_STATE_RENDER_TARGET,
5132 D3D12_RESOURCE_STATE_RESOLVE_SOURCE,
5133 d3d12CommandBuffer->colorTargetSubresources[i]
5134 );
5135
5136 ID3D12GraphicsCommandList_ResolveSubresource(
5137 d3d12CommandBuffer->graphicsCommandList,
5138 d3d12CommandBuffer->colorResolveSubresources[i]->parent->resource,
5139 d3d12CommandBuffer->colorResolveSubresources[i]->index,
5140 d3d12CommandBuffer->colorTargetSubresources[i]->parent->resource,
5141 d3d12CommandBuffer->colorTargetSubresources[i]->index,
5142 SDLToD3D12_TextureFormat[d3d12CommandBuffer->colorTargetSubresources[i]->parent->container->header.info.format]);
5143
5144 D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
5145 d3d12CommandBuffer,
5146 D3D12_RESOURCE_STATE_RESOLVE_SOURCE,
5147 d3d12CommandBuffer->colorTargetSubresources[i]);
5148
5149 D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
5150 d3d12CommandBuffer,
5151 D3D12_RESOURCE_STATE_RESOLVE_DEST,
5152 d3d12CommandBuffer->colorResolveSubresources[i]);
5153 } else {
5154 D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
5155 d3d12CommandBuffer,
5156 D3D12_RESOURCE_STATE_RENDER_TARGET,
5157 d3d12CommandBuffer->colorTargetSubresources[i]);
5158 }
5159 }
5160 }
5161
5162 if (d3d12CommandBuffer->depthStencilTextureSubresource != NULL) {
5163 D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
5164 d3d12CommandBuffer,
5165 D3D12_RESOURCE_STATE_DEPTH_WRITE,
5166 d3d12CommandBuffer->depthStencilTextureSubresource);
5167
5168 d3d12CommandBuffer->depthStencilTextureSubresource = NULL;
5169 }
5170
5171 d3d12CommandBuffer->currentGraphicsPipeline = NULL;
5172
5173 ID3D12GraphicsCommandList_OMSetRenderTargets(
5174 d3d12CommandBuffer->graphicsCommandList,
5175 0,
5176 NULL,
5177 false,
5178 NULL);
5179
5180 // Reset bind state
5181 SDL_zeroa(d3d12CommandBuffer->colorTargetSubresources);
5182 SDL_zeroa(d3d12CommandBuffer->colorResolveSubresources);
5183 d3d12CommandBuffer->depthStencilTextureSubresource = NULL;
5184
5185 SDL_zeroa(d3d12CommandBuffer->vertexBuffers);
5186 SDL_zeroa(d3d12CommandBuffer->vertexBufferOffsets);
5187 d3d12CommandBuffer->vertexBufferCount = 0;
5188
5189 SDL_zeroa(d3d12CommandBuffer->vertexSamplerTextures);
5190 SDL_zeroa(d3d12CommandBuffer->vertexSamplers);
5191 SDL_zeroa(d3d12CommandBuffer->vertexStorageTextures);
5192 SDL_zeroa(d3d12CommandBuffer->vertexStorageBuffers);
5193
5194 SDL_zeroa(d3d12CommandBuffer->fragmentSamplerTextures);
5195 SDL_zeroa(d3d12CommandBuffer->fragmentSamplers);
5196 SDL_zeroa(d3d12CommandBuffer->fragmentStorageTextures);
5197 SDL_zeroa(d3d12CommandBuffer->fragmentStorageBuffers);
5198}
5199
5200// Compute Pass
5201
5202static void D3D12_BeginComputePass(
5203 SDL_GPUCommandBuffer *commandBuffer,
5204 const SDL_GPUStorageTextureReadWriteBinding *storageTextureBindings,
5205 Uint32 numStorageTextureBindings,
5206 const SDL_GPUStorageBufferReadWriteBinding *storageBufferBindings,
5207 Uint32 numStorageBufferBindings)
5208{
5209 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5210
5211 d3d12CommandBuffer->computeReadWriteStorageTextureSubresourceCount = numStorageTextureBindings;
5212 d3d12CommandBuffer->computeReadWriteStorageBufferCount = numStorageBufferBindings;
5213
5214 /* Read-write resources will be actually bound in BindComputePipeline
5215 * after the root signature is set.
5216 * We also have to scan to see which barriers we actually need because depth slices aren't separate subresources
5217 */
5218 if (numStorageTextureBindings > 0) {
5219 for (Uint32 i = 0; i < numStorageTextureBindings; i += 1) {
5220 D3D12TextureContainer *container = (D3D12TextureContainer *)storageTextureBindings[i].texture;
5221
5222 D3D12TextureSubresource *subresource = D3D12_INTERNAL_PrepareTextureSubresourceForWrite(
5223 d3d12CommandBuffer,
5224 container,
5225 storageTextureBindings[i].layer,
5226 storageTextureBindings[i].mip_level,
5227 storageTextureBindings[i].cycle,
5228 D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
5229
5230 d3d12CommandBuffer->computeReadWriteStorageTextureSubresources[i] = subresource;
5231
5232 D3D12_INTERNAL_TrackTexture(
5233 d3d12CommandBuffer,
5234 subresource->parent);
5235 }
5236 }
5237
5238 if (numStorageBufferBindings > 0) {
5239 for (Uint32 i = 0; i < numStorageBufferBindings; i += 1) {
5240 D3D12BufferContainer *container = (D3D12BufferContainer *)storageBufferBindings[i].buffer;
5241
5242 D3D12Buffer *buffer = D3D12_INTERNAL_PrepareBufferForWrite(
5243 d3d12CommandBuffer,
5244 container,
5245 storageBufferBindings[i].cycle,
5246 D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
5247
5248 d3d12CommandBuffer->computeReadWriteStorageBuffers[i] = buffer;
5249
5250 D3D12_INTERNAL_TrackBuffer(
5251 d3d12CommandBuffer,
5252 buffer);
5253 }
5254 }
5255}
5256
5257static void D3D12_BindComputePipeline(
5258 SDL_GPUCommandBuffer *commandBuffer,
5259 SDL_GPUComputePipeline *computePipeline)
5260{
5261 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5262
5263 /* Acquire GPU descriptor heaps if we haven't yet */
5264 if (d3d12CommandBuffer->gpuDescriptorHeaps[0] == NULL) {
5265 D3D12_INTERNAL_SetGPUDescriptorHeaps(d3d12CommandBuffer);
5266 }
5267
5268 D3D12ComputePipeline *pipeline = (D3D12ComputePipeline *)computePipeline;
5269 D3D12_CPU_DESCRIPTOR_HANDLE cpuHandles[MAX_TEXTURE_SAMPLERS_PER_STAGE];
5270 D3D12_GPU_DESCRIPTOR_HANDLE gpuDescriptorHandle;
5271
5272 ID3D12GraphicsCommandList_SetPipelineState(
5273 d3d12CommandBuffer->graphicsCommandList,
5274 pipeline->pipelineState);
5275
5276 ID3D12GraphicsCommandList_SetComputeRootSignature(
5277 d3d12CommandBuffer->graphicsCommandList,
5278 pipeline->rootSignature->handle);
5279
5280 d3d12CommandBuffer->currentComputePipeline = pipeline;
5281
5282 d3d12CommandBuffer->needComputeSamplerBind = true;
5283 d3d12CommandBuffer->needComputeReadOnlyStorageTextureBind = true;
5284 d3d12CommandBuffer->needComputeReadOnlyStorageBufferBind = true;
5285
5286 for (Uint32 i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
5287 d3d12CommandBuffer->needComputeUniformBufferBind[i] = true;
5288 }
5289
5290 for (Uint32 i = 0; i < pipeline->numUniformBuffers; i += 1) {
5291 if (d3d12CommandBuffer->computeUniformBuffers[i] == NULL) {
5292 d3d12CommandBuffer->computeUniformBuffers[i] = D3D12_INTERNAL_AcquireUniformBufferFromPool(
5293 d3d12CommandBuffer);
5294 }
5295 }
5296
5297 D3D12_INTERNAL_TrackComputePipeline(d3d12CommandBuffer, pipeline);
5298
5299 // Bind write-only resources after setting root signature
5300 if (pipeline->numReadWriteStorageTextures > 0) {
5301 for (Uint32 i = 0; i < pipeline->numReadWriteStorageTextures; i += 1) {
5302 cpuHandles[i] = d3d12CommandBuffer->computeReadWriteStorageTextureSubresources[i]->uavHandle.cpuHandle;
5303 }
5304
5305 D3D12_INTERNAL_WriteGPUDescriptors(
5306 d3d12CommandBuffer,
5307 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
5308 cpuHandles,
5309 d3d12CommandBuffer->computeReadWriteStorageTextureSubresourceCount,
5310 &gpuDescriptorHandle);
5311
5312 ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(
5313 d3d12CommandBuffer->graphicsCommandList,
5314 d3d12CommandBuffer->currentComputePipeline->rootSignature->readWriteStorageTextureRootIndex,
5315 gpuDescriptorHandle);
5316 }
5317
5318 if (pipeline->numReadWriteStorageBuffers > 0) {
5319 for (Uint32 i = 0; i < pipeline->numReadWriteStorageBuffers; i += 1) {
5320 cpuHandles[i] = d3d12CommandBuffer->computeReadWriteStorageBuffers[i]->uavDescriptor.cpuHandle;
5321 }
5322
5323 D3D12_INTERNAL_WriteGPUDescriptors(
5324 d3d12CommandBuffer,
5325 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
5326 cpuHandles,
5327 d3d12CommandBuffer->computeReadWriteStorageBufferCount,
5328 &gpuDescriptorHandle);
5329
5330 ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(
5331 d3d12CommandBuffer->graphicsCommandList,
5332 d3d12CommandBuffer->currentComputePipeline->rootSignature->readWriteStorageBufferRootIndex,
5333 gpuDescriptorHandle);
5334 }
5335}
5336
5337static void D3D12_BindComputeSamplers(
5338 SDL_GPUCommandBuffer *commandBuffer,
5339 Uint32 firstSlot,
5340 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
5341 Uint32 numBindings)
5342{
5343 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5344
5345 for (Uint32 i = 0; i < numBindings; i += 1) {
5346 D3D12TextureContainer *container = (D3D12TextureContainer *)textureSamplerBindings[i].texture;
5347 D3D12Sampler *sampler = (D3D12Sampler *)textureSamplerBindings[i].sampler;
5348
5349 if (d3d12CommandBuffer->computeSamplers[firstSlot + i] != sampler) {
5350 D3D12_INTERNAL_TrackSampler(
5351 d3d12CommandBuffer,
5352 (D3D12Sampler *)textureSamplerBindings[i].sampler);
5353
5354 d3d12CommandBuffer->computeSamplers[firstSlot + i] = (D3D12Sampler *)textureSamplerBindings[i].sampler;
5355 d3d12CommandBuffer->needComputeSamplerBind = true;
5356 }
5357
5358 if (d3d12CommandBuffer->computeSamplerTextures[firstSlot + i] != container->activeTexture) {
5359 D3D12_INTERNAL_TrackTexture(
5360 d3d12CommandBuffer,
5361 container->activeTexture);
5362
5363 d3d12CommandBuffer->computeSamplerTextures[firstSlot + i] = container->activeTexture;
5364 d3d12CommandBuffer->needComputeSamplerBind = true;
5365 }
5366 }
5367}
5368
5369static void D3D12_BindComputeStorageTextures(
5370 SDL_GPUCommandBuffer *commandBuffer,
5371 Uint32 firstSlot,
5372 SDL_GPUTexture *const *storageTextures,
5373 Uint32 numBindings)
5374{
5375 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5376
5377 for (Uint32 i = 0; i < numBindings; i += 1) {
5378 D3D12TextureContainer *container = (D3D12TextureContainer *)storageTextures[i];
5379
5380 if (d3d12CommandBuffer->computeReadOnlyStorageTextures[firstSlot + i] != container->activeTexture) {
5381 /* If a different texture was in this slot, transition it back to its default usage */
5382 if (d3d12CommandBuffer->computeReadOnlyStorageTextures[firstSlot + i] != NULL) {
5383 D3D12_INTERNAL_TextureTransitionToDefaultUsage(
5384 d3d12CommandBuffer,
5385 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE,
5386 d3d12CommandBuffer->computeReadOnlyStorageTextures[firstSlot + i]);
5387 }
5388
5389 /* Then transition the new texture and prepare it for binding */
5390 D3D12_INTERNAL_TextureTransitionFromDefaultUsage(
5391 d3d12CommandBuffer,
5392 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE,
5393 container->activeTexture);
5394
5395 D3D12_INTERNAL_TrackTexture(
5396 d3d12CommandBuffer,
5397 container->activeTexture);
5398
5399 d3d12CommandBuffer->computeReadOnlyStorageTextures[firstSlot + i] = container->activeTexture;
5400 d3d12CommandBuffer->needComputeReadOnlyStorageTextureBind = true;
5401 }
5402 }
5403}
5404
5405static void D3D12_BindComputeStorageBuffers(
5406 SDL_GPUCommandBuffer *commandBuffer,
5407 Uint32 firstSlot,
5408 SDL_GPUBuffer *const *storageBuffers,
5409 Uint32 numBindings)
5410{
5411 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5412
5413 for (Uint32 i = 0; i < numBindings; i += 1) {
5414 D3D12BufferContainer *container = (D3D12BufferContainer *)storageBuffers[i];
5415 D3D12Buffer *buffer = container->activeBuffer;
5416
5417 if (d3d12CommandBuffer->computeReadOnlyStorageBuffers[firstSlot + i] != buffer) {
5418 /* If a different buffer was in this slot, transition it back to its default usage */
5419 if (d3d12CommandBuffer->computeReadOnlyStorageBuffers[firstSlot + i] != NULL) {
5420 D3D12_INTERNAL_BufferTransitionToDefaultUsage(
5421 d3d12CommandBuffer,
5422 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE,
5423 d3d12CommandBuffer->computeReadOnlyStorageBuffers[firstSlot + i]);
5424 }
5425
5426 /* Then transition the new buffer and prepare it for binding */
5427 D3D12_INTERNAL_BufferTransitionFromDefaultUsage(
5428 d3d12CommandBuffer,
5429 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE,
5430 buffer);
5431
5432 D3D12_INTERNAL_TrackBuffer(
5433 d3d12CommandBuffer,
5434 buffer);
5435
5436 d3d12CommandBuffer->computeReadOnlyStorageBuffers[firstSlot + i] = buffer;
5437 d3d12CommandBuffer->needComputeReadOnlyStorageBufferBind = true;
5438 }
5439 }
5440}
5441
5442static void D3D12_PushComputeUniformData(
5443 SDL_GPUCommandBuffer *commandBuffer,
5444 Uint32 slotIndex,
5445 const void *data,
5446 Uint32 length)
5447{
5448 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5449
5450 D3D12_INTERNAL_PushUniformData(
5451 d3d12CommandBuffer,
5452 SDL_GPU_SHADERSTAGE_COMPUTE,
5453 slotIndex,
5454 data,
5455 length);
5456}
5457
5458static void D3D12_INTERNAL_BindComputeResources(
5459 D3D12CommandBuffer *commandBuffer)
5460{
5461 D3D12ComputePipeline *computePipeline = commandBuffer->currentComputePipeline;
5462
5463 /* Acquire GPU descriptor heaps if we haven't yet */
5464 if (commandBuffer->gpuDescriptorHeaps[0] == NULL) {
5465 D3D12_INTERNAL_SetGPUDescriptorHeaps(commandBuffer);
5466 }
5467
5468 D3D12_CPU_DESCRIPTOR_HANDLE cpuHandles[MAX_TEXTURE_SAMPLERS_PER_STAGE];
5469 D3D12_GPU_DESCRIPTOR_HANDLE gpuDescriptorHandle;
5470
5471 if (commandBuffer->needComputeSamplerBind) {
5472 if (computePipeline->numSamplers > 0) {
5473 for (Uint32 i = 0; i < computePipeline->numSamplers; i += 1) {
5474 cpuHandles[i] = commandBuffer->computeSamplers[i]->handle.cpuHandle;
5475 }
5476
5477 D3D12_INTERNAL_WriteGPUDescriptors(
5478 commandBuffer,
5479 D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER,
5480 cpuHandles,
5481 computePipeline->numSamplers,
5482 &gpuDescriptorHandle);
5483
5484 ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(
5485 commandBuffer->graphicsCommandList,
5486 computePipeline->rootSignature->samplerRootIndex,
5487 gpuDescriptorHandle);
5488
5489 for (Uint32 i = 0; i < computePipeline->numSamplers; i += 1) {
5490 cpuHandles[i] = commandBuffer->computeSamplerTextures[i]->srvHandle.cpuHandle;
5491 }
5492
5493 D3D12_INTERNAL_WriteGPUDescriptors(
5494 commandBuffer,
5495 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
5496 cpuHandles,
5497 computePipeline->numSamplers,
5498 &gpuDescriptorHandle);
5499
5500 ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(
5501 commandBuffer->graphicsCommandList,
5502 computePipeline->rootSignature->samplerTextureRootIndex,
5503 gpuDescriptorHandle);
5504 }
5505 commandBuffer->needComputeSamplerBind = false;
5506 }
5507
5508 if (commandBuffer->needComputeReadOnlyStorageTextureBind) {
5509 if (computePipeline->numReadOnlyStorageTextures > 0) {
5510 for (Uint32 i = 0; i < computePipeline->numReadOnlyStorageTextures; i += 1) {
5511 cpuHandles[i] = commandBuffer->computeReadOnlyStorageTextures[i]->srvHandle.cpuHandle;
5512 }
5513
5514 D3D12_INTERNAL_WriteGPUDescriptors(
5515 commandBuffer,
5516 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
5517 cpuHandles,
5518 computePipeline->numReadOnlyStorageTextures,
5519 &gpuDescriptorHandle);
5520
5521 ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(
5522 commandBuffer->graphicsCommandList,
5523 computePipeline->rootSignature->readOnlyStorageTextureRootIndex,
5524 gpuDescriptorHandle);
5525 }
5526 commandBuffer->needComputeReadOnlyStorageTextureBind = false;
5527 }
5528
5529 if (commandBuffer->needComputeReadOnlyStorageBufferBind) {
5530 if (computePipeline->numReadOnlyStorageBuffers > 0) {
5531 for (Uint32 i = 0; i < computePipeline->numReadOnlyStorageBuffers; i += 1) {
5532 cpuHandles[i] = commandBuffer->computeReadOnlyStorageBuffers[i]->srvDescriptor.cpuHandle;
5533 }
5534
5535 D3D12_INTERNAL_WriteGPUDescriptors(
5536 commandBuffer,
5537 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
5538 cpuHandles,
5539 computePipeline->numReadOnlyStorageBuffers,
5540 &gpuDescriptorHandle);
5541
5542 ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(
5543 commandBuffer->graphicsCommandList,
5544 computePipeline->rootSignature->readOnlyStorageBufferRootIndex,
5545 gpuDescriptorHandle);
5546 }
5547 commandBuffer->needComputeReadOnlyStorageBufferBind = false;
5548 }
5549
5550 for (Uint32 i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
5551 if (commandBuffer->needComputeUniformBufferBind[i]) {
5552 if (computePipeline->numUniformBuffers > i) {
5553 ID3D12GraphicsCommandList_SetComputeRootConstantBufferView(
5554 commandBuffer->graphicsCommandList,
5555 computePipeline->rootSignature->uniformBufferRootIndex[i],
5556 commandBuffer->computeUniformBuffers[i]->buffer->virtualAddress + commandBuffer->computeUniformBuffers[i]->drawOffset);
5557 }
5558 }
5559 commandBuffer->needComputeUniformBufferBind[i] = false;
5560 }
5561}
5562
5563static void D3D12_DispatchCompute(
5564 SDL_GPUCommandBuffer *commandBuffer,
5565 Uint32 groupcountX,
5566 Uint32 groupcountY,
5567 Uint32 groupcountZ)
5568{
5569 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5570
5571 D3D12_INTERNAL_BindComputeResources(d3d12CommandBuffer);
5572 ID3D12GraphicsCommandList_Dispatch(
5573 d3d12CommandBuffer->graphicsCommandList,
5574 groupcountX,
5575 groupcountY,
5576 groupcountZ);
5577}
5578
5579static void D3D12_DispatchComputeIndirect(
5580 SDL_GPUCommandBuffer *commandBuffer,
5581 SDL_GPUBuffer *buffer,
5582 Uint32 offset)
5583{
5584 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5585 D3D12Buffer *d3d12Buffer = ((D3D12BufferContainer *)buffer)->activeBuffer;
5586
5587 D3D12_INTERNAL_BindComputeResources(d3d12CommandBuffer);
5588 ID3D12GraphicsCommandList_ExecuteIndirect(
5589 d3d12CommandBuffer->graphicsCommandList,
5590 d3d12CommandBuffer->renderer->indirectDispatchCommandSignature,
5591 1,
5592 d3d12Buffer->handle,
5593 offset,
5594 NULL,
5595 0);
5596
5597 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, d3d12Buffer);
5598}
5599
5600static void D3D12_EndComputePass(
5601 SDL_GPUCommandBuffer *commandBuffer)
5602{
5603 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5604
5605 for (Uint32 i = 0; i < d3d12CommandBuffer->computeReadWriteStorageTextureSubresourceCount; i += 1) {
5606 if (d3d12CommandBuffer->computeReadWriteStorageTextureSubresources[i]) {
5607 D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
5608 d3d12CommandBuffer,
5609 D3D12_RESOURCE_STATE_UNORDERED_ACCESS,
5610 d3d12CommandBuffer->computeReadWriteStorageTextureSubresources[i]);
5611
5612 d3d12CommandBuffer->computeReadWriteStorageTextureSubresources[i] = NULL;
5613 }
5614 }
5615 d3d12CommandBuffer->computeReadWriteStorageTextureSubresourceCount = 0;
5616
5617 for (Uint32 i = 0; i < d3d12CommandBuffer->computeReadWriteStorageBufferCount; i += 1) {
5618 if (d3d12CommandBuffer->computeReadWriteStorageBuffers[i]) {
5619 D3D12_INTERNAL_BufferTransitionToDefaultUsage(
5620 d3d12CommandBuffer,
5621 D3D12_RESOURCE_STATE_UNORDERED_ACCESS,
5622 d3d12CommandBuffer->computeReadWriteStorageBuffers[i]);
5623
5624 d3d12CommandBuffer->computeReadWriteStorageBuffers[i] = NULL;
5625 }
5626 }
5627 d3d12CommandBuffer->computeReadWriteStorageBufferCount = 0;
5628
5629 for (Uint32 i = 0; i < MAX_STORAGE_TEXTURES_PER_STAGE; i += 1) {
5630 if (d3d12CommandBuffer->computeReadOnlyStorageTextures[i]) {
5631 D3D12_INTERNAL_TextureTransitionToDefaultUsage(
5632 d3d12CommandBuffer,
5633 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE,
5634 d3d12CommandBuffer->computeReadOnlyStorageTextures[i]);
5635
5636 d3d12CommandBuffer->computeReadOnlyStorageTextures[i] = NULL;
5637 }
5638 }
5639
5640 for (Uint32 i = 0; i < MAX_STORAGE_BUFFERS_PER_STAGE; i += 1) {
5641 if (d3d12CommandBuffer->computeReadOnlyStorageBuffers[i]) {
5642 D3D12_INTERNAL_BufferTransitionToDefaultUsage(
5643 d3d12CommandBuffer,
5644 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE,
5645 d3d12CommandBuffer->computeReadOnlyStorageBuffers[i]);
5646
5647 d3d12CommandBuffer->computeReadOnlyStorageBuffers[i] = NULL;
5648 }
5649 }
5650
5651 SDL_zeroa(d3d12CommandBuffer->computeSamplerTextures);
5652 SDL_zeroa(d3d12CommandBuffer->computeSamplers);
5653
5654 d3d12CommandBuffer->currentComputePipeline = NULL;
5655}
5656
5657// TransferBuffer Data
5658
5659static void *D3D12_MapTransferBuffer(
5660 SDL_GPURenderer *driverData,
5661 SDL_GPUTransferBuffer *transferBuffer,
5662 bool cycle)
5663{
5664 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
5665 D3D12BufferContainer *container = (D3D12BufferContainer *)transferBuffer;
5666 void *dataPointer;
5667
5668 if (
5669 cycle &&
5670 SDL_GetAtomicInt(&container->activeBuffer->referenceCount) > 0) {
5671 D3D12_INTERNAL_CycleActiveBuffer(
5672 renderer,
5673 container);
5674 }
5675
5676 // Upload buffers are persistently mapped, download buffers are not
5677 if (container->type == D3D12_BUFFER_TYPE_UPLOAD) {
5678 dataPointer = container->activeBuffer->mapPointer;
5679 } else {
5680 ID3D12Resource_Map(
5681 container->activeBuffer->handle,
5682 0,
5683 NULL,
5684 (void **)&dataPointer);
5685 }
5686
5687 return dataPointer;
5688}
5689
5690static void D3D12_UnmapTransferBuffer(
5691 SDL_GPURenderer *driverData,
5692 SDL_GPUTransferBuffer *transferBuffer)
5693{
5694 (void)driverData;
5695 D3D12BufferContainer *container = (D3D12BufferContainer *)transferBuffer;
5696
5697 // Upload buffers are persistently mapped, download buffers are not
5698 if (container->type == D3D12_BUFFER_TYPE_DOWNLOAD) {
5699 ID3D12Resource_Unmap(
5700 container->activeBuffer->handle,
5701 0,
5702 NULL);
5703 }
5704}
5705
5706// Copy Pass
5707
5708static void D3D12_BeginCopyPass(
5709 SDL_GPUCommandBuffer *commandBuffer)
5710{
5711 // no-op
5712 (void)commandBuffer;
5713}
5714
5715static void D3D12_UploadToTexture(
5716 SDL_GPUCommandBuffer *commandBuffer,
5717 const SDL_GPUTextureTransferInfo *source,
5718 const SDL_GPUTextureRegion *destination,
5719 bool cycle)
5720{
5721 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5722 D3D12BufferContainer *transferBufferContainer = (D3D12BufferContainer *)source->transfer_buffer;
5723 D3D12Buffer *temporaryBuffer = NULL;
5724 D3D12_TEXTURE_COPY_LOCATION sourceLocation;
5725 D3D12_TEXTURE_COPY_LOCATION destinationLocation;
5726 Uint32 pixelsPerRow = source->pixels_per_row;
5727 Uint32 rowPitch;
5728 Uint32 alignedRowPitch;
5729 Uint32 rowsPerSlice = source->rows_per_layer;
5730 Uint32 bytesPerSlice;
5731 bool needsRealignment;
5732 bool needsPlacementCopy;
5733
5734 // Note that the transfer buffer does not need a barrier, as it is synced by the client.
5735
5736 D3D12TextureContainer *textureContainer = (D3D12TextureContainer *)destination->texture;
5737 D3D12TextureSubresource *textureSubresource = D3D12_INTERNAL_PrepareTextureSubresourceForWrite(
5738 d3d12CommandBuffer,
5739 textureContainer,
5740 destination->layer,
5741 destination->mip_level,
5742 cycle,
5743 D3D12_RESOURCE_STATE_COPY_DEST);
5744
5745 /* D3D12 requires texture data row pitch to be 256 byte aligned, which is obviously insane.
5746 * Instead of exposing that restriction to the client, which is a huge rake to step on,
5747 * and a restriction that no other backend requires, we're going to copy data to a temporary buffer,
5748 * copy THAT data to the texture, and then get rid of the temporary buffer ASAP.
5749 * If we're lucky and the row pitch and depth pitch are already aligned, we can skip all of that.
5750 *
5751 * D3D12 also requires offsets to be 512 byte aligned. We'll fix that for the client and warn them as well.
5752 *
5753 * And just for some extra fun, D3D12 doesn't actually support depth pitch, so we have to realign that too!
5754 */
5755
5756 if (pixelsPerRow == 0) {
5757 pixelsPerRow = destination->w;
5758 }
5759
5760 rowPitch = BytesPerRow(pixelsPerRow, textureContainer->header.info.format);
5761
5762 if (rowsPerSlice == 0) {
5763 rowsPerSlice = destination->h;
5764 }
5765
5766 bytesPerSlice = rowsPerSlice * rowPitch;
5767
5768 alignedRowPitch = D3D12_INTERNAL_Align(rowPitch, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT);
5769 needsRealignment = rowsPerSlice != destination->h || rowPitch != alignedRowPitch;
5770 needsPlacementCopy = source->offset % D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT != 0;
5771
5772 sourceLocation.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;
5773 sourceLocation.PlacedFootprint.Footprint.Format = SDLToD3D12_TextureFormat[textureContainer->header.info.format];
5774 sourceLocation.PlacedFootprint.Footprint.RowPitch = alignedRowPitch;
5775
5776 destinationLocation.pResource = textureContainer->activeTexture->resource;
5777 destinationLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
5778 destinationLocation.SubresourceIndex = textureSubresource->index;
5779
5780 if (needsRealignment) {
5781 temporaryBuffer = D3D12_INTERNAL_CreateBuffer(
5782 d3d12CommandBuffer->renderer,
5783 0,
5784 alignedRowPitch * destination->h * destination->d,
5785 D3D12_BUFFER_TYPE_UPLOAD,
5786 NULL);
5787
5788 if (!temporaryBuffer) {
5789 return;
5790 }
5791
5792 sourceLocation.pResource = temporaryBuffer->handle;
5793
5794 for (Uint32 sliceIndex = 0; sliceIndex < destination->d; sliceIndex += 1) {
5795 // copy row count minus one to avoid overread
5796 for (Uint32 rowIndex = 0; rowIndex < rowsPerSlice - 1; rowIndex += 1) {
5797 SDL_memcpy(
5798 temporaryBuffer->mapPointer + (sliceIndex * rowsPerSlice) + (rowIndex * alignedRowPitch),
5799 transferBufferContainer->activeBuffer->mapPointer + source->offset + (sliceIndex * bytesPerSlice) + (rowIndex * rowPitch),
5800 alignedRowPitch);
5801 }
5802 Uint32 offset = source->offset + (sliceIndex * bytesPerSlice) + ((rowsPerSlice - 1) * rowPitch);
5803 SDL_memcpy(
5804 temporaryBuffer->mapPointer + (sliceIndex * rowsPerSlice) + ((rowsPerSlice - 1) * alignedRowPitch),
5805 transferBufferContainer->activeBuffer->mapPointer + offset,
5806 SDL_min(alignedRowPitch, transferBufferContainer->size - offset));
5807
5808 sourceLocation.PlacedFootprint.Footprint.Width = destination->w;
5809 sourceLocation.PlacedFootprint.Footprint.Height = rowsPerSlice;
5810 sourceLocation.PlacedFootprint.Footprint.Depth = 1;
5811 sourceLocation.PlacedFootprint.Offset = (sliceIndex * bytesPerSlice);
5812
5813 ID3D12GraphicsCommandList_CopyTextureRegion(
5814 d3d12CommandBuffer->graphicsCommandList,
5815 &destinationLocation,
5816 destination->x,
5817 destination->y,
5818 sliceIndex,
5819 &sourceLocation,
5820 NULL);
5821 }
5822
5823 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, temporaryBuffer);
5824 D3D12_INTERNAL_ReleaseBuffer(
5825 d3d12CommandBuffer->renderer,
5826 temporaryBuffer);
5827 } else if (needsPlacementCopy) {
5828 temporaryBuffer = D3D12_INTERNAL_CreateBuffer(
5829 d3d12CommandBuffer->renderer,
5830 0,
5831 alignedRowPitch * destination->h * destination->d,
5832 D3D12_BUFFER_TYPE_UPLOAD,
5833 NULL);
5834
5835 if (!temporaryBuffer) {
5836 return;
5837 }
5838
5839 SDL_memcpy(
5840 temporaryBuffer->mapPointer,
5841 transferBufferContainer->activeBuffer->mapPointer + source->offset,
5842 alignedRowPitch * destination->h * destination->d);
5843
5844 sourceLocation.pResource = temporaryBuffer->handle;
5845 sourceLocation.PlacedFootprint.Offset = 0;
5846 sourceLocation.PlacedFootprint.Footprint.Width = destination->w;
5847 sourceLocation.PlacedFootprint.Footprint.Height = destination->h;
5848 sourceLocation.PlacedFootprint.Footprint.Depth = 1;
5849
5850 ID3D12GraphicsCommandList_CopyTextureRegion(
5851 d3d12CommandBuffer->graphicsCommandList,
5852 &destinationLocation,
5853 destination->x,
5854 destination->y,
5855 destination->z,
5856 &sourceLocation,
5857 NULL);
5858
5859 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, temporaryBuffer);
5860 D3D12_INTERNAL_ReleaseBuffer(
5861 d3d12CommandBuffer->renderer,
5862 temporaryBuffer);
5863
5864 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Texture upload offset not aligned to 512 bytes! This is suboptimal on D3D12!");
5865 } else {
5866 sourceLocation.pResource = transferBufferContainer->activeBuffer->handle;
5867 sourceLocation.PlacedFootprint.Offset = source->offset;
5868 sourceLocation.PlacedFootprint.Footprint.Width = destination->w;
5869 sourceLocation.PlacedFootprint.Footprint.Height = destination->h;
5870 sourceLocation.PlacedFootprint.Footprint.Depth = destination->d;
5871
5872 ID3D12GraphicsCommandList_CopyTextureRegion(
5873 d3d12CommandBuffer->graphicsCommandList,
5874 &destinationLocation,
5875 destination->x,
5876 destination->y,
5877 destination->z,
5878 &sourceLocation,
5879 NULL);
5880 }
5881
5882 D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
5883 d3d12CommandBuffer,
5884 D3D12_RESOURCE_STATE_COPY_DEST,
5885 textureSubresource);
5886
5887 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, transferBufferContainer->activeBuffer);
5888 D3D12_INTERNAL_TrackTexture(d3d12CommandBuffer, textureSubresource->parent);
5889}
5890
5891static void D3D12_UploadToBuffer(
5892 SDL_GPUCommandBuffer *commandBuffer,
5893 const SDL_GPUTransferBufferLocation *source,
5894 const SDL_GPUBufferRegion *destination,
5895 bool cycle)
5896{
5897 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5898 D3D12BufferContainer *transferBufferContainer = (D3D12BufferContainer *)source->transfer_buffer;
5899 D3D12BufferContainer *bufferContainer = (D3D12BufferContainer *)destination->buffer;
5900
5901 // The transfer buffer does not need a barrier, it is synced by the client.
5902
5903 D3D12Buffer *buffer = D3D12_INTERNAL_PrepareBufferForWrite(
5904 d3d12CommandBuffer,
5905 bufferContainer,
5906 cycle,
5907 D3D12_RESOURCE_STATE_COPY_DEST);
5908
5909 ID3D12GraphicsCommandList_CopyBufferRegion(
5910 d3d12CommandBuffer->graphicsCommandList,
5911 buffer->handle,
5912 destination->offset,
5913 transferBufferContainer->activeBuffer->handle,
5914 source->offset,
5915 destination->size);
5916
5917 D3D12_INTERNAL_BufferTransitionToDefaultUsage(
5918 d3d12CommandBuffer,
5919 D3D12_RESOURCE_STATE_COPY_DEST,
5920 buffer);
5921
5922 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, transferBufferContainer->activeBuffer);
5923 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, buffer);
5924}
5925
5926static void D3D12_CopyTextureToTexture(
5927 SDL_GPUCommandBuffer *commandBuffer,
5928 const SDL_GPUTextureLocation *source,
5929 const SDL_GPUTextureLocation *destination,
5930 Uint32 w,
5931 Uint32 h,
5932 Uint32 d,
5933 bool cycle)
5934{
5935 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
5936 D3D12_TEXTURE_COPY_LOCATION sourceLocation;
5937 D3D12_TEXTURE_COPY_LOCATION destinationLocation;
5938
5939 D3D12TextureSubresource *sourceSubresource = D3D12_INTERNAL_FetchTextureSubresource(
5940 (D3D12TextureContainer *)source->texture,
5941 source->layer,
5942 source->mip_level);
5943
5944 D3D12TextureSubresource *destinationSubresource = D3D12_INTERNAL_PrepareTextureSubresourceForWrite(
5945 d3d12CommandBuffer,
5946 (D3D12TextureContainer *)destination->texture,
5947 destination->layer,
5948 destination->mip_level,
5949 cycle,
5950 D3D12_RESOURCE_STATE_COPY_DEST);
5951
5952 D3D12_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
5953 d3d12CommandBuffer,
5954 D3D12_RESOURCE_STATE_COPY_SOURCE,
5955 sourceSubresource);
5956
5957 sourceLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
5958 sourceLocation.SubresourceIndex = sourceSubresource->index;
5959 sourceLocation.pResource = sourceSubresource->parent->resource;
5960
5961 destinationLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
5962 destinationLocation.SubresourceIndex = destinationSubresource->index;
5963 destinationLocation.pResource = destinationSubresource->parent->resource;
5964
5965 D3D12_BOX sourceBox = { source->x, source->y, source->z, source->x + w, source->y + h, source->z + d };
5966
5967 ID3D12GraphicsCommandList_CopyTextureRegion(
5968 d3d12CommandBuffer->graphicsCommandList,
5969 &destinationLocation,
5970 destination->x,
5971 destination->y,
5972 destination->z,
5973 &sourceLocation,
5974 &sourceBox);
5975
5976 D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
5977 d3d12CommandBuffer,
5978 D3D12_RESOURCE_STATE_COPY_SOURCE,
5979 sourceSubresource);
5980
5981 D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
5982 d3d12CommandBuffer,
5983 D3D12_RESOURCE_STATE_COPY_DEST,
5984 destinationSubresource);
5985
5986 D3D12_INTERNAL_TrackTexture(
5987 d3d12CommandBuffer,
5988 sourceSubresource->parent);
5989
5990 D3D12_INTERNAL_TrackTexture(
5991 d3d12CommandBuffer,
5992 destinationSubresource->parent);
5993}
5994
5995static void D3D12_CopyBufferToBuffer(
5996 SDL_GPUCommandBuffer *commandBuffer,
5997 const SDL_GPUBufferLocation *source,
5998 const SDL_GPUBufferLocation *destination,
5999 Uint32 size,
6000 bool cycle)
6001{
6002 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
6003 D3D12BufferContainer *sourceContainer = (D3D12BufferContainer *)source->buffer;
6004 D3D12BufferContainer *destinationContainer = (D3D12BufferContainer *)destination->buffer;
6005
6006 D3D12Buffer *sourceBuffer = sourceContainer->activeBuffer;
6007 D3D12Buffer *destinationBuffer = D3D12_INTERNAL_PrepareBufferForWrite(
6008 d3d12CommandBuffer,
6009 destinationContainer,
6010 cycle,
6011 D3D12_RESOURCE_STATE_COPY_DEST);
6012
6013 D3D12_INTERNAL_BufferTransitionFromDefaultUsage(
6014 d3d12CommandBuffer,
6015 D3D12_RESOURCE_STATE_COPY_SOURCE,
6016 sourceBuffer);
6017
6018 ID3D12GraphicsCommandList_CopyBufferRegion(
6019 d3d12CommandBuffer->graphicsCommandList,
6020 destinationBuffer->handle,
6021 destination->offset,
6022 sourceBuffer->handle,
6023 source->offset,
6024 size);
6025
6026 D3D12_INTERNAL_BufferTransitionToDefaultUsage(
6027 d3d12CommandBuffer,
6028 D3D12_RESOURCE_STATE_COPY_SOURCE,
6029 sourceBuffer);
6030
6031 D3D12_INTERNAL_BufferTransitionToDefaultUsage(
6032 d3d12CommandBuffer,
6033 D3D12_RESOURCE_STATE_COPY_DEST,
6034 destinationBuffer);
6035
6036 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, sourceBuffer);
6037 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, destinationBuffer);
6038}
6039
6040static void D3D12_DownloadFromTexture(
6041 SDL_GPUCommandBuffer *commandBuffer,
6042 const SDL_GPUTextureRegion *source,
6043 const SDL_GPUTextureTransferInfo *destination)
6044{
6045 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
6046 D3D12_TEXTURE_COPY_LOCATION sourceLocation;
6047 D3D12_TEXTURE_COPY_LOCATION destinationLocation;
6048 Uint32 pixelsPerRow = destination->pixels_per_row;
6049 Uint32 rowPitch;
6050 Uint32 alignedRowPitch;
6051 Uint32 rowsPerSlice = destination->rows_per_layer;
6052 bool needsRealignment;
6053 bool needsPlacementCopy;
6054 D3D12TextureDownload *textureDownload = NULL;
6055 D3D12TextureContainer *sourceContainer = (D3D12TextureContainer *)source->texture;
6056 D3D12TextureSubresource *sourceSubresource = D3D12_INTERNAL_FetchTextureSubresource(
6057 sourceContainer,
6058 source->layer,
6059 source->mip_level);
6060 D3D12BufferContainer *destinationContainer = (D3D12BufferContainer *)destination->transfer_buffer;
6061 D3D12Buffer *destinationBuffer = destinationContainer->activeBuffer;
6062
6063 /* D3D12 requires texture data row pitch to be 256 byte aligned, which is obviously insane.
6064 * Instead of exposing that restriction to the client, which is a huge rake to step on,
6065 * and a restriction that no other backend requires, we're going to copy data to a temporary buffer,
6066 * copy THAT data to the texture, and then get rid of the temporary buffer ASAP.
6067 * If we're lucky and the row pitch and depth pitch are already aligned, we can skip all of that.
6068 *
6069 * D3D12 also requires offsets to be 512 byte aligned. We'll fix that for the client and warn them as well.
6070 *
6071 * And just for some extra fun, D3D12 doesn't actually support depth pitch, so we have to realign that too!
6072 *
6073 * Since this is an async download we have to do all these fixups after the command is finished,
6074 * so we'll cache the metadata and map and copy it when the command buffer is cleaned.
6075 */
6076
6077 if (pixelsPerRow == 0) {
6078 pixelsPerRow = source->w;
6079 }
6080
6081 rowPitch = BytesPerRow(pixelsPerRow, sourceContainer->header.info.format);
6082
6083 if (rowsPerSlice == 0) {
6084 rowsPerSlice = source->h;
6085 }
6086
6087 alignedRowPitch = D3D12_INTERNAL_Align(rowPitch, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT);
6088 needsRealignment = rowsPerSlice != source->h || rowPitch != alignedRowPitch;
6089 needsPlacementCopy = destination->offset % D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT != 0;
6090
6091 sourceLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
6092 sourceLocation.SubresourceIndex = sourceSubresource->index;
6093 sourceLocation.pResource = sourceSubresource->parent->resource;
6094
6095 D3D12_BOX sourceBox = { source->x, source->y, source->z, source->x + source->w, source->y + rowsPerSlice, source->z + source->d };
6096
6097 destinationLocation.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;
6098 destinationLocation.PlacedFootprint.Footprint.Format = SDLToD3D12_TextureFormat[sourceContainer->header.info.format];
6099 destinationLocation.PlacedFootprint.Footprint.Width = source->w;
6100 destinationLocation.PlacedFootprint.Footprint.Height = rowsPerSlice;
6101 destinationLocation.PlacedFootprint.Footprint.Depth = source->d;
6102 destinationLocation.PlacedFootprint.Footprint.RowPitch = alignedRowPitch;
6103
6104 if (needsRealignment || needsPlacementCopy) {
6105 textureDownload = (D3D12TextureDownload *)SDL_malloc(sizeof(D3D12TextureDownload));
6106
6107 if (!textureDownload) {
6108 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to create texture download structure!");
6109 return;
6110 }
6111
6112 textureDownload->temporaryBuffer = D3D12_INTERNAL_CreateBuffer(
6113 d3d12CommandBuffer->renderer,
6114 0,
6115 alignedRowPitch * rowsPerSlice * source->d,
6116 D3D12_BUFFER_TYPE_DOWNLOAD,
6117 NULL);
6118
6119 if (!textureDownload->temporaryBuffer) {
6120 SDL_free(textureDownload);
6121 return;
6122 }
6123
6124 textureDownload->destinationBuffer = destinationBuffer;
6125 textureDownload->bufferOffset = destination->offset;
6126 textureDownload->width = source->w;
6127 textureDownload->height = rowsPerSlice;
6128 textureDownload->depth = source->d;
6129 textureDownload->bytesPerRow = rowPitch;
6130 textureDownload->bytesPerDepthSlice = rowPitch * rowsPerSlice;
6131 textureDownload->alignedBytesPerRow = alignedRowPitch;
6132
6133 destinationLocation.pResource = textureDownload->temporaryBuffer->handle;
6134 destinationLocation.PlacedFootprint.Offset = 0;
6135 } else {
6136 destinationLocation.pResource = destinationBuffer->handle;
6137 destinationLocation.PlacedFootprint.Offset = destination->offset;
6138 }
6139
6140 D3D12_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
6141 d3d12CommandBuffer,
6142 D3D12_RESOURCE_STATE_COPY_SOURCE,
6143 sourceSubresource);
6144
6145 ID3D12GraphicsCommandList_CopyTextureRegion(
6146 d3d12CommandBuffer->graphicsCommandList,
6147 &destinationLocation,
6148 0,
6149 0,
6150 0,
6151 &sourceLocation,
6152 &sourceBox);
6153
6154 D3D12_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
6155 d3d12CommandBuffer,
6156 D3D12_RESOURCE_STATE_COPY_SOURCE,
6157 sourceSubresource);
6158
6159 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, destinationBuffer);
6160 D3D12_INTERNAL_TrackTexture(d3d12CommandBuffer, sourceSubresource->parent);
6161
6162 if (textureDownload != NULL) {
6163 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, textureDownload->temporaryBuffer);
6164
6165 if (d3d12CommandBuffer->textureDownloadCount >= d3d12CommandBuffer->textureDownloadCapacity) {
6166 d3d12CommandBuffer->textureDownloadCapacity *= 2;
6167 d3d12CommandBuffer->textureDownloads = (D3D12TextureDownload **)SDL_realloc(
6168 d3d12CommandBuffer->textureDownloads,
6169 d3d12CommandBuffer->textureDownloadCapacity * sizeof(D3D12TextureDownload *));
6170 }
6171
6172 d3d12CommandBuffer->textureDownloads[d3d12CommandBuffer->textureDownloadCount] = textureDownload;
6173 d3d12CommandBuffer->textureDownloadCount += 1;
6174
6175 D3D12_INTERNAL_ReleaseBuffer(d3d12CommandBuffer->renderer, textureDownload->temporaryBuffer);
6176 }
6177}
6178
6179static void D3D12_DownloadFromBuffer(
6180 SDL_GPUCommandBuffer *commandBuffer,
6181 const SDL_GPUBufferRegion *source,
6182 const SDL_GPUTransferBufferLocation *destination)
6183{
6184 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
6185 D3D12BufferContainer *sourceContainer = (D3D12BufferContainer *)source->buffer;
6186 D3D12BufferContainer *destinationContainer = (D3D12BufferContainer *)destination->transfer_buffer;
6187
6188 D3D12Buffer *sourceBuffer = sourceContainer->activeBuffer;
6189 D3D12_INTERNAL_BufferTransitionFromDefaultUsage(
6190 d3d12CommandBuffer,
6191 D3D12_RESOURCE_STATE_COPY_SOURCE,
6192 sourceBuffer);
6193
6194 D3D12Buffer *destinationBuffer = destinationContainer->activeBuffer;
6195
6196 ID3D12GraphicsCommandList_CopyBufferRegion(
6197 d3d12CommandBuffer->graphicsCommandList,
6198 destinationBuffer->handle,
6199 destination->offset,
6200 sourceBuffer->handle,
6201 source->offset,
6202 source->size);
6203
6204 D3D12_INTERNAL_BufferTransitionToDefaultUsage(
6205 d3d12CommandBuffer,
6206 D3D12_RESOURCE_STATE_COPY_SOURCE,
6207 sourceBuffer);
6208
6209 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, sourceBuffer);
6210 D3D12_INTERNAL_TrackBuffer(d3d12CommandBuffer, destinationBuffer);
6211}
6212
6213static void D3D12_EndCopyPass(
6214 SDL_GPUCommandBuffer *commandBuffer)
6215{
6216 // no-op
6217 (void)commandBuffer;
6218}
6219
6220static void D3D12_GenerateMipmaps(
6221 SDL_GPUCommandBuffer *commandBuffer,
6222 SDL_GPUTexture *texture)
6223{
6224 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
6225 D3D12Renderer *renderer = d3d12CommandBuffer->renderer;
6226 D3D12TextureContainer *container = (D3D12TextureContainer *)texture;
6227 SDL_GPUGraphicsPipeline *blitPipeline;
6228
6229 blitPipeline = SDL_GPU_FetchBlitPipeline(
6230 renderer->sdlGPUDevice,
6231 container->header.info.type,
6232 container->header.info.format,
6233 renderer->blitVertexShader,
6234 renderer->blitFrom2DShader,
6235 renderer->blitFrom2DArrayShader,
6236 renderer->blitFrom3DShader,
6237 renderer->blitFromCubeShader,
6238 renderer->blitFromCubeArrayShader,
6239 &renderer->blitPipelines,
6240 &renderer->blitPipelineCount,
6241 &renderer->blitPipelineCapacity);
6242
6243 if (blitPipeline == NULL) {
6244 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Could not fetch blit pipeline");
6245 return;
6246 }
6247
6248 // We have to do this one subresource at a time
6249 for (Uint32 layerOrDepthIndex = 0; layerOrDepthIndex < container->header.info.layer_count_or_depth; layerOrDepthIndex += 1) {
6250 for (Uint32 levelIndex = 1; levelIndex < container->header.info.num_levels; levelIndex += 1) {
6251 SDL_GPUBlitInfo blitInfo;
6252 SDL_zero(blitInfo);
6253
6254 blitInfo.source.texture = texture;
6255 blitInfo.source.mip_level = levelIndex - 1;
6256 blitInfo.source.layer_or_depth_plane = layerOrDepthIndex;
6257 blitInfo.source.x = 0;
6258 blitInfo.source.y = 0;
6259 blitInfo.source.w = SDL_max(container->header.info.width >> (levelIndex - 1), 1);
6260 blitInfo.source.h = SDL_max(container->header.info.height >> (levelIndex - 1), 1);
6261
6262 blitInfo.destination.texture = texture;
6263 blitInfo.destination.mip_level = levelIndex;
6264 blitInfo.destination.layer_or_depth_plane = layerOrDepthIndex;
6265 blitInfo.destination.x = 0;
6266 blitInfo.destination.y = 0;
6267 blitInfo.destination.w = SDL_max(container->header.info.width >> levelIndex, 1);
6268 blitInfo.destination.h = SDL_max(container->header.info.height >> levelIndex, 1);
6269
6270 blitInfo.load_op = SDL_GPU_LOADOP_DONT_CARE;
6271 blitInfo.filter = SDL_GPU_FILTER_LINEAR;
6272
6273 SDL_BlitGPUTexture(
6274 commandBuffer,
6275 &blitInfo);
6276 }
6277 }
6278
6279 D3D12_INTERNAL_TrackTexture(d3d12CommandBuffer, container->activeTexture);
6280}
6281
6282static void D3D12_Blit(
6283 SDL_GPUCommandBuffer *commandBuffer,
6284 const SDL_GPUBlitInfo *info)
6285{
6286 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
6287 D3D12Renderer *renderer = (D3D12Renderer *)d3d12CommandBuffer->renderer;
6288
6289 SDL_GPU_BlitCommon(
6290 commandBuffer,
6291 info,
6292 renderer->blitLinearSampler,
6293 renderer->blitNearestSampler,
6294 renderer->blitVertexShader,
6295 renderer->blitFrom2DShader,
6296 renderer->blitFrom2DArrayShader,
6297 renderer->blitFrom3DShader,
6298 renderer->blitFromCubeShader,
6299 renderer->blitFromCubeArrayShader,
6300 &renderer->blitPipelines,
6301 &renderer->blitPipelineCount,
6302 &renderer->blitPipelineCapacity);
6303}
6304
6305// Submission/Presentation
6306
6307static D3D12WindowData *D3D12_INTERNAL_FetchWindowData(
6308 SDL_Window *window)
6309{
6310 SDL_PropertiesID properties = SDL_GetWindowProperties(window);
6311 return (D3D12WindowData *)SDL_GetPointerProperty(properties, WINDOW_PROPERTY_DATA, NULL);
6312}
6313
6314static bool D3D12_INTERNAL_OnWindowResize(void *userdata, SDL_Event *e)
6315{
6316 SDL_Window *w = (SDL_Window *)userdata;
6317 D3D12WindowData *data;
6318 if (e->type == SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED && e->window.windowID == SDL_GetWindowID(w)) {
6319 data = D3D12_INTERNAL_FetchWindowData(w);
6320 data->needsSwapchainRecreate = true;
6321 }
6322
6323 return true;
6324}
6325
6326static bool D3D12_SupportsSwapchainComposition(
6327 SDL_GPURenderer *driverData,
6328 SDL_Window *window,
6329 SDL_GPUSwapchainComposition swapchainComposition)
6330{
6331#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
6332 // FIXME: HDR support would be nice to add, but it seems complicated...
6333 return swapchainComposition == SDL_GPU_SWAPCHAINCOMPOSITION_SDR ||
6334 swapchainComposition == SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR;
6335#else
6336 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
6337 DXGI_FORMAT format;
6338 D3D12_FEATURE_DATA_FORMAT_SUPPORT formatSupport;
6339 Uint32 colorSpaceSupport;
6340 HRESULT res;
6341
6342 format = SwapchainCompositionToTextureFormat[swapchainComposition];
6343
6344 formatSupport.Format = format;
6345 res = ID3D12Device_CheckFeatureSupport(
6346 renderer->device,
6347 D3D12_FEATURE_FORMAT_SUPPORT,
6348 &formatSupport,
6349 sizeof(formatSupport));
6350 if (FAILED(res)) {
6351 // Format is apparently unknown
6352 return false;
6353 }
6354
6355 if (!(formatSupport.Support1 & D3D12_FORMAT_SUPPORT1_DISPLAY)) {
6356 return false;
6357 }
6358
6359 D3D12WindowData *windowData = D3D12_INTERNAL_FetchWindowData(window);
6360 if (windowData == NULL) {
6361 SET_STRING_ERROR_AND_RETURN("Must claim window before querying swapchain composition support!", false);
6362 }
6363
6364 // Check the color space support if necessary
6365 if (swapchainComposition != SDL_GPU_SWAPCHAINCOMPOSITION_SDR) {
6366 IDXGISwapChain3_CheckColorSpaceSupport(
6367 windowData->swapchain,
6368 SwapchainCompositionToColorSpace[swapchainComposition],
6369 &colorSpaceSupport);
6370
6371 if (!(colorSpaceSupport & DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT)) {
6372 return false;
6373 }
6374 }
6375#endif
6376
6377 return true;
6378}
6379
6380static bool D3D12_SupportsPresentMode(
6381 SDL_GPURenderer *driverData,
6382 SDL_Window *window,
6383 SDL_GPUPresentMode presentMode)
6384{
6385 (void)driverData;
6386 (void)window;
6387
6388 switch (presentMode) {
6389 case SDL_GPU_PRESENTMODE_IMMEDIATE:
6390 case SDL_GPU_PRESENTMODE_VSYNC:
6391 return true;
6392 case SDL_GPU_PRESENTMODE_MAILBOX:
6393#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
6394 return false;
6395#else
6396 return true;
6397#endif
6398 default:
6399 SDL_assert(!"Unrecognized present mode");
6400 return false;
6401 }
6402}
6403
6404#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
6405static bool D3D12_INTERNAL_CreateSwapchain(
6406 D3D12Renderer *renderer,
6407 D3D12WindowData *windowData,
6408 SDL_GPUSwapchainComposition swapchain_composition,
6409 SDL_GPUPresentMode present_mode)
6410{
6411 int width, height;
6412 SDL_GPUTextureCreateInfo createInfo;
6413 D3D12Texture *texture;
6414
6415 // Get the swapchain size
6416 SDL_SyncWindow(windowData->window);
6417 SDL_GetWindowSizeInPixels(windowData->window, &width, &height);
6418
6419 // Min swapchain image count is 2
6420 windowData->swapchainTextureCount = SDL_clamp(renderer->allowedFramesInFlight, 2, 3);
6421
6422 // Create the swapchain textures
6423 SDL_zero(createInfo);
6424 createInfo.type = SDL_GPU_TEXTURETYPE_2D;
6425 createInfo.width = width;
6426 createInfo.height = height;
6427 createInfo.format = SwapchainCompositionToSDLTextureFormat[swapchain_composition];
6428 createInfo.usage = SDL_GPU_TEXTUREUSAGE_COLOR_TARGET;
6429 createInfo.layer_count_or_depth = 1;
6430 createInfo.num_levels = 1;
6431
6432 for (Uint32 i = 0; i < windowData->swapchainTextureCount; i += 1) {
6433 texture = D3D12_INTERNAL_CreateTexture(renderer, &createInfo, true, "Swapchain");
6434 texture->container = &windowData->textureContainers[i];
6435 windowData->textureContainers[i].activeTexture = texture;
6436 windowData->textureContainers[i].canBeCycled = false;
6437 windowData->textureContainers[i].header.info = createInfo;
6438 windowData->textureContainers[i].textureCapacity = 1;
6439 windowData->textureContainers[i].textureCount = 1;
6440 windowData->textureContainers[i].textures = &windowData->textureContainers[i].activeTexture;
6441 }
6442
6443 // Initialize the swapchain data
6444 windowData->present_mode = present_mode;
6445 windowData->swapchainComposition = swapchain_composition;
6446 windowData->swapchainColorSpace = DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709;
6447 windowData->frameCounter = 0;
6448 windowData->width = width;
6449 windowData->height = height;
6450
6451 // Precache blit pipelines for the swapchain format
6452 for (Uint32 i = 0; i < 5; i += 1) {
6453 SDL_GPU_FetchBlitPipeline(
6454 renderer->sdlGPUDevice,
6455 (SDL_GPUTextureType)i,
6456 createInfo.format,
6457 renderer->blitVertexShader,
6458 renderer->blitFrom2DShader,
6459 renderer->blitFrom2DArrayShader,
6460 renderer->blitFrom3DShader,
6461 renderer->blitFromCubeShader,
6462 renderer->blitFromCubeArrayShader,
6463 &renderer->blitPipelines,
6464 &renderer->blitPipelineCount,
6465 &renderer->blitPipelineCapacity);
6466 }
6467
6468 return true;
6469}
6470
6471static void D3D12_INTERNAL_DestroySwapchain(
6472 D3D12Renderer *renderer,
6473 D3D12WindowData *windowData)
6474{
6475 renderer->commandQueue->PresentX(0, NULL, NULL);
6476 for (Uint32 i = 0; i < windowData->swapchainTextureCount; i += 1) {
6477 D3D12_INTERNAL_DestroyTexture(
6478 renderer,
6479 windowData->textureContainers[i].activeTexture);
6480 }
6481}
6482
6483static bool D3D12_INTERNAL_ResizeSwapchain(
6484 D3D12Renderer *renderer,
6485 D3D12WindowData *windowData)
6486{
6487 // Wait so we don't release in-flight views
6488 D3D12_Wait((SDL_GPURenderer *)renderer);
6489
6490 // Present a black screen
6491 renderer->commandQueue->PresentX(0, NULL, NULL);
6492
6493 // Clean up the previous swapchain textures
6494 for (Uint32 i = 0; i < windowData->swapchainTextureCount; i += 1) {
6495 D3D12_INTERNAL_DestroyTexture(
6496 renderer,
6497 windowData->textureContainers[i].activeTexture);
6498 }
6499
6500 // Create a new swapchain
6501 D3D12_INTERNAL_CreateSwapchain(
6502 renderer,
6503 windowData,
6504 windowData->swapchainComposition,
6505 windowData->present_mode);
6506
6507 windowData->needsSwapchainRecreate = false;
6508 return true;
6509}
6510#else
6511static bool D3D12_INTERNAL_InitializeSwapchainTexture(
6512 D3D12Renderer *renderer,
6513 IDXGISwapChain3 *swapchain,
6514 SDL_GPUSwapchainComposition composition,
6515 Uint32 index,
6516 D3D12TextureContainer *pTextureContainer)
6517{
6518 D3D12Texture *pTexture;
6519 ID3D12Resource *swapchainTexture;
6520 D3D12_RESOURCE_DESC textureDesc;
6521 D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc;
6522 D3D12_RENDER_TARGET_VIEW_DESC rtvDesc;
6523 DXGI_FORMAT swapchainFormat = SwapchainCompositionToTextureFormat[composition];
6524 HRESULT res;
6525
6526 res = IDXGISwapChain_GetBuffer(
6527 swapchain,
6528 index,
6529 D3D_GUID(D3D_IID_ID3D12Resource),
6530 (void **)&swapchainTexture);
6531 CHECK_D3D12_ERROR_AND_RETURN("Could not get buffer from swapchain!", false);
6532
6533 pTexture = (D3D12Texture *)SDL_calloc(1, sizeof(D3D12Texture));
6534 if (!pTexture) {
6535 ID3D12Resource_Release(swapchainTexture);
6536 return false;
6537 }
6538 pTexture->resource = NULL; // This will be set in AcquireSwapchainTexture
6539 SDL_SetAtomicInt(&pTexture->referenceCount, 0);
6540 pTexture->subresourceCount = 1;
6541 pTexture->subresources = (D3D12TextureSubresource *)SDL_calloc(1, sizeof(D3D12TextureSubresource));
6542 if (!pTexture->subresources) {
6543 SDL_free(pTexture);
6544 ID3D12Resource_Release(swapchainTexture);
6545 return false;
6546 }
6547 pTexture->subresources[0].rtvHandles = SDL_calloc(1, sizeof(D3D12StagingDescriptor));
6548 pTexture->subresources[0].uavHandle.heap = NULL;
6549 pTexture->subresources[0].dsvHandle.heap = NULL;
6550 pTexture->subresources[0].parent = pTexture;
6551 pTexture->subresources[0].index = 0;
6552 pTexture->subresources[0].layer = 0;
6553 pTexture->subresources[0].depth = 1;
6554 pTexture->subresources[0].level = 0;
6555
6556 ID3D12Resource_GetDesc(swapchainTexture, &textureDesc);
6557 pTextureContainer->header.info.width = (Uint32)textureDesc.Width;
6558 pTextureContainer->header.info.height = (Uint32)textureDesc.Height;
6559 pTextureContainer->header.info.layer_count_or_depth = 1;
6560 pTextureContainer->header.info.num_levels = 1;
6561 pTextureContainer->header.info.type = SDL_GPU_TEXTURETYPE_2D;
6562 pTextureContainer->header.info.usage = SDL_GPU_TEXTUREUSAGE_COLOR_TARGET;
6563 pTextureContainer->header.info.sample_count = SDL_GPU_SAMPLECOUNT_1;
6564 pTextureContainer->header.info.format = SwapchainCompositionToSDLTextureFormat[composition];
6565
6566 pTextureContainer->debugName = NULL;
6567 pTextureContainer->textures = (D3D12Texture **)SDL_calloc(1, sizeof(D3D12Texture *));
6568 if (!pTextureContainer->textures) {
6569 SDL_free(pTexture->subresources);
6570 SDL_free(pTexture);
6571 ID3D12Resource_Release(swapchainTexture);
6572 return false;
6573 }
6574
6575 pTextureContainer->textureCapacity = 1;
6576 pTextureContainer->textureCount = 1;
6577 pTextureContainer->textures[0] = pTexture;
6578 pTextureContainer->activeTexture = pTexture;
6579 pTextureContainer->canBeCycled = false;
6580
6581 pTexture->container = pTextureContainer;
6582 pTexture->containerIndex = 0;
6583
6584 // Create the SRV for the swapchain
6585 D3D12_INTERNAL_AssignStagingDescriptorHandle(
6586 renderer,
6587 D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV,
6588 &pTexture->srvHandle);
6589
6590 srvDesc.Format = SwapchainCompositionToTextureFormat[composition];
6591 srvDesc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
6592 srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
6593 srvDesc.Texture2D.MipLevels = 1;
6594 srvDesc.Texture2D.MostDetailedMip = 0;
6595 srvDesc.Texture2D.ResourceMinLODClamp = 0;
6596 srvDesc.Texture2D.PlaneSlice = 0;
6597
6598 ID3D12Device_CreateShaderResourceView(
6599 renderer->device,
6600 swapchainTexture,
6601 &srvDesc,
6602 pTexture->srvHandle.cpuHandle);
6603
6604 // Create the RTV for the swapchain
6605 D3D12_INTERNAL_AssignStagingDescriptorHandle(
6606 renderer,
6607 D3D12_DESCRIPTOR_HEAP_TYPE_RTV,
6608 &pTexture->subresources[0].rtvHandles[0]);
6609
6610 rtvDesc.Format = (composition == SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR) ? DXGI_FORMAT_B8G8R8A8_UNORM_SRGB : swapchainFormat;
6611 rtvDesc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D;
6612 rtvDesc.Texture2D.MipSlice = 0;
6613 rtvDesc.Texture2D.PlaneSlice = 0;
6614
6615 ID3D12Device_CreateRenderTargetView(
6616 renderer->device,
6617 swapchainTexture,
6618 &rtvDesc,
6619 pTexture->subresources[0].rtvHandles[0].cpuHandle);
6620
6621 ID3D12Resource_Release(swapchainTexture);
6622
6623 return true;
6624}
6625
6626static bool D3D12_INTERNAL_ResizeSwapchain(
6627 D3D12Renderer *renderer,
6628 D3D12WindowData *windowData)
6629{
6630 // Wait so we don't release in-flight views
6631 D3D12_Wait((SDL_GPURenderer *)renderer);
6632
6633 // Release views and clean up
6634 for (Uint32 i = 0; i < windowData->swapchainTextureCount; i += 1) {
6635 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
6636 renderer,
6637 &windowData->textureContainers[i].activeTexture->srvHandle);
6638 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
6639 renderer,
6640 &windowData->textureContainers[i].activeTexture->subresources[0].rtvHandles[0]);
6641
6642 SDL_free(windowData->textureContainers[i].activeTexture->subresources[0].rtvHandles);
6643 SDL_free(windowData->textureContainers[i].activeTexture->subresources);
6644 SDL_free(windowData->textureContainers[i].activeTexture);
6645 SDL_free(windowData->textureContainers[i].textures);
6646 }
6647
6648 // Resize the swapchain
6649 HRESULT res = IDXGISwapChain_ResizeBuffers(
6650 windowData->swapchain,
6651 0, // Keep buffer count the same
6652 0, // use client window width
6653 0, // use client window height
6654 DXGI_FORMAT_UNKNOWN, // Keep the old format
6655 renderer->supportsTearing ? DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0);
6656 CHECK_D3D12_ERROR_AND_RETURN("Could not resize swapchain buffers", false);
6657
6658 // Create texture object for the swapchain
6659 for (Uint32 i = 0; i < windowData->swapchainTextureCount; i += 1) {
6660 if (!D3D12_INTERNAL_InitializeSwapchainTexture(
6661 renderer,
6662 windowData->swapchain,
6663 windowData->swapchainComposition,
6664 i,
6665 &windowData->textureContainers[i])) {
6666 return false;
6667 }
6668 }
6669
6670 DXGI_SWAP_CHAIN_DESC1 swapchainDesc;
6671 IDXGISwapChain3_GetDesc1(windowData->swapchain, &swapchainDesc);
6672 CHECK_D3D12_ERROR_AND_RETURN("Failed to retrieve swapchain descriptor!", false);
6673
6674 windowData->width = swapchainDesc.Width;
6675 windowData->height = swapchainDesc.Height;
6676 windowData->needsSwapchainRecreate = false;
6677 return true;
6678}
6679
6680static void D3D12_INTERNAL_DestroySwapchain(
6681 D3D12Renderer *renderer,
6682 D3D12WindowData *windowData)
6683{
6684 // Release views and clean up
6685 for (Uint32 i = 0; i < windowData->swapchainTextureCount; i += 1) {
6686 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
6687 renderer,
6688 &windowData->textureContainers[i].activeTexture->srvHandle);
6689 D3D12_INTERNAL_ReleaseStagingDescriptorHandle(
6690 renderer,
6691 &windowData->textureContainers[i].activeTexture->subresources[0].rtvHandles[0]);
6692
6693 SDL_free(windowData->textureContainers[i].activeTexture->subresources[0].rtvHandles);
6694 SDL_free(windowData->textureContainers[i].activeTexture->subresources);
6695 SDL_free(windowData->textureContainers[i].activeTexture);
6696 SDL_free(windowData->textureContainers[i].textures);
6697 }
6698
6699 IDXGISwapChain_Release(windowData->swapchain);
6700 windowData->swapchain = NULL;
6701}
6702
6703static bool D3D12_INTERNAL_CreateSwapchain(
6704 D3D12Renderer *renderer,
6705 D3D12WindowData *windowData,
6706 SDL_GPUSwapchainComposition swapchainComposition,
6707 SDL_GPUPresentMode presentMode)
6708{
6709 HWND dxgiHandle;
6710 DXGI_SWAP_CHAIN_DESC1 swapchainDesc;
6711 DXGI_SWAP_CHAIN_FULLSCREEN_DESC fullscreenDesc;
6712 DXGI_FORMAT swapchainFormat;
6713 IDXGIFactory1 *pParent;
6714 IDXGISwapChain1 *swapchain;
6715 IDXGISwapChain3 *swapchain3;
6716 HRESULT res;
6717
6718 // Get the DXGI handle
6719#ifdef _WIN32
6720 dxgiHandle = (HWND)SDL_GetPointerProperty(SDL_GetWindowProperties(windowData->window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, NULL);
6721#else
6722 dxgiHandle = (HWND)windowData->window;
6723#endif
6724
6725 swapchainFormat = SwapchainCompositionToTextureFormat[swapchainComposition];
6726
6727 // Min swapchain image count is 2
6728 windowData->swapchainTextureCount = SDL_clamp(renderer->allowedFramesInFlight, 2, 3);
6729
6730 // Initialize the swapchain buffer descriptor
6731 swapchainDesc.Width = 0; // use client window width
6732 swapchainDesc.Height = 0; // use client window height
6733 swapchainDesc.Format = swapchainFormat;
6734 swapchainDesc.SampleDesc.Count = 1;
6735 swapchainDesc.SampleDesc.Quality = 0;
6736 swapchainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
6737 swapchainDesc.BufferCount = windowData->swapchainTextureCount;
6738 swapchainDesc.Scaling = DXGI_SCALING_NONE;
6739 swapchainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
6740 swapchainDesc.AlphaMode = DXGI_ALPHA_MODE_UNSPECIFIED;
6741 swapchainDesc.Flags = 0;
6742 swapchainDesc.Stereo = 0;
6743
6744 // Initialize the fullscreen descriptor (if needed)
6745 fullscreenDesc.RefreshRate.Numerator = 0;
6746 fullscreenDesc.RefreshRate.Denominator = 0;
6747 fullscreenDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
6748 fullscreenDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
6749 fullscreenDesc.Windowed = true;
6750
6751 if (renderer->supportsTearing) {
6752 swapchainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING;
6753 } else {
6754 swapchainDesc.Flags = 0;
6755 }
6756
6757 if (!IsWindow(dxgiHandle)) {
6758 return false;
6759 }
6760
6761 // Create the swapchain!
6762 res = IDXGIFactory4_CreateSwapChainForHwnd(
6763 renderer->factory,
6764 (IUnknown *)renderer->commandQueue,
6765 dxgiHandle,
6766 &swapchainDesc,
6767 &fullscreenDesc,
6768 NULL,
6769 &swapchain);
6770 CHECK_D3D12_ERROR_AND_RETURN("Could not create swapchain", false);
6771
6772 res = IDXGISwapChain1_QueryInterface(
6773 swapchain,
6774 D3D_GUID(D3D_IID_IDXGISwapChain3),
6775 (void **)&swapchain3);
6776 IDXGISwapChain1_Release(swapchain);
6777 CHECK_D3D12_ERROR_AND_RETURN("Could not create IDXGISwapChain3", false);
6778
6779 if (swapchainComposition != SDL_GPU_SWAPCHAINCOMPOSITION_SDR) {
6780 // Support already verified if we hit this block
6781 IDXGISwapChain3_SetColorSpace1(
6782 swapchain3,
6783 SwapchainCompositionToColorSpace[swapchainComposition]);
6784 }
6785
6786 /*
6787 * The swapchain's parent is a separate factory from the factory that
6788 * we used to create the swapchain, and only that parent can be used to
6789 * set the window association. Trying to set an association on our factory
6790 * will silently fail and doesn't even verify arguments or return errors.
6791 * See https://gamedev.net/forums/topic/634235-dxgidisabling-altenter/4999955/
6792 */
6793 res = IDXGISwapChain3_GetParent(
6794 swapchain3,
6795 D3D_GUID(D3D_IID_IDXGIFactory1),
6796 (void **)&pParent);
6797 if (FAILED(res)) {
6798 SDL_LogWarn(
6799 SDL_LOG_CATEGORY_GPU,
6800 "Could not get swapchain parent! Error Code: " HRESULT_FMT,
6801 res);
6802 } else {
6803 // Disable DXGI window crap
6804 res = IDXGIFactory1_MakeWindowAssociation(
6805 pParent,
6806 dxgiHandle,
6807 DXGI_MWA_NO_WINDOW_CHANGES);
6808 if (FAILED(res)) {
6809 SDL_LogWarn(
6810 SDL_LOG_CATEGORY_GPU,
6811 "MakeWindowAssociation failed! Error Code: " HRESULT_FMT,
6812 res);
6813 }
6814
6815 // We're done with the parent now
6816 IDXGIFactory1_Release(pParent);
6817 }
6818
6819 IDXGISwapChain3_GetDesc1(swapchain3, &swapchainDesc);
6820 CHECK_D3D12_ERROR_AND_RETURN("Failed to retrieve swapchain descriptor!", false);
6821
6822 // Initialize the swapchain data
6823 windowData->swapchain = swapchain3;
6824 windowData->present_mode = presentMode;
6825 windowData->swapchainComposition = swapchainComposition;
6826 windowData->swapchainColorSpace = SwapchainCompositionToColorSpace[swapchainComposition];
6827 windowData->frameCounter = 0;
6828 windowData->width = swapchainDesc.Width;
6829 windowData->height = swapchainDesc.Height;
6830
6831 // Precache blit pipelines for the swapchain format
6832 for (Uint32 i = 0; i < 5; i += 1) {
6833 SDL_GPU_FetchBlitPipeline(
6834 renderer->sdlGPUDevice,
6835 (SDL_GPUTextureType)i,
6836 SwapchainCompositionToSDLTextureFormat[swapchainComposition],
6837 renderer->blitVertexShader,
6838 renderer->blitFrom2DShader,
6839 renderer->blitFrom2DArrayShader,
6840 renderer->blitFrom3DShader,
6841 renderer->blitFromCubeShader,
6842 renderer->blitFromCubeArrayShader,
6843 &renderer->blitPipelines,
6844 &renderer->blitPipelineCount,
6845 &renderer->blitPipelineCapacity);
6846 }
6847
6848 /* If a you are using a FLIP model format you can't create the swapchain as DXGI_FORMAT_B8G8R8A8_UNORM_SRGB.
6849 * You have to create the swapchain as DXGI_FORMAT_B8G8R8A8_UNORM and then set the render target view's format to DXGI_FORMAT_B8G8R8A8_UNORM_SRGB
6850 */
6851 for (Uint32 i = 0; i < windowData->swapchainTextureCount; i += 1) {
6852 if (!D3D12_INTERNAL_InitializeSwapchainTexture(
6853 renderer,
6854 swapchain3,
6855 swapchainComposition,
6856 i,
6857 &windowData->textureContainers[i])) {
6858 IDXGISwapChain3_Release(swapchain3);
6859 return false;
6860 }
6861 }
6862
6863 return true;
6864}
6865#endif
6866
6867static bool D3D12_ClaimWindow(
6868 SDL_GPURenderer *driverData,
6869 SDL_Window *window)
6870{
6871 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
6872 D3D12WindowData *windowData = D3D12_INTERNAL_FetchWindowData(window);
6873
6874 if (windowData == NULL) {
6875 windowData = (D3D12WindowData *)SDL_calloc(1, sizeof(D3D12WindowData));
6876 if (!windowData) {
6877 return false;
6878 }
6879 windowData->window = window;
6880
6881 if (D3D12_INTERNAL_CreateSwapchain(renderer, windowData, SDL_GPU_SWAPCHAINCOMPOSITION_SDR, SDL_GPU_PRESENTMODE_VSYNC)) {
6882 SDL_SetPointerProperty(SDL_GetWindowProperties(window), WINDOW_PROPERTY_DATA, windowData);
6883
6884 SDL_LockMutex(renderer->windowLock);
6885 if (renderer->claimedWindowCount >= renderer->claimedWindowCapacity) {
6886 renderer->claimedWindowCapacity *= 2;
6887 renderer->claimedWindows = (D3D12WindowData **)SDL_realloc(
6888 renderer->claimedWindows,
6889 renderer->claimedWindowCapacity * sizeof(D3D12WindowData *));
6890 }
6891 renderer->claimedWindows[renderer->claimedWindowCount] = windowData;
6892 renderer->claimedWindowCount += 1;
6893 SDL_UnlockMutex(renderer->windowLock);
6894
6895 SDL_AddEventWatch(D3D12_INTERNAL_OnWindowResize, window);
6896
6897 return true;
6898 } else {
6899 SDL_free(windowData);
6900 SET_STRING_ERROR_AND_RETURN("Could not create swapchain, failed to claim window!", false);
6901 }
6902 } else {
6903 SET_STRING_ERROR_AND_RETURN("Window already claimed", false);
6904 }
6905}
6906
6907static void D3D12_ReleaseWindow(
6908 SDL_GPURenderer *driverData,
6909 SDL_Window *window)
6910{
6911 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
6912 D3D12WindowData *windowData = D3D12_INTERNAL_FetchWindowData(window);
6913
6914 if (windowData == NULL) {
6915 SET_STRING_ERROR_AND_RETURN("Window already unclaimed!", );
6916 }
6917
6918 D3D12_Wait(driverData);
6919
6920 for (Uint32 i = 0; i < MAX_FRAMES_IN_FLIGHT; i += 1) {
6921 if (windowData->inFlightFences[i] != NULL) {
6922 D3D12_ReleaseFence(
6923 driverData,
6924 windowData->inFlightFences[i]);
6925 windowData->inFlightFences[i] = NULL;
6926 }
6927 }
6928
6929 D3D12_INTERNAL_DestroySwapchain(renderer, windowData);
6930
6931 SDL_LockMutex(renderer->windowLock);
6932 for (Uint32 i = 0; i < renderer->claimedWindowCount; i += 1) {
6933 if (renderer->claimedWindows[i]->window == window) {
6934 renderer->claimedWindows[i] = renderer->claimedWindows[renderer->claimedWindowCount - 1];
6935 renderer->claimedWindowCount -= 1;
6936 break;
6937 }
6938 }
6939 SDL_UnlockMutex(renderer->windowLock);
6940
6941 SDL_free(windowData);
6942 SDL_ClearProperty(SDL_GetWindowProperties(window), WINDOW_PROPERTY_DATA);
6943 SDL_RemoveEventWatch(D3D12_INTERNAL_OnWindowResize, window);
6944}
6945
6946static bool D3D12_SetSwapchainParameters(
6947 SDL_GPURenderer *driverData,
6948 SDL_Window *window,
6949 SDL_GPUSwapchainComposition swapchainComposition,
6950 SDL_GPUPresentMode presentMode)
6951{
6952 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
6953 D3D12WindowData *windowData = D3D12_INTERNAL_FetchWindowData(window);
6954
6955 if (windowData == NULL) {
6956 SET_STRING_ERROR_AND_RETURN("Cannot set swapchain parameters on unclaimed window!", false);
6957 }
6958
6959 if (!D3D12_SupportsSwapchainComposition(driverData, window, swapchainComposition)) {
6960 SET_STRING_ERROR_AND_RETURN("Swapchain composition not supported!", false);
6961 }
6962
6963 if (!D3D12_SupportsPresentMode(driverData, window, presentMode)) {
6964 SET_STRING_ERROR_AND_RETURN("Present mode not supported!", false);
6965 }
6966
6967 if (
6968 swapchainComposition != windowData->swapchainComposition ||
6969 presentMode != windowData->present_mode) {
6970 D3D12_Wait(driverData);
6971
6972 // Recreate the swapchain
6973 D3D12_INTERNAL_DestroySwapchain(
6974 renderer,
6975 windowData);
6976
6977 return D3D12_INTERNAL_CreateSwapchain(
6978 renderer,
6979 windowData,
6980 swapchainComposition,
6981 presentMode);
6982 }
6983
6984 return true;
6985}
6986
6987static bool D3D12_SetAllowedFramesInFlight(
6988 SDL_GPURenderer *driverData,
6989 Uint32 allowedFramesInFlight)
6990{
6991 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
6992
6993 if (!D3D12_Wait(driverData)) {
6994 return false;
6995 }
6996
6997 // Destroy all swapchains
6998 for (Uint32 i = 0; i < renderer->claimedWindowCount; i += 1) {
6999 D3D12WindowData *windowData = renderer->claimedWindows[i];
7000
7001 D3D12_INTERNAL_DestroySwapchain(renderer, windowData);
7002 }
7003
7004 // Set the frames in flight value
7005 renderer->allowedFramesInFlight = allowedFramesInFlight;
7006
7007 // Recreate all swapchains
7008 for (Uint32 i = 0; i < renderer->claimedWindowCount; i += 1) {
7009 D3D12WindowData *windowData = renderer->claimedWindows[i];
7010
7011 if (!D3D12_INTERNAL_CreateSwapchain(
7012 renderer,
7013 windowData,
7014 windowData->swapchainComposition,
7015 windowData->present_mode)) {
7016 return false;
7017 }
7018 }
7019
7020 return true;
7021}
7022
7023static SDL_GPUTextureFormat D3D12_GetSwapchainTextureFormat(
7024 SDL_GPURenderer *driverData,
7025 SDL_Window *window)
7026{
7027 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
7028 D3D12WindowData *windowData = D3D12_INTERNAL_FetchWindowData(window);
7029
7030 if (windowData == NULL) {
7031 SET_STRING_ERROR_AND_RETURN("Cannot get swapchain format, window has not been claimed!", SDL_GPU_TEXTUREFORMAT_INVALID);
7032 }
7033
7034 return windowData->textureContainers[windowData->frameCounter].header.info.format;
7035}
7036
7037static D3D12Fence *D3D12_INTERNAL_AcquireFence(
7038 D3D12Renderer *renderer)
7039{
7040 D3D12Fence *fence;
7041 ID3D12Fence *handle;
7042 HRESULT res;
7043
7044 SDL_LockMutex(renderer->fenceLock);
7045
7046 if (renderer->availableFenceCount == 0) {
7047 res = ID3D12Device_CreateFence(
7048 renderer->device,
7049 D3D12_FENCE_UNSIGNALED_VALUE,
7050 D3D12_FENCE_FLAG_NONE,
7051 D3D_GUID(D3D_IID_ID3D12Fence),
7052 (void **)&handle);
7053 if (FAILED(res)) {
7054 D3D12_INTERNAL_SetError(renderer, "Failed to create fence!", res);
7055 SDL_UnlockMutex(renderer->fenceLock);
7056 return NULL;
7057 }
7058
7059 fence = (D3D12Fence *)SDL_calloc(1, sizeof(D3D12Fence));
7060 if (!fence) {
7061 ID3D12Fence_Release(handle);
7062 SDL_UnlockMutex(renderer->fenceLock);
7063 return NULL;
7064 }
7065 fence->handle = handle;
7066 fence->event = CreateEvent(NULL, FALSE, FALSE, NULL);
7067 SDL_SetAtomicInt(&fence->referenceCount, 0);
7068 } else {
7069 fence = renderer->availableFences[renderer->availableFenceCount - 1];
7070 renderer->availableFenceCount -= 1;
7071 ID3D12Fence_Signal(fence->handle, D3D12_FENCE_UNSIGNALED_VALUE);
7072 }
7073
7074 SDL_UnlockMutex(renderer->fenceLock);
7075
7076 (void)SDL_AtomicIncRef(&fence->referenceCount);
7077 return fence;
7078}
7079
7080static bool D3D12_INTERNAL_AllocateCommandBuffer(
7081 D3D12Renderer *renderer)
7082{
7083 D3D12CommandBuffer *commandBuffer;
7084 HRESULT res;
7085 ID3D12CommandAllocator *commandAllocator;
7086 ID3D12GraphicsCommandList *commandList;
7087
7088 commandBuffer = (D3D12CommandBuffer *)SDL_calloc(1, sizeof(D3D12CommandBuffer));
7089 if (!commandBuffer) {
7090 SET_STRING_ERROR_AND_RETURN("Failed to create ID3D12CommandList. Out of Memory", false);
7091 }
7092
7093 res = ID3D12Device_CreateCommandAllocator(
7094 renderer->device,
7095 D3D12_COMMAND_LIST_TYPE_DIRECT,
7096 D3D_GUID(D3D_IID_ID3D12CommandAllocator),
7097 (void **)&commandAllocator);
7098 if (FAILED(res)) {
7099 D3D12_INTERNAL_SetError(renderer, "Failed to create ID3D12CommandAllocator", res);
7100 D3D12_INTERNAL_DestroyCommandBuffer(commandBuffer);
7101 return false;
7102 }
7103 commandBuffer->commandAllocator = commandAllocator;
7104
7105 res = ID3D12Device_CreateCommandList(
7106 renderer->device,
7107 0,
7108 D3D12_COMMAND_LIST_TYPE_DIRECT,
7109 commandAllocator,
7110 NULL,
7111 D3D_GUID(D3D_IID_ID3D12GraphicsCommandList),
7112 (void **)&commandList);
7113
7114 if (FAILED(res)) {
7115 D3D12_INTERNAL_SetError(renderer, "Failed to create ID3D12CommandList", res);
7116 D3D12_INTERNAL_DestroyCommandBuffer(commandBuffer);
7117 return false;
7118 }
7119 commandBuffer->graphicsCommandList = commandList;
7120
7121 commandBuffer->renderer = renderer;
7122 commandBuffer->inFlightFence = NULL;
7123
7124 // Window handling
7125 commandBuffer->presentDataCapacity = 1;
7126 commandBuffer->presentDataCount = 0;
7127 commandBuffer->presentDatas = (D3D12PresentData *)SDL_calloc(
7128 commandBuffer->presentDataCapacity, sizeof(D3D12PresentData));
7129
7130 // Resource tracking
7131 commandBuffer->usedTextureCapacity = 4;
7132 commandBuffer->usedTextureCount = 0;
7133 commandBuffer->usedTextures = (D3D12Texture **)SDL_calloc(
7134 commandBuffer->usedTextureCapacity, sizeof(D3D12Texture *));
7135
7136 commandBuffer->usedBufferCapacity = 4;
7137 commandBuffer->usedBufferCount = 0;
7138 commandBuffer->usedBuffers = (D3D12Buffer **)SDL_calloc(
7139 commandBuffer->usedBufferCapacity, sizeof(D3D12Buffer *));
7140
7141 commandBuffer->usedSamplerCapacity = 4;
7142 commandBuffer->usedSamplerCount = 0;
7143 commandBuffer->usedSamplers = (D3D12Sampler **)SDL_calloc(
7144 commandBuffer->usedSamplerCapacity, sizeof(D3D12Sampler *));
7145
7146 commandBuffer->usedGraphicsPipelineCapacity = 4;
7147 commandBuffer->usedGraphicsPipelineCount = 0;
7148 commandBuffer->usedGraphicsPipelines = (D3D12GraphicsPipeline **)SDL_calloc(
7149 commandBuffer->usedGraphicsPipelineCapacity, sizeof(D3D12GraphicsPipeline *));
7150
7151 commandBuffer->usedComputePipelineCapacity = 4;
7152 commandBuffer->usedComputePipelineCount = 0;
7153 commandBuffer->usedComputePipelines = (D3D12ComputePipeline **)SDL_calloc(
7154 commandBuffer->usedComputePipelineCapacity, sizeof(D3D12ComputePipeline *));
7155
7156 commandBuffer->usedUniformBufferCapacity = 4;
7157 commandBuffer->usedUniformBufferCount = 0;
7158 commandBuffer->usedUniformBuffers = (D3D12UniformBuffer **)SDL_calloc(
7159 commandBuffer->usedUniformBufferCapacity, sizeof(D3D12UniformBuffer *));
7160
7161 commandBuffer->textureDownloadCapacity = 4;
7162 commandBuffer->textureDownloadCount = 0;
7163 commandBuffer->textureDownloads = (D3D12TextureDownload **)SDL_calloc(
7164 commandBuffer->textureDownloadCapacity, sizeof(D3D12TextureDownload *));
7165
7166 if (
7167 (!commandBuffer->presentDatas) ||
7168 (!commandBuffer->usedTextures) ||
7169 (!commandBuffer->usedBuffers) ||
7170 (!commandBuffer->usedSamplers) ||
7171 (!commandBuffer->usedGraphicsPipelines) ||
7172 (!commandBuffer->usedComputePipelines) ||
7173 (!commandBuffer->usedUniformBuffers) ||
7174 (!commandBuffer->textureDownloads)) {
7175 D3D12_INTERNAL_DestroyCommandBuffer(commandBuffer);
7176 SET_STRING_ERROR_AND_RETURN("Failed to create ID3D12CommandList. Out of Memory", false);
7177 }
7178
7179 D3D12CommandBuffer **resizedAvailableCommandBuffers = (D3D12CommandBuffer **)SDL_realloc(
7180 renderer->availableCommandBuffers,
7181 sizeof(D3D12CommandBuffer *) * (renderer->availableCommandBufferCapacity + 1));
7182
7183 if (!resizedAvailableCommandBuffers) {
7184 D3D12_INTERNAL_DestroyCommandBuffer(commandBuffer);
7185 SET_STRING_ERROR_AND_RETURN("Failed to create ID3D12CommandList. Out of Memory", false);
7186 }
7187 // Add to inactive command buffer array
7188 renderer->availableCommandBufferCapacity += 1;
7189 renderer->availableCommandBuffers = resizedAvailableCommandBuffers;
7190
7191 renderer->availableCommandBuffers[renderer->availableCommandBufferCount] = commandBuffer;
7192 renderer->availableCommandBufferCount += 1;
7193
7194 return true;
7195}
7196
7197static D3D12CommandBuffer *D3D12_INTERNAL_AcquireCommandBufferFromPool(
7198 D3D12Renderer *renderer)
7199{
7200 D3D12CommandBuffer *commandBuffer;
7201
7202 if (renderer->availableCommandBufferCount == 0) {
7203 if (!D3D12_INTERNAL_AllocateCommandBuffer(renderer)) {
7204 return NULL;
7205 }
7206 }
7207
7208 commandBuffer = renderer->availableCommandBuffers[renderer->availableCommandBufferCount - 1];
7209 renderer->availableCommandBufferCount -= 1;
7210
7211 return commandBuffer;
7212}
7213
7214static SDL_GPUCommandBuffer *D3D12_AcquireCommandBuffer(
7215 SDL_GPURenderer *driverData)
7216{
7217 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
7218 D3D12CommandBuffer *commandBuffer;
7219 ID3D12DescriptorHeap *heaps[2];
7220 SDL_zeroa(heaps);
7221
7222 SDL_LockMutex(renderer->acquireCommandBufferLock);
7223 commandBuffer = D3D12_INTERNAL_AcquireCommandBufferFromPool(renderer);
7224 SDL_UnlockMutex(renderer->acquireCommandBufferLock);
7225
7226 if (commandBuffer == NULL) {
7227 return NULL;
7228 }
7229
7230 // Set the bind state
7231 commandBuffer->currentGraphicsPipeline = NULL;
7232
7233 SDL_zeroa(commandBuffer->colorTargetSubresources);
7234 SDL_zeroa(commandBuffer->colorResolveSubresources);
7235 commandBuffer->depthStencilTextureSubresource = NULL;
7236
7237 SDL_zeroa(commandBuffer->vertexBuffers);
7238 SDL_zeroa(commandBuffer->vertexBufferOffsets);
7239 commandBuffer->vertexBufferCount = 0;
7240
7241 SDL_zeroa(commandBuffer->vertexSamplerTextures);
7242 SDL_zeroa(commandBuffer->vertexSamplers);
7243 SDL_zeroa(commandBuffer->vertexStorageTextures);
7244 SDL_zeroa(commandBuffer->vertexStorageBuffers);
7245 SDL_zeroa(commandBuffer->vertexUniformBuffers);
7246
7247 SDL_zeroa(commandBuffer->fragmentSamplerTextures);
7248 SDL_zeroa(commandBuffer->fragmentSamplers);
7249 SDL_zeroa(commandBuffer->fragmentStorageTextures);
7250 SDL_zeroa(commandBuffer->fragmentStorageBuffers);
7251 SDL_zeroa(commandBuffer->fragmentUniformBuffers);
7252
7253 SDL_zeroa(commandBuffer->computeSamplerTextures);
7254 SDL_zeroa(commandBuffer->computeSamplers);
7255 SDL_zeroa(commandBuffer->computeReadOnlyStorageTextures);
7256 SDL_zeroa(commandBuffer->computeReadOnlyStorageBuffers);
7257 SDL_zeroa(commandBuffer->computeReadWriteStorageTextureSubresources);
7258 SDL_zeroa(commandBuffer->computeReadWriteStorageBuffers);
7259 SDL_zeroa(commandBuffer->computeUniformBuffers);
7260
7261 commandBuffer->autoReleaseFence = true;
7262
7263 return (SDL_GPUCommandBuffer *)commandBuffer;
7264}
7265
7266static bool D3D12_WaitForSwapchain(
7267 SDL_GPURenderer *driverData,
7268 SDL_Window *window)
7269{
7270 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
7271 D3D12WindowData *windowData = D3D12_INTERNAL_FetchWindowData(window);
7272
7273 if (windowData == NULL) {
7274 SET_STRING_ERROR_AND_RETURN("Cannot wait for a swapchain from an unclaimed window!", false);
7275 }
7276
7277 if (windowData->inFlightFences[windowData->frameCounter] != NULL) {
7278 if (!D3D12_WaitForFences(
7279 driverData,
7280 true,
7281 &windowData->inFlightFences[windowData->frameCounter],
7282 1)) {
7283 return false;
7284 }
7285 }
7286
7287 return true;
7288}
7289
7290static bool D3D12_INTERNAL_AcquireSwapchainTexture(
7291 bool block,
7292 SDL_GPUCommandBuffer *commandBuffer,
7293 SDL_Window *window,
7294 SDL_GPUTexture **swapchainTexture,
7295 Uint32 *swapchainTextureWidth,
7296 Uint32 *swapchainTextureHeight)
7297{
7298 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
7299 D3D12Renderer *renderer = d3d12CommandBuffer->renderer;
7300 D3D12WindowData *windowData;
7301 Uint32 swapchainIndex;
7302 HRESULT res;
7303
7304 *swapchainTexture = NULL;
7305 if (swapchainTextureWidth) {
7306 *swapchainTextureWidth = 0;
7307 }
7308 if (swapchainTextureHeight) {
7309 *swapchainTextureHeight = 0;
7310 }
7311
7312 windowData = D3D12_INTERNAL_FetchWindowData(window);
7313 if (windowData == NULL) {
7314 SET_STRING_ERROR_AND_RETURN("Cannot acquire swapchain texture from an unclaimed window!", false);
7315 }
7316
7317 if (windowData->needsSwapchainRecreate) {
7318 if (!D3D12_INTERNAL_ResizeSwapchain(renderer, windowData)) {
7319 return false;
7320 }
7321 }
7322
7323 if (swapchainTextureWidth) {
7324 *swapchainTextureWidth = windowData->width;
7325 }
7326 if (swapchainTextureHeight) {
7327 *swapchainTextureHeight = windowData->height;
7328 }
7329
7330 if (windowData->inFlightFences[windowData->frameCounter] != NULL) {
7331 if (block) {
7332 // In VSYNC mode, block until the least recent presented frame is done
7333 if (!D3D12_WaitForFences(
7334 (SDL_GPURenderer *)renderer,
7335 true,
7336 &windowData->inFlightFences[windowData->frameCounter],
7337 1)) {
7338 return false;
7339 }
7340 } else {
7341 // If we are not blocking and the least recent fence is not signaled,
7342 // return true to indicate that there is no error but rendering should be skipped.
7343 if (!D3D12_QueryFence(
7344 (SDL_GPURenderer *)renderer,
7345 windowData->inFlightFences[windowData->frameCounter])) {
7346 return true;
7347 }
7348 }
7349
7350 D3D12_ReleaseFence(
7351 (SDL_GPURenderer *)renderer,
7352 windowData->inFlightFences[windowData->frameCounter]);
7353
7354 windowData->inFlightFences[windowData->frameCounter] = NULL;
7355 }
7356
7357#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
7358 // FIXME: Should this happen before the inFlightFences stuff above?
7359 windowData->frameToken = D3D12XBOX_FRAME_PIPELINE_TOKEN_NULL;
7360 renderer->device->WaitFrameEventX(D3D12XBOX_FRAME_EVENT_ORIGIN, INFINITE, NULL, D3D12XBOX_WAIT_FRAME_EVENT_FLAG_NONE, &windowData->frameToken);
7361 swapchainIndex = windowData->frameCounter;
7362#else
7363 swapchainIndex = IDXGISwapChain3_GetCurrentBackBufferIndex(windowData->swapchain);
7364
7365 // Set the handle on the windowData texture data.
7366 res = IDXGISwapChain_GetBuffer(
7367 windowData->swapchain,
7368 swapchainIndex,
7369 D3D_GUID(D3D_IID_ID3D12Resource),
7370 (void **)&windowData->textureContainers[swapchainIndex].activeTexture->resource);
7371 CHECK_D3D12_ERROR_AND_RETURN("Could not acquire swapchain!", false);
7372#endif
7373
7374 // Set up presentation
7375 if (d3d12CommandBuffer->presentDataCount == d3d12CommandBuffer->presentDataCapacity) {
7376 d3d12CommandBuffer->presentDataCapacity += 1;
7377 d3d12CommandBuffer->presentDatas = (D3D12PresentData *)SDL_realloc(
7378 d3d12CommandBuffer->presentDatas,
7379 d3d12CommandBuffer->presentDataCapacity * sizeof(D3D12PresentData));
7380 }
7381 d3d12CommandBuffer->presentDatas[d3d12CommandBuffer->presentDataCount].windowData = windowData;
7382 d3d12CommandBuffer->presentDatas[d3d12CommandBuffer->presentDataCount].swapchainImageIndex = swapchainIndex;
7383 d3d12CommandBuffer->presentDataCount += 1;
7384
7385 // Set up resource barrier
7386 D3D12_RESOURCE_BARRIER barrierDesc;
7387 barrierDesc.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
7388 barrierDesc.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
7389 barrierDesc.Transition.StateBefore = D3D12_RESOURCE_STATE_PRESENT;
7390 barrierDesc.Transition.StateAfter = D3D12_RESOURCE_STATE_RENDER_TARGET;
7391 barrierDesc.Transition.pResource = windowData->textureContainers[swapchainIndex].activeTexture->resource;
7392 barrierDesc.Transition.Subresource = 0;
7393
7394 ID3D12GraphicsCommandList_ResourceBarrier(
7395 d3d12CommandBuffer->graphicsCommandList,
7396 1,
7397 &barrierDesc);
7398
7399 *swapchainTexture = (SDL_GPUTexture*)&windowData->textureContainers[swapchainIndex];
7400 return true;
7401}
7402
7403static bool D3D12_AcquireSwapchainTexture(
7404 SDL_GPUCommandBuffer *command_buffer,
7405 SDL_Window *window,
7406 SDL_GPUTexture **swapchain_texture,
7407 Uint32 *swapchain_texture_width,
7408 Uint32 *swapchain_texture_height
7409) {
7410 return D3D12_INTERNAL_AcquireSwapchainTexture(
7411 false,
7412 command_buffer,
7413 window,
7414 swapchain_texture,
7415 swapchain_texture_width,
7416 swapchain_texture_height);
7417}
7418
7419static bool D3D12_WaitAndAcquireSwapchainTexture(
7420 SDL_GPUCommandBuffer *command_buffer,
7421 SDL_Window *window,
7422 SDL_GPUTexture **swapchain_texture,
7423 Uint32 *swapchain_texture_width,
7424 Uint32 *swapchain_texture_height
7425) {
7426 return D3D12_INTERNAL_AcquireSwapchainTexture(
7427 true,
7428 command_buffer,
7429 window,
7430 swapchain_texture,
7431 swapchain_texture_width,
7432 swapchain_texture_height);
7433}
7434
7435static void D3D12_INTERNAL_PerformPendingDestroys(D3D12Renderer *renderer)
7436{
7437 SDL_LockMutex(renderer->disposeLock);
7438
7439 for (Sint32 i = renderer->buffersToDestroyCount - 1; i >= 0; i -= 1) {
7440 if (SDL_GetAtomicInt(&renderer->buffersToDestroy[i]->referenceCount) == 0) {
7441 D3D12_INTERNAL_DestroyBuffer(
7442 renderer,
7443 renderer->buffersToDestroy[i]);
7444
7445 renderer->buffersToDestroy[i] = renderer->buffersToDestroy[renderer->buffersToDestroyCount - 1];
7446 renderer->buffersToDestroyCount -= 1;
7447 }
7448 }
7449
7450 for (Sint32 i = renderer->texturesToDestroyCount - 1; i >= 0; i -= 1) {
7451 if (SDL_GetAtomicInt(&renderer->texturesToDestroy[i]->referenceCount) == 0) {
7452 D3D12_INTERNAL_DestroyTexture(
7453 renderer,
7454 renderer->texturesToDestroy[i]);
7455
7456 renderer->texturesToDestroy[i] = renderer->texturesToDestroy[renderer->texturesToDestroyCount - 1];
7457 renderer->texturesToDestroyCount -= 1;
7458 }
7459 }
7460
7461 for (Sint32 i = renderer->samplersToDestroyCount - 1; i >= 0; i -= 1) {
7462 if (SDL_GetAtomicInt(&renderer->samplersToDestroy[i]->referenceCount) == 0) {
7463 D3D12_INTERNAL_DestroySampler(
7464 renderer,
7465 renderer->samplersToDestroy[i]);
7466
7467 renderer->samplersToDestroy[i] = renderer->samplersToDestroy[renderer->samplersToDestroyCount - 1];
7468 renderer->samplersToDestroyCount -= 1;
7469 }
7470 }
7471
7472 for (Sint32 i = renderer->graphicsPipelinesToDestroyCount - 1; i >= 0; i -= 1) {
7473 if (SDL_GetAtomicInt(&renderer->graphicsPipelinesToDestroy[i]->referenceCount) == 0) {
7474 D3D12_INTERNAL_DestroyGraphicsPipeline(
7475 renderer->graphicsPipelinesToDestroy[i]);
7476
7477 renderer->graphicsPipelinesToDestroy[i] = renderer->graphicsPipelinesToDestroy[renderer->graphicsPipelinesToDestroyCount - 1];
7478 renderer->graphicsPipelinesToDestroyCount -= 1;
7479 }
7480 }
7481
7482 for (Sint32 i = renderer->computePipelinesToDestroyCount - 1; i >= 0; i -= 1) {
7483 if (SDL_GetAtomicInt(&renderer->computePipelinesToDestroy[i]->referenceCount) == 0) {
7484 D3D12_INTERNAL_DestroyComputePipeline(
7485 renderer->computePipelinesToDestroy[i]);
7486
7487 renderer->computePipelinesToDestroy[i] = renderer->computePipelinesToDestroy[renderer->computePipelinesToDestroyCount - 1];
7488 renderer->computePipelinesToDestroyCount -= 1;
7489 }
7490 }
7491
7492 SDL_UnlockMutex(renderer->disposeLock);
7493}
7494
7495static bool D3D12_INTERNAL_CopyTextureDownload(
7496 D3D12CommandBuffer *commandBuffer,
7497 D3D12TextureDownload *download)
7498{
7499 D3D12Renderer *renderer = commandBuffer->renderer;
7500 Uint8 *sourcePtr;
7501 Uint8 *destPtr;
7502 HRESULT res;
7503
7504 res = ID3D12Resource_Map(
7505 download->temporaryBuffer->handle,
7506 0,
7507 NULL,
7508 (void **)&sourcePtr);
7509
7510 CHECK_D3D12_ERROR_AND_RETURN("Failed to map temporary buffer", false);
7511
7512 res = ID3D12Resource_Map(
7513 download->destinationBuffer->handle,
7514 0,
7515 NULL,
7516 (void **)&destPtr);
7517
7518 CHECK_D3D12_ERROR_AND_RETURN("Failed to map destination buffer", false);
7519
7520 for (Uint32 sliceIndex = 0; sliceIndex < download->depth; sliceIndex += 1) {
7521 for (Uint32 rowIndex = 0; rowIndex < download->height; rowIndex += 1) {
7522 SDL_memcpy(
7523 destPtr + download->bufferOffset + (sliceIndex * download->bytesPerDepthSlice) + (rowIndex * download->bytesPerRow),
7524 sourcePtr + (sliceIndex * download->height) + (rowIndex * download->alignedBytesPerRow),
7525 download->bytesPerRow);
7526 }
7527 }
7528
7529 ID3D12Resource_Unmap(
7530 download->temporaryBuffer->handle,
7531 0,
7532 NULL);
7533
7534 ID3D12Resource_Unmap(
7535 download->destinationBuffer->handle,
7536 0,
7537 NULL);
7538
7539 return true;
7540}
7541
7542static bool D3D12_INTERNAL_CleanCommandBuffer(
7543 D3D12Renderer *renderer,
7544 D3D12CommandBuffer *commandBuffer,
7545 bool cancel)
7546{
7547 Uint32 i;
7548 HRESULT res;
7549 bool result = true;
7550
7551 // Perform deferred texture data copies
7552 for (i = 0; i < commandBuffer->textureDownloadCount; i += 1) {
7553 if (!cancel) {
7554 result &= D3D12_INTERNAL_CopyTextureDownload(
7555 commandBuffer,
7556 commandBuffer->textureDownloads[i]);
7557 }
7558 SDL_free(commandBuffer->textureDownloads[i]);
7559 }
7560 commandBuffer->textureDownloadCount = 0;
7561
7562 if (!result) {
7563 return false;
7564 }
7565
7566 res = ID3D12CommandAllocator_Reset(commandBuffer->commandAllocator);
7567 CHECK_D3D12_ERROR_AND_RETURN("Could not reset command allocator", false);
7568
7569 res = ID3D12GraphicsCommandList_Reset(
7570 commandBuffer->graphicsCommandList,
7571 commandBuffer->commandAllocator,
7572 NULL);
7573 CHECK_D3D12_ERROR_AND_RETURN("Could not reset command list", false);
7574
7575 // Return descriptor heaps to pool
7576 D3D12_INTERNAL_ReturnGPUDescriptorHeapToPool(
7577 renderer,
7578 commandBuffer->gpuDescriptorHeaps[D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV]);
7579 D3D12_INTERNAL_ReturnGPUDescriptorHeapToPool(
7580 renderer,
7581 commandBuffer->gpuDescriptorHeaps[D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER]);
7582
7583 commandBuffer->gpuDescriptorHeaps[D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV] = NULL;
7584 commandBuffer->gpuDescriptorHeaps[D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER] = NULL;
7585
7586 // Uniform buffers are now available
7587 SDL_LockMutex(renderer->acquireUniformBufferLock);
7588
7589 for (i = 0; i < commandBuffer->usedUniformBufferCount; i += 1) {
7590 D3D12_INTERNAL_ReturnUniformBufferToPool(
7591 renderer,
7592 commandBuffer->usedUniformBuffers[i]);
7593 }
7594 commandBuffer->usedUniformBufferCount = 0;
7595
7596 SDL_UnlockMutex(renderer->acquireUniformBufferLock);
7597
7598 // TODO: More reference counting
7599
7600 for (i = 0; i < commandBuffer->usedTextureCount; i += 1) {
7601 (void)SDL_AtomicDecRef(&commandBuffer->usedTextures[i]->referenceCount);
7602 }
7603 commandBuffer->usedTextureCount = 0;
7604
7605 for (i = 0; i < commandBuffer->usedBufferCount; i += 1) {
7606 (void)SDL_AtomicDecRef(&commandBuffer->usedBuffers[i]->referenceCount);
7607 }
7608 commandBuffer->usedBufferCount = 0;
7609
7610 for (i = 0; i < commandBuffer->usedSamplerCount; i += 1) {
7611 (void)SDL_AtomicDecRef(&commandBuffer->usedSamplers[i]->referenceCount);
7612 }
7613 commandBuffer->usedSamplerCount = 0;
7614
7615 for (i = 0; i < commandBuffer->usedGraphicsPipelineCount; i += 1) {
7616 (void)SDL_AtomicDecRef(&commandBuffer->usedGraphicsPipelines[i]->referenceCount);
7617 }
7618 commandBuffer->usedGraphicsPipelineCount = 0;
7619
7620 for (i = 0; i < commandBuffer->usedComputePipelineCount; i += 1) {
7621 (void)SDL_AtomicDecRef(&commandBuffer->usedComputePipelines[i]->referenceCount);
7622 }
7623 commandBuffer->usedComputePipelineCount = 0;
7624
7625 // Reset presentation
7626 commandBuffer->presentDataCount = 0;
7627
7628 // The fence is now available (unless SubmitAndAcquireFence was called)
7629 if (commandBuffer->autoReleaseFence) {
7630 D3D12_ReleaseFence(
7631 (SDL_GPURenderer *)renderer,
7632 (SDL_GPUFence *)commandBuffer->inFlightFence);
7633
7634 commandBuffer->inFlightFence = NULL;
7635 }
7636
7637 // Return command buffer to pool
7638 SDL_LockMutex(renderer->acquireCommandBufferLock);
7639
7640 if (renderer->availableCommandBufferCount == renderer->availableCommandBufferCapacity) {
7641 renderer->availableCommandBufferCapacity += 1;
7642 renderer->availableCommandBuffers = (D3D12CommandBuffer **)SDL_realloc(
7643 renderer->availableCommandBuffers,
7644 renderer->availableCommandBufferCapacity * sizeof(D3D12CommandBuffer *));
7645 }
7646
7647 renderer->availableCommandBuffers[renderer->availableCommandBufferCount] = commandBuffer;
7648 renderer->availableCommandBufferCount += 1;
7649
7650 SDL_UnlockMutex(renderer->acquireCommandBufferLock);
7651
7652 // Remove this command buffer from the submitted list
7653 if (!cancel) {
7654 for (i = 0; i < renderer->submittedCommandBufferCount; i += 1) {
7655 if (renderer->submittedCommandBuffers[i] == commandBuffer) {
7656 renderer->submittedCommandBuffers[i] = renderer->submittedCommandBuffers[renderer->submittedCommandBufferCount - 1];
7657 renderer->submittedCommandBufferCount -= 1;
7658 }
7659 }
7660 }
7661
7662 return true;
7663}
7664
7665static bool D3D12_Submit(
7666 SDL_GPUCommandBuffer *commandBuffer)
7667{
7668 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
7669 D3D12Renderer *renderer = d3d12CommandBuffer->renderer;
7670 ID3D12CommandList *commandLists[1];
7671 HRESULT res;
7672
7673 SDL_LockMutex(renderer->submitLock);
7674
7675 // Unmap uniform buffers
7676 for (Uint32 i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
7677 if (d3d12CommandBuffer->vertexUniformBuffers[i] != NULL) {
7678 ID3D12Resource_Unmap(
7679 d3d12CommandBuffer->vertexUniformBuffers[i]->buffer->handle,
7680 0,
7681 NULL);
7682 d3d12CommandBuffer->vertexUniformBuffers[i]->buffer->mapPointer = NULL;
7683 }
7684
7685 if (d3d12CommandBuffer->fragmentUniformBuffers[i] != NULL) {
7686 ID3D12Resource_Unmap(
7687 d3d12CommandBuffer->fragmentUniformBuffers[i]->buffer->handle,
7688 0,
7689 NULL);
7690 d3d12CommandBuffer->fragmentUniformBuffers[i]->buffer->mapPointer = NULL;
7691 }
7692
7693 // TODO: compute uniforms
7694 }
7695
7696 // Transition present textures to present mode
7697 for (Uint32 i = 0; i < d3d12CommandBuffer->presentDataCount; i += 1) {
7698 Uint32 swapchainIndex = d3d12CommandBuffer->presentDatas[i].swapchainImageIndex;
7699 D3D12TextureContainer *container = &d3d12CommandBuffer->presentDatas[i].windowData->textureContainers[swapchainIndex];
7700 D3D12TextureSubresource *subresource = D3D12_INTERNAL_FetchTextureSubresource(container, 0, 0);
7701
7702 D3D12_RESOURCE_BARRIER barrierDesc;
7703 barrierDesc.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
7704 barrierDesc.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
7705 barrierDesc.Transition.StateBefore = D3D12_RESOURCE_STATE_RENDER_TARGET;
7706 barrierDesc.Transition.StateAfter = D3D12_RESOURCE_STATE_PRESENT;
7707 barrierDesc.Transition.pResource = subresource->parent->resource;
7708 barrierDesc.Transition.Subresource = subresource->index;
7709
7710 ID3D12GraphicsCommandList_ResourceBarrier(
7711 d3d12CommandBuffer->graphicsCommandList,
7712 1,
7713 &barrierDesc);
7714 }
7715
7716 // Notify the command buffer that we have completed recording
7717 res = ID3D12GraphicsCommandList_Close(d3d12CommandBuffer->graphicsCommandList);
7718 CHECK_D3D12_ERROR_AND_RETURN("Failed to close command list!", false);
7719
7720 res = ID3D12GraphicsCommandList_QueryInterface(
7721 d3d12CommandBuffer->graphicsCommandList,
7722 D3D_GUID(D3D_IID_ID3D12CommandList),
7723 (void **)&commandLists[0]);
7724 if (FAILED(res)) {
7725 SDL_UnlockMutex(renderer->submitLock);
7726 CHECK_D3D12_ERROR_AND_RETURN("Failed to convert command list!", false);
7727 }
7728
7729 // Submit the command list to the queue
7730 ID3D12CommandQueue_ExecuteCommandLists(
7731 renderer->commandQueue,
7732 1,
7733 commandLists);
7734
7735 ID3D12CommandList_Release(commandLists[0]);
7736
7737 // Acquire a fence and set it to the in-flight fence
7738 d3d12CommandBuffer->inFlightFence = D3D12_INTERNAL_AcquireFence(renderer);
7739 if (!d3d12CommandBuffer->inFlightFence) {
7740 SDL_UnlockMutex(renderer->submitLock);
7741 return false;
7742 }
7743
7744 // Mark that a fence should be signaled after command list execution
7745 res = ID3D12CommandQueue_Signal(
7746 renderer->commandQueue,
7747 d3d12CommandBuffer->inFlightFence->handle,
7748 D3D12_FENCE_SIGNAL_VALUE);
7749 if (FAILED(res)) {
7750 SDL_UnlockMutex(renderer->submitLock);
7751 CHECK_D3D12_ERROR_AND_RETURN("Failed to enqueue fence signal!", false);
7752 }
7753
7754 // Mark the command buffer as submitted
7755 if (renderer->submittedCommandBufferCount + 1 >= renderer->submittedCommandBufferCapacity) {
7756 renderer->submittedCommandBufferCapacity = renderer->submittedCommandBufferCount + 1;
7757
7758 renderer->submittedCommandBuffers = (D3D12CommandBuffer **)SDL_realloc(
7759 renderer->submittedCommandBuffers,
7760 sizeof(D3D12CommandBuffer *) * renderer->submittedCommandBufferCapacity);
7761 }
7762
7763 renderer->submittedCommandBuffers[renderer->submittedCommandBufferCount] = d3d12CommandBuffer;
7764 renderer->submittedCommandBufferCount += 1;
7765
7766 bool result = true;
7767
7768 // Present, if applicable
7769 for (Uint32 i = 0; i < d3d12CommandBuffer->presentDataCount; i += 1) {
7770 D3D12PresentData *presentData = &d3d12CommandBuffer->presentDatas[i];
7771 D3D12WindowData *windowData = presentData->windowData;
7772
7773#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
7774 D3D12XBOX_PRESENT_PLANE_PARAMETERS planeParams;
7775 SDL_zero(planeParams);
7776 planeParams.Token = windowData->frameToken;
7777 planeParams.ResourceCount = 1;
7778 planeParams.ppResources = &windowData->textureContainers[windowData->frameCounter].activeTexture->resource;
7779 planeParams.ColorSpace = DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709; // FIXME
7780
7781 D3D12XBOX_PRESENT_PARAMETERS presentParams;
7782 SDL_zero(presentParams);
7783 presentParams.Flags = (windowData->present_mode == SDL_GPU_PRESENTMODE_IMMEDIATE) ? D3D12XBOX_PRESENT_FLAG_IMMEDIATE : D3D12XBOX_PRESENT_FLAG_NONE;
7784
7785 renderer->commandQueue->PresentX(1, &planeParams, &presentParams);
7786 if (FAILED(res)) {
7787 result = false;
7788 }
7789#else
7790 // NOTE: flip discard always supported since DXGI 1.4 is required
7791 Uint32 syncInterval = 1;
7792 if (windowData->present_mode == SDL_GPU_PRESENTMODE_IMMEDIATE ||
7793 windowData->present_mode == SDL_GPU_PRESENTMODE_MAILBOX) {
7794 syncInterval = 0;
7795 }
7796
7797 Uint32 presentFlags = 0;
7798 if (renderer->supportsTearing &&
7799 windowData->present_mode == SDL_GPU_PRESENTMODE_IMMEDIATE) {
7800 presentFlags = DXGI_PRESENT_ALLOW_TEARING;
7801 }
7802
7803 res = IDXGISwapChain_Present(
7804 windowData->swapchain,
7805 syncInterval,
7806 presentFlags);
7807 if (FAILED(res)) {
7808 result = false;
7809 }
7810
7811 ID3D12Resource_Release(windowData->textureContainers[presentData->swapchainImageIndex].activeTexture->resource);
7812#endif
7813
7814 windowData->inFlightFences[windowData->frameCounter] = (SDL_GPUFence*)d3d12CommandBuffer->inFlightFence;
7815 (void)SDL_AtomicIncRef(&d3d12CommandBuffer->inFlightFence->referenceCount);
7816 windowData->frameCounter = (windowData->frameCounter + 1) % renderer->allowedFramesInFlight;
7817 }
7818
7819 // Check for cleanups
7820 for (Sint32 i = renderer->submittedCommandBufferCount - 1; i >= 0; i -= 1) {
7821 Uint64 fenceValue = ID3D12Fence_GetCompletedValue(
7822 renderer->submittedCommandBuffers[i]->inFlightFence->handle);
7823
7824 if (fenceValue == D3D12_FENCE_SIGNAL_VALUE) {
7825 result &= D3D12_INTERNAL_CleanCommandBuffer(
7826 renderer,
7827 renderer->submittedCommandBuffers[i],
7828 false);
7829 }
7830 }
7831
7832 D3D12_INTERNAL_PerformPendingDestroys(renderer);
7833
7834 SDL_UnlockMutex(renderer->submitLock);
7835
7836 return result;
7837}
7838
7839static SDL_GPUFence *D3D12_SubmitAndAcquireFence(
7840 SDL_GPUCommandBuffer *commandBuffer)
7841{
7842 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
7843 d3d12CommandBuffer->autoReleaseFence = false;
7844 if (!D3D12_Submit(commandBuffer)) {
7845 return NULL;
7846 }
7847 return (SDL_GPUFence *)d3d12CommandBuffer->inFlightFence;
7848}
7849
7850static bool D3D12_Cancel(
7851 SDL_GPUCommandBuffer *commandBuffer)
7852{
7853 D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
7854 D3D12Renderer *renderer = d3d12CommandBuffer->renderer;
7855 bool result;
7856 HRESULT res;
7857
7858 // Notify the command buffer that we have completed recording
7859 res = ID3D12GraphicsCommandList_Close(d3d12CommandBuffer->graphicsCommandList);
7860 CHECK_D3D12_ERROR_AND_RETURN("Failed to close command list!", false);
7861
7862 d3d12CommandBuffer->autoReleaseFence = false;
7863 SDL_LockMutex(renderer->submitLock);
7864 result = D3D12_INTERNAL_CleanCommandBuffer(renderer, d3d12CommandBuffer, true);
7865 SDL_UnlockMutex(renderer->submitLock);
7866
7867 return result;
7868}
7869
7870static bool D3D12_Wait(
7871 SDL_GPURenderer *driverData)
7872{
7873 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
7874 D3D12Fence *fence = D3D12_INTERNAL_AcquireFence(renderer);
7875 if (!fence) {
7876 return false;
7877 }
7878 HRESULT res;
7879
7880 SDL_LockMutex(renderer->submitLock);
7881
7882 if (renderer->commandQueue) {
7883 // Insert a signal into the end of the command queue...
7884 ID3D12CommandQueue_Signal(
7885 renderer->commandQueue,
7886 fence->handle,
7887 D3D12_FENCE_SIGNAL_VALUE);
7888
7889 // ...and then block on it.
7890 if (ID3D12Fence_GetCompletedValue(fence->handle) != D3D12_FENCE_SIGNAL_VALUE) {
7891 res = ID3D12Fence_SetEventOnCompletion(
7892 fence->handle,
7893 D3D12_FENCE_SIGNAL_VALUE,
7894 fence->event);
7895 CHECK_D3D12_ERROR_AND_RETURN("Setting fence event failed", false);
7896
7897 DWORD waitResult = WaitForSingleObject(fence->event, INFINITE);
7898 if (waitResult == WAIT_FAILED) {
7899 SDL_UnlockMutex(renderer->submitLock);
7900 SET_STRING_ERROR_AND_RETURN("Wait failed", false); // TODO: is there a better way to report this?
7901 }
7902 }
7903 }
7904
7905 D3D12_ReleaseFence(
7906 (SDL_GPURenderer *)renderer,
7907 (SDL_GPUFence *)fence);
7908
7909 bool result = true;
7910
7911 // Clean up
7912 for (Sint32 i = renderer->submittedCommandBufferCount - 1; i >= 0; i -= 1) {
7913 result &= D3D12_INTERNAL_CleanCommandBuffer(renderer, renderer->submittedCommandBuffers[i], false);
7914 }
7915
7916 D3D12_INTERNAL_PerformPendingDestroys(renderer);
7917
7918 SDL_UnlockMutex(renderer->submitLock);
7919
7920 return result;
7921}
7922
7923static bool D3D12_WaitForFences(
7924 SDL_GPURenderer *driverData,
7925 bool waitAll,
7926 SDL_GPUFence *const *fences,
7927 Uint32 numFences)
7928{
7929 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
7930 D3D12Fence *fence;
7931 HANDLE *events = SDL_stack_alloc(HANDLE, numFences);
7932 HRESULT res;
7933
7934 SDL_LockMutex(renderer->submitLock);
7935
7936 for (Uint32 i = 0; i < numFences; i += 1) {
7937 fence = (D3D12Fence *)fences[i];
7938
7939 res = ID3D12Fence_SetEventOnCompletion(
7940 fence->handle,
7941 D3D12_FENCE_SIGNAL_VALUE,
7942 fence->event);
7943 CHECK_D3D12_ERROR_AND_RETURN("Setting fence event failed", false);
7944
7945 events[i] = fence->event;
7946 }
7947
7948 DWORD waitResult = WaitForMultipleObjects(
7949 numFences,
7950 events,
7951 waitAll,
7952 INFINITE);
7953
7954 if (waitResult == WAIT_FAILED) {
7955 SDL_UnlockMutex(renderer->submitLock);
7956 SET_STRING_ERROR_AND_RETURN("Wait failed", false); // TODO: is there a better way to report this?
7957 }
7958
7959 bool result = true;
7960
7961 // Check for cleanups
7962 for (Sint32 i = renderer->submittedCommandBufferCount - 1; i >= 0; i -= 1) {
7963 Uint64 fenceValue = ID3D12Fence_GetCompletedValue(
7964 renderer->submittedCommandBuffers[i]->inFlightFence->handle);
7965
7966 if (fenceValue == D3D12_FENCE_SIGNAL_VALUE) {
7967 result &= D3D12_INTERNAL_CleanCommandBuffer(
7968 renderer,
7969 renderer->submittedCommandBuffers[i],
7970 false);
7971 }
7972 }
7973
7974 D3D12_INTERNAL_PerformPendingDestroys(renderer);
7975
7976 SDL_stack_free(events);
7977
7978 SDL_UnlockMutex(renderer->submitLock);
7979
7980 return result;
7981}
7982
7983// Feature Queries
7984
7985static bool D3D12_SupportsTextureFormat(
7986 SDL_GPURenderer *driverData,
7987 SDL_GPUTextureFormat format,
7988 SDL_GPUTextureType type,
7989 SDL_GPUTextureUsageFlags usage)
7990{
7991 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
7992 DXGI_FORMAT dxgiFormat = SDLToD3D12_TextureFormat[format];
7993 D3D12_FEATURE_DATA_FORMAT_SUPPORT formatSupport = { dxgiFormat, D3D12_FORMAT_SUPPORT1_NONE, D3D12_FORMAT_SUPPORT2_NONE };
7994 HRESULT res;
7995
7996 res = ID3D12Device_CheckFeatureSupport(
7997 renderer->device,
7998 D3D12_FEATURE_FORMAT_SUPPORT,
7999 &formatSupport,
8000 sizeof(formatSupport));
8001 if (FAILED(res)) {
8002 // Format is apparently unknown
8003 return false;
8004 }
8005
8006 // Is the texture type supported?
8007 if (type == SDL_GPU_TEXTURETYPE_2D && !(formatSupport.Support1 & D3D12_FORMAT_SUPPORT1_TEXTURE2D)) {
8008 return false;
8009 }
8010 if (type == SDL_GPU_TEXTURETYPE_2D_ARRAY && !(formatSupport.Support1 & D3D12_FORMAT_SUPPORT1_TEXTURE2D)) {
8011 return false;
8012 }
8013 if (type == SDL_GPU_TEXTURETYPE_3D && !(formatSupport.Support1 & D3D12_FORMAT_SUPPORT1_TEXTURE3D)) {
8014 return false;
8015 }
8016 if (type == SDL_GPU_TEXTURETYPE_CUBE && !(formatSupport.Support1 & D3D12_FORMAT_SUPPORT1_TEXTURECUBE)) {
8017 return false;
8018 }
8019 if (type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY && !(formatSupport.Support1 & D3D12_FORMAT_SUPPORT1_TEXTURECUBE)) {
8020 return false;
8021 }
8022
8023 // Are the usage flags supported?
8024 if ((usage & SDL_GPU_TEXTUREUSAGE_SAMPLER) && !(formatSupport.Support1 & D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE)) {
8025 return false;
8026 }
8027 if ((usage & (SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ | SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ)) && !(formatSupport.Support1 & D3D12_FORMAT_SUPPORT1_SHADER_LOAD)) {
8028 return false;
8029 }
8030 if ((usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE) && !(formatSupport.Support2 & D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE)) {
8031 return false;
8032 }
8033 if ((usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE) && !(formatSupport.Support2 & D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD)) {
8034 return false;
8035 }
8036 if ((usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET) && !(formatSupport.Support1 & D3D12_FORMAT_SUPPORT1_RENDER_TARGET)) {
8037 return false;
8038 }
8039
8040 // Special case check for depth, because D3D12 is great.
8041 formatSupport.Format = SDLToD3D12_DepthFormat[format];
8042 formatSupport.Support1 = D3D12_FORMAT_SUPPORT1_NONE;
8043 formatSupport.Support2 = D3D12_FORMAT_SUPPORT2_NONE;
8044
8045 res = ID3D12Device_CheckFeatureSupport(
8046 renderer->device,
8047 D3D12_FEATURE_FORMAT_SUPPORT,
8048 &formatSupport,
8049 sizeof(formatSupport));
8050 if (FAILED(res)) {
8051 // Format is apparently unknown
8052 return false;
8053 }
8054
8055 if ((usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET) && !(formatSupport.Support1 & D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL)) {
8056 return false;
8057 }
8058
8059 return true;
8060}
8061
8062static bool D3D12_SupportsSampleCount(
8063 SDL_GPURenderer *driverData,
8064 SDL_GPUTextureFormat format,
8065 SDL_GPUSampleCount sampleCount)
8066{
8067 D3D12Renderer *renderer = (D3D12Renderer *)driverData;
8068 D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS featureData;
8069 HRESULT res;
8070
8071#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
8072 featureData.Flags = (D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG)0;
8073#else
8074 featureData.Flags = (D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS)0;
8075#endif
8076 featureData.Format = SDLToD3D12_TextureFormat[format];
8077 featureData.SampleCount = SDLToD3D12_SampleCount[sampleCount];
8078 res = ID3D12Device_CheckFeatureSupport(
8079 renderer->device,
8080 D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS,
8081 &featureData,
8082 sizeof(featureData));
8083
8084 return SUCCEEDED(res) && featureData.NumQualityLevels > 0;
8085}
8086
8087static void D3D12_INTERNAL_InitBlitResources(
8088 D3D12Renderer *renderer)
8089{
8090 SDL_GPUShaderCreateInfo shaderCreateInfo;
8091 SDL_GPUSamplerCreateInfo samplerCreateInfo;
8092
8093 renderer->blitPipelineCapacity = 2;
8094 renderer->blitPipelineCount = 0;
8095 renderer->blitPipelines = (BlitPipelineCacheEntry *)SDL_malloc(
8096 renderer->blitPipelineCapacity * sizeof(BlitPipelineCacheEntry));
8097
8098 // Fullscreen vertex shader
8099 SDL_zero(shaderCreateInfo);
8100 shaderCreateInfo.code = (Uint8 *)D3D12_FullscreenVert;
8101 shaderCreateInfo.code_size = sizeof(D3D12_FullscreenVert);
8102 shaderCreateInfo.stage = SDL_GPU_SHADERSTAGE_VERTEX;
8103 shaderCreateInfo.format = SDL_GPU_SHADERFORMAT_DXBC;
8104 shaderCreateInfo.entrypoint = "main";
8105
8106 renderer->blitVertexShader = D3D12_CreateShader(
8107 (SDL_GPURenderer *)renderer,
8108 &shaderCreateInfo);
8109
8110 if (renderer->blitVertexShader == NULL) {
8111 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile vertex shader for blit!");
8112 }
8113
8114 // BlitFrom2D pixel shader
8115 shaderCreateInfo.code = (Uint8 *)D3D12_BlitFrom2D;
8116 shaderCreateInfo.code_size = sizeof(D3D12_BlitFrom2D);
8117 shaderCreateInfo.stage = SDL_GPU_SHADERSTAGE_FRAGMENT;
8118 shaderCreateInfo.num_samplers = 1;
8119 shaderCreateInfo.num_uniform_buffers = 1;
8120
8121 renderer->blitFrom2DShader = D3D12_CreateShader(
8122 (SDL_GPURenderer *)renderer,
8123 &shaderCreateInfo);
8124
8125 if (renderer->blitFrom2DShader == NULL) {
8126 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile BlitFrom2D pixel shader!");
8127 }
8128
8129 // BlitFrom2DArray pixel shader
8130 shaderCreateInfo.code = (Uint8 *)D3D12_BlitFrom2DArray;
8131 shaderCreateInfo.code_size = sizeof(D3D12_BlitFrom2DArray);
8132
8133 renderer->blitFrom2DArrayShader = D3D12_CreateShader(
8134 (SDL_GPURenderer *)renderer,
8135 &shaderCreateInfo);
8136
8137 if (renderer->blitFrom2DArrayShader == NULL) {
8138 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile BlitFrom2DArray pixel shader!");
8139 }
8140
8141 // BlitFrom3D pixel shader
8142 shaderCreateInfo.code = (Uint8 *)D3D12_BlitFrom3D;
8143 shaderCreateInfo.code_size = sizeof(D3D12_BlitFrom3D);
8144
8145 renderer->blitFrom3DShader = D3D12_CreateShader(
8146 (SDL_GPURenderer *)renderer,
8147 &shaderCreateInfo);
8148
8149 if (renderer->blitFrom3DShader == NULL) {
8150 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile BlitFrom3D pixel shader!");
8151 }
8152
8153 // BlitFromCube pixel shader
8154 shaderCreateInfo.code = (Uint8 *)D3D12_BlitFromCube;
8155 shaderCreateInfo.code_size = sizeof(D3D12_BlitFromCube);
8156
8157 renderer->blitFromCubeShader = D3D12_CreateShader(
8158 (SDL_GPURenderer *)renderer,
8159 &shaderCreateInfo);
8160
8161 if (renderer->blitFromCubeShader == NULL) {
8162 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile BlitFromCube pixel shader!");
8163 }
8164
8165 // BlitFromCubeArray pixel shader
8166 shaderCreateInfo.code = (Uint8 *)D3D12_BlitFromCubeArray;
8167 shaderCreateInfo.code_size = sizeof(D3D12_BlitFromCubeArray);
8168
8169 renderer->blitFromCubeArrayShader = D3D12_CreateShader(
8170 (SDL_GPURenderer *)renderer,
8171 &shaderCreateInfo);
8172
8173 if (renderer->blitFromCubeArrayShader == NULL) {
8174 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile BlitFromCubeArray pixel shader!");
8175 }
8176
8177 // Create samplers
8178 samplerCreateInfo.address_mode_u = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
8179 samplerCreateInfo.address_mode_v = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
8180 samplerCreateInfo.address_mode_w = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
8181 samplerCreateInfo.enable_anisotropy = 0;
8182 samplerCreateInfo.enable_compare = 0;
8183 samplerCreateInfo.mag_filter = SDL_GPU_FILTER_NEAREST;
8184 samplerCreateInfo.min_filter = SDL_GPU_FILTER_NEAREST;
8185 samplerCreateInfo.mipmap_mode = SDL_GPU_SAMPLERMIPMAPMODE_NEAREST;
8186 samplerCreateInfo.mip_lod_bias = 0.0f;
8187 samplerCreateInfo.min_lod = 0;
8188 samplerCreateInfo.max_lod = 1000;
8189 samplerCreateInfo.max_anisotropy = 1.0f;
8190 samplerCreateInfo.compare_op = SDL_GPU_COMPAREOP_NEVER;
8191
8192 renderer->blitNearestSampler = D3D12_CreateSampler(
8193 (SDL_GPURenderer *)renderer,
8194 &samplerCreateInfo);
8195
8196 if (renderer->blitNearestSampler == NULL) {
8197 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to create blit nearest sampler!");
8198 }
8199
8200 samplerCreateInfo.mag_filter = SDL_GPU_FILTER_LINEAR;
8201 samplerCreateInfo.min_filter = SDL_GPU_FILTER_LINEAR;
8202 samplerCreateInfo.mipmap_mode = SDL_GPU_SAMPLERMIPMAPMODE_LINEAR;
8203
8204 renderer->blitLinearSampler = D3D12_CreateSampler(
8205 (SDL_GPURenderer *)renderer,
8206 &samplerCreateInfo);
8207
8208 if (renderer->blitLinearSampler == NULL) {
8209 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to create blit linear sampler!");
8210 }
8211}
8212
8213static bool D3D12_PrepareDriver(SDL_VideoDevice *_this)
8214{
8215#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
8216 return true;
8217#else
8218 SDL_SharedObject *d3d12Dll;
8219 SDL_SharedObject *dxgiDll;
8220 PFN_D3D12_CREATE_DEVICE D3D12CreateDeviceFunc;
8221 PFN_CREATE_DXGI_FACTORY1 CreateDXGIFactoryFunc;
8222 HRESULT res;
8223 ID3D12Device *device;
8224 IDXGIFactory1 *factory;
8225 IDXGIFactory4 *factory4;
8226 IDXGIFactory6 *factory6;
8227 IDXGIAdapter1 *adapter;
8228
8229 // Can we load D3D12?
8230
8231 d3d12Dll = SDL_LoadObject(D3D12_DLL);
8232 if (d3d12Dll == NULL) {
8233 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "D3D12: Could not find " D3D12_DLL);
8234 return false;
8235 }
8236
8237 D3D12CreateDeviceFunc = (PFN_D3D12_CREATE_DEVICE)SDL_LoadFunction(
8238 d3d12Dll,
8239 D3D12_CREATE_DEVICE_FUNC);
8240 if (D3D12CreateDeviceFunc == NULL) {
8241 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "D3D12: Could not find function " D3D12_CREATE_DEVICE_FUNC " in " D3D12_DLL);
8242 SDL_UnloadObject(d3d12Dll);
8243 return false;
8244 }
8245
8246 // Can we load DXGI?
8247
8248 dxgiDll = SDL_LoadObject(DXGI_DLL);
8249 if (dxgiDll == NULL) {
8250 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "D3D12: Could not find " DXGI_DLL);
8251 return false;
8252 }
8253
8254 CreateDXGIFactoryFunc = (PFN_CREATE_DXGI_FACTORY1)SDL_LoadFunction(
8255 dxgiDll,
8256 CREATE_DXGI_FACTORY1_FUNC);
8257 if (CreateDXGIFactoryFunc == NULL) {
8258 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "D3D12: Could not find function " CREATE_DXGI_FACTORY1_FUNC " in " DXGI_DLL);
8259 SDL_UnloadObject(dxgiDll);
8260 return false;
8261 }
8262
8263 // Can we create a device?
8264
8265 // Create the DXGI factory
8266 res = CreateDXGIFactoryFunc(
8267 &D3D_IID_IDXGIFactory1,
8268 (void **)&factory);
8269 if (FAILED(res)) {
8270 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "D3D12: Could not create DXGIFactory");
8271 SDL_UnloadObject(d3d12Dll);
8272 SDL_UnloadObject(dxgiDll);
8273 return false;
8274 }
8275
8276 // Check for DXGI 1.4 support
8277 res = IDXGIFactory1_QueryInterface(
8278 factory,
8279 D3D_GUID(D3D_IID_IDXGIFactory4),
8280 (void **)&factory4);
8281 if (FAILED(res)) {
8282 IDXGIFactory1_Release(factory);
8283 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "D3D12: Failed to find DXGI1.4 support, required for DX12");
8284 SDL_UnloadObject(d3d12Dll);
8285 SDL_UnloadObject(dxgiDll);
8286 return false;
8287 }
8288 IDXGIFactory4_Release(factory4);
8289
8290 res = IDXGIFactory1_QueryInterface(
8291 factory,
8292 D3D_GUID(D3D_IID_IDXGIFactory6),
8293 (void **)&factory6);
8294 if (SUCCEEDED(res)) {
8295 res = IDXGIFactory6_EnumAdapterByGpuPreference(
8296 factory6,
8297 0,
8298 DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE,
8299 D3D_GUID(D3D_IID_IDXGIAdapter1),
8300 (void **)&adapter);
8301 IDXGIFactory6_Release(factory6);
8302 } else {
8303 res = IDXGIFactory1_EnumAdapters1(
8304 factory,
8305 0,
8306 &adapter);
8307 }
8308 if (FAILED(res)) {
8309 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "D3D12: Failed to find adapter for D3D12Device");
8310 IDXGIFactory1_Release(factory);
8311 SDL_UnloadObject(d3d12Dll);
8312 SDL_UnloadObject(dxgiDll);
8313 return false;
8314 }
8315
8316 res = D3D12CreateDeviceFunc(
8317 (IUnknown *)adapter,
8318 D3D_FEATURE_LEVEL_CHOICE,
8319 D3D_GUID(D3D_IID_ID3D12Device),
8320 (void **)&device);
8321
8322 if (SUCCEEDED(res)) {
8323 ID3D12Device_Release(device);
8324 }
8325 IDXGIAdapter1_Release(adapter);
8326 IDXGIFactory1_Release(factory);
8327
8328 SDL_UnloadObject(d3d12Dll);
8329 SDL_UnloadObject(dxgiDll);
8330
8331 if (FAILED(res)) {
8332 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "D3D12: Could not create D3D12Device with feature level " D3D_FEATURE_LEVEL_CHOICE_STR);
8333 return false;
8334 }
8335
8336 return true;
8337#endif
8338}
8339
8340#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)) && defined(HAVE_IDXGIINFOQUEUE)
8341static void D3D12_INTERNAL_TryInitializeDXGIDebug(D3D12Renderer *renderer)
8342{
8343 PFN_DXGI_GET_DEBUG_INTERFACE DXGIGetDebugInterfaceFunc;
8344 HRESULT res;
8345
8346 renderer->dxgidebug_dll = SDL_LoadObject(DXGIDEBUG_DLL);
8347 if (renderer->dxgidebug_dll == NULL) {
8348 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Could not find " DXGIDEBUG_DLL);
8349 return;
8350 }
8351
8352 DXGIGetDebugInterfaceFunc = (PFN_DXGI_GET_DEBUG_INTERFACE)SDL_LoadFunction(
8353 renderer->dxgidebug_dll,
8354 DXGI_GET_DEBUG_INTERFACE_FUNC);
8355 if (DXGIGetDebugInterfaceFunc == NULL) {
8356 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Could not load function: " DXGI_GET_DEBUG_INTERFACE_FUNC);
8357 return;
8358 }
8359
8360 res = DXGIGetDebugInterfaceFunc(&D3D_IID_IDXGIDebug, (void **)&renderer->dxgiDebug);
8361 if (FAILED(res)) {
8362 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Could not get IDXGIDebug interface");
8363 }
8364
8365 res = DXGIGetDebugInterfaceFunc(&D3D_IID_IDXGIInfoQueue, (void **)&renderer->dxgiInfoQueue);
8366 if (FAILED(res)) {
8367 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Could not get IDXGIInfoQueue interface");
8368 }
8369}
8370#endif
8371
8372static void D3D12_INTERNAL_TryInitializeD3D12Debug(D3D12Renderer *renderer)
8373{
8374 PFN_D3D12_GET_DEBUG_INTERFACE D3D12GetDebugInterfaceFunc;
8375 HRESULT res;
8376
8377 D3D12GetDebugInterfaceFunc = (PFN_D3D12_GET_DEBUG_INTERFACE)SDL_LoadFunction(
8378 renderer->d3d12_dll,
8379 D3D12_GET_DEBUG_INTERFACE_FUNC);
8380 if (D3D12GetDebugInterfaceFunc == NULL) {
8381 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Could not load function: " D3D12_GET_DEBUG_INTERFACE_FUNC);
8382 return;
8383 }
8384
8385 res = D3D12GetDebugInterfaceFunc(D3D_GUID(D3D_IID_ID3D12Debug), (void **)&renderer->d3d12Debug);
8386 if (FAILED(res)) {
8387 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Could not get ID3D12Debug interface");
8388 return;
8389 }
8390
8391 ID3D12Debug_EnableDebugLayer(renderer->d3d12Debug);
8392}
8393
8394#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
8395static bool D3D12_INTERNAL_TryInitializeD3D12DebugInfoQueue(D3D12Renderer *renderer)
8396{
8397 ID3D12InfoQueue *infoQueue = NULL;
8398 D3D12_MESSAGE_SEVERITY severities[] = { D3D12_MESSAGE_SEVERITY_INFO };
8399 D3D12_INFO_QUEUE_FILTER filter;
8400 HRESULT res;
8401
8402 res = ID3D12Device_QueryInterface(
8403 renderer->device,
8404 D3D_GUID(D3D_IID_ID3D12InfoQueue),
8405 (void **)&infoQueue);
8406 if (FAILED(res)) {
8407 CHECK_D3D12_ERROR_AND_RETURN("Failed to convert ID3D12Device to ID3D12InfoQueue", false);
8408 }
8409
8410 SDL_zero(filter);
8411 filter.DenyList.NumSeverities = 1;
8412 filter.DenyList.pSeverityList = severities;
8413 ID3D12InfoQueue_PushStorageFilter(
8414 infoQueue,
8415 &filter);
8416
8417 ID3D12InfoQueue_SetBreakOnSeverity(
8418 infoQueue,
8419 D3D12_MESSAGE_SEVERITY_CORRUPTION,
8420 true);
8421
8422 ID3D12InfoQueue_Release(infoQueue);
8423
8424 return true;
8425}
8426
8427static void WINAPI D3D12_INTERNAL_OnD3D12DebugInfoMsg(
8428 D3D12_MESSAGE_CATEGORY category,
8429 D3D12_MESSAGE_SEVERITY severity,
8430 D3D12_MESSAGE_ID id,
8431 LPCSTR description,
8432 void *context)
8433{
8434 char *catStr;
8435 char *sevStr;
8436
8437 switch (category) {
8438 case D3D12_MESSAGE_CATEGORY_APPLICATION_DEFINED:
8439 catStr = "APPLICATION_DEFINED";
8440 break;
8441 case D3D12_MESSAGE_CATEGORY_MISCELLANEOUS:
8442 catStr = "MISCELLANEOUS";
8443 break;
8444 case D3D12_MESSAGE_CATEGORY_INITIALIZATION:
8445 catStr = "INITIALIZATION";
8446 break;
8447 case D3D12_MESSAGE_CATEGORY_CLEANUP:
8448 catStr = "CLEANUP";
8449 break;
8450 case D3D12_MESSAGE_CATEGORY_COMPILATION:
8451 catStr = "COMPILATION";
8452 break;
8453 case D3D12_MESSAGE_CATEGORY_STATE_CREATION:
8454 catStr = "STATE_CREATION";
8455 break;
8456 case D3D12_MESSAGE_CATEGORY_STATE_SETTING:
8457 catStr = "STATE_SETTING";
8458 break;
8459 case D3D12_MESSAGE_CATEGORY_STATE_GETTING:
8460 catStr = "STATE_GETTING";
8461 break;
8462 case D3D12_MESSAGE_CATEGORY_RESOURCE_MANIPULATION:
8463 catStr = "RESOURCE_MANIPULATION";
8464 break;
8465 case D3D12_MESSAGE_CATEGORY_EXECUTION:
8466 catStr = "EXECUTION";
8467 break;
8468 case D3D12_MESSAGE_CATEGORY_SHADER:
8469 catStr = "SHADER";
8470 break;
8471 default:
8472 catStr = "UNKNOWN";
8473 break;
8474 }
8475
8476 switch (severity) {
8477 case D3D12_MESSAGE_SEVERITY_CORRUPTION:
8478 sevStr = "CORRUPTION";
8479 break;
8480 case D3D12_MESSAGE_SEVERITY_ERROR:
8481 sevStr = "ERROR";
8482 break;
8483 case D3D12_MESSAGE_SEVERITY_WARNING:
8484 sevStr = "WARNING";
8485 break;
8486 case D3D12_MESSAGE_SEVERITY_INFO:
8487 sevStr = "INFO";
8488 break;
8489 case D3D12_MESSAGE_SEVERITY_MESSAGE:
8490 sevStr = "MESSAGE";
8491 break;
8492 default:
8493 sevStr = "UNKNOWN";
8494 break;
8495 }
8496
8497 if (severity <= D3D12_MESSAGE_SEVERITY_ERROR) {
8498 SDL_LogError(
8499 SDL_LOG_CATEGORY_GPU,
8500 "D3D12 ERROR: %s [%s %s #%d]",
8501 description,
8502 catStr,
8503 sevStr,
8504 id);
8505 } else {
8506 SDL_LogWarn(
8507 SDL_LOG_CATEGORY_GPU,
8508 "D3D12 WARNING: %s [%s %s #%d]",
8509 description,
8510 catStr,
8511 sevStr,
8512 id);
8513 }
8514}
8515
8516static void D3D12_INTERNAL_TryInitializeD3D12DebugInfoLogger(D3D12Renderer *renderer)
8517{
8518 ID3D12InfoQueue1 *infoQueue = NULL;
8519 HRESULT res;
8520
8521 res = ID3D12Device_QueryInterface(
8522 renderer->device,
8523 D3D_GUID(D3D_IID_ID3D12InfoQueue1),
8524 (void **)&infoQueue);
8525 if (FAILED(res)) {
8526 return;
8527 }
8528
8529 ID3D12InfoQueue1_RegisterMessageCallback(
8530 infoQueue,
8531 D3D12_INTERNAL_OnD3D12DebugInfoMsg,
8532 D3D12_MESSAGE_CALLBACK_FLAG_NONE,
8533 NULL,
8534 NULL);
8535
8536 ID3D12InfoQueue1_Release(infoQueue);
8537}
8538#endif
8539
8540static SDL_GPUDevice *D3D12_CreateDevice(bool debugMode, bool preferLowPower, SDL_PropertiesID props)
8541{
8542 SDL_GPUDevice *result;
8543 D3D12Renderer *renderer;
8544 HRESULT res;
8545
8546#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
8547 PFN_D3D12_XBOX_CREATE_DEVICE D3D12XboxCreateDeviceFunc;
8548 D3D12XBOX_CREATE_DEVICE_PARAMETERS createDeviceParams;
8549#else
8550 PFN_CREATE_DXGI_FACTORY1 CreateDXGIFactoryFunc;
8551 IDXGIFactory1 *factory1;
8552 IDXGIFactory5 *factory5;
8553 IDXGIFactory6 *factory6;
8554 DXGI_ADAPTER_DESC1 adapterDesc;
8555 LARGE_INTEGER umdVersion;
8556 PFN_D3D12_CREATE_DEVICE D3D12CreateDeviceFunc;
8557#endif
8558 D3D12_FEATURE_DATA_ARCHITECTURE architecture;
8559 D3D12_COMMAND_QUEUE_DESC queueDesc;
8560
8561 renderer = (D3D12Renderer *)SDL_calloc(1, sizeof(D3D12Renderer));
8562
8563#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
8564 // Load the DXGI library
8565 renderer->dxgi_dll = SDL_LoadObject(DXGI_DLL);
8566 if (renderer->dxgi_dll == NULL) {
8567 D3D12_INTERNAL_DestroyRenderer(renderer);
8568 SET_STRING_ERROR_AND_RETURN("Could not find " DXGI_DLL, NULL);
8569 }
8570
8571#ifdef HAVE_IDXGIINFOQUEUE
8572 // Initialize the DXGI debug layer, if applicable
8573 if (debugMode) {
8574 D3D12_INTERNAL_TryInitializeDXGIDebug(renderer);
8575 }
8576#endif
8577
8578 // Load the CreateDXGIFactory1 function
8579 CreateDXGIFactoryFunc = (PFN_CREATE_DXGI_FACTORY1)SDL_LoadFunction(
8580 renderer->dxgi_dll,
8581 CREATE_DXGI_FACTORY1_FUNC);
8582 if (CreateDXGIFactoryFunc == NULL) {
8583 D3D12_INTERNAL_DestroyRenderer(renderer);
8584 SET_STRING_ERROR_AND_RETURN("Could not load function: " CREATE_DXGI_FACTORY1_FUNC, NULL);
8585 }
8586
8587 // Create the DXGI factory
8588 res = CreateDXGIFactoryFunc(
8589 &D3D_IID_IDXGIFactory1,
8590 (void **)&factory1);
8591 if (FAILED(res)) {
8592 D3D12_INTERNAL_DestroyRenderer(renderer);
8593 CHECK_D3D12_ERROR_AND_RETURN("Could not create DXGIFactory", NULL);
8594 }
8595
8596 // Check for DXGI 1.4 support
8597 res = IDXGIFactory1_QueryInterface(
8598 factory1,
8599 D3D_GUID(D3D_IID_IDXGIFactory4),
8600 (void **)&renderer->factory);
8601 if (FAILED(res)) {
8602 D3D12_INTERNAL_DestroyRenderer(renderer);
8603 CHECK_D3D12_ERROR_AND_RETURN("DXGI1.4 support not found, required for DX12", NULL);
8604 }
8605 IDXGIFactory1_Release(factory1);
8606
8607 // Check for explicit tearing support
8608 res = IDXGIFactory4_QueryInterface(
8609 renderer->factory,
8610 D3D_GUID(D3D_IID_IDXGIFactory5),
8611 (void **)&factory5);
8612 if (SUCCEEDED(res)) {
8613 res = IDXGIFactory5_CheckFeatureSupport(
8614 factory5,
8615 DXGI_FEATURE_PRESENT_ALLOW_TEARING,
8616 &renderer->supportsTearing,
8617 sizeof(renderer->supportsTearing));
8618 if (FAILED(res)) {
8619 renderer->supportsTearing = false;
8620 }
8621 IDXGIFactory5_Release(factory5);
8622 }
8623
8624 // Select the appropriate device for rendering
8625 res = IDXGIFactory4_QueryInterface(
8626 renderer->factory,
8627 D3D_GUID(D3D_IID_IDXGIFactory6),
8628 (void **)&factory6);
8629 if (SUCCEEDED(res)) {
8630 res = IDXGIFactory6_EnumAdapterByGpuPreference(
8631 factory6,
8632 0,
8633 preferLowPower ? DXGI_GPU_PREFERENCE_MINIMUM_POWER : DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE,
8634 D3D_GUID(D3D_IID_IDXGIAdapter1),
8635 (void **)&renderer->adapter);
8636 IDXGIFactory6_Release(factory6);
8637 } else {
8638 res = IDXGIFactory4_EnumAdapters1(
8639 renderer->factory,
8640 0,
8641 &renderer->adapter);
8642 }
8643
8644 if (FAILED(res)) {
8645 D3D12_INTERNAL_DestroyRenderer(renderer);
8646 CHECK_D3D12_ERROR_AND_RETURN("Could not find adapter for D3D12Device", NULL);
8647 }
8648
8649 // Get information about the selected adapter. Used for logging info.
8650 res = IDXGIAdapter1_GetDesc1(renderer->adapter, &adapterDesc);
8651 if (FAILED(res)) {
8652 D3D12_INTERNAL_DestroyRenderer(renderer);
8653 CHECK_D3D12_ERROR_AND_RETURN("Could not get adapter description", NULL);
8654 }
8655 res = IDXGIAdapter1_CheckInterfaceSupport(renderer->adapter, D3D_GUID(D3D_IID_IDXGIDevice), &umdVersion);
8656 if (FAILED(res)) {
8657 D3D12_INTERNAL_DestroyRenderer(renderer);
8658 CHECK_D3D12_ERROR_AND_RETURN("Could not get adapter driver version", NULL);
8659 }
8660
8661 SDL_LogInfo(SDL_LOG_CATEGORY_GPU, "SDL_GPU Driver: D3D12");
8662 SDL_LogInfo(SDL_LOG_CATEGORY_GPU, "D3D12 Adapter: %S", adapterDesc.Description);
8663 SDL_LogInfo(
8664 SDL_LOG_CATEGORY_GPU,
8665 "D3D12 Driver: %d.%d.%d.%d",
8666 HIWORD(umdVersion.HighPart),
8667 LOWORD(umdVersion.HighPart),
8668 HIWORD(umdVersion.LowPart),
8669 LOWORD(umdVersion.LowPart));
8670#endif
8671
8672 // Load the D3D library
8673 renderer->d3d12_dll = SDL_LoadObject(D3D12_DLL);
8674 if (renderer->d3d12_dll == NULL) {
8675 D3D12_INTERNAL_DestroyRenderer(renderer);
8676 SET_STRING_ERROR_AND_RETURN("Could not find " D3D12_DLL, NULL);
8677 }
8678
8679 // Load the CreateDevice function
8680#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
8681 D3D12XboxCreateDeviceFunc = (PFN_D3D12_XBOX_CREATE_DEVICE)SDL_LoadFunction(
8682 renderer->d3d12_dll,
8683 "D3D12XboxCreateDevice");
8684 if (D3D12XboxCreateDeviceFunc == NULL) {
8685 D3D12_INTERNAL_DestroyRenderer(renderer);
8686 SET_STRING_ERROR_AND_RETURN("Could not load function: D3D12XboxCreateDevice", NULL);
8687 }
8688#else
8689 D3D12CreateDeviceFunc = (PFN_D3D12_CREATE_DEVICE)SDL_LoadFunction(
8690 renderer->d3d12_dll,
8691 D3D12_CREATE_DEVICE_FUNC);
8692 if (D3D12CreateDeviceFunc == NULL) {
8693 D3D12_INTERNAL_DestroyRenderer(renderer);
8694 SET_STRING_ERROR_AND_RETURN("Could not load function: " D3D12_CREATE_DEVICE_FUNC, NULL);
8695 }
8696#endif
8697
8698 renderer->D3D12SerializeRootSignature_func = (PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)SDL_LoadFunction(
8699 renderer->d3d12_dll,
8700 D3D12_SERIALIZE_ROOT_SIGNATURE_FUNC);
8701 if (renderer->D3D12SerializeRootSignature_func == NULL) {
8702 D3D12_INTERNAL_DestroyRenderer(renderer);
8703 SET_STRING_ERROR_AND_RETURN("Could not load function: " D3D12_SERIALIZE_ROOT_SIGNATURE_FUNC, NULL);
8704 }
8705
8706 // Initialize the D3D12 debug layer, if applicable
8707 if (debugMode) {
8708 D3D12_INTERNAL_TryInitializeD3D12Debug(renderer);
8709 }
8710
8711 // Create the D3D12Device
8712#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
8713 if (s_Device != NULL) {
8714 renderer->device = s_Device;
8715 } else {
8716 SDL_zero(createDeviceParams);
8717 createDeviceParams.Version = D3D12_SDK_VERSION;
8718 createDeviceParams.GraphicsCommandQueueRingSizeBytes = D3D12XBOX_DEFAULT_SIZE_BYTES;
8719 createDeviceParams.GraphicsScratchMemorySizeBytes = D3D12XBOX_DEFAULT_SIZE_BYTES;
8720 createDeviceParams.ComputeScratchMemorySizeBytes = D3D12XBOX_DEFAULT_SIZE_BYTES;
8721 createDeviceParams.DisableGeometryShaderAllocations = TRUE;
8722 createDeviceParams.DisableTessellationShaderAllocations = TRUE;
8723#if defined(SDL_PLATFORM_XBOXSERIES)
8724 createDeviceParams.DisableDXR = TRUE;
8725#endif
8726 if (debugMode) {
8727 createDeviceParams.ProcessDebugFlags = D3D12XBOX_PROCESS_DEBUG_FLAG_DEBUG;
8728 }
8729
8730 res = D3D12XboxCreateDeviceFunc(
8731 NULL,
8732 &createDeviceParams,
8733 IID_GRAPHICS_PPV_ARGS(&renderer->device));
8734 if (FAILED(res)) {
8735 D3D12_INTERNAL_DestroyRenderer(renderer);
8736 CHECK_D3D12_ERROR_AND_RETURN("Could not create D3D12Device", NULL);
8737 }
8738
8739 s_Device = renderer->device;
8740 }
8741#else
8742 res = D3D12CreateDeviceFunc(
8743 (IUnknown *)renderer->adapter,
8744 D3D_FEATURE_LEVEL_CHOICE,
8745 D3D_GUID(D3D_IID_ID3D12Device),
8746 (void **)&renderer->device);
8747
8748 if (FAILED(res)) {
8749 D3D12_INTERNAL_DestroyRenderer(renderer);
8750 CHECK_D3D12_ERROR_AND_RETURN("Could not create D3D12Device", NULL);
8751 }
8752
8753 // Initialize the D3D12 debug info queue, if applicable
8754 if (debugMode) {
8755 if (!D3D12_INTERNAL_TryInitializeD3D12DebugInfoQueue(renderer)) {
8756 return NULL;
8757 }
8758 D3D12_INTERNAL_TryInitializeD3D12DebugInfoLogger(renderer);
8759 }
8760#endif
8761
8762 // Check UMA
8763 architecture.NodeIndex = 0;
8764 res = ID3D12Device_CheckFeatureSupport(
8765 renderer->device,
8766 D3D12_FEATURE_ARCHITECTURE,
8767 &architecture,
8768 sizeof(D3D12_FEATURE_DATA_ARCHITECTURE));
8769 if (FAILED(res)) {
8770 D3D12_INTERNAL_DestroyRenderer(renderer);
8771 CHECK_D3D12_ERROR_AND_RETURN("Could not get device architecture", NULL);
8772 }
8773
8774 renderer->UMA = (bool)architecture.UMA;
8775 renderer->UMACacheCoherent = (bool)architecture.CacheCoherentUMA;
8776
8777#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
8778 renderer->GPUUploadHeapSupported = false;
8779#else
8780 // Check "GPU Upload Heap" support (for fast uniform buffers)
8781 D3D12_FEATURE_DATA_D3D12_OPTIONS16 options16; // 15 wasn't enough, huh?
8782 renderer->GPUUploadHeapSupported = false;
8783 res = ID3D12Device_CheckFeatureSupport(
8784 renderer->device,
8785 D3D12_FEATURE_D3D12_OPTIONS16,
8786 &options16,
8787 sizeof(options16));
8788
8789 if (SUCCEEDED(res)) {
8790 renderer->GPUUploadHeapSupported = options16.GPUUploadHeapSupported;
8791 }
8792#endif
8793
8794 // Create command queue
8795#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
8796 if (s_CommandQueue != NULL) {
8797 renderer->commandQueue = s_CommandQueue;
8798 } else {
8799#endif
8800 queueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
8801 queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
8802 queueDesc.NodeMask = 0;
8803 queueDesc.Priority = 0;
8804
8805 res = ID3D12Device_CreateCommandQueue(
8806 renderer->device,
8807 &queueDesc,
8808 D3D_GUID(D3D_IID_ID3D12CommandQueue),
8809 (void **)&renderer->commandQueue);
8810
8811 if (FAILED(res)) {
8812 D3D12_INTERNAL_DestroyRenderer(renderer);
8813 CHECK_D3D12_ERROR_AND_RETURN("Could not create D3D12CommandQueue", NULL);
8814 }
8815#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
8816 s_CommandQueue = renderer->commandQueue;
8817 }
8818#endif
8819
8820 // Create indirect command signatures
8821
8822 D3D12_COMMAND_SIGNATURE_DESC commandSignatureDesc;
8823 D3D12_INDIRECT_ARGUMENT_DESC indirectArgumentDesc;
8824 SDL_zero(indirectArgumentDesc);
8825
8826 indirectArgumentDesc.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW;
8827 commandSignatureDesc.NodeMask = 0;
8828 commandSignatureDesc.ByteStride = sizeof(SDL_GPUIndirectDrawCommand);
8829 commandSignatureDesc.NumArgumentDescs = 1;
8830 commandSignatureDesc.pArgumentDescs = &indirectArgumentDesc;
8831
8832 res = ID3D12Device_CreateCommandSignature(
8833 renderer->device,
8834 &commandSignatureDesc,
8835 NULL,
8836 D3D_GUID(D3D_IID_ID3D12CommandSignature),
8837 (void **)&renderer->indirectDrawCommandSignature);
8838 if (FAILED(res)) {
8839 D3D12_INTERNAL_DestroyRenderer(renderer);
8840 CHECK_D3D12_ERROR_AND_RETURN("Could not create indirect draw command signature", NULL);
8841 }
8842
8843 indirectArgumentDesc.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED;
8844 commandSignatureDesc.ByteStride = sizeof(SDL_GPUIndexedIndirectDrawCommand);
8845 commandSignatureDesc.pArgumentDescs = &indirectArgumentDesc;
8846
8847 res = ID3D12Device_CreateCommandSignature(
8848 renderer->device,
8849 &commandSignatureDesc,
8850 NULL,
8851 D3D_GUID(D3D_IID_ID3D12CommandSignature),
8852 (void **)&renderer->indirectIndexedDrawCommandSignature);
8853 if (FAILED(res)) {
8854 D3D12_INTERNAL_DestroyRenderer(renderer);
8855 CHECK_D3D12_ERROR_AND_RETURN("Could not create indirect indexed draw command signature", NULL);
8856 }
8857
8858 indirectArgumentDesc.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH;
8859 commandSignatureDesc.ByteStride = sizeof(SDL_GPUIndirectDispatchCommand);
8860 commandSignatureDesc.pArgumentDescs = &indirectArgumentDesc;
8861
8862 res = ID3D12Device_CreateCommandSignature(
8863 renderer->device,
8864 &commandSignatureDesc,
8865 NULL,
8866 D3D_GUID(D3D_IID_ID3D12CommandSignature),
8867 (void **)&renderer->indirectDispatchCommandSignature);
8868 if (FAILED(res)) {
8869 D3D12_INTERNAL_DestroyRenderer(renderer);
8870 CHECK_D3D12_ERROR_AND_RETURN("Could not create indirect dispatch command signature", NULL);
8871 }
8872
8873 // Initialize pools
8874
8875 renderer->submittedCommandBufferCapacity = 4;
8876 renderer->submittedCommandBufferCount = 0;
8877 renderer->submittedCommandBuffers = (D3D12CommandBuffer **)SDL_calloc(
8878 renderer->submittedCommandBufferCapacity, sizeof(D3D12CommandBuffer *));
8879 if (!renderer->submittedCommandBuffers) {
8880 D3D12_INTERNAL_DestroyRenderer(renderer);
8881 return NULL;
8882 }
8883
8884 renderer->uniformBufferPoolCapacity = 4;
8885 renderer->uniformBufferPoolCount = 0;
8886 renderer->uniformBufferPool = (D3D12UniformBuffer **)SDL_calloc(
8887 renderer->uniformBufferPoolCapacity, sizeof(D3D12UniformBuffer *));
8888 if (!renderer->uniformBufferPool) {
8889 D3D12_INTERNAL_DestroyRenderer(renderer);
8890 return NULL;
8891 }
8892
8893 renderer->claimedWindowCapacity = 4;
8894 renderer->claimedWindowCount = 0;
8895 renderer->claimedWindows = (D3D12WindowData **)SDL_calloc(
8896 renderer->claimedWindowCapacity, sizeof(D3D12WindowData *));
8897 if (!renderer->claimedWindows) {
8898 D3D12_INTERNAL_DestroyRenderer(renderer);
8899 return NULL;
8900 }
8901
8902 renderer->availableFenceCapacity = 4;
8903 renderer->availableFenceCount = 0;
8904 renderer->availableFences = (D3D12Fence **)SDL_calloc(
8905 renderer->availableFenceCapacity, sizeof(D3D12Fence *));
8906 if (!renderer->availableFences) {
8907 D3D12_INTERNAL_DestroyRenderer(renderer);
8908 return NULL;
8909 }
8910
8911 // Initialize staging descriptor pools
8912 for (Uint32 i = 0; i < D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES; i += 1) {
8913 renderer->stagingDescriptorPools[i] = D3D12_INTERNAL_CreateStagingDescriptorPool(
8914 renderer,
8915 (D3D12_DESCRIPTOR_HEAP_TYPE)i);
8916
8917 if (renderer->stagingDescriptorPools[i] == NULL) {
8918 D3D12_INTERNAL_DestroyRenderer(renderer);
8919 return NULL;
8920 }
8921 }
8922
8923 // Initialize GPU descriptor heaps
8924 for (Uint32 i = 0; i < 2; i += 1) {
8925 renderer->gpuDescriptorHeapPools[i].lock = SDL_CreateMutex();
8926 renderer->gpuDescriptorHeapPools[i].capacity = 4;
8927 renderer->gpuDescriptorHeapPools[i].count = 4;
8928 renderer->gpuDescriptorHeapPools[i].heaps = (D3D12DescriptorHeap **)SDL_calloc(
8929 renderer->gpuDescriptorHeapPools[i].capacity, sizeof(D3D12DescriptorHeap *));
8930
8931 for (Uint32 j = 0; j < renderer->gpuDescriptorHeapPools[i].capacity; j += 1) {
8932 renderer->gpuDescriptorHeapPools[i].heaps[j] = D3D12_INTERNAL_CreateDescriptorHeap(
8933 renderer,
8934 (D3D12_DESCRIPTOR_HEAP_TYPE)i,
8935 i == D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV ? VIEW_GPU_DESCRIPTOR_COUNT : SAMPLER_GPU_DESCRIPTOR_COUNT,
8936 false);
8937
8938 if (renderer->gpuDescriptorHeapPools[i].heaps[j] == NULL) {
8939 D3D12_INTERNAL_DestroyRenderer(renderer);
8940 return NULL;
8941 }
8942 }
8943 }
8944
8945 // Deferred resource releasing
8946
8947 renderer->buffersToDestroyCapacity = 4;
8948 renderer->buffersToDestroyCount = 0;
8949 renderer->buffersToDestroy = (D3D12Buffer **)SDL_calloc(
8950 renderer->buffersToDestroyCapacity, sizeof(D3D12Buffer *));
8951 if (!renderer->buffersToDestroy) {
8952 D3D12_INTERNAL_DestroyRenderer(renderer);
8953 return NULL;
8954 }
8955
8956 renderer->texturesToDestroyCapacity = 4;
8957 renderer->texturesToDestroyCount = 0;
8958 renderer->texturesToDestroy = (D3D12Texture **)SDL_calloc(
8959 renderer->texturesToDestroyCapacity, sizeof(D3D12Texture *));
8960 if (!renderer->texturesToDestroy) {
8961 D3D12_INTERNAL_DestroyRenderer(renderer);
8962 return NULL;
8963 }
8964
8965 renderer->samplersToDestroyCapacity = 4;
8966 renderer->samplersToDestroyCount = 0;
8967 renderer->samplersToDestroy = (D3D12Sampler **)SDL_calloc(
8968 renderer->samplersToDestroyCapacity, sizeof(D3D12Sampler *));
8969 if (!renderer->samplersToDestroy) {
8970 D3D12_INTERNAL_DestroyRenderer(renderer);
8971 return NULL;
8972 }
8973
8974 renderer->graphicsPipelinesToDestroyCapacity = 4;
8975 renderer->graphicsPipelinesToDestroyCount = 0;
8976 renderer->graphicsPipelinesToDestroy = (D3D12GraphicsPipeline **)SDL_calloc(
8977 renderer->graphicsPipelinesToDestroyCapacity, sizeof(D3D12GraphicsPipeline *));
8978 if (!renderer->graphicsPipelinesToDestroy) {
8979 D3D12_INTERNAL_DestroyRenderer(renderer);
8980 return NULL;
8981 }
8982
8983 renderer->computePipelinesToDestroyCapacity = 4;
8984 renderer->computePipelinesToDestroyCount = 0;
8985 renderer->computePipelinesToDestroy = (D3D12ComputePipeline **)SDL_calloc(
8986 renderer->computePipelinesToDestroyCapacity, sizeof(D3D12ComputePipeline *));
8987 if (!renderer->computePipelinesToDestroy) {
8988 D3D12_INTERNAL_DestroyRenderer(renderer);
8989 return NULL;
8990 }
8991
8992 // Locks
8993 renderer->acquireCommandBufferLock = SDL_CreateMutex();
8994 renderer->acquireUniformBufferLock = SDL_CreateMutex();
8995 renderer->submitLock = SDL_CreateMutex();
8996 renderer->windowLock = SDL_CreateMutex();
8997 renderer->fenceLock = SDL_CreateMutex();
8998 renderer->disposeLock = SDL_CreateMutex();
8999
9000 renderer->debug_mode = debugMode;
9001 renderer->allowedFramesInFlight = 2;
9002
9003 renderer->semantic = SDL_GetStringProperty(props, SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING, "TEXCOORD");
9004
9005 // Blit resources
9006 D3D12_INTERNAL_InitBlitResources(renderer);
9007
9008#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
9009 res = renderer->device->SetFrameIntervalX(
9010 NULL,
9011 D3D12XBOX_FRAME_INTERVAL_60_HZ,
9012 renderer->allowedFramesInFlight - 1,
9013 D3D12XBOX_FRAME_INTERVAL_FLAG_NONE);
9014 if (FAILED(res)) {
9015 D3D12_INTERNAL_DestroyRenderer(renderer);
9016 CHECK_D3D12_ERROR_AND_RETURN("Could not get set frame interval", NULL);
9017 }
9018
9019 res = renderer->device->ScheduleFrameEventX(
9020 D3D12XBOX_FRAME_EVENT_ORIGIN,
9021 0,
9022 NULL,
9023 D3D12XBOX_SCHEDULE_FRAME_EVENT_FLAG_NONE);
9024 if (FAILED(res)) {
9025 D3D12_INTERNAL_DestroyRenderer(renderer);
9026 CHECK_D3D12_ERROR_AND_RETURN("Could not schedule frame events", NULL);
9027 }
9028#endif
9029
9030 // Create the SDL_GPU Device
9031 result = (SDL_GPUDevice *)SDL_calloc(1, sizeof(SDL_GPUDevice));
9032
9033 if (!result) {
9034 D3D12_INTERNAL_DestroyRenderer(renderer);
9035 return NULL;
9036 }
9037
9038 ASSIGN_DRIVER(D3D12)
9039 result->driverData = (SDL_GPURenderer *)renderer;
9040 result->debug_mode = debugMode;
9041 renderer->sdlGPUDevice = result;
9042
9043 return result;
9044}
9045
9046SDL_GPUBootstrap D3D12Driver = {
9047 "direct3d12",
9048 SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_DXBC,
9049 D3D12_PrepareDriver,
9050 D3D12_CreateDevice
9051};
9052
9053#endif // SDL_GPU_D3D12
9054
9055// GDK-specific APIs
9056
9057#ifdef SDL_PLATFORM_GDK
9058
9059void SDL_GDKSuspendGPU(SDL_GPUDevice *device)
9060{
9061#if defined(SDL_GPU_D3D12) && (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
9062 D3D12Renderer *renderer = (D3D12Renderer *)device->driverData;
9063 HRESULT res;
9064 if (device == NULL) {
9065 SET_STRING_ERROR_AND_RETURN("Invalid GPU device", );
9066 }
9067
9068 SDL_LockMutex(renderer->submitLock);
9069 res = renderer->commandQueue->SuspendX(0);
9070 if (FAILED(res)) {
9071 SDL_LogError(SDL_LOG_CATEGORY_GPU, "SuspendX failed: %X", res);
9072 }
9073 SDL_UnlockMutex(renderer->submitLock);
9074#endif
9075}
9076
9077void SDL_GDKResumeGPU(SDL_GPUDevice *device)
9078{
9079#if defined(SDL_GPU_D3D12) && (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
9080 D3D12Renderer *renderer = (D3D12Renderer *)device->driverData;
9081 HRESULT res;
9082 if (device == NULL) {
9083 SET_STRING_ERROR_AND_RETURN("Invalid GPU device", );
9084 }
9085
9086 SDL_LockMutex(renderer->submitLock);
9087 res = renderer->commandQueue->ResumeX();
9088 if (FAILED(res)) {
9089 SDL_LogError(SDL_LOG_CATEGORY_GPU, "ResumeX failed: %X", res);
9090 }
9091 SDL_UnlockMutex(renderer->submitLock);
9092
9093 res = renderer->device->SetFrameIntervalX(
9094 NULL,
9095 D3D12XBOX_FRAME_INTERVAL_60_HZ,
9096 renderer->allowedFramesInFlight - 1,
9097 D3D12XBOX_FRAME_INTERVAL_FLAG_NONE);
9098 if (FAILED(res)) {
9099 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Could not set frame interval: %X", res);
9100 }
9101
9102 res = renderer->device->ScheduleFrameEventX(
9103 D3D12XBOX_FRAME_EVENT_ORIGIN,
9104 0,
9105 NULL,
9106 D3D12XBOX_SCHEDULE_FRAME_EVENT_FLAG_NONE);
9107 if (FAILED(res)) {
9108 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Could not schedule frame events: %X", res);
9109 }
9110#endif
9111}
9112
9113#endif // SDL_PLATFORM_GDK
diff --git a/contrib/SDL-3.2.8/src/gpu/d3d12/compile_shaders.bat b/contrib/SDL-3.2.8/src/gpu/d3d12/compile_shaders.bat
new file mode 100644
index 0000000..7aa78ef
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/d3d12/compile_shaders.bat
@@ -0,0 +1,18 @@
1rem This script runs for the Windows build, but also via the _xbox variant with these vars set.
2rem Make sure to default to building for Windows if they're not set.
3if %DXC%.==. set DXC=dxc
4if %SUFFIX%.==. set SUFFIX=.h
5
6echo Building with %DXC%
7echo Suffix %SUFFIX%
8
9cd "%~dp0"
10
11%DXC% -E FullscreenVert -T vs_6_0 -Fh D3D12_FullscreenVert.h D3D_Blit.hlsl
12%DXC% -E BlitFrom2D -T ps_6_0 -Fh D3D12_BlitFrom2D.h D3D_Blit.hlsl
13%DXC% -E BlitFrom2DArray -T ps_6_0 -Fh D3D12_BlitFrom2DArray.h D3D_Blit.hlsl
14%DXC% -E BlitFrom3D -T ps_6_0 -Fh D3D12_BlitFrom3D.h D3D_Blit.hlsl
15%DXC% -E BlitFromCube -T ps_6_0 -Fh D3D12_BlitFromCube.h D3D_Blit.hlsl
16%DXC% -E BlitFromCubeArray -T ps_6_0 -Fh D3D12_BlitFromCubeArray.h D3D_Blit.hlsl
17copy /b D3D12_FullscreenVert.h+D3D12_BlitFrom2D.h+D3D12_BlitFrom2DArray.h+D3D12_BlitFrom3D.h+D3D12_BlitFromCube.h+D3D12_BlitFromCubeArray.h D3D12_Blit%SUFFIX%
18del D3D12_FullscreenVert.h D3D12_BlitFrom2D.h D3D12_BlitFrom2DArray.h D3D12_BlitFrom3D.h D3D12_BlitFromCube.h D3D12_BlitFromCubeArray.h
diff --git a/contrib/SDL-3.2.8/src/gpu/d3d12/compile_shaders_xbox.bat b/contrib/SDL-3.2.8/src/gpu/d3d12/compile_shaders_xbox.bat
new file mode 100644
index 0000000..311b172
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/d3d12/compile_shaders_xbox.bat
@@ -0,0 +1,13 @@
1if %2.==one. goto setxboxone
2rem Xbox Series compile
3set DXC="%GameDKLatest%\GXDK\bin\Scarlett\DXC.exe"
4set SUFFIX=_Series.h
5goto startbuild
6
7:setxboxone
8set DXC="%GameDKLatest%\GXDK\bin\XboxOne\DXC.exe"
9set SUFFIX=_One.h
10
11:startbuild
12
13call "%~dp0\compile_shaders.bat"
diff --git a/contrib/SDL-3.2.8/src/gpu/metal/Metal_Blit.h b/contrib/SDL-3.2.8/src/gpu/metal/Metal_Blit.h
new file mode 100644
index 0000000..ccd3e4b
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/metal/Metal_Blit.h
@@ -0,0 +1,10088 @@
1#if defined(SDL_PLATFORM_IOS)
2#if TARGET_OS_SIMULATOR
3const unsigned char FullscreenVert_metallib[] = {
4 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
5 0x00, 0x00, 0x00, 0x00, 0x84, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
7 0x00, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00,
9 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
10 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x0b, 0x00, 0x00,
11 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
12 0x4e, 0x41, 0x4d, 0x45, 0x0f, 0x00, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63,
13 0x72, 0x65, 0x65, 0x6e, 0x56, 0x65, 0x72, 0x74, 0x00, 0x54, 0x59, 0x50,
14 0x45, 0x01, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0xfc, 0x9a,
15 0xd8, 0xff, 0x14, 0x82, 0xee, 0xaa, 0x88, 0x32, 0x2c, 0x1f, 0x0a, 0xd6,
16 0x45, 0x2c, 0x19, 0x79, 0xd0, 0x03, 0xdc, 0x42, 0xab, 0xba, 0x62, 0x57,
17 0xdd, 0x08, 0x0d, 0xbf, 0x20, 0x1f, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00,
18 0x90, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54,
19 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
20 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x02, 0x00,
22 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x45, 0x4e, 0x44, 0x54,
23 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00,
24 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00,
25 0x14, 0x00, 0x00, 0x00, 0x74, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
26 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
27 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00,
28 0x21, 0x0c, 0x00, 0x00, 0x96, 0x02, 0x00, 0x00, 0x0b, 0x02, 0x21, 0x00,
29 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91,
30 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c,
31 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02,
32 0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b,
33 0x0a, 0x32, 0x42, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5,
34 0x00, 0x19, 0x32, 0x42, 0x04, 0x49, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50,
35 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06,
36 0x51, 0x18, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x1b, 0x7a, 0x24, 0xf8,
37 0xff, 0xff, 0xff, 0xff, 0x01, 0x90, 0x00, 0x8a, 0x08, 0x07, 0x78, 0x80,
38 0x07, 0x79, 0x78, 0x07, 0x7c, 0x68, 0x03, 0x73, 0xa8, 0x07, 0x77, 0x18,
39 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40,
40 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xda, 0x21, 0x1d,
41 0xdc, 0xa1, 0x0d, 0xd8, 0xa1, 0x1c, 0xce, 0x21, 0x1c, 0xd8, 0xa1, 0x0d,
42 0xec, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0xe0, 0x1e,
43 0xd2, 0x81, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x38, 0x00, 0x06, 0x77, 0x78,
44 0x87, 0x36, 0x10, 0x87, 0x7a, 0x48, 0x07, 0x76, 0xa0, 0x87, 0x74, 0x70,
45 0x87, 0x79, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08,
46 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0,
47 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x00,
48 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d,
49 0xcc, 0x41, 0x1e, 0xc2, 0xa1, 0x1d, 0xca, 0xa1, 0x0d, 0xe0, 0xe1, 0x1d,
50 0xd2, 0xc1, 0x1d, 0xe8, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xca, 0x81, 0x1d,
51 0xd2, 0xa1, 0x1d, 0xda, 0xc0, 0x1d, 0xde, 0xc1, 0x1d, 0xda, 0x80, 0x1d,
52 0xca, 0x21, 0x1c, 0xcc, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00,
53 0x08, 0x77, 0x78, 0x87, 0x36, 0x48, 0x07, 0x77, 0x30, 0x87, 0x79, 0x68,
54 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00,
55 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d,
56 0xdc, 0x21, 0x1c, 0xdc, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d,
57 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28,
58 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x83, 0x79, 0x48, 0x87, 0x73, 0x70,
59 0x87, 0x72, 0x20, 0x87, 0x36, 0xd0, 0x87, 0x72, 0x90, 0x87, 0x77, 0x98,
60 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40,
61 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d,
62 0xda, 0x80, 0x1e, 0xe4, 0x21, 0x1c, 0xe0, 0x01, 0x1e, 0xd2, 0xc1, 0x1d,
63 0xce, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90,
64 0x87, 0x7a, 0x28, 0x07, 0x80, 0x98, 0x07, 0x7a, 0x08, 0x87, 0x71, 0x58,
65 0x87, 0x36, 0x80, 0x07, 0x79, 0x78, 0x07, 0x7a, 0x28, 0x87, 0x71, 0xa0,
66 0x87, 0x77, 0x90, 0x87, 0x36, 0x10, 0x87, 0x7a, 0x30, 0x07, 0x73, 0x28,
67 0x07, 0x79, 0x68, 0x83, 0x79, 0x48, 0x07, 0x7d, 0x28, 0x07, 0x00, 0x0f,
68 0x00, 0xa2, 0x1e, 0xdc, 0x61, 0x1e, 0xc2, 0xc1, 0x1c, 0xca, 0xa1, 0x0d,
69 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0,
70 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x36, 0x18, 0xc2, 0xff, 0xff, 0xff,
71 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x8c, 0xe1, 0xff, 0xff, 0xff, 0xff,
72 0x07, 0x40, 0x02, 0x28, 0x00, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00,
73 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06,
74 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
75 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84,
76 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c,
77 0x0b, 0x84, 0x84, 0x4c, 0x10, 0x38, 0x33, 0x00, 0xc3, 0x08, 0x02, 0x30,
78 0x8c, 0x40, 0x00, 0x56, 0x08, 0x99, 0x23, 0x00, 0x83, 0x22, 0x0c, 0x51,
79 0x15, 0x01, 0x88, 0x6e, 0x20, 0x20, 0x05, 0x68, 0x8e, 0x00, 0x14, 0x86,
80 0x11, 0x08, 0x62, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0xbe, 0x70, 0x48,
81 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60,
82 0x87, 0x72, 0x68, 0x83, 0x74, 0x78, 0x87, 0x79, 0x88, 0x83, 0x39, 0x70,
83 0x03, 0x38, 0x70, 0x03, 0x38, 0x68, 0x83, 0x79, 0x48, 0x87, 0x76, 0xa8,
84 0x07, 0x76, 0x08, 0x07, 0x7a, 0x78, 0x07, 0x79, 0xd8, 0x70, 0x1b, 0xe5,
85 0xd0, 0x06, 0xf0, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74,
86 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78,
87 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a,
88 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76,
89 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a,
90 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76,
91 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d,
92 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
93 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74,
94 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a,
95 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72,
96 0x40, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
97 0x60, 0x0f, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
98 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74,
99 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a,
100 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79,
101 0x60, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72,
102 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71,
103 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6,
104 0x10, 0x07, 0x79, 0x20, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a,
105 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76,
106 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76,
107 0xd0, 0x06, 0xf6, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71,
108 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71,
109 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74,
110 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78,
111 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x11, 0xc2,
112 0x90, 0xce, 0x47, 0x2d, 0x8b, 0x24, 0x44, 0x04, 0xd1, 0xbc, 0x44, 0x34,
113 0x0d, 0x89, 0x00, 0xa7, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00,
114 0x00, 0x00, 0x80, 0x21, 0x91, 0x73, 0x1d, 0x40, 0x00, 0x08, 0x00, 0x00,
115 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0xb1, 0x41, 0xa0, 0x28, 0xa6, 0x00,
116 0x00, 0x40, 0x16, 0x08, 0x07, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x0c,
117 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2,
118 0x22, 0x28, 0x81, 0x42, 0x18, 0x01, 0x20, 0x1d, 0x4b, 0x88, 0x04, 0x00,
119 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c,
120 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3,
121 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6,
122 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e,
123 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43,
124 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03,
125 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48,
126 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20,
127 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e,
128 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d,
129 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89,
130 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83,
131 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68,
132 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90,
133 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78,
134 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98,
135 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5,
136 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c,
137 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c,
138 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43,
139 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43,
140 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82,
141 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58,
142 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18,
143 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2,
144 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec,
145 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e,
146 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d,
147 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83,
148 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60,
149 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0,
150 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d,
151 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d,
152 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43,
153 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3,
154 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18,
155 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3,
156 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1,
157 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e,
158 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3,
159 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3,
160 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60,
161 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec,
162 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5,
163 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5,
164 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8,
165 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17,
166 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d,
167 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03,
168 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78,
169 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce,
170 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef,
171 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08,
172 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0,
173 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8,
174 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x20, 0x00, 0x00,
175 0x82, 0x00, 0x00, 0x00, 0x32, 0x9a, 0x08, 0x14, 0x02, 0x85, 0x8c, 0x27,
176 0x46, 0x46, 0xc8, 0x11, 0x32, 0x64, 0xd4, 0x26, 0xe8, 0x4c, 0x00, 0x00,
177 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x44, 0x45, 0x06, 0x33, 0x30,
178 0xc6, 0xd0, 0x10, 0x02, 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73,
179 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a,
180 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c,
181 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30,
182 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c,
183 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29,
184 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d,
185 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73,
186 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
187 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74,
188 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
189 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
190 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f,
191 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
192 0x61, 0x69, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x6f,
193 0x75, 0x74, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
194 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66,
195 0x29, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70,
196 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32,
197 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
198 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74,
199 0x69, 0x6f, 0x6e, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x70, 0x6f, 0x73,
200 0x61, 0x69, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x69,
201 0x64, 0x75, 0x69, 0x6e, 0x74, 0x76, 0x49, 0x00, 0x23, 0x08, 0x84, 0x30,
202 0x82, 0xa0, 0x18, 0x23, 0x08, 0xc4, 0x30, 0x82, 0x40, 0x10, 0x23, 0x08,
203 0x44, 0x31, 0x82, 0x60, 0x00, 0x33, 0x0c, 0x54, 0x50, 0xcd, 0x30, 0x58,
204 0xc2, 0x35, 0x43, 0x30, 0xcc, 0x30, 0x50, 0x14, 0x36, 0x03, 0x41, 0x50,
205 0x18, 0x36, 0x43, 0x50, 0xcc, 0x10, 0x18, 0x33, 0x04, 0xc7, 0x0c, 0x06,
206 0x92, 0x28, 0x0b, 0xd3, 0xcc, 0x50, 0x38, 0xca, 0xc3, 0x40, 0x33, 0x08,
207 0x62, 0x30, 0x06, 0x33, 0x18, 0x58, 0xa4, 0x48, 0xcc, 0x34, 0x43, 0x50,
208 0x06, 0x33, 0x0c, 0x19, 0x19, 0x98, 0x81, 0x8c, 0x04, 0x26, 0xe8, 0x22,
209 0x36, 0x36, 0xbb, 0x36, 0x97, 0xb6, 0x37, 0xb2, 0x3a, 0xb6, 0x32, 0x17,
210 0x33, 0xb6, 0xb0, 0xb3, 0xb9, 0x51, 0x84, 0x4c, 0x3b, 0x85, 0x8d, 0xcd,
211 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x94, 0x60, 0xbb, 0x25,
212 0x2c, 0x4d, 0xce, 0xc5, 0xae, 0x4c, 0x6e, 0x2e, 0xed, 0xcd, 0x6d, 0x94,
213 0x80, 0x3b, 0x2a, 0x2c, 0x4d, 0xce, 0x85, 0x2d, 0xcc, 0xed, 0xac, 0x2e,
214 0xec, 0xac, 0xec, 0xcb, 0xae, 0x4c, 0x6e, 0x2e, 0xed, 0xcd, 0x6d, 0x94,
215 0xa0, 0xbb, 0x29, 0x2c, 0x4d, 0xce, 0x65, 0xec, 0xad, 0x0d, 0x2e, 0x8d,
216 0xad, 0xec, 0xeb, 0x0d, 0x8e, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x94, 0xc1,
217 0xfb, 0xc0, 0xe0, 0x94, 0xb0, 0x34, 0x39, 0x17, 0xbb, 0x32, 0x39, 0xba,
218 0x32, 0xbc, 0x51, 0x02, 0x33, 0x00, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00,
219 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07,
220 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39,
221 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2,
222 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16,
223 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40,
224 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07,
225 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07,
226 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b,
227 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc,
228 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8,
229 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2,
230 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50,
231 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x10, 0x00, 0x00,
232 0x06, 0x00, 0x00, 0x00, 0x07, 0xcc, 0x3c, 0xa4, 0x83, 0x3b, 0x9c, 0x03,
233 0x3b, 0x94, 0x03, 0x3d, 0xa0, 0x83, 0x3c, 0x94, 0x43, 0x38, 0x90, 0xc3,
234 0x01, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
235 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
236 0x44, 0x33, 0x00, 0xb4, 0x23, 0x00, 0x25, 0x40, 0x3c, 0x07, 0x51, 0x0c,
237 0x08, 0x32, 0x16, 0x01, 0x04, 0xc6, 0x41, 0x30, 0x03, 0x30, 0x02, 0x30,
238 0x46, 0x00, 0x82, 0x20, 0x88, 0x7f, 0x14, 0x33, 0x00, 0x63, 0x09, 0x20,
239 0x08, 0x82, 0x20, 0x18, 0x80, 0x20, 0x08, 0x82, 0xe0, 0x30, 0x96, 0x00,
240 0x82, 0x20, 0x88, 0xff, 0x02, 0x08, 0x82, 0x20, 0xfe, 0xcd, 0x00, 0x90,
241 0xcc, 0x41, 0x34, 0x8d, 0xf3, 0xd0, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00,
242 0xf5, 0x4c, 0x57, 0x41, 0xa5, 0x23, 0x06, 0xc6, 0x10, 0x82, 0x60, 0xe1,
243 0x1f, 0xc7, 0x15, 0xcc, 0x31, 0x24, 0x01, 0x54, 0x13, 0xa6, 0x23, 0x06,
244 0xc6, 0x10, 0x82, 0x60, 0xe1, 0x1f, 0x87, 0x16, 0xcc, 0x31, 0x0c, 0x81,
245 0x64, 0x01, 0x23, 0xfe, 0x16, 0x30, 0xe0, 0x3f, 0xc8, 0x10, 0x30, 0xd4,
246 0x20, 0x43, 0xc0, 0x50, 0xb3, 0x0d, 0x4c, 0x01, 0xcc, 0x36, 0x04, 0x42,
247 0x90, 0x01, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
248 0x32, 0x0e, 0x10, 0x22, 0x84, 0x00, 0xf1, 0x04, 0x00, 0x00, 0x00, 0x00,
249 0x00, 0x00, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
250 0x12, 0x03, 0x94, 0x28, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
251 0x25, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
252 0x01, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
253 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00,
254 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
255 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
256 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
257 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
258 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
259 0x0e, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x24, 0x00, 0x00,
260 0x0e, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
261 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00, 0x00,
262 0x00, 0x00, 0x00, 0x00, 0x5d, 0x0c, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
263 0x12, 0x03, 0x94, 0xac, 0x00, 0x00, 0x00, 0x00, 0x46, 0x75, 0x6c, 0x6c,
264 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x56, 0x65, 0x72, 0x74, 0x61, 0x69,
265 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e, 0x66, 0x2e,
266 0x66, 0x33, 0x32, 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32, 0x33, 0x32, 0x30,
267 0x32, 0x33, 0x2e, 0x39, 0x38, 0x61, 0x69, 0x72, 0x36, 0x34, 0x2d, 0x61,
268 0x70, 0x70, 0x6c, 0x65, 0x2d, 0x69, 0x6f, 0x73, 0x31, 0x33, 0x2e, 0x30,
269 0x2e, 0x30, 0x2d, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72,
270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
271};
272const unsigned int FullscreenVert_metallib_len = 3204;
273const unsigned char BlitFrom2D_metallib[] = {
274 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
275 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
276 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
277 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
278 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00,
279 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
280 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x0f, 0x00, 0x00,
281 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
282 0x4e, 0x41, 0x4d, 0x45, 0x0b, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
283 0x6f, 0x6d, 0x32, 0x44, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01,
284 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x00, 0xa2, 0xe0, 0xec, 0x9e, 0x44,
285 0x28, 0xba, 0x6b, 0x22, 0xa2, 0x11, 0xbf, 0xae, 0x65, 0xd7, 0x7c, 0x9e,
286 0x69, 0xc1, 0x0d, 0x0b, 0xf8, 0xd3, 0xb0, 0xb7, 0x2a, 0xf1, 0x40, 0xbc,
287 0xb5, 0xaa, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x90, 0x0f, 0x00, 0x00,
288 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00,
289 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
290 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45,
291 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
292 0x45, 0x4e, 0x44, 0x54, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00,
293 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
294 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
295 0x70, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde,
296 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24,
297 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00,
298 0x89, 0x03, 0x00, 0x00, 0x0b, 0x02, 0x21, 0x00, 0x02, 0x00, 0x00, 0x00,
299 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49,
300 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19,
301 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42,
302 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88,
303 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42,
304 0x04, 0x49, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c,
305 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00,
306 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff,
307 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4,
308 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda,
309 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00,
310 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87,
311 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87,
312 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07,
313 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc,
314 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2,
315 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4,
316 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc,
317 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda,
318 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
319 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87,
320 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07,
321 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03,
322 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca,
323 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6,
324 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0,
325 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
326 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87,
327 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea,
328 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce,
329 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde,
330 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8,
331 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87,
332 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07,
333 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8,
334 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6,
335 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6,
336 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc,
337 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00,
338 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87,
339 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07,
340 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0,
341 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20,
342 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0,
343 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06,
344 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff,
345 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02,
346 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e,
347 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff,
348 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff,
349 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00,
350 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18,
351 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48,
352 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00,
353 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84,
354 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c,
355 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x68, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30,
356 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30,
357 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10,
358 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4a, 0x9a, 0x22, 0x4a, 0x98, 0xfc,
359 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0xdf, 0x1e, 0xfe, 0x69, 0x8c, 0x00,
360 0x18, 0x44, 0x30, 0x82, 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff, 0x25,
361 0x80, 0x79, 0x16, 0x22, 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01, 0x11,
362 0x8a, 0x11, 0x44, 0x28, 0x27, 0x91, 0x9a, 0x23, 0x40, 0x8c, 0x10, 0xd8,
363 0x1c, 0x41, 0x30, 0x8c, 0x20, 0x0c, 0x45, 0x69, 0x27, 0x09, 0xf7, 0x1c,
364 0x00, 0x83, 0x60, 0x11, 0xc0, 0x20, 0x39, 0x10, 0x90, 0x02, 0x63, 0x8e,
365 0x00, 0x14, 0x06, 0x11, 0x04, 0x61, 0x10, 0x61, 0x10, 0x46, 0x00, 0x00,
366 0x13, 0xbe, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70,
367 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x83, 0x74, 0x78, 0x87, 0x79,
368 0x88, 0x83, 0x39, 0x70, 0x03, 0x38, 0x70, 0x03, 0x38, 0x68, 0x83, 0x79,
369 0x48, 0x87, 0x76, 0xa8, 0x07, 0x76, 0x08, 0x07, 0x7a, 0x78, 0x07, 0x79,
370 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0, 0xa0, 0x07, 0x76, 0x40, 0x07,
371 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x90, 0x0e,
372 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x80, 0x07,
373 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07,
374 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x90, 0x0e,
375 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
376 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
377 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
378 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x76, 0x40, 0x07,
379 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f,
380 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07,
381 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07,
382 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
383 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x74, 0x80, 0x07,
384 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f,
385 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
386 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07,
387 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x20, 0x07,
388 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07,
389 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79, 0x20, 0x07, 0x7a, 0x20, 0x07,
390 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f,
391 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07,
392 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x50, 0x07, 0x71, 0x20, 0x07,
393 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07,
394 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07,
395 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07,
396 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07,
397 0x72, 0xa0, 0x11, 0xc2, 0x90, 0xca, 0xb6, 0x20, 0xd3, 0x17, 0x39, 0x8c,
398 0xdd, 0x0d, 0x89, 0x00, 0x45, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10,
399 0x00, 0x00, 0x00, 0x80, 0x21, 0x91, 0xb2, 0x41, 0x40, 0x00, 0x08, 0x00,
400 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x30, 0x24, 0x2a, 0x83, 0x4b, 0x02,
401 0x02, 0x60, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x89, 0x0d,
402 0x02, 0x45, 0x17, 0x07, 0x00, 0x00, 0xb2, 0x40, 0x0b, 0x00, 0x00, 0x00,
403 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47,
404 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30,
405 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x64, 0x47, 0x00, 0x0a, 0xa2, 0x40,
406 0x0a, 0x85, 0xea, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00,
407 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66,
408 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07,
409 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10,
410 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce,
411 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b,
412 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c,
413 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07,
414 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11,
415 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0,
416 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8,
417 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b,
418 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b,
419 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87,
420 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07,
421 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87,
422 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81,
423 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30,
424 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4,
425 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca,
426 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39,
427 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b,
428 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b,
429 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83,
430 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87,
431 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90,
432 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20,
433 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc,
434 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66,
435 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24,
436 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07,
437 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e,
438 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e,
439 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54,
440 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39,
441 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c,
442 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07,
443 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0,
444 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4,
445 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b,
446 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39,
447 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c,
448 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87,
449 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0,
450 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50,
451 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0,
452 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec,
453 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6,
454 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66,
455 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39,
456 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07,
457 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10,
458 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90,
459 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07,
460 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07,
461 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07,
462 0x00, 0x00, 0x00, 0x00, 0x79, 0x20, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
463 0x32, 0x9a, 0x08, 0x14, 0x02, 0x85, 0x8c, 0x27, 0x46, 0x46, 0xc8, 0x11,
464 0x32, 0x64, 0xd4, 0xd4, 0x80, 0x0c, 0xee, 0x09, 0x8b, 0xf2, 0x06, 0xc5,
465 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2,
466 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc,
467 0xa2, 0x60, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20,
468 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72,
469 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d,
470 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
471 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d,
472 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33,
473 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72,
474 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e,
475 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65,
476 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
477 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e,
478 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
479 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66,
480 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e,
481 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64,
482 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61, 0x69, 0x72,
483 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61,
484 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e,
485 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70,
486 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28,
487 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69,
488 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e,
489 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x66,
490 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67,
491 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e,
492 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e,
493 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69,
494 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66,
495 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65,
496 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f,
497 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78,
498 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e,
499 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
500 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f,
501 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
502 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65,
503 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f,
504 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
505 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61,
506 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
507 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f,
508 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f,
509 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69,
510 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72,
511 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74, 0x75,
512 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20,
513 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63,
514 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e,
515 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c,
516 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70,
517 0x6c, 0x65, 0x72, 0x00, 0xc4, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
518 0x30, 0x82, 0x30, 0x0c, 0x23, 0x08, 0x15, 0x34, 0x82, 0x30, 0x10, 0x23,
519 0x08, 0x43, 0x31, 0x82, 0x30, 0x18, 0x23, 0x08, 0x0b, 0x30, 0x82, 0x30,
520 0x1c, 0x23, 0x08, 0x03, 0x32, 0x82, 0x30, 0x24, 0x23, 0x08, 0x83, 0x32,
521 0x82, 0x30, 0x2c, 0x33, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x0c, 0x43, 0x1b,
522 0x08, 0x6e, 0x30, 0x43, 0x30, 0xcc, 0x30, 0xac, 0xc1, 0x1a, 0xbc, 0xc1,
523 0x0c, 0x04, 0xb1, 0x06, 0x6f, 0xf0, 0x06, 0x33, 0x04, 0xc5, 0x0c, 0x81,
524 0x31, 0x43, 0x70, 0xcc, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0x32, 0x43,
525 0xe0, 0x07, 0x33, 0x24, 0x6f, 0xb0, 0x30, 0x8d, 0x93, 0x3c, 0x50, 0x34,
526 0x03, 0xd2, 0x06, 0x52, 0x33, 0x25, 0x0a, 0x44, 0xcd, 0x40, 0xbd, 0x81,
527 0x1c, 0xbc, 0xc1, 0xa3, 0xc9, 0x81, 0x1c, 0xbc, 0xc1, 0xb3, 0xcd, 0x81,
528 0x1b, 0xbc, 0x01, 0xd7, 0xd1, 0x81, 0x1b, 0xbc, 0x81, 0xf7, 0xcd, 0x20,
529 0xad, 0x41, 0x65, 0xc5, 0xc1, 0xf5, 0x06, 0x6d, 0x80, 0x65, 0xa2, 0x00,
530 0x06, 0x71, 0x10, 0x06, 0x72, 0x90, 0x88, 0x01, 0x34, 0x06, 0x33, 0x28,
531 0x75, 0x40, 0x06, 0xd7, 0x1b, 0xb4, 0x41, 0x19, 0x24, 0x66, 0x00, 0x9d,
532 0xc1, 0x0c, 0x89, 0x1b, 0xa0, 0xc1, 0xf5, 0x06, 0x6d, 0x90, 0xa4, 0x01,
533 0xa4, 0x06, 0x33, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0x30,
534 0xc3, 0x00, 0x07, 0x7f, 0x60, 0x0a, 0xd5, 0x01, 0x1c, 0xc7, 0x71, 0x1c,
535 0xc7, 0x71, 0x1c, 0xc7, 0xb9, 0x81, 0x1b, 0x58, 0x74, 0xa0, 0x07, 0x96,
536 0x65, 0xe9, 0x01, 0xc7, 0x0a, 0xa6, 0x00, 0x1b, 0x7e, 0x61, 0x0f, 0xea,
537 0xc0, 0x0a, 0x32, 0x12, 0x98, 0xa0, 0x8b, 0xd8, 0xd8, 0xec, 0xda, 0x5c,
538 0xda, 0xde, 0xc8, 0xea, 0xd8, 0xca, 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6,
539 0x46, 0x11, 0xea, 0xc0, 0x0e, 0x4e, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49,
540 0x23, 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0xb8, 0x83, 0x5b, 0xc2, 0xd2, 0xe4,
541 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0x46, 0x09, 0xf0, 0xe0,
542 0xa8, 0xb0, 0x34, 0x39, 0x17, 0xb6, 0x30, 0xb7, 0xb3, 0xba, 0xb0, 0xb3,
543 0xb2, 0x2f, 0xbb, 0x32, 0xb9, 0xb9, 0xb4, 0x37, 0xb7, 0x51, 0x82, 0x3c,
544 0xb8, 0x29, 0x2c, 0x4d, 0xce, 0x65, 0xec, 0xad, 0x0d, 0x2e, 0x8d, 0xad,
545 0xec, 0xeb, 0x0d, 0x8e, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x94, 0x41, 0x0f,
546 0xf6, 0x80, 0x0f, 0x8e, 0x09, 0x4b, 0x93, 0x73, 0x31, 0x93, 0x0b, 0x3b,
547 0x6b, 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0x30, 0x05, 0x00, 0x00, 0x00, 0x00,
548 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28,
549 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3,
550 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d,
551 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d,
552 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1,
553 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4,
554 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78,
555 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3,
556 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c,
557 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c,
558 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c,
559 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4,
560 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00,
561 0xd1, 0x10, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0xcc, 0x3c, 0xa4,
562 0x83, 0x3b, 0x9c, 0x03, 0x3b, 0x94, 0x03, 0x3d, 0xa0, 0x83, 0x3c, 0x94,
563 0x43, 0x38, 0x90, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00,
564 0x65, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00,
565 0x03, 0x00, 0x00, 0x00, 0xe4, 0x6a, 0x80, 0xde, 0x08, 0x00, 0x81, 0x11,
566 0x00, 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00,
567 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0x48, 0x4f, 0x00, 0x00, 0x00, 0x00,
568 0xcf, 0xc3, 0x59, 0x18, 0x26, 0x0d, 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69,
569 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53,
570 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42,
571 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
572 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46,
573 0x72, 0x6f, 0x6d, 0x32, 0x44, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
574 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72,
575 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
576 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70,
577 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
578 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74,
579 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f,
580 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e,
581 0x74, 0x00, 0x00, 0x00, 0x13, 0x04, 0x8b, 0x99, 0x20, 0x58, 0xcd, 0x04,
582 0xc1, 0x72, 0x26, 0x08, 0xd6, 0xb3, 0x42, 0xa0, 0x05, 0x55, 0x58, 0x31,
583 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15, 0x56,
584 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03, 0x2a,
585 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60, 0x61, 0x43, 0x50,
586 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02, 0x2c,
587 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02, 0x2c,
588 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18, 0x7e,
589 0xa1, 0x17, 0x64, 0x01, 0x9b, 0x0c, 0x46, 0x33, 0x51, 0x20, 0xc8, 0x26,
590 0x03, 0xf2, 0x5c, 0x14, 0x08, 0x62, 0x01, 0x23, 0xfe, 0x16, 0x10, 0xe0,
591 0xbf, 0xc9, 0xc0, 0x4c, 0x1c, 0x05, 0x83, 0x8c, 0x18, 0x18, 0x44, 0x08,
592 0x82, 0x85, 0x7f, 0x48, 0x5f, 0x30, 0x62, 0xd0, 0x14, 0x21, 0x08, 0x06,
593 0x50, 0x18, 0x38, 0x0d, 0xc1, 0x2c, 0x4c, 0xa0, 0x70, 0xa3, 0x09, 0x01,
594 0x90, 0x41, 0x40, 0x0c, 0x09, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8,
595 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba,
596 0x80, 0xec, 0xc2, 0x96, 0xe3, 0x08, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17,
597 0xb6, 0x14, 0xc9, 0xb1, 0x0b, 0x88, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,
598 0x71, 0x20, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x32, 0x0e, 0x10, 0x22,
599 0x84, 0x00, 0xa4, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
600 0x65, 0x0c, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x60,
601 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
602 0x08, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
603 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00,
604 0x03, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
605 0x44, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
606 0x0a, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
607 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
608 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
609 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
610 0xff, 0xff, 0xff, 0xff, 0x00, 0x24, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
611 0x1b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00,
612 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
613 0x17, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
614 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
615 0x5d, 0x0c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0xe3,
616 0x00, 0x00, 0x00, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d,
617 0x32, 0x44, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65,
618 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x32, 0x64, 0x2e,
619 0x76, 0x34, 0x66, 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6e,
620 0x76, 0x65, 0x72, 0x74, 0x2e, 0x66, 0x2e, 0x66, 0x33, 0x32, 0x2e, 0x75,
621 0x2e, 0x69, 0x33, 0x32, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38,
622 0x61, 0x69, 0x72, 0x36, 0x34, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2d,
623 0x69, 0x6f, 0x73, 0x31, 0x33, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x73, 0x69,
624 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
625 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
626};
627const unsigned int BlitFrom2D_metallib_len = 4224;
628const unsigned char BlitFrom2DArray_metallib[] = {
629 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
630 0x00, 0x00, 0x00, 0x00, 0x15, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
631 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
632 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
633 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xed, 0x00, 0x00, 0x00,
634 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
635 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00,
636 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
637 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
638 0x6f, 0x6d, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00, 0x54, 0x59,
639 0x50, 0x45, 0x01, 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x9a,
640 0xa9, 0x54, 0x22, 0x4e, 0xcb, 0x7c, 0x2b, 0x35, 0x27, 0xe8, 0xc2, 0x41,
641 0x05, 0x0c, 0xbb, 0x71, 0xf1, 0x1b, 0xe3, 0x27, 0x91, 0x5e, 0x86, 0xcb,
642 0x10, 0x05, 0x96, 0x34, 0xaf, 0xaa, 0xbd, 0x4d, 0x44, 0x53, 0x5a, 0x08,
643 0x00, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46,
644 0x54, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
645 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
646 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x02,
647 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x45, 0x4e, 0x44,
648 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00,
649 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00,
650 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff, 0xff, 0xff,
651 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00,
652 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00,
653 0x00, 0x21, 0x0c, 0x00, 0x00, 0x9e, 0x03, 0x00, 0x00, 0x0b, 0x02, 0x21,
654 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23,
655 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84,
656 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45,
657 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18,
658 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88,
659 0xa5, 0x00, 0x19, 0x32, 0x42, 0x04, 0x49, 0x0e, 0x90, 0x91, 0x22, 0xc4,
660 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46,
661 0x06, 0x51, 0x18, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24,
662 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22,
663 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1,
664 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21,
665 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80,
666 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70,
667 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79,
668 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40,
669 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21,
670 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1,
671 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00,
672 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0,
673 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72,
674 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76,
675 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72,
676 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77,
677 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80,
678 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20,
679 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0,
680 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72,
681 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79,
682 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74,
683 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1,
684 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40,
685 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1,
686 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a,
687 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70,
688 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70,
689 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62,
690 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1,
691 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40,
692 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21,
693 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79,
694 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76,
695 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01,
696 0xd8, 0xe0, 0x09, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e,
697 0xe9, 0x20, 0x0f, 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e,
698 0xf2, 0xd0, 0x06, 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e,
699 0xe1, 0x30, 0x0f, 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28,
700 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48,
701 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00,
702 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09,
703 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50,
704 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35,
705 0x00, 0x24, 0xa0, 0x02, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00,
706 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e,
707 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00,
708 0x00, 0x2a, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85,
709 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90,
710 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x74, 0x33,
711 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70,
712 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12,
713 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4d,
714 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0xdf,
715 0x1e, 0x7e, 0x20, 0x8a, 0x00, 0xec, 0x9f, 0xc6, 0x08, 0x80, 0x41, 0x04,
716 0x23, 0xb8, 0x48, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x5f, 0x02, 0x98, 0x67,
717 0x21, 0xa2, 0x7f, 0x1a, 0x23, 0x00, 0x06, 0x11, 0x10, 0xa1, 0x18, 0x41,
718 0x84, 0x72, 0x12, 0xa9, 0x39, 0x02, 0xc4, 0x08, 0x81, 0xcd, 0x11, 0x04,
719 0xc3, 0x08, 0xc2, 0x50, 0x96, 0x76, 0x92, 0x18, 0xee, 0x39, 0x00, 0x06,
720 0xc1, 0x22, 0x80, 0x41, 0xb2, 0x08, 0x03, 0x10, 0x1d, 0x08, 0x48, 0x81,
721 0x31, 0x47, 0x00, 0x0a, 0x83, 0x08, 0x82, 0x30, 0x88, 0x00, 0x08, 0x83,
722 0x08, 0x83, 0x30, 0x02, 0x00, 0x13, 0xbe, 0x70, 0x48, 0x07, 0x79, 0xb0,
723 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68,
724 0x83, 0x74, 0x78, 0x87, 0x79, 0x88, 0x83, 0x39, 0x70, 0x03, 0x38, 0x70,
725 0x03, 0x38, 0x68, 0x83, 0x79, 0x48, 0x87, 0x76, 0xa8, 0x07, 0x76, 0x08,
726 0x07, 0x7a, 0x78, 0x07, 0x79, 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0,
727 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76,
728 0x40, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78,
729 0xd0, 0x06, 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d,
730 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71,
731 0x60, 0x07, 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72,
732 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a,
733 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73,
734 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
735 0x60, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76,
736 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76,
737 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a,
738 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73,
739 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
740 0x60, 0x0f, 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76,
741 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74,
742 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a,
743 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d,
744 0x60, 0x0f, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78,
745 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79,
746 0x20, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75,
747 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72,
748 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6,
749 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a,
750 0x50, 0x07, 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72,
751 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71,
752 0x00, 0x07, 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71,
753 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x11, 0xc2, 0x90, 0xcf, 0xb6,
754 0x20, 0xd3, 0x17, 0x39, 0x8c, 0xdd, 0x69, 0x51, 0x04, 0x60, 0x43, 0x22,
755 0xe0, 0x51, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
756 0x60, 0x48, 0xf4, 0x84, 0x01, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x20,
757 0x00, 0x00, 0x00, 0x00, 0x43, 0x22, 0x38, 0xb8, 0x24, 0x20, 0x00, 0x06,
758 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x12, 0x9d, 0xc2, 0x45,
759 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0xc4,
760 0x06, 0x81, 0xa2, 0xa0, 0x03, 0x00, 0x00, 0x59, 0x20, 0x0b, 0x00, 0x00,
761 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26,
762 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50,
763 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x84, 0x47, 0x00, 0x0a, 0xa2,
764 0x40, 0x0a, 0x85, 0xee, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18, 0x00,
765 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c,
766 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80,
767 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed,
768 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d,
769 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83,
770 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78,
771 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70,
772 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc,
773 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3,
774 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c,
775 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83,
776 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03,
777 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68,
778 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60,
779 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80,
780 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98,
781 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec,
782 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c,
783 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d,
784 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43,
785 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03,
786 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03,
787 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70,
788 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0,
789 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4,
790 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33,
791 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c,
792 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e,
793 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50,
794 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78,
795 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33,
796 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d,
797 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06,
798 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43,
799 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3,
800 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08,
801 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec,
802 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e,
803 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19,
804 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43,
805 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03,
806 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08,
807 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed,
808 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6,
809 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3,
810 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2,
811 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d,
812 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f,
813 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83,
814 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08,
815 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5,
816 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3,
817 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90,
818 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78,
819 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98,
820 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00,
821 0x00, 0x32, 0x9a, 0x08, 0x14, 0x02, 0x85, 0x8c, 0x27, 0x46, 0x46, 0xc8,
822 0x11, 0x32, 0x64, 0xd4, 0xd4, 0x80, 0x0c, 0xfa, 0x09, 0x8b, 0xf2, 0x06,
823 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30,
824 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31,
825 0xcc, 0xa2, 0x78, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b,
826 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61,
827 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20,
828 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
829 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28,
830 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32,
831 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69,
832 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65,
833 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c,
834 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
835 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65,
836 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d,
837 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75,
838 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65,
839 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e,
840 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61, 0x69,
841 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e,
842 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69, 0x72,
843 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e,
844 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
845 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61,
846 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69, 0x72,
847 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
848 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
849 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72,
850 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72,
851 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74,
852 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75,
853 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66,
854 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c,
855 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65,
856 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69, 0x72,
857 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65,
858 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54,
859 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f,
860 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76,
861 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72,
862 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61,
863 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
864 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65,
865 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53,
866 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73,
867 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61,
868 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69,
869 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74,
870 0x75, 0x72, 0x65, 0x32, 0x64, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3c,
871 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c,
872 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74,
873 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c,
874 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75,
875 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00,
876 0x00, 0xc4, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x82, 0x30,
877 0x10, 0x23, 0x08, 0x57, 0x34, 0x82, 0x30, 0x14, 0x23, 0x08, 0x83, 0x31,
878 0x82, 0x30, 0x1c, 0x23, 0x08, 0x0b, 0x30, 0x82, 0x30, 0x20, 0x23, 0x08,
879 0x43, 0x32, 0x82, 0x30, 0x28, 0x23, 0x08, 0xc3, 0x32, 0x82, 0x30, 0x30,
880 0x33, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x0c, 0x43, 0x1b, 0x08, 0x6e, 0x30,
881 0x43, 0x30, 0xcc, 0x30, 0xac, 0xc1, 0x1a, 0xbc, 0xc1, 0x0c, 0x04, 0xb1,
882 0x06, 0x6f, 0xf0, 0x06, 0x33, 0x04, 0xc5, 0x0c, 0x81, 0x31, 0x43, 0x70,
883 0xcc, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0x32, 0x43, 0xe0, 0x07, 0x33,
884 0x24, 0x6f, 0xb0, 0x30, 0x8d, 0x93, 0x3c, 0x50, 0x34, 0x03, 0xd2, 0x06,
885 0x52, 0x33, 0x25, 0x0a, 0x44, 0xcd, 0x40, 0xbd, 0x81, 0x1c, 0xbc, 0xc1,
886 0xa3, 0xc9, 0x81, 0x1c, 0xbc, 0xc1, 0xb3, 0xcd, 0x81, 0x1b, 0xbc, 0x01,
887 0xd7, 0xd1, 0x81, 0x1b, 0xbc, 0x81, 0xf7, 0xcd, 0x20, 0xad, 0x41, 0x65,
888 0xc5, 0xc1, 0xf5, 0x06, 0x6d, 0x80, 0x65, 0xa2, 0x00, 0x06, 0x71, 0x10,
889 0x06, 0x72, 0x90, 0x88, 0x01, 0x34, 0x06, 0x33, 0x28, 0x75, 0x40, 0x06,
890 0xd7, 0x1b, 0xb4, 0x41, 0x19, 0x24, 0x66, 0x00, 0x9d, 0xc1, 0x0c, 0x89,
891 0x1b, 0xa0, 0xc1, 0xf5, 0x06, 0x6d, 0x90, 0xa4, 0x01, 0xa4, 0x06, 0x33,
892 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0x30, 0xc3, 0x00, 0x07,
893 0x7f, 0x60, 0x0a, 0xd5, 0x01, 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c,
894 0xc7, 0xb9, 0x81, 0x1b, 0x58, 0x74, 0xa0, 0x07, 0x96, 0x65, 0xe9, 0x01,
895 0xc7, 0x0a, 0xa6, 0x00, 0x1b, 0x7e, 0x61, 0x0f, 0xea, 0xc0, 0x0a, 0x32,
896 0x12, 0x98, 0xa0, 0x8b, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xda, 0xde, 0xc8,
897 0xea, 0xd8, 0xca, 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6, 0x46, 0x11, 0xea,
898 0xc0, 0x0e, 0x4e, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73,
899 0xa3, 0x1b, 0x25, 0xb8, 0x83, 0x5b, 0xc2, 0xd2, 0xe4, 0x5c, 0xec, 0xca,
900 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0x46, 0x09, 0xf0, 0xe0, 0xa8, 0xb0, 0x34,
901 0x39, 0x17, 0xb6, 0x30, 0xb7, 0xb3, 0xba, 0xb0, 0xb3, 0xb2, 0x2f, 0xbb,
902 0x32, 0xb9, 0xb9, 0xb4, 0x37, 0xb7, 0x51, 0x82, 0x3c, 0xb8, 0x29, 0x2c,
903 0x4d, 0xce, 0x65, 0xec, 0xad, 0x0d, 0x2e, 0x8d, 0xad, 0xec, 0xeb, 0x0d,
904 0x8e, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x94, 0x41, 0x0f, 0xf6, 0x80, 0x0f,
905 0x8e, 0x09, 0x4b, 0x93, 0x73, 0x31, 0x93, 0x0b, 0x3b, 0x6b, 0x2b, 0x73,
906 0xa3, 0x1b, 0x25, 0x30, 0x05, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x18, 0x00,
907 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80,
908 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43,
909 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e,
910 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d,
911 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4,
912 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81,
913 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08,
914 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01,
915 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c,
916 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c,
917 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c,
918 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1,
919 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x10, 0x00,
920 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0xcc, 0x3c, 0xa4, 0x83, 0x3b, 0x9c,
921 0x03, 0x3b, 0x94, 0x03, 0x3d, 0xa0, 0x83, 0x3c, 0x94, 0x43, 0x38, 0x90,
922 0xc3, 0x01, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x70, 0x00, 0x00,
923 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
924 0x00, 0xe4, 0x6a, 0x80, 0xde, 0x08, 0x00, 0x81, 0x11, 0x00, 0x00, 0x00,
925 0x00, 0xf1, 0x30, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8,
926 0x90, 0x51, 0x22, 0x88, 0x58, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x13, 0x06,
927 0x16, 0x86, 0x49, 0x03, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74,
928 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70,
929 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x61,
930 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f,
931 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d,
932 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x29, 0x61, 0x69, 0x72, 0x2d,
933 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
934 0x61, 0x72, 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
935 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61,
936 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
937 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65,
938 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32,
939 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
940 0x69, 0x6e, 0x74, 0x00, 0x00, 0x13, 0x04, 0xac, 0x99, 0x20, 0x60, 0xce,
941 0x04, 0x01, 0x7b, 0x26, 0x08, 0x18, 0xb4, 0x42, 0xa0, 0x05, 0x55, 0x58,
942 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15,
943 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03,
944 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60, 0x61, 0x43,
945 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02,
946 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02,
947 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18,
948 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0, 0x0b, 0xbd, 0x20, 0x0b, 0x00,
949 0x00, 0x9b, 0x0c, 0x46, 0x33, 0x51, 0x20, 0xc8, 0x26, 0x03, 0xf2, 0x5c,
950 0x14, 0x08, 0x62, 0x01, 0x23, 0xfe, 0x16, 0x10, 0xe0, 0xbf, 0xc9, 0xc0,
951 0x4c, 0x14, 0x05, 0x60, 0x8c, 0x18, 0x14, 0x44, 0x08, 0x82, 0x01, 0xf5,
952 0x05, 0x9b, 0x0c, 0x8f, 0xf5, 0x51, 0x30, 0xc8, 0x88, 0x81, 0x41, 0x84,
953 0x20, 0x58, 0xf8, 0x87, 0x34, 0x06, 0xc1, 0x88, 0x81, 0x53, 0x84, 0x20,
954 0x18, 0x40, 0x65, 0x10, 0x41, 0x07, 0xf1, 0x38, 0x4f, 0xd0, 0x7c, 0xa3,
955 0x09, 0x01, 0x90, 0x41, 0x40, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
956 0x00, 0x5b, 0x8e, 0x20, 0xc8, 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72,
957 0x0c, 0x41, 0x2e, 0x1c, 0xba, 0x80, 0xec, 0xc2, 0x96, 0xe3, 0x08, 0x7e,
958 0xe1, 0xd0, 0x05, 0x64, 0x17, 0xb6, 0x1c, 0x4a, 0x00, 0x0e, 0x87, 0x2e,
959 0x20, 0xbb, 0xb0, 0xa5, 0x60, 0x8e, 0x5d, 0x40, 0x74, 0x01, 0x00, 0x00,
960 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x03, 0x00, 0x00,
961 0x00, 0x32, 0x0e, 0x10, 0x22, 0x84, 0x00, 0xae, 0x06, 0x00, 0x00, 0x00,
962 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00, 0x31, 0x00, 0x00,
963 0x00, 0x12, 0x03, 0x94, 0x78, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
964 0x00, 0x5e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00,
965 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
966 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00,
967 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00,
968 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00,
969 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
970 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
971 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
972 0x00, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x24, 0x00,
973 0x00, 0x0f, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
974 0x00, 0x21, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00,
975 0x00, 0x30, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
976 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00,
977 0x00, 0x47, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00,
978 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00,
979 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x0c, 0x00, 0x00, 0x25, 0x00, 0x00,
980 0x00, 0x12, 0x03, 0x94, 0x25, 0x01, 0x00, 0x00, 0x00, 0x42, 0x6c, 0x69,
981 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79,
982 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x74,
983 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x32, 0x64, 0x5f, 0x61, 0x72,
984 0x72, 0x61, 0x79, 0x2e, 0x76, 0x34, 0x66, 0x33, 0x32, 0x61, 0x69, 0x72,
985 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e, 0x66, 0x2e, 0x66,
986 0x33, 0x32, 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e,
987 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e, 0x75, 0x2e, 0x69, 0x33,
988 0x32, 0x2e, 0x66, 0x2e, 0x66, 0x33, 0x32, 0x33, 0x32, 0x30, 0x32, 0x33,
989 0x2e, 0x39, 0x38, 0x61, 0x69, 0x72, 0x36, 0x34, 0x2d, 0x61, 0x70, 0x70,
990 0x6c, 0x65, 0x2d, 0x69, 0x6f, 0x73, 0x31, 0x33, 0x2e, 0x30, 0x2e, 0x30,
991 0x2d, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x00, 0x00,
992 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
993 0x00, 0x00, 0x00, 0x00, 0x00
994};
995const unsigned int BlitFrom2DArray_metallib_len = 4373;
996const unsigned char BlitFrom3D_metallib[] = {
997 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
998 0x00, 0x00, 0x00, 0x00, 0xb0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
999 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
1000 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1001 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00,
1002 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1003 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00,
1004 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
1005 0x4e, 0x41, 0x4d, 0x45, 0x0b, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
1006 0x6f, 0x6d, 0x33, 0x44, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01,
1007 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x52, 0x08, 0x36, 0x5c, 0x9d, 0xb1,
1008 0x35, 0xed, 0xb1, 0xdb, 0x40, 0xe8, 0xb5, 0x47, 0xc9, 0x03, 0x6c, 0x9a,
1009 0xb8, 0x7f, 0x79, 0x93, 0xf6, 0xed, 0xd9, 0x4f, 0xca, 0x50, 0x96, 0x12,
1010 0x3c, 0xe6, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0xc0, 0x0f, 0x00, 0x00,
1011 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00,
1012 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1013 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45,
1014 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
1015 0x45, 0x4e, 0x44, 0x54, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00,
1016 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
1017 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
1018 0xac, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde,
1019 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24,
1020 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00,
1021 0x98, 0x03, 0x00, 0x00, 0x0b, 0x02, 0x21, 0x00, 0x02, 0x00, 0x00, 0x00,
1022 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49,
1023 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19,
1024 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42,
1025 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88,
1026 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42,
1027 0x04, 0x49, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c,
1028 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00,
1029 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff,
1030 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4,
1031 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda,
1032 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00,
1033 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87,
1034 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87,
1035 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07,
1036 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc,
1037 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2,
1038 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4,
1039 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc,
1040 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda,
1041 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
1042 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87,
1043 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07,
1044 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03,
1045 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca,
1046 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6,
1047 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0,
1048 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
1049 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87,
1050 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea,
1051 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce,
1052 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde,
1053 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8,
1054 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87,
1055 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07,
1056 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8,
1057 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6,
1058 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6,
1059 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc,
1060 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00,
1061 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87,
1062 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07,
1063 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0,
1064 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20,
1065 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0,
1066 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06,
1067 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff,
1068 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02,
1069 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e,
1070 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff,
1071 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff,
1072 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00,
1073 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18,
1074 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48,
1075 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00,
1076 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84,
1077 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c,
1078 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30,
1079 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30,
1080 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10,
1081 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4a, 0x9a, 0x22, 0x4a, 0x98, 0xfc,
1082 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0xff, 0x1e, 0xfe, 0x69, 0x8c, 0x00,
1083 0x18, 0x44, 0x30, 0x82, 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff, 0x25,
1084 0x80, 0x79, 0x16, 0x22, 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01, 0x11,
1085 0x8a, 0x11, 0x44, 0x28, 0x27, 0x91, 0x9a, 0x23, 0x40, 0x8c, 0x10, 0xd8,
1086 0x30, 0xc2, 0x00, 0xcc, 0x11, 0x04, 0xc3, 0x08, 0xc3, 0x50, 0x94, 0x76,
1087 0x92, 0x7b, 0xf0, 0x01, 0x30, 0x28, 0x16, 0x01, 0x0c, 0x9a, 0x03, 0x01,
1088 0x29, 0x30, 0xe6, 0x08, 0x40, 0x61, 0x10, 0x41, 0x10, 0x06, 0x11, 0x00,
1089 0x61, 0x10, 0x61, 0x10, 0x46, 0x00, 0x00, 0x00, 0x13, 0xbe, 0x70, 0x48,
1090 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60,
1091 0x87, 0x72, 0x68, 0x83, 0x74, 0x78, 0x87, 0x79, 0x88, 0x83, 0x39, 0x70,
1092 0x03, 0x38, 0x70, 0x03, 0x38, 0x68, 0x83, 0x79, 0x48, 0x87, 0x76, 0xa8,
1093 0x07, 0x76, 0x08, 0x07, 0x7a, 0x78, 0x07, 0x79, 0xd8, 0x70, 0x1b, 0xe5,
1094 0xd0, 0x06, 0xf0, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74,
1095 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78,
1096 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a,
1097 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76,
1098 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a,
1099 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76,
1100 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d,
1101 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
1102 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74,
1103 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a,
1104 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72,
1105 0x40, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
1106 0x60, 0x0f, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
1107 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74,
1108 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a,
1109 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79,
1110 0x60, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72,
1111 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71,
1112 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6,
1113 0x10, 0x07, 0x79, 0x20, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a,
1114 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76,
1115 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76,
1116 0xd0, 0x06, 0xf6, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71,
1117 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71,
1118 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74,
1119 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78,
1120 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x11, 0xc2,
1121 0x90, 0xca, 0xb6, 0x20, 0xd3, 0x17, 0x39, 0xcc, 0xdd, 0x0d, 0x89, 0x00,
1122 0x45, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80,
1123 0x21, 0x91, 0xb2, 0x45, 0x40, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
1124 0x00, 0x00, 0x30, 0x24, 0x2a, 0x83, 0x6b, 0x02, 0x02, 0x60, 0x00, 0x00,
1125 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x89, 0x0d, 0x02, 0x45, 0x35, 0x07,
1126 0x00, 0x00, 0xb2, 0x40, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14,
1127 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a,
1128 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85,
1129 0x52, 0x06, 0x74, 0x47, 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xec, 0x58,
1130 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00,
1131 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88,
1132 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
1133 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e,
1134 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30,
1135 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8,
1136 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
1137 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76,
1138 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e,
1139 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e,
1140 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
1141 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4,
1142 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
1143 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37,
1144 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
1145 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71,
1146 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e,
1147 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1,
1148 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
1149 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90,
1150 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
1151 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc,
1152 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7,
1153 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78,
1154 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f,
1155 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f,
1156 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1,
1157 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0,
1158 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0,
1159 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b,
1160 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c,
1161 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61,
1162 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1,
1163 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc,
1164 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4,
1165 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79,
1166 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72,
1167 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e,
1168 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1,
1169 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4,
1170 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8,
1171 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71,
1172 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19,
1173 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f,
1174 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e,
1175 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e,
1176 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81,
1177 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21,
1178 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc,
1179 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70,
1180 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77,
1181 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e,
1182 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e,
1183 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a,
1184 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73,
1185 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00,
1186 0x79, 0x20, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x32, 0x9a, 0x08, 0x14,
1187 0x02, 0x85, 0x8c, 0x27, 0x46, 0x46, 0xc8, 0x11, 0x32, 0x64, 0xd4, 0xd4,
1188 0x80, 0x0c, 0xee, 0x09, 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14,
1189 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42,
1190 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x60, 0xcd, 0x72,
1191 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73,
1192 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a,
1193 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c,
1194 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30,
1195 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c,
1196 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29,
1197 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d,
1198 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73,
1199 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
1200 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74,
1201 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
1202 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
1203 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f,
1204 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
1205 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74,
1206 0x61, 0x72, 0x67, 0x65, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67,
1207 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c,
1208 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67,
1209 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65,
1210 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78,
1211 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65,
1212 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73,
1213 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74,
1214 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d,
1215 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69,
1216 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70,
1217 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f,
1218 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61,
1219 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69,
1220 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
1221 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e,
1222 0x72, 0x65, 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75,
1223 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
1224 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44,
1225 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e,
1226 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f,
1227 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70,
1228 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79,
1229 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61,
1230 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67,
1231 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
1232 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
1233 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65,
1234 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d,
1235 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x33, 0x64,
1236 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70,
1237 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78,
1238 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70,
1239 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f,
1240 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00,
1241 0xc4, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x82, 0x30, 0x0c,
1242 0x23, 0x08, 0x16, 0x34, 0x82, 0x30, 0x10, 0x23, 0x08, 0x43, 0x31, 0x82,
1243 0x30, 0x18, 0x23, 0x08, 0x0b, 0x30, 0x82, 0x30, 0x1c, 0x23, 0x08, 0x03,
1244 0x32, 0x82, 0x30, 0x24, 0x23, 0x08, 0x83, 0x32, 0x82, 0x30, 0x2c, 0x33,
1245 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x0c, 0x43, 0x1b, 0x08, 0x6e, 0x30, 0x43,
1246 0x30, 0xcc, 0x30, 0xac, 0xc1, 0x1a, 0xbc, 0xc1, 0x0c, 0x04, 0xb1, 0x06,
1247 0x6f, 0xf0, 0x06, 0x33, 0x04, 0xc5, 0x0c, 0x81, 0x31, 0x43, 0x70, 0xcc,
1248 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0x32, 0x43, 0xe0, 0x07, 0x33, 0x24,
1249 0x6f, 0xb0, 0x30, 0x8d, 0x93, 0x3c, 0x50, 0x34, 0x03, 0xd2, 0x06, 0x52,
1250 0x33, 0x25, 0x0a, 0x44, 0xcd, 0x40, 0xbd, 0x81, 0x1c, 0xbc, 0xc1, 0xa3,
1251 0xc9, 0x81, 0x1c, 0xbc, 0xc1, 0xb3, 0xcd, 0x81, 0x1b, 0xbc, 0x01, 0xd7,
1252 0xd1, 0x81, 0x1b, 0xbc, 0x81, 0xf7, 0xcd, 0x20, 0xad, 0x41, 0x65, 0xc5,
1253 0xc1, 0xf5, 0x06, 0x6d, 0x80, 0x65, 0xa2, 0x00, 0x06, 0x71, 0x10, 0x06,
1254 0x72, 0x90, 0x88, 0x01, 0x34, 0x06, 0x33, 0x28, 0x75, 0x40, 0x06, 0xd7,
1255 0x1b, 0xb4, 0x41, 0x19, 0x24, 0x66, 0x00, 0x9d, 0xc1, 0x0c, 0x89, 0x1b,
1256 0xa0, 0xc1, 0xf5, 0x06, 0x6d, 0x90, 0xa4, 0x01, 0xa4, 0x06, 0x33, 0x14,
1257 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0x30, 0xc3, 0x00, 0x07, 0x7f,
1258 0x60, 0x0a, 0xd5, 0x01, 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c, 0xc7,
1259 0xb9, 0x81, 0x1b, 0x58, 0x74, 0xa0, 0x07, 0x96, 0x65, 0xe9, 0x01, 0xc7,
1260 0x0a, 0xa6, 0x00, 0x1b, 0x7e, 0x61, 0x0f, 0xea, 0xc0, 0x0a, 0x32, 0x12,
1261 0x98, 0xa0, 0x8b, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xda, 0xde, 0xc8, 0xea,
1262 0xd8, 0xca, 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6, 0x46, 0x11, 0xea, 0xc0,
1263 0x0e, 0x4e, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3,
1264 0x1b, 0x25, 0xb8, 0x83, 0x5b, 0xc2, 0xd2, 0xe4, 0x5c, 0xec, 0xca, 0xe4,
1265 0xe6, 0xd2, 0xde, 0xdc, 0x46, 0x09, 0xf0, 0xe0, 0xa8, 0xb0, 0x34, 0x39,
1266 0x17, 0xb6, 0x30, 0xb7, 0xb3, 0xba, 0xb0, 0xb3, 0xb2, 0x2f, 0xbb, 0x32,
1267 0xb9, 0xb9, 0xb4, 0x37, 0xb7, 0x51, 0x82, 0x3c, 0xb8, 0x29, 0x2c, 0x4d,
1268 0xce, 0x65, 0xec, 0xad, 0x0d, 0x2e, 0x8d, 0xad, 0xec, 0xeb, 0x0d, 0x8e,
1269 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x94, 0x41, 0x0f, 0xf6, 0x80, 0x0f, 0x8e,
1270 0x09, 0x4b, 0x93, 0x73, 0x31, 0x93, 0x0b, 0x3b, 0x6b, 0x2b, 0x73, 0xa3,
1271 0x1b, 0x25, 0x30, 0x05, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00,
1272 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07,
1273 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39,
1274 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2,
1275 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16,
1276 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40,
1277 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07,
1278 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07,
1279 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b,
1280 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc,
1281 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8,
1282 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2,
1283 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50,
1284 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x10, 0x00, 0x00,
1285 0x06, 0x00, 0x00, 0x00, 0x07, 0xcc, 0x3c, 0xa4, 0x83, 0x3b, 0x9c, 0x03,
1286 0x3b, 0x94, 0x03, 0x3d, 0xa0, 0x83, 0x3c, 0x94, 0x43, 0x38, 0x90, 0xc3,
1287 0x01, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00,
1288 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
1289 0x34, 0x66, 0x00, 0xe8, 0xd5, 0x00, 0xc1, 0x39, 0x06, 0x83, 0xb0, 0x46,
1290 0x00, 0xe8, 0x16, 0x01, 0x81, 0x11, 0x00, 0x12, 0x33, 0x00, 0x00, 0x00,
1291 0xf1, 0x30, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90,
1292 0x51, 0x22, 0x48, 0x4f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xc3, 0x59, 0x18,
1293 0x26, 0x0d, 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65,
1294 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c,
1295 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x61, 0x69,
1296 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
1297 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x33,
1298 0x44, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
1299 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29,
1300 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
1301 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73,
1302 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
1303 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73,
1304 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
1305 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x00, 0x00, 0x00,
1306 0x13, 0x84, 0x8b, 0x99, 0x20, 0x5c, 0xcd, 0x04, 0xe1, 0x72, 0x26, 0x08,
1307 0xd7, 0xb3, 0x42, 0xa0, 0x05, 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac,
1308 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b,
1309 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c,
1310 0x18, 0x72, 0x21, 0x17, 0x60, 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b,
1311 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c,
1312 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4,
1313 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61,
1314 0xc3, 0xf0, 0x0b, 0xbd, 0x20, 0x0b, 0x00, 0x00, 0x9b, 0x0c, 0x4a, 0x74,
1315 0x51, 0x20, 0xc8, 0x26, 0x03, 0x33, 0x6d, 0x14, 0x08, 0x62, 0x01, 0x24,
1316 0xfe, 0x16, 0x10, 0xe0, 0x3f, 0xc8, 0x10, 0x1c, 0xcb, 0x26, 0x43, 0x84,
1317 0x65, 0x14, 0x80, 0x31, 0xc7, 0x30, 0x04, 0xcc, 0x26, 0x03, 0xb5, 0x91,
1318 0x01, 0x05, 0x83, 0x8c, 0x18, 0x18, 0x44, 0x08, 0x82, 0x85, 0x7f, 0x4c,
1319 0x67, 0x10, 0x8c, 0x18, 0x34, 0x45, 0x08, 0x82, 0x41, 0x94, 0x06, 0x56,
1320 0x45, 0x4c, 0xd1, 0x14, 0x3c, 0x64, 0x30, 0x9a, 0x10, 0x00, 0x19, 0x04,
1321 0xc4, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8,
1322 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba,
1323 0x80, 0xec, 0xc2, 0x96, 0x03, 0x09, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17,
1324 0xb6, 0x1c, 0x4b, 0x00, 0x0e, 0x87, 0x2e, 0x20, 0xbb, 0xb0, 0xa5, 0x68,
1325 0x8e, 0x5d, 0x40, 0x74, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1326 0x71, 0x20, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x32, 0x0e, 0x10, 0x22,
1327 0x84, 0x00, 0xa6, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1328 0x65, 0x0c, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x60,
1329 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
1330 0x08, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1331 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00,
1332 0x03, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1333 0x44, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1334 0x0a, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1335 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1336 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1337 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
1338 0xff, 0xff, 0xff, 0xff, 0x00, 0x24, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
1339 0x1b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00,
1340 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
1341 0x17, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
1342 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1343 0x5d, 0x0c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0xe3,
1344 0x00, 0x00, 0x00, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d,
1345 0x33, 0x44, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65,
1346 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x33, 0x64, 0x2e,
1347 0x76, 0x34, 0x66, 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6e,
1348 0x76, 0x65, 0x72, 0x74, 0x2e, 0x66, 0x2e, 0x66, 0x33, 0x32, 0x2e, 0x75,
1349 0x2e, 0x69, 0x33, 0x32, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38,
1350 0x61, 0x69, 0x72, 0x36, 0x34, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2d,
1351 0x69, 0x6f, 0x73, 0x31, 0x33, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x73, 0x69,
1352 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00
1353};
1354const unsigned int BlitFrom3D_metallib_len = 4272;
1355const unsigned char BlitFromCube_metallib[] = {
1356 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
1357 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1358 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
1359 0x00, 0x00, 0x00, 0x00, 0xe2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1360 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00,
1361 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1362 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00,
1363 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
1364 0x4e, 0x41, 0x4d, 0x45, 0x0d, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
1365 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01,
1366 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x8b, 0xe8, 0x88, 0x9b,
1367 0xa5, 0x64, 0x32, 0x7d, 0x67, 0xad, 0x19, 0xb7, 0x57, 0x79, 0x7e, 0x03,
1368 0xb1, 0x83, 0x8e, 0x8c, 0xf2, 0xc2, 0xfa, 0x96, 0x39, 0xe3, 0x07, 0x93,
1369 0xbf, 0xb2, 0xa4, 0x14, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x10, 0x11,
1370 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00,
1371 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1372 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1373 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00,
1374 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00,
1375 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e,
1376 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00,
1377 0x00, 0x00, 0xf0, 0x10, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43,
1378 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c,
1379 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c,
1380 0x00, 0x00, 0xdc, 0x03, 0x00, 0x00, 0x0b, 0x02, 0x21, 0x00, 0x02, 0x00,
1381 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8,
1382 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05,
1383 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92,
1384 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32,
1385 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19,
1386 0x32, 0x42, 0x04, 0x49, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51,
1387 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18,
1388 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff,
1389 0xff, 0xff, 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01,
1390 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61,
1391 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01,
1392 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74,
1393 0x70, 0x87, 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36,
1394 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b,
1395 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00,
1396 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81,
1397 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0,
1398 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21,
1399 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21,
1400 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77,
1401 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36,
1402 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36,
1403 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77,
1404 0x68, 0x03, 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1,
1405 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1,
1406 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81,
1407 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77,
1408 0x78, 0x87, 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73,
1409 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41,
1410 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21,
1411 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41,
1412 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21,
1413 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80,
1414 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78,
1415 0x48, 0x07, 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74,
1416 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21,
1417 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1,
1418 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1,
1419 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1,
1420 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73,
1421 0x28, 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a,
1422 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09,
1423 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f,
1424 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06,
1425 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f,
1426 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff,
1427 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1,
1428 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d,
1429 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18,
1430 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4,
1431 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0,
1432 0x02, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86,
1433 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32,
1434 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x2b, 0x00,
1435 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22,
1436 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c,
1437 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x7c, 0x33, 0x00, 0xc3, 0x08,
1438 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45,
1439 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34,
1440 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4b, 0x9a, 0x22, 0x4a,
1441 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0x5f, 0xa0, 0x02, 0xe2,
1442 0x9f, 0xc6, 0x08, 0x80, 0x41, 0x04, 0x23, 0xb8, 0x48, 0x9a, 0x22, 0x4a,
1443 0x98, 0xfc, 0x5f, 0x02, 0x98, 0x67, 0x21, 0xa2, 0x7f, 0x1a, 0x23, 0x00,
1444 0x06, 0x11, 0x10, 0xa1, 0x18, 0x41, 0x84, 0x72, 0x12, 0xa9, 0x39, 0x02,
1445 0xc4, 0x08, 0x81, 0x0d, 0x23, 0x0c, 0xc0, 0x1c, 0x41, 0x50, 0x90, 0x76,
1446 0x92, 0x7b, 0x00, 0x0c, 0x82, 0x45, 0x00, 0x83, 0x64, 0x11, 0x06, 0x20,
1447 0x3a, 0x10, 0x90, 0x02, 0x63, 0x8e, 0x00, 0x14, 0x06, 0x11, 0x04, 0x61,
1448 0x10, 0x01, 0x10, 0xa6, 0x00, 0x46, 0x00, 0x86, 0x11, 0x86, 0x61, 0x10,
1449 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0xbe, 0x70, 0x48, 0x07, 0x79,
1450 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72,
1451 0x68, 0x83, 0x74, 0x78, 0x87, 0x79, 0x88, 0x83, 0x39, 0x70, 0x03, 0x38,
1452 0x70, 0x03, 0x38, 0x68, 0x83, 0x79, 0x48, 0x87, 0x76, 0xa8, 0x07, 0x76,
1453 0x08, 0x07, 0x7a, 0x78, 0x07, 0x79, 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06,
1454 0xf0, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
1455 0x76, 0x40, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07,
1456 0x78, 0xd0, 0x06, 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07,
1457 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07,
1458 0x71, 0x60, 0x07, 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
1459 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07,
1460 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e,
1461 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
1462 0x6d, 0x60, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
1463 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07,
1464 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07,
1465 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f,
1466 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
1467 0x6d, 0x60, 0x0f, 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
1468 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
1469 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07,
1470 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07,
1471 0x6d, 0x60, 0x0f, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07,
1472 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07,
1473 0x79, 0x20, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07,
1474 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07,
1475 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06,
1476 0xf6, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07,
1477 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07,
1478 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07,
1479 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07,
1480 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x11, 0xc2, 0x90, 0xcc,
1481 0xb6, 0x20, 0xd3, 0x17, 0x39, 0x0c, 0x47, 0x05, 0xc4, 0x90, 0x08, 0x60,
1482 0x14, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18,
1483 0x12, 0x31, 0x1d, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
1484 0x00, 0x00, 0x43, 0xa2, 0x34, 0xb8, 0x24, 0x20, 0x00, 0x06, 0x00, 0x00,
1485 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x12, 0x81, 0xc2, 0x45, 0x01, 0x01,
1486 0x30, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x06, 0x81,
1487 0xa2, 0xde, 0x03, 0x00, 0x00, 0x59, 0x20, 0x00, 0x00, 0x00, 0x0b, 0x00,
1488 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09,
1489 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02,
1490 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x84, 0x47, 0x00, 0x0a,
1491 0xa2, 0x40, 0x0a, 0x85, 0xee, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18,
1492 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1,
1493 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42,
1494 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f,
1495 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1,
1496 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84,
1497 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc,
1498 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70,
1499 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19,
1500 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f,
1501 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21,
1502 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc,
1503 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84,
1504 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37,
1505 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70,
1506 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77,
1507 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79,
1508 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e,
1509 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1,
1510 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81,
1511 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98,
1512 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88,
1513 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4,
1514 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72,
1515 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74,
1516 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e,
1517 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e,
1518 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21,
1519 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01,
1520 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc,
1521 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77,
1522 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e,
1523 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1,
1524 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61,
1525 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0,
1526 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0,
1527 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74,
1528 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e,
1529 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41,
1530 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48,
1531 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c,
1532 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4,
1533 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71,
1534 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f,
1535 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f,
1536 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f,
1537 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23,
1538 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21,
1539 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21,
1540 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94,
1541 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a,
1542 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e,
1543 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e,
1544 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74,
1545 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74,
1546 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78,
1547 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x20, 0x00, 0x00, 0x00, 0x01,
1548 0x00, 0x00, 0x32, 0x9a, 0x08, 0x14, 0x02, 0x85, 0x8c, 0x27, 0x46, 0x46,
1549 0xc8, 0x11, 0x32, 0x64, 0xd4, 0xd4, 0x80, 0x0c, 0xf2, 0x09, 0x8b, 0xf2,
1550 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33,
1551 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74,
1552 0x31, 0xcc, 0xa2, 0x68, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44,
1553 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68,
1554 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65,
1555 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,
1556 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20,
1557 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30,
1558 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61,
1559 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64,
1560 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62,
1561 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c,
1562 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f,
1563 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f,
1564 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62,
1565 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f,
1566 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65,
1567 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61,
1568 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
1569 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69,
1570 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69,
1571 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
1572 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29,
1573 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69,
1574 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76,
1575 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61,
1576 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69,
1577 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69,
1578 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63,
1579 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62,
1580 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66,
1581 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e,
1582 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64,
1583 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69,
1584 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70,
1585 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74,
1586 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69,
1587 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65,
1588 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65,
1589 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e,
1590 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a,
1591 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70,
1592 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65,
1593 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
1594 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
1595 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61,
1596 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78,
1597 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65, 0x3c, 0x66, 0x6c, 0x6f,
1598 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73,
1599 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
1600 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73,
1601 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
1602 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0xc4, 0x62,
1603 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x82, 0x30, 0x10, 0x23, 0x08,
1604 0x57, 0x34, 0x82, 0x30, 0x14, 0x23, 0x08, 0x83, 0x31, 0x82, 0x30, 0x1c,
1605 0x23, 0x08, 0x0b, 0x30, 0x82, 0x30, 0x20, 0x23, 0x08, 0x43, 0x32, 0x82,
1606 0x30, 0x28, 0x23, 0x08, 0xc3, 0x32, 0x82, 0x30, 0x30, 0x33, 0x0c, 0x6b,
1607 0x10, 0xb0, 0xc1, 0x0c, 0x43, 0x1b, 0x08, 0x6e, 0x30, 0x43, 0x30, 0xcc,
1608 0x30, 0xac, 0xc1, 0x1a, 0xbc, 0xc1, 0x0c, 0x04, 0xb1, 0x06, 0x6f, 0xf0,
1609 0x06, 0x33, 0x04, 0xc5, 0x0c, 0x81, 0x31, 0x43, 0x70, 0xcc, 0x50, 0x20,
1610 0x6f, 0xf0, 0x06, 0x89, 0x32, 0x43, 0xe0, 0x07, 0x33, 0x24, 0x6f, 0xb0,
1611 0x30, 0x8d, 0x93, 0x3c, 0x50, 0x34, 0x03, 0xd2, 0x06, 0x52, 0x33, 0x25,
1612 0x0a, 0x44, 0xcd, 0x40, 0xbd, 0x81, 0x1c, 0xbc, 0xc1, 0xa3, 0xc9, 0x81,
1613 0x1c, 0xbc, 0xc1, 0xb3, 0xcd, 0x81, 0x1b, 0xbc, 0x01, 0xd7, 0xd1, 0x81,
1614 0x1b, 0xbc, 0x81, 0xf7, 0xcd, 0x20, 0xad, 0x41, 0x65, 0xc5, 0xc1, 0xf5,
1615 0x06, 0x6d, 0x80, 0x65, 0xa2, 0x00, 0x06, 0x71, 0x10, 0x06, 0x72, 0x90,
1616 0x88, 0x01, 0x34, 0x06, 0x33, 0x28, 0x75, 0x40, 0x06, 0xd7, 0x1b, 0xb4,
1617 0x41, 0x19, 0x24, 0x66, 0x00, 0x9d, 0xc1, 0x0c, 0x89, 0x1b, 0xa0, 0xc1,
1618 0xf5, 0x06, 0x6d, 0x90, 0xa4, 0x01, 0xa4, 0x06, 0x33, 0x14, 0xa0, 0x10,
1619 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0x30, 0xc3, 0x00, 0x07, 0x7f, 0x60, 0x0a,
1620 0xd5, 0x01, 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0xb9, 0x81,
1621 0x1b, 0x58, 0x74, 0xa0, 0x07, 0x96, 0x65, 0xe9, 0x01, 0xc7, 0x0a, 0xa6,
1622 0x00, 0x1b, 0x7e, 0x61, 0x0f, 0xea, 0xc0, 0x0a, 0x32, 0x12, 0x98, 0xa0,
1623 0x8b, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xda, 0xde, 0xc8, 0xea, 0xd8, 0xca,
1624 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6, 0x46, 0x11, 0xea, 0xc0, 0x0e, 0x4e,
1625 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x1b, 0x25,
1626 0xb8, 0x83, 0x5b, 0xc2, 0xd2, 0xe4, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2,
1627 0xde, 0xdc, 0x46, 0x09, 0xf0, 0xe0, 0xa8, 0xb0, 0x34, 0x39, 0x17, 0xb6,
1628 0x30, 0xb7, 0xb3, 0xba, 0xb0, 0xb3, 0xb2, 0x2f, 0xbb, 0x32, 0xb9, 0xb9,
1629 0xb4, 0x37, 0xb7, 0x51, 0x82, 0x3c, 0xb8, 0x29, 0x2c, 0x4d, 0xce, 0x65,
1630 0xec, 0xad, 0x0d, 0x2e, 0x8d, 0xad, 0xec, 0xeb, 0x0d, 0x8e, 0x2e, 0xed,
1631 0xcd, 0x6d, 0x6e, 0x94, 0x41, 0x0f, 0xf6, 0x80, 0x0f, 0x8e, 0x09, 0x4b,
1632 0x93, 0x73, 0x31, 0x93, 0x0b, 0x3b, 0x6b, 0x2b, 0x73, 0xa3, 0x1b, 0x25,
1633 0x30, 0x05, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00,
1634 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58,
1635 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3,
1636 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d,
1637 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3,
1638 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1,
1639 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28,
1640 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28,
1641 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83,
1642 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c,
1643 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e,
1644 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d,
1645 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4,
1646 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x10, 0x00, 0x00, 0x06, 0x00,
1647 0x00, 0x00, 0x07, 0xcc, 0x3c, 0xa4, 0x83, 0x3b, 0x9c, 0x03, 0x3b, 0x94,
1648 0x03, 0x3d, 0xa0, 0x83, 0x3c, 0x94, 0x43, 0x38, 0x90, 0xc3, 0x01, 0x00,
1649 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0xae, 0x00, 0x00, 0x00, 0x13, 0x04,
1650 0x48, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x34, 0x4a,
1651 0x81, 0x5e, 0x0d, 0x10, 0x2e, 0x81, 0x22, 0xa0, 0x3e, 0xd6, 0x00, 0x04,
1652 0x02, 0x81, 0x19, 0x80, 0x31, 0x02, 0x10, 0x04, 0x41, 0x10, 0x14, 0x66,
1653 0x00, 0xc6, 0x08, 0x40, 0x10, 0x04, 0xf1, 0x5f, 0x18, 0x01, 0x18, 0x23,
1654 0x00, 0x41, 0x10, 0xc4, 0xbf, 0x31, 0x02, 0x10, 0x04, 0x41, 0x10, 0x0c,
1655 0x28, 0xcc, 0x41, 0x84, 0x01, 0xc7, 0x79, 0x73, 0x10, 0x1f, 0xc7, 0x79,
1656 0x73, 0x10, 0x5c, 0x18, 0x70, 0xde, 0x1c, 0x04, 0xf7, 0x71, 0xde, 0x1c,
1657 0x04, 0xc7, 0x85, 0x81, 0x37, 0x07, 0xc1, 0x71, 0x9f, 0x37, 0x07, 0x01,
1658 0x06, 0x60, 0x00, 0x06, 0xde, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x30,
1659 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22,
1660 0xc8, 0x4f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xe3, 0x59, 0x18, 0x26, 0x0d,
1661 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74,
1662 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20,
1663 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d,
1664 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73,
1665 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75, 0x62,
1666 0x65, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
1667 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29,
1668 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
1669 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73,
1670 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
1671 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73,
1672 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
1673 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x00, 0x13, 0x04,
1674 0xac, 0x99, 0x20, 0x60, 0xce, 0x04, 0x01, 0x7b, 0x26, 0x08, 0x18, 0xb4,
1675 0x42, 0xa0, 0x05, 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a,
1676 0xc1, 0x16, 0x68, 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0,
1677 0x21, 0x48, 0x85, 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72,
1678 0x21, 0x17, 0x60, 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85,
1679 0x0d, 0xc3, 0x2b, 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85,
1680 0x0d, 0x89, 0x2b, 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c,
1681 0xf8, 0xc2, 0x2c, 0x6c, 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0,
1682 0x0b, 0xbd, 0x20, 0x0b, 0x00, 0x00, 0x9b, 0x0c, 0x97, 0x47, 0x06, 0x14,
1683 0x08, 0xb2, 0xc9, 0x90, 0x81, 0x01, 0x1a, 0x50, 0x20, 0x88, 0x05, 0x9d,
1684 0xf8, 0x5b, 0x40, 0x80, 0xff, 0x18, 0x42, 0x40, 0x06, 0x16, 0x40, 0xe2,
1685 0x6f, 0x01, 0x05, 0xfe, 0x63, 0x08, 0xc4, 0x66, 0xc1, 0x24, 0xfe, 0x16,
1686 0x5c, 0xe0, 0xbf, 0xc9, 0x30, 0x06, 0x6a, 0xb0, 0x06, 0x14, 0x80, 0x31,
1687 0x62, 0x50, 0x10, 0x21, 0x08, 0x06, 0x94, 0x1d, 0x04, 0xc3, 0x3c, 0x43,
1688 0x70, 0x1c, 0x41, 0x21, 0x10, 0x03, 0x43, 0x18, 0xc5, 0x65, 0x58, 0x47,
1689 0x84, 0xff, 0x1c, 0x03, 0x16, 0x88, 0x81, 0x7d, 0x49, 0xf8, 0xcf, 0x31,
1690 0x08, 0xc1, 0x18, 0xcc, 0x12, 0x1c, 0x16, 0x06, 0x48, 0xf8, 0xcf, 0x31,
1691 0x6c, 0x81, 0x19, 0xcc, 0x31, 0x04, 0x8d, 0x19, 0xcc, 0x12, 0x1c, 0x73,
1692 0x0c, 0x9c, 0x43, 0x07, 0x56, 0x06, 0x4c, 0xf8, 0xcf, 0x31, 0x08, 0x41,
1693 0x1a, 0xcc, 0x12, 0x1c, 0x73, 0x0c, 0x5e, 0x74, 0x07, 0x73, 0x0c, 0xc1,
1694 0xb3, 0x06, 0xb3, 0x04, 0x87, 0xa5, 0x01, 0x14, 0xfe, 0x73, 0x0c, 0x60,
1695 0x40, 0xe9, 0xc1, 0x1c, 0x43, 0x20, 0xbc, 0xc1, 0x2c, 0xc1, 0x61, 0x6c,
1696 0x60, 0x85, 0xbf, 0xb5, 0x01, 0x15, 0xfe, 0x73, 0x0c, 0x63, 0x20, 0xf8,
1697 0xc1, 0x1c, 0x43, 0x20, 0xcc, 0xc1, 0x2c, 0xc1, 0x31, 0xd0, 0x13, 0x08,
1698 0x86, 0x52, 0x40, 0x04, 0x35, 0x68, 0x02, 0x18, 0x04, 0xa8, 0x00, 0x0c,
1699 0x32, 0x04, 0x64, 0x30, 0x07, 0x9b, 0x0c, 0x7b, 0x20, 0x0a, 0xab, 0x40,
1700 0xc1, 0x20, 0x23, 0x06, 0x06, 0x11, 0x82, 0x60, 0xe1, 0x1f, 0xd2, 0x2b,
1701 0x04, 0x23, 0x06, 0x4b, 0x11, 0x82, 0x60, 0x00, 0xc5, 0x42, 0x1f, 0xf0,
1702 0x01, 0xa1, 0x07, 0x81, 0x1c, 0xac, 0xc2, 0x68, 0x42, 0x00, 0x64, 0x10,
1703 0x10, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8, 0x85, 0x43,
1704 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba, 0x80, 0xec,
1705 0xc2, 0x96, 0xa3, 0x09, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17, 0xb6, 0x1c,
1706 0x6c, 0x10, 0x80, 0xc3, 0xa1, 0x0b, 0xc8, 0x2e, 0x6c, 0x29, 0xdc, 0xe0,
1707 0xd8, 0x05, 0x44, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20,
1708 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x32, 0x0e, 0x10, 0x22, 0x84, 0x00,
1709 0xae, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0c,
1710 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x78, 0x01, 0x00,
1711 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x08, 0x00,
1712 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x00,
1713 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00,
1714 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00,
1715 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
1716 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x00,
1717 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
1718 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
1719 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xff, 0xff,
1720 0xff, 0xff, 0x00, 0x24, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x00,
1721 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xff, 0xff,
1722 0xff, 0xff, 0x08, 0x24, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x17, 0x00,
1723 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff,
1724 0xff, 0xff, 0x08, 0x24, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x17, 0x00,
1725 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff,
1726 0xff, 0xff, 0x08, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x0c,
1727 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0xfe, 0x00, 0x00,
1728 0x00, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75,
1729 0x62, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65,
1730 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x75, 0x62,
1731 0x65, 0x2e, 0x76, 0x34, 0x66, 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63,
1732 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e, 0x66, 0x2e, 0x66, 0x33, 0x32,
1733 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f,
1734 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32, 0x2e,
1735 0x66, 0x2e, 0x66, 0x33, 0x32, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39,
1736 0x38, 0x61, 0x69, 0x72, 0x36, 0x34, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x65,
1737 0x2d, 0x69, 0x6f, 0x73, 0x31, 0x33, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x73,
1738 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00,
1739 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1740 0x00, 0x00
1741};
1742const unsigned int BlitFromCube_metallib_len = 4610;
1743const unsigned char BlitFromCubeArray_metallib[] = {
1744 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
1745 0x00, 0x00, 0x00, 0x00, 0x27, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1746 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
1747 0x00, 0x00, 0x00, 0x00, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1748 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00,
1749 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1750 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x11, 0x00, 0x00,
1751 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
1752 0x4e, 0x41, 0x4d, 0x45, 0x12, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
1753 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00,
1754 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20,
1755 0x00, 0x89, 0xf6, 0x8b, 0xfe, 0xde, 0xcf, 0x36, 0x23, 0x4a, 0x7e, 0x82,
1756 0x8b, 0xd3, 0x9f, 0x9f, 0x3a, 0xca, 0x18, 0x30, 0xb5, 0xe5, 0x58, 0x7a,
1757 0xc7, 0x26, 0x8b, 0x98, 0x10, 0xf9, 0xe8, 0xf9, 0x84, 0x4d, 0x44, 0x53,
1758 0x5a, 0x08, 0x00, 0x30, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f,
1759 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1760 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1761 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02,
1762 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x45,
1763 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04,
1764 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00,
1765 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x11, 0x00, 0x00, 0xff,
1766 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03,
1767 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14,
1768 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0xe3, 0x03, 0x00, 0x00, 0x0b,
1769 0x02, 0x21, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07,
1770 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92,
1771 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80,
1772 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38,
1773 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43,
1774 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0x04, 0x49, 0x0e, 0x90, 0x91,
1775 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04,
1776 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x1b,
1777 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40, 0x02,
1778 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d,
1779 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d,
1780 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28,
1781 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72, 0x38,
1782 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78,
1783 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00,
1784 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c,
1785 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20,
1786 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c,
1787 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e,
1788 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8,
1789 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08,
1790 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0,
1791 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x68,
1792 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70, 0x30,
1793 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d,
1794 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e,
1795 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8,
1796 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70, 0x70,
1797 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0,
1798 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d,
1799 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c,
1800 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c,
1801 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90,
1802 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90,
1803 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36, 0x68,
1804 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c,
1805 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e,
1806 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e,
1807 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d,
1808 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70,
1809 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78, 0x68,
1810 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e,
1811 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8,
1812 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e, 0xe6,
1813 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e, 0xec,
1814 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8,
1815 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b,
1816 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86,
1817 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f,
1818 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80,
1819 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d,
1820 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05,
1821 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c,
1822 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89,
1823 0x20, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20,
1824 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84,
1825 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10,
1826 0x7c, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04,
1827 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02,
1828 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42,
1829 0x38, 0x4e, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a,
1830 0x88, 0x5f, 0xa0, 0x02, 0xe2, 0x07, 0xa2, 0x08, 0xc0, 0xfe, 0x69, 0x8c,
1831 0x00, 0x18, 0x44, 0x30, 0x82, 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff,
1832 0x25, 0x80, 0x79, 0x16, 0x22, 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01,
1833 0x11, 0x8a, 0x11, 0x44, 0x28, 0x27, 0x91, 0x9a, 0x23, 0x40, 0x8c, 0x10,
1834 0xd8, 0x30, 0xc2, 0x00, 0xcc, 0x11, 0x04, 0x25, 0x69, 0x27, 0xb9, 0xf1,
1835 0x00, 0x18, 0x04, 0x8b, 0x00, 0x06, 0xc9, 0x22, 0x0c, 0x40, 0x74, 0x20,
1836 0x20, 0x05, 0xc6, 0x1c, 0x01, 0x28, 0x0c, 0x22, 0x08, 0xc2, 0x20, 0x02,
1837 0x20, 0x4c, 0x01, 0x8c, 0x00, 0x0c, 0x23, 0x0c, 0xc3, 0x20, 0xc2, 0x20,
1838 0x00, 0x00, 0x00, 0x13, 0xbe, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a,
1839 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x83, 0x74,
1840 0x78, 0x87, 0x79, 0x88, 0x83, 0x39, 0x70, 0x03, 0x38, 0x70, 0x03, 0x38,
1841 0x68, 0x83, 0x79, 0x48, 0x87, 0x76, 0xa8, 0x07, 0x76, 0x08, 0x07, 0x7a,
1842 0x78, 0x07, 0x79, 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0, 0xa0, 0x07,
1843 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
1844 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06,
1845 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e,
1846 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07,
1847 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07,
1848 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
1849 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07,
1850 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e,
1851 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
1852 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07,
1853 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a, 0x30, 0x07,
1854 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73, 0x20, 0x07,
1855 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f,
1856 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
1857 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
1858 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a, 0x10, 0x07,
1859 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f,
1860 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07,
1861 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79, 0x20, 0x07,
1862 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07,
1863 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07,
1864 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x50, 0x07,
1865 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07,
1866 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07,
1867 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07,
1868 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07,
1869 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x11, 0xc2, 0x90, 0xd1, 0xb6, 0x20, 0xd3,
1870 0x17, 0x39, 0x0c, 0x47, 0x05, 0x84, 0x16, 0x45, 0x00, 0x36, 0x24, 0x02,
1871 0x22, 0x05, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
1872 0x86, 0x44, 0xd1, 0x18, 0x40, 0x40, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02,
1873 0x00, 0x00, 0x00, 0x30, 0x24, 0xa2, 0x83, 0x4b, 0x02, 0x02, 0x60, 0x00,
1874 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x21, 0xd1, 0x2a, 0x5c, 0x14,
1875 0x10, 0x00, 0x03, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x48, 0x6c,
1876 0x10, 0x28, 0x5a, 0x3e, 0x00, 0x00, 0x90, 0x05, 0x02, 0x00, 0x00, 0x0b,
1877 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c,
1878 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30,
1879 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x84, 0x47, 0x00,
1880 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xee, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1,
1881 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
1882 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
1883 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
1884 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
1885 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
1886 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d,
1887 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87,
1888 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87,
1889 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30,
1890 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde,
1891 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b,
1892 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c,
1893 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
1894 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87,
1895 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87,
1896 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87,
1897 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0,
1898 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc,
1899 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4,
1900 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39,
1901 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38,
1902 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
1903 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87,
1904 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87,
1905 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50,
1906 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50,
1907 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2,
1908 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea,
1909 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b,
1910 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87,
1911 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50,
1912 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde,
1913 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0,
1914 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d,
1915 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b,
1916 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87,
1917 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10,
1918 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2,
1919 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66,
1920 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38,
1921 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b,
1922 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07,
1923 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60,
1924 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20,
1925 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30,
1926 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30,
1927 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec,
1928 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8,
1929 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39,
1930 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07,
1931 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87,
1932 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30,
1933 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87,
1934 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87,
1935 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07,
1936 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x20, 0x00, 0x00, 0x01,
1937 0x01, 0x00, 0x00, 0x32, 0x9a, 0x08, 0x14, 0x02, 0x85, 0x8c, 0x27, 0x46,
1938 0x46, 0xc8, 0x11, 0x32, 0x64, 0xd4, 0xd4, 0x80, 0x0c, 0xfe, 0x09, 0x8b,
1939 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06,
1940 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c,
1941 0x74, 0x31, 0xcc, 0xa2, 0x80, 0x41, 0xb3, 0x1c, 0x0d, 0x00, 0x00, 0x53,
1942 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63,
1943 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c,
1944 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73,
1945 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38,
1946 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32,
1947 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c,
1948 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
1949 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61,
1950 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69,
1951 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68,
1952 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63,
1953 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65,
1954 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68,
1955 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72,
1956 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
1957 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65,
1958 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61,
1959 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f,
1960 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
1961 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66,
1962 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61,
1963 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69,
1964 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e,
1965 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61,
1966 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61,
1967 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65,
1968 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e,
1969 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75,
1970 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72,
1971 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e,
1972 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61,
1973 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79,
1974 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66,
1975 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73,
1976 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c,
1977 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79,
1978 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72,
1979 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69,
1980 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79,
1981 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a,
1982 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f,
1983 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f,
1984 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
1985 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
1986 0x78, 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65, 0x5f, 0x61, 0x72,
1987 0x72, 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73,
1988 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
1989 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73,
1990 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65,
1991 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c,
1992 0x65, 0x72, 0x00, 0xc4, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
1993 0x82, 0x30, 0x10, 0x23, 0x08, 0x57, 0x34, 0x82, 0x30, 0x14, 0x23, 0x08,
1994 0x83, 0x31, 0x82, 0x30, 0x1c, 0x23, 0x08, 0x0b, 0x30, 0x82, 0x30, 0x20,
1995 0x23, 0x08, 0x43, 0x32, 0x82, 0x30, 0x28, 0x23, 0x08, 0xc3, 0x32, 0x82,
1996 0x30, 0x30, 0x33, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x0c, 0x43, 0x1b, 0x08,
1997 0x6e, 0x30, 0x43, 0x30, 0xcc, 0x30, 0xac, 0xc1, 0x1a, 0xbc, 0xc1, 0x0c,
1998 0x04, 0xb1, 0x06, 0x6f, 0xf0, 0x06, 0x33, 0x04, 0xc5, 0x0c, 0x81, 0x31,
1999 0x43, 0x70, 0xcc, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0x32, 0x43, 0xe0,
2000 0x07, 0x33, 0x24, 0x6f, 0xb0, 0x30, 0x8d, 0x93, 0x3c, 0x50, 0x34, 0x03,
2001 0xd2, 0x06, 0x52, 0x33, 0x25, 0x0a, 0x44, 0xcd, 0x40, 0xbd, 0x81, 0x1c,
2002 0xbc, 0xc1, 0xa3, 0xc9, 0x81, 0x1c, 0xbc, 0xc1, 0xb3, 0xcd, 0x81, 0x1b,
2003 0xbc, 0x01, 0xd7, 0xd1, 0x81, 0x1b, 0xbc, 0x81, 0xf7, 0xcd, 0x20, 0xad,
2004 0x41, 0x65, 0xc5, 0xc1, 0xf5, 0x06, 0x6d, 0x80, 0x65, 0xa2, 0x00, 0x06,
2005 0x71, 0x10, 0x06, 0x72, 0x90, 0x88, 0x01, 0x34, 0x06, 0x33, 0x28, 0x75,
2006 0x40, 0x06, 0xd7, 0x1b, 0xb4, 0x41, 0x19, 0x24, 0x66, 0x00, 0x9d, 0xc1,
2007 0x0c, 0x89, 0x1b, 0xa0, 0xc1, 0xf5, 0x06, 0x6d, 0x90, 0xa4, 0x01, 0xa4,
2008 0x06, 0x33, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0x30, 0xc3,
2009 0x00, 0x07, 0x7f, 0x60, 0x0a, 0xd5, 0x01, 0x1c, 0xc7, 0x71, 0x1c, 0xc7,
2010 0x71, 0x1c, 0xc7, 0xb9, 0x81, 0x1b, 0x58, 0x74, 0xa0, 0x07, 0x96, 0x65,
2011 0xe9, 0x01, 0xc7, 0x0a, 0xa6, 0x00, 0x1b, 0x7e, 0x61, 0x0f, 0xea, 0xc0,
2012 0x0a, 0x32, 0x12, 0x98, 0xa0, 0x8b, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xda,
2013 0xde, 0xc8, 0xea, 0xd8, 0xca, 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6, 0x46,
2014 0x11, 0xea, 0xc0, 0x0e, 0x4e, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23,
2015 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0xb8, 0x83, 0x5b, 0xc2, 0xd2, 0xe4, 0x5c,
2016 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0x46, 0x09, 0xf0, 0xe0, 0xa8,
2017 0xb0, 0x34, 0x39, 0x17, 0xb6, 0x30, 0xb7, 0xb3, 0xba, 0xb0, 0xb3, 0xb2,
2018 0x2f, 0xbb, 0x32, 0xb9, 0xb9, 0xb4, 0x37, 0xb7, 0x51, 0x82, 0x3c, 0xb8,
2019 0x29, 0x2c, 0x4d, 0xce, 0x65, 0xec, 0xad, 0x0d, 0x2e, 0x8d, 0xad, 0xec,
2020 0xeb, 0x0d, 0x8e, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x94, 0x41, 0x0f, 0xf6,
2021 0x80, 0x0f, 0x8e, 0x09, 0x4b, 0x93, 0x73, 0x31, 0x93, 0x0b, 0x3b, 0x6b,
2022 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0x30, 0x05, 0x00, 0x00, 0x00, 0x00, 0xa9,
2023 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87,
2024 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38,
2025 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8,
2026 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde,
2027 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20,
2028 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0,
2029 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87,
2030 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38,
2031 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8,
2032 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc,
2033 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8,
2034 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20,
2035 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xd1,
2036 0x10, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0xcc, 0x3c, 0xa4, 0x83,
2037 0x3b, 0x9c, 0x03, 0x3b, 0x94, 0x03, 0x3d, 0xa0, 0x83, 0x3c, 0x94, 0x43,
2038 0x38, 0x90, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0xb2,
2039 0x00, 0x00, 0x00, 0x13, 0x04, 0x48, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x19,
2040 0x00, 0x00, 0x00, 0x34, 0x8a, 0xa1, 0x14, 0xe8, 0xd5, 0x00, 0xe1, 0x12,
2041 0x28, 0x02, 0xea, 0x63, 0x0d, 0x40, 0x20, 0x10, 0x98, 0x01, 0x18, 0x23,
2042 0x00, 0x41, 0x10, 0x04, 0x41, 0x61, 0x06, 0x60, 0x8c, 0x00, 0x04, 0x41,
2043 0x10, 0xff, 0x85, 0x11, 0x80, 0x31, 0x02, 0x10, 0x04, 0x41, 0xfc, 0x1b,
2044 0x23, 0x00, 0x41, 0x10, 0x04, 0xc1, 0x80, 0xc2, 0x1c, 0x84, 0x18, 0x74,
2045 0xdd, 0x37, 0x07, 0x01, 0x06, 0x5d, 0xf7, 0xcd, 0x41, 0x74, 0x62, 0xd0,
2046 0x7d, 0x73, 0x10, 0x1d, 0x18, 0x74, 0xdf, 0x1c, 0x44, 0xd7, 0x89, 0xc1,
2047 0x37, 0x07, 0xd1, 0x75, 0x60, 0xf0, 0xcd, 0x41, 0x84, 0x41, 0x18, 0x84,
2048 0xc1, 0x37, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x46,
2049 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0x08, 0x59, 0x00,
2050 0x00, 0x00, 0x00, 0xcf, 0x33, 0x06, 0x16, 0x86, 0x49, 0x03, 0x00, 0x6f,
2051 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68,
2052 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b,
2053 0x20, 0x54, 0x42, 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69,
2054 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c,
2055 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41, 0x72,
2056 0x72, 0x61, 0x79, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
2057 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28,
2058 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
2059 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65,
2060 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
2061 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72,
2062 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72,
2063 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x13,
2064 0x04, 0xac, 0x99, 0x20, 0x60, 0xce, 0x04, 0x01, 0x7b, 0x26, 0x08, 0x18,
2065 0xb4, 0x42, 0xa0, 0x05, 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2,
2066 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad,
2067 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18,
2068 0x72, 0x21, 0x17, 0x60, 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0,
2069 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80,
2070 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82,
2071 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3,
2072 0xf0, 0x0b, 0xbd, 0x20, 0x0b, 0x00, 0x00, 0x9b, 0x0c, 0xd8, 0x57, 0x06,
2073 0x14, 0x08, 0xb2, 0xc9, 0xa0, 0x85, 0x41, 0x1a, 0x50, 0x20, 0x88, 0x05,
2074 0x9e, 0xf8, 0x5b, 0x40, 0x80, 0xff, 0x18, 0x42, 0x50, 0x06, 0x16, 0x40,
2075 0xe2, 0x6f, 0x01, 0x05, 0xfe, 0x63, 0x08, 0xc4, 0x66, 0xc1, 0x24, 0xfe,
2076 0x16, 0x5c, 0xe0, 0xbf, 0xc9, 0x40, 0x06, 0x6b, 0xc0, 0x06, 0x14, 0x80,
2077 0x31, 0x62, 0x50, 0x10, 0x21, 0x08, 0x06, 0xd4, 0x1d, 0x04, 0x15, 0x90,
2078 0x41, 0x0d, 0xf3, 0x0c, 0xc1, 0x71, 0x04, 0x85, 0x40, 0x0c, 0x0c, 0x61,
2079 0x14, 0x98, 0x61, 0x5e, 0x11, 0xfe, 0x73, 0x0c, 0x59, 0x30, 0x06, 0x06,
2080 0x06, 0x4a, 0xf8, 0xcf, 0x31, 0x08, 0x01, 0x19, 0xcc, 0x12, 0x1c, 0x26,
2081 0x06, 0x49, 0xf8, 0xcf, 0x31, 0x70, 0xc1, 0x19, 0xcc, 0x31, 0x04, 0xce,
2082 0x19, 0xcc, 0x12, 0x1c, 0x73, 0x0c, 0xdd, 0x63, 0x07, 0x66, 0x06, 0x4d,
2083 0xf8, 0xcf, 0x31, 0x08, 0x81, 0x1a, 0xcc, 0x12, 0x1c, 0x73, 0x0c, 0x9f,
2084 0x94, 0x07, 0x73, 0x0c, 0x01, 0xc4, 0x06, 0xb3, 0x04, 0x87, 0xa9, 0x41,
2085 0x14, 0xfe, 0x73, 0x0c, 0x61, 0x50, 0xf1, 0xc1, 0x1c, 0x43, 0x20, 0xc0,
2086 0xc1, 0x2c, 0xc1, 0x61, 0x6d, 0x70, 0x85, 0xbf, 0xb9, 0x41, 0x15, 0xfe,
2087 0x73, 0x0c, 0x64, 0x20, 0x80, 0xc2, 0x1c, 0x43, 0x20, 0xd0, 0xc1, 0x2c,
2088 0xc1, 0x31, 0xd0, 0x13, 0x08, 0x86, 0x52, 0x40, 0x04, 0x35, 0x68, 0x02,
2089 0x18, 0x04, 0xaa, 0x00, 0x0c, 0x32, 0x04, 0x65, 0x40, 0x07, 0x75, 0xe9,
2090 0xc1, 0x6c, 0x32, 0xf8, 0x41, 0x29, 0xb8, 0x02, 0x05, 0x83, 0x8c, 0x18,
2091 0x18, 0x44, 0x08, 0x82, 0x85, 0x7f, 0x48, 0xb2, 0x10, 0x8c, 0x18, 0x30,
2092 0x45, 0x08, 0x82, 0x01, 0x44, 0x0b, 0xa0, 0xf0, 0x07, 0x05, 0xc1, 0x07,
2093 0x01, 0x1d, 0xb8, 0xc2, 0x68, 0x42, 0x00, 0x64, 0x10, 0x10, 0x03, 0x0c,
2094 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8, 0x85, 0x43, 0x17, 0x90, 0x5d,
2095 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba, 0x80, 0xec, 0xc2, 0x96, 0xa3,
2096 0x09, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17, 0xb6, 0x1c, 0x6e, 0x10, 0x80,
2097 0xc3, 0xa1, 0x0b, 0xc8, 0x2e, 0x6c, 0x29, 0xe0, 0xe0, 0xd8, 0x05, 0x44,
2098 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x03,
2099 0x00, 0x00, 0x00, 0x32, 0x0e, 0x10, 0x22, 0x84, 0x00, 0xb1, 0x06, 0x00,
2100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00, 0x31,
2101 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x78, 0x01, 0x00, 0x00, 0x00, 0x03,
2102 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4c,
2103 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00,
2104 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xb8,
2105 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x1f,
2106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x89,
2107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00,
2108 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
2109 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00,
2110 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00,
2111 0x24, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x11,
2112 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08,
2113 0x24, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x34,
2114 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08,
2115 0x24, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x4b,
2116 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08,
2117 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x0c, 0x00, 0x00, 0x26,
2118 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x29, 0x01, 0x00, 0x00, 0x00, 0x42,
2119 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41,
2120 0x72, 0x72, 0x61, 0x79, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70,
2121 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63,
2122 0x75, 0x62, 0x65, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x76, 0x34,
2123 0x66, 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65,
2124 0x72, 0x74, 0x2e, 0x66, 0x2e, 0x66, 0x33, 0x32, 0x2e, 0x75, 0x2e, 0x69,
2125 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72,
2126 0x74, 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32, 0x2e, 0x66, 0x2e, 0x66, 0x33,
2127 0x32, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x61, 0x69, 0x72,
2128 0x36, 0x34, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2d, 0x69, 0x6f, 0x73,
2129 0x31, 0x33, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x73, 0x69, 0x6d, 0x75, 0x6c,
2130 0x61, 0x74, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2131 0x00, 0x00, 0x00
2132};
2133const unsigned int BlitFromCubeArray_metallib_len = 4647;
2134#else
2135const unsigned char FullscreenVert_metallib[] = {
2136 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
2137 0x00, 0x00, 0x00, 0x00, 0x70, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2138 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
2139 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2140 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00,
2141 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2142 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x00,
2143 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
2144 0x4e, 0x41, 0x4d, 0x45, 0x0f, 0x00, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63,
2145 0x72, 0x65, 0x65, 0x6e, 0x56, 0x65, 0x72, 0x74, 0x00, 0x54, 0x59, 0x50,
2146 0x45, 0x01, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x36, 0x7e,
2147 0x95, 0x79, 0x28, 0x52, 0x49, 0x2e, 0xa7, 0xc9, 0x10, 0xf6, 0x76, 0x61,
2148 0x39, 0x41, 0x60, 0x9d, 0xcd, 0xd9, 0x0a, 0x19, 0x14, 0x65, 0xe3, 0xe3,
2149 0x44, 0xf2, 0x31, 0x58, 0xd4, 0xaf, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00,
2150 0x80, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54,
2151 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2152 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2153 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00,
2154 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00,
2155 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
2156 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
2157 0x68, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde,
2158 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24,
2159 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00,
2160 0x92, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00,
2161 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49,
2162 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19,
2163 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42,
2164 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88,
2165 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42,
2166 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c,
2167 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00,
2168 0x6c, 0x00, 0x00, 0x00, 0x1b, 0x7a, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff,
2169 0x01, 0x90, 0x00, 0x8a, 0x08, 0x07, 0x78, 0x80, 0x07, 0x79, 0x78, 0x07,
2170 0x7c, 0x68, 0x03, 0x73, 0xa8, 0x07, 0x77, 0x18, 0x87, 0x36, 0x30, 0x07,
2171 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4,
2172 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xda, 0x21, 0x1d, 0xdc, 0xa1, 0x0d, 0xd8,
2173 0xa1, 0x1c, 0xce, 0x21, 0x1c, 0xd8, 0xa1, 0x0d, 0xec, 0xa1, 0x1c, 0xc6,
2174 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0xe0, 0x1e, 0xd2, 0x81, 0x1c, 0xe8,
2175 0x01, 0x1d, 0x00, 0x38, 0x00, 0x06, 0x77, 0x78, 0x87, 0x36, 0x10, 0x87,
2176 0x7a, 0x48, 0x07, 0x76, 0xa0, 0x87, 0x74, 0x70, 0x87, 0x79, 0x00, 0x08,
2177 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87,
2178 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87,
2179 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x00, 0xe8, 0x41, 0x1e, 0xea,
2180 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xcc, 0x41, 0x1e, 0xc2,
2181 0xa1, 0x1d, 0xca, 0xa1, 0x0d, 0xe0, 0xe1, 0x1d, 0xd2, 0xc1, 0x1d, 0xe8,
2182 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xca, 0x81, 0x1d, 0xd2, 0xa1, 0x1d, 0xda,
2183 0xc0, 0x1d, 0xde, 0xc1, 0x1d, 0xda, 0x80, 0x1d, 0xca, 0x21, 0x1c, 0xcc,
2184 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
2185 0x36, 0x48, 0x07, 0x77, 0x30, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87,
2186 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea,
2187 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xdc, 0x21, 0x1c, 0xdc,
2188 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8,
2189 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87,
2190 0x77, 0x68, 0x83, 0x79, 0x48, 0x87, 0x73, 0x70, 0x87, 0x72, 0x20, 0x87,
2191 0x36, 0xd0, 0x87, 0x72, 0x90, 0x87, 0x77, 0x98, 0x87, 0x36, 0x30, 0x07,
2192 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4,
2193 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x80, 0x1e, 0xe4,
2194 0x21, 0x1c, 0xe0, 0x01, 0x1e, 0xd2, 0xc1, 0x1d, 0xce, 0xa1, 0x0d, 0xda,
2195 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07,
2196 0x80, 0x98, 0x07, 0x7a, 0x08, 0x87, 0x71, 0x58, 0x87, 0x36, 0x80, 0x07,
2197 0x79, 0x78, 0x07, 0x7a, 0x28, 0x87, 0x71, 0xa0, 0x87, 0x77, 0x90, 0x87,
2198 0x36, 0x10, 0x87, 0x7a, 0x30, 0x07, 0x73, 0x28, 0x07, 0x79, 0x68, 0x83,
2199 0x79, 0x48, 0x07, 0x7d, 0x28, 0x07, 0x00, 0x0f, 0x00, 0xa2, 0x1e, 0xdc,
2200 0x61, 0x1e, 0xc2, 0xc1, 0x1c, 0xca, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda,
2201 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87,
2202 0x72, 0x00, 0x36, 0x18, 0xc2, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04,
2203 0x50, 0x1b, 0x8c, 0xe1, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0x28,
2204 0x00, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2205 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00,
2206 0x89, 0x20, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09,
2207 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3,
2208 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c,
2209 0x10, 0x38, 0x33, 0x00, 0xc3, 0x08, 0x02, 0x30, 0x8c, 0x40, 0x00, 0x56,
2210 0x08, 0x99, 0x23, 0x00, 0x83, 0x22, 0x0c, 0x51, 0x15, 0x01, 0x88, 0x6e,
2211 0x20, 0x20, 0x05, 0x68, 0x8e, 0x00, 0x14, 0x86, 0x11, 0x08, 0x62, 0x04,
2212 0x00, 0x00, 0x00, 0x00, 0x13, 0xaa, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03,
2213 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x83,
2214 0x74, 0x78, 0x87, 0x79, 0x88, 0x83, 0x38, 0x70, 0x03, 0x38, 0x70, 0x03,
2215 0x38, 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0, 0xa0, 0x07, 0x76, 0x40,
2216 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x90,
2217 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x80,
2218 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60,
2219 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x90,
2220 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20,
2221 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0,
2222 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30,
2223 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x76, 0x40,
2224 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60,
2225 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60,
2226 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0,
2227 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73, 0x20, 0x07, 0x7a, 0x30,
2228 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x74, 0x80,
2229 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60,
2230 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40,
2231 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80,
2232 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x20,
2233 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20,
2234 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79, 0x20, 0x07, 0x7a, 0x20,
2235 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60,
2236 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0,
2237 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x50, 0x07, 0x71, 0x20,
2238 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20,
2239 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10,
2240 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40,
2241 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30,
2242 0x07, 0x72, 0x30, 0xe4, 0x29, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04,
2243 0x00, 0x00, 0x00, 0x60, 0xc8, 0x73, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00,
2244 0x08, 0x00, 0x00, 0x00, 0x80, 0x46, 0x08, 0x43, 0x3a, 0x1f, 0xb5, 0x2c,
2245 0x92, 0x10, 0x11, 0x44, 0xf3, 0x12, 0xd1, 0x24, 0xb1, 0x41, 0xa0, 0x68,
2246 0xa2, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
2247 0x32, 0x1e, 0x98, 0x0c, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47,
2248 0xc6, 0x04, 0x43, 0xa2, 0x22, 0x28, 0x81, 0x42, 0x18, 0x01, 0x20, 0x1d,
2249 0x4b, 0x88, 0x04, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00,
2250 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88,
2251 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
2252 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e,
2253 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30,
2254 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8,
2255 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
2256 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76,
2257 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e,
2258 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e,
2259 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
2260 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4,
2261 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
2262 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37,
2263 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
2264 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71,
2265 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e,
2266 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1,
2267 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
2268 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90,
2269 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
2270 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc,
2271 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7,
2272 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78,
2273 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f,
2274 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f,
2275 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1,
2276 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0,
2277 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0,
2278 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b,
2279 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c,
2280 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61,
2281 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1,
2282 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc,
2283 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4,
2284 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79,
2285 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72,
2286 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e,
2287 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1,
2288 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4,
2289 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8,
2290 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71,
2291 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19,
2292 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f,
2293 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e,
2294 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e,
2295 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81,
2296 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21,
2297 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc,
2298 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70,
2299 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77,
2300 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e,
2301 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e,
2302 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a,
2303 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73,
2304 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00,
2305 0x79, 0x18, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90,
2306 0x51, 0x4e, 0xd0, 0x99, 0x00, 0x00, 0x00, 0x00, 0x8b, 0xf2, 0x06, 0xc5,
2307 0xc6, 0x91, 0x41, 0x44, 0x45, 0x06, 0x33, 0x30, 0xc6, 0xd0, 0x10, 0x02,
2308 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77,
2309 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70,
2310 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72,
2311 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39,
2312 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33,
2313 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61,
2314 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
2315 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73,
2316 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
2317 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74,
2318 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
2319 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d,
2320 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63,
2321 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
2322 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75,
2323 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33,
2324 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72,
2325 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61,
2326 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e,
2327 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61,
2328 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x66,
2329 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e,
2330 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x64, 0x75, 0x69, 0x6e,
2331 0x74, 0x76, 0x49, 0x00, 0x13, 0x04, 0x42, 0x98, 0x20, 0x28, 0xc6, 0x04,
2332 0x81, 0x18, 0x26, 0x08, 0x04, 0x31, 0x41, 0x20, 0x8a, 0x09, 0x82, 0x01,
2333 0x6c, 0x18, 0xa8, 0xa0, 0xda, 0x30, 0x58, 0xc2, 0xb5, 0x21, 0x18, 0x36,
2334 0x0c, 0x14, 0x86, 0x6d, 0x20, 0x08, 0x0a, 0xc3, 0x36, 0x04, 0xc5, 0x86,
2335 0xc0, 0xd8, 0x10, 0x1c, 0x1b, 0x0c, 0x24, 0x51, 0x16, 0xa6, 0xd9, 0x50,
2336 0x38, 0xca, 0xc3, 0x40, 0x1b, 0x04, 0x31, 0x18, 0x83, 0x0d, 0x06, 0x16,
2337 0x29, 0x12, 0x33, 0x6d, 0x08, 0xca, 0x60, 0xc3, 0x90, 0x91, 0x81, 0x19,
2338 0x68, 0x24, 0x30, 0x41, 0x8d, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xda, 0xde,
2339 0xc8, 0xea, 0xd8, 0xca, 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6, 0xa6, 0x08,
2340 0x99, 0x56, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d,
2341 0x6e, 0x4a, 0xb0, 0x75, 0x09, 0x4b, 0x93, 0x73, 0xb1, 0x2b, 0x93, 0x9b,
2342 0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x70, 0xa5, 0xc2, 0xd2, 0xe4, 0x5c, 0xd8,
2343 0xc2, 0xdc, 0xce, 0xea, 0xc2, 0xce, 0xca, 0xbe, 0xec, 0xca, 0xe4, 0xe6,
2344 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x5d, 0xa7, 0xb0, 0x34, 0x39, 0x97, 0xb1,
2345 0xb7, 0x36, 0xb8, 0x34, 0xb6, 0xb2, 0xaf, 0x37, 0x38, 0xba, 0xb4, 0x37,
2346 0xb7, 0xb9, 0x29, 0x83, 0xf7, 0x81, 0x41, 0x95, 0xb0, 0x34, 0x39, 0x17,
2347 0xbb, 0x32, 0x39, 0xba, 0x32, 0xbc, 0x29, 0x81, 0x19, 0x00, 0x00, 0x00,
2348 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28,
2349 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3,
2350 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d,
2351 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d,
2352 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1,
2353 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4,
2354 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78,
2355 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3,
2356 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c,
2357 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c,
2358 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c,
2359 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4,
2360 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00,
2361 0x61, 0x20, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c,
2362 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x44, 0x33, 0x00, 0xb4,
2363 0x23, 0x00, 0x25, 0x40, 0x3c, 0x07, 0x51, 0x0c, 0x08, 0x32, 0x16, 0x01,
2364 0x04, 0xc6, 0x41, 0x30, 0x03, 0x30, 0x02, 0x30, 0x46, 0x00, 0x82, 0x20,
2365 0x88, 0x7f, 0x14, 0x33, 0x00, 0x63, 0x09, 0x20, 0x08, 0x82, 0x20, 0x18,
2366 0x80, 0x20, 0x08, 0x82, 0xe0, 0x30, 0x96, 0x00, 0x82, 0x20, 0x88, 0xff,
2367 0x02, 0x08, 0x82, 0x20, 0xfe, 0xcd, 0x00, 0x90, 0xcc, 0x41, 0x34, 0x8d,
2368 0xf3, 0xd0, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x4c, 0x57, 0x41,
2369 0xa5, 0x23, 0x06, 0xc6, 0x10, 0x82, 0x60, 0xf1, 0x1d, 0x57, 0x30, 0xc7,
2370 0x90, 0x04, 0x50, 0x4d, 0x98, 0x8e, 0x18, 0x18, 0x43, 0x08, 0x82, 0xc5,
2371 0x77, 0x68, 0xc1, 0x1c, 0xc3, 0x10, 0x48, 0x16, 0x30, 0xf2, 0xb1, 0x80,
2372 0x81, 0xcf, 0x20, 0x43, 0xc0, 0x50, 0x83, 0x0c, 0x01, 0x43, 0xcd, 0x36,
2373 0x30, 0x05, 0x30, 0xdb, 0x10, 0x08, 0x41, 0x06, 0x00, 0x00, 0x00, 0x00,
2374 0x71, 0x20, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22,
2375 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88,
2376 0x90, 0xa1, 0x02, 0x88, 0x13, 0x38, 0x1f, 0xb5, 0x2c, 0x92, 0x10, 0x11,
2377 0x44, 0xf3, 0x12, 0xd1, 0x64, 0x01, 0x17, 0x80, 0x44, 0xbe, 0xe0, 0x34,
2378 0x15, 0x11, 0x4d, 0x7e, 0xe1, 0x17, 0xb7, 0xed, 0x53, 0x3e, 0x72, 0xdb,
2379 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
2380};
2381const unsigned int FullscreenVert_metallib_len = 2928;
2382const unsigned char BlitFrom2D_metallib[] = {
2383 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
2384 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2385 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
2386 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2387 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
2388 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2389 0xec, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0e, 0x00, 0x00,
2390 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
2391 0x4e, 0x41, 0x4d, 0x45, 0x0b, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
2392 0x6f, 0x6d, 0x32, 0x44, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01,
2393 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0xdd, 0xdb, 0xfe, 0xe2, 0x0d, 0xb0,
2394 0x21, 0xfb, 0xa9, 0x55, 0x90, 0x46, 0x6f, 0x1b, 0xfb, 0x73, 0x3b, 0x1c,
2395 0xc7, 0xcc, 0x56, 0x6f, 0xc3, 0xb7, 0x96, 0xe8, 0x8b, 0xf1, 0xb5, 0xa5,
2396 0x9a, 0x33, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x20, 0x0e, 0x00, 0x00,
2397 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00,
2398 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2399 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45,
2400 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
2401 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
2402 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b,
2403 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x08, 0x0e, 0x00, 0x00,
2404 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00,
2405 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8,
2406 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0x7a, 0x03, 0x00, 0x00,
2407 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
2408 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
2409 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62,
2410 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14,
2411 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20,
2412 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
2413 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a,
2414 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00,
2415 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40,
2416 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1,
2417 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1,
2418 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a,
2419 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72,
2420 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a,
2421 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74,
2422 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40,
2423 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01,
2424 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1,
2425 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41,
2426 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79,
2427 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79,
2428 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77,
2429 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76,
2430 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70,
2431 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1,
2432 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01,
2433 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79,
2434 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70,
2435 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70,
2436 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2,
2437 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81,
2438 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0,
2439 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a,
2440 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a,
2441 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36,
2442 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1,
2443 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00,
2444 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41,
2445 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1,
2446 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a,
2447 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78,
2448 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1,
2449 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06,
2450 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e,
2451 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e,
2452 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05,
2453 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00,
2454 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d,
2455 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff,
2456 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f,
2457 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0,
2458 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00, 0x49, 0x18, 0x00, 0x00,
2459 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61,
2460 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00,
2461 0x89, 0x20, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09,
2462 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3,
2463 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c,
2464 0x10, 0x60, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73,
2465 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45,
2466 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04,
2467 0x42, 0x38, 0x4a, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89,
2468 0x8a, 0x88, 0xdf, 0x1e, 0xfe, 0x69, 0x8c, 0x00, 0x18, 0x44, 0x30, 0x82,
2469 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff, 0x25, 0x80, 0x79, 0x16, 0x22,
2470 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01, 0x11, 0x8a, 0x11, 0x44, 0x28,
2471 0x27, 0x91, 0x9a, 0x23, 0x08, 0x86, 0x11, 0x84, 0xa1, 0x24, 0xe1, 0x24,
2472 0xc1, 0x1a, 0x03, 0x83, 0x5c, 0x11, 0xc0, 0x20, 0x38, 0x10, 0x90, 0x02,
2473 0x63, 0x8e, 0x00, 0x14, 0x06, 0x11, 0x04, 0x61, 0x10, 0x61, 0x10, 0x46,
2474 0x00, 0x00, 0x00, 0x00, 0x13, 0xaa, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03,
2475 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x83,
2476 0x74, 0x78, 0x87, 0x79, 0x88, 0x83, 0x38, 0x70, 0x03, 0x38, 0x70, 0x03,
2477 0x38, 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0, 0xa0, 0x07, 0x76, 0x40,
2478 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x90,
2479 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x80,
2480 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60,
2481 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x90,
2482 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20,
2483 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0,
2484 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30,
2485 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x76, 0x40,
2486 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60,
2487 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60,
2488 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0,
2489 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73, 0x20, 0x07, 0x7a, 0x30,
2490 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x74, 0x80,
2491 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60,
2492 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40,
2493 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80,
2494 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x20,
2495 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20,
2496 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79, 0x20, 0x07, 0x7a, 0x20,
2497 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60,
2498 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0,
2499 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x50, 0x07, 0x71, 0x20,
2500 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20,
2501 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10,
2502 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40,
2503 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30,
2504 0x07, 0x72, 0x30, 0xe4, 0x51, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04,
2505 0x00, 0x00, 0x00, 0x60, 0xc8, 0xe3, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00,
2506 0x08, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x07, 0x02, 0x02, 0x60, 0x00, 0x00,
2507 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x10, 0x86, 0x54, 0xb6, 0x05,
2508 0x99, 0xbe, 0xc8, 0x61, 0xec, 0x4e, 0x62, 0x83, 0x40, 0xd1, 0xb6, 0x01,
2509 0x00, 0x80, 0x2c, 0x10, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14,
2510 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a,
2511 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85,
2512 0x52, 0x06, 0x44, 0x47, 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xe6, 0x58,
2513 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00,
2514 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88,
2515 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
2516 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e,
2517 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30,
2518 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8,
2519 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
2520 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76,
2521 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e,
2522 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e,
2523 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
2524 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4,
2525 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
2526 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37,
2527 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
2528 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71,
2529 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e,
2530 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1,
2531 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
2532 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90,
2533 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
2534 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc,
2535 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7,
2536 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78,
2537 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f,
2538 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f,
2539 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1,
2540 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0,
2541 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0,
2542 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b,
2543 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c,
2544 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61,
2545 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1,
2546 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc,
2547 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4,
2548 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79,
2549 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72,
2550 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e,
2551 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1,
2552 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4,
2553 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8,
2554 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71,
2555 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19,
2556 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f,
2557 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e,
2558 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e,
2559 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81,
2560 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21,
2561 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc,
2562 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70,
2563 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77,
2564 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e,
2565 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e,
2566 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a,
2567 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73,
2568 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00,
2569 0x79, 0x18, 0x00, 0x00, 0xf1, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90,
2570 0x51, 0xaa, 0x01, 0x19, 0xdc, 0x13, 0x00, 0x00, 0x8b, 0xf2, 0x06, 0xc5,
2571 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2,
2572 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc,
2573 0xa2, 0x60, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20,
2574 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72,
2575 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d,
2576 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
2577 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d,
2578 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33,
2579 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72,
2580 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e,
2581 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65,
2582 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
2583 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e,
2584 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
2585 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66,
2586 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e,
2587 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64,
2588 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61, 0x69, 0x72,
2589 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61,
2590 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e,
2591 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70,
2592 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28,
2593 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69,
2594 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e,
2595 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x66,
2596 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67,
2597 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e,
2598 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e,
2599 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69,
2600 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66,
2601 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65,
2602 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f,
2603 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78,
2604 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e,
2605 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
2606 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f,
2607 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
2608 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65,
2609 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f,
2610 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
2611 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61,
2612 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
2613 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f,
2614 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f,
2615 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69,
2616 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72,
2617 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74, 0x75,
2618 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20,
2619 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63,
2620 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e,
2621 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c,
2622 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70,
2623 0x6c, 0x65, 0x72, 0x00, 0x13, 0x84, 0x61, 0x98, 0x20, 0x4c, 0xd0, 0x04,
2624 0x61, 0x20, 0x26, 0x08, 0x43, 0x31, 0x41, 0x18, 0x8c, 0x09, 0xc2, 0x02,
2625 0x4c, 0x10, 0x86, 0x63, 0x82, 0x30, 0x20, 0x13, 0x84, 0x21, 0x99, 0x20,
2626 0x0c, 0xca, 0x04, 0x61, 0x58, 0x36, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x86,
2627 0xa1, 0x0d, 0x04, 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35, 0x78, 0x83,
2628 0x37, 0xd8, 0x40, 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21, 0x28, 0x36,
2629 0x04, 0xc6, 0x86, 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0xb2,
2630 0x21, 0xf0, 0x83, 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24, 0x0f, 0x14,
2631 0x6d, 0x40, 0xda, 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d, 0xd4, 0x1b,
2632 0xc8, 0xc1, 0x1b, 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c, 0xdb, 0x1c,
2633 0xb8, 0xc1, 0x1b, 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78, 0xdf, 0x06,
2634 0x69, 0x0d, 0x2a, 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c, 0x13, 0x05,
2635 0x30, 0x88, 0x83, 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31, 0xd8, 0xa0,
2636 0xd4, 0x01, 0x19, 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98, 0x01, 0x74,
2637 0x06, 0x1b, 0x12, 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20, 0x49, 0x03,
2638 0x48, 0x0d, 0x36, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0xb0,
2639 0x61, 0x80, 0x83, 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8, 0x11, 0x1b,
2640 0x9b, 0x5d, 0x9b, 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99, 0x8b, 0x19,
2641 0x5b, 0xd8, 0xd9, 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a, 0x1b, 0x9b,
2642 0x5d, 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0, 0x0e, 0xba,
2643 0x84, 0xa5, 0xc9, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d,
2644 0x09, 0xf0, 0xa0, 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98, 0xdb, 0x59,
2645 0x5d, 0xd8, 0x59, 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb,
2646 0x94, 0x20, 0x0f, 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd, 0xb5, 0xc1,
2647 0xa5, 0xb1, 0x95, 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d,
2648 0x19, 0xf4, 0x60, 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c, 0x8b, 0x99,
2649 0x5c, 0xd8, 0x59, 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14, 0x00, 0x00,
2650 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28,
2651 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3,
2652 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d,
2653 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d,
2654 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1,
2655 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4,
2656 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78,
2657 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3,
2658 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c,
2659 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c,
2660 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c,
2661 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4,
2662 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00,
2663 0x61, 0x20, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c,
2664 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xc4, 0x6a, 0x80, 0xda,
2665 0x08, 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00,
2666 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0x48, 0x4f, 0x00, 0x00, 0x00, 0x00,
2667 0xcf, 0xc3, 0x59, 0x18, 0x26, 0x0d, 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69,
2668 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53,
2669 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42,
2670 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
2671 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46,
2672 0x72, 0x6f, 0x6d, 0x32, 0x44, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
2673 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72,
2674 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
2675 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70,
2676 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
2677 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74,
2678 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f,
2679 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e,
2680 0x74, 0x00, 0x00, 0x00, 0x13, 0x04, 0x8a, 0x99, 0x20, 0x50, 0xcd, 0x04,
2681 0x81, 0x72, 0x26, 0x08, 0xd4, 0xb3, 0x42, 0xa0, 0x05, 0x55, 0x58, 0x31,
2682 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15, 0x56,
2683 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03, 0x2a,
2684 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60, 0x61, 0x43, 0x50,
2685 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02, 0x2c,
2686 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02, 0x2c,
2687 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18, 0x7e,
2688 0xa1, 0x17, 0x64, 0x01, 0x9b, 0x0c, 0x05, 0x23, 0x51, 0x20, 0xc8, 0x26,
2689 0xc3, 0xe1, 0x58, 0x14, 0x08, 0x62, 0xc1, 0x22, 0x1f, 0x0b, 0x08, 0xf8,
2690 0x6c, 0x32, 0x2c, 0xd2, 0x46, 0xc1, 0x20, 0x23, 0x06, 0x06, 0x11, 0x82,
2691 0x60, 0xf1, 0x41, 0x5e, 0x30, 0x62, 0xd0, 0x14, 0x21, 0x08, 0x16, 0x9f,
2692 0x03, 0x06, 0x0d, 0x43, 0x2c, 0xca, 0x12, 0x6c, 0x19, 0x04, 0xc4, 0x00,
2693 0x09, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8, 0x85, 0x43, 0x17, 0x90,
2694 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba, 0x80, 0xec, 0xc2, 0x96,
2695 0xe3, 0x08, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17, 0xb6, 0x14, 0xc9, 0xb1,
2696 0x0b, 0x88, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00,
2697 0x12, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22, 0x64, 0x82, 0xa4, 0x1c,
2698 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88, 0x90, 0xa1, 0x05, 0x6c,
2699 0x00, 0x12, 0xf9, 0x12, 0xc0, 0x3c, 0x0b, 0xf1, 0x4f, 0xc4, 0x35, 0x51,
2700 0x11, 0xf1, 0xdb, 0x83, 0x5f, 0xe1, 0xc5, 0x6d, 0x2b, 0x00, 0xa2, 0x81,
2701 0xb2, 0x2d, 0xc8, 0xf4, 0x45, 0x0e, 0x63, 0x77, 0x26, 0x70, 0x01, 0x48,
2702 0xe4, 0x0b, 0x4e, 0x53, 0x11, 0xd1, 0xe4, 0x17, 0x7e, 0x71, 0xdb, 0x3e,
2703 0xe5, 0x23, 0xb7, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
2704};
2705const unsigned int BlitFrom2D_metallib_len = 3852;
2706const unsigned char BlitFrom2DArray_metallib[] = {
2707 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
2708 0x00, 0x00, 0x00, 0x00, 0x81, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2709 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
2710 0x00, 0x00, 0x00, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2711 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x00, 0x00, 0x00,
2712 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2713 0xf1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x0e, 0x00, 0x00,
2714 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
2715 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
2716 0x6f, 0x6d, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00, 0x54, 0x59,
2717 0x50, 0x45, 0x01, 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x5a,
2718 0xb6, 0x27, 0x19, 0x1d, 0x07, 0x93, 0x57, 0x51, 0x97, 0xd8, 0x2e, 0x0e,
2719 0x79, 0x5c, 0xd2, 0x1b, 0x26, 0xed, 0xa2, 0x41, 0xab, 0x0d, 0x04, 0x42,
2720 0x64, 0x84, 0xde, 0x4c, 0x01, 0xee, 0xed, 0x4d, 0x44, 0x53, 0x5a, 0x08,
2721 0x00, 0x90, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46,
2722 0x54, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2723 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2724 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00,
2725 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00,
2726 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44,
2727 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00,
2728 0x00, 0x7c, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0,
2729 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30,
2730 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00,
2731 0x00, 0x97, 0x03, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00,
2732 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04,
2733 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08,
2734 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b,
2735 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52,
2736 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32,
2737 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81,
2738 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00,
2739 0x00, 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff,
2740 0xff, 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e,
2741 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c,
2742 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d,
2743 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70,
2744 0x87, 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0,
2745 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48,
2746 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18,
2747 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e,
2748 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c,
2749 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d,
2750 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d,
2751 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78,
2752 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80,
2753 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28,
2754 0x07, 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68,
2755 0x03, 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e,
2756 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c,
2757 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e,
2758 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78,
2759 0x87, 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80,
2760 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e,
2761 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d,
2762 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e,
2763 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c,
2764 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70,
2765 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48,
2766 0x07, 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00,
2767 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c,
2768 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c,
2769 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c,
2770 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c,
2771 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28,
2772 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40,
2773 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03,
2774 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d,
2775 0x20, 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee,
2776 0xf0, 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0,
2777 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff,
2778 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28,
2779 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30,
2780 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8,
2781 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff,
2782 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02,
2783 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40,
2784 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61,
2785 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x29, 0x00, 0x00,
2786 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4,
2787 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a,
2788 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x6c, 0x33, 0x00, 0xc3, 0x08, 0x04,
2789 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94,
2790 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88,
2791 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4d, 0x9a, 0x22, 0x4a, 0x98,
2792 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0xdf, 0x1e, 0x7e, 0x20, 0x8a,
2793 0x00, 0xec, 0x9f, 0xc6, 0x08, 0x80, 0x41, 0x04, 0x23, 0xb8, 0x48, 0x9a,
2794 0x22, 0x4a, 0x98, 0xfc, 0x5f, 0x02, 0x98, 0x67, 0x21, 0xa2, 0x7f, 0x1a,
2795 0x23, 0x00, 0x06, 0x11, 0x10, 0xa1, 0x18, 0x41, 0x84, 0x72, 0x12, 0xa9,
2796 0x39, 0x82, 0x60, 0x18, 0x41, 0x18, 0x8a, 0x12, 0x4e, 0x12, 0x83, 0x35,
2797 0x06, 0x06, 0xb9, 0x22, 0x80, 0x41, 0xb0, 0x08, 0x03, 0x90, 0x1c, 0x08,
2798 0x48, 0x81, 0x31, 0x47, 0x00, 0x0a, 0x83, 0x08, 0x82, 0x30, 0x88, 0x00,
2799 0x08, 0x83, 0x08, 0x83, 0x30, 0x02, 0x00, 0x00, 0x00, 0x13, 0xaa, 0x70,
2800 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78,
2801 0x60, 0x87, 0x72, 0x68, 0x83, 0x74, 0x78, 0x87, 0x79, 0x88, 0x83, 0x38,
2802 0x70, 0x03, 0x38, 0x70, 0x03, 0x38, 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06,
2803 0xf0, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
2804 0x76, 0x40, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07,
2805 0x78, 0xd0, 0x06, 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07,
2806 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07,
2807 0x71, 0x60, 0x07, 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
2808 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07,
2809 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e,
2810 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
2811 0x6d, 0x60, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
2812 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07,
2813 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07,
2814 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f,
2815 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
2816 0x6d, 0x60, 0x0f, 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
2817 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
2818 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07,
2819 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07,
2820 0x6d, 0x60, 0x0f, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07,
2821 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07,
2822 0x79, 0x20, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07,
2823 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07,
2824 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06,
2825 0xf6, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07,
2826 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07,
2827 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07,
2828 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07,
2829 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0x30, 0xe4, 0x51, 0x00, 0x00,
2830 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0xc8, 0xe3, 0x00,
2831 0x01, 0x20, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x07,
2832 0x02, 0x02, 0x60, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x21,
2833 0x8f, 0x04, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
2834 0x1a, 0x21, 0x0c, 0xf9, 0x6c, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0xd8, 0x9d,
2835 0x16, 0x45, 0x00, 0x26, 0xb1, 0x41, 0xa0, 0xa8, 0xe0, 0x00, 0x00, 0x40,
2836 0x16, 0x08, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98,
2837 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43,
2838 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20,
2839 0x85, 0x52, 0x06, 0x64, 0x47, 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xea,
2840 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00,
2841 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d,
2842 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07,
2843 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80,
2844 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66,
2845 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d,
2846 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07,
2847 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03,
2848 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90,
2849 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50,
2850 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2,
2851 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39,
2852 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14,
2853 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07,
2854 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07,
2855 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87,
2856 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0,
2857 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8,
2858 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc,
2859 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6,
2860 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39,
2861 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f,
2862 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c,
2863 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07,
2864 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53,
2865 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40,
2866 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc,
2867 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc,
2868 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38,
2869 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07,
2870 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51,
2871 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca,
2872 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4,
2873 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38,
2874 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c,
2875 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87,
2876 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07,
2877 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50,
2878 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8,
2879 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d,
2880 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c,
2881 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4,
2882 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87,
2883 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20,
2884 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10,
2885 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0,
2886 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2,
2887 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4,
2888 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b,
2889 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc,
2890 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87,
2891 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10,
2892 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50,
2893 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87,
2894 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85,
2895 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00,
2896 0x00, 0x79, 0x18, 0x00, 0x00, 0xf3, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8,
2897 0x90, 0x51, 0xaa, 0x01, 0x19, 0xf4, 0x13, 0x00, 0x00, 0x8b, 0xf2, 0x06,
2898 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30,
2899 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31,
2900 0xcc, 0xa2, 0x78, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b,
2901 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61,
2902 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20,
2903 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
2904 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28,
2905 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32,
2906 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69,
2907 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65,
2908 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c,
2909 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
2910 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65,
2911 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d,
2912 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75,
2913 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65,
2914 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e,
2915 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61, 0x69,
2916 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e,
2917 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69, 0x72,
2918 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e,
2919 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
2920 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61,
2921 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69, 0x72,
2922 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
2923 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
2924 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72,
2925 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72,
2926 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74,
2927 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75,
2928 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66,
2929 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c,
2930 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65,
2931 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69, 0x72,
2932 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65,
2933 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54,
2934 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f,
2935 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76,
2936 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72,
2937 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61,
2938 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
2939 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65,
2940 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53,
2941 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73,
2942 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61,
2943 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69,
2944 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74,
2945 0x75, 0x72, 0x65, 0x32, 0x64, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3c,
2946 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c,
2947 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74,
2948 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c,
2949 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75,
2950 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00,
2951 0x00, 0x13, 0x84, 0x81, 0x98, 0x20, 0x54, 0xd1, 0x04, 0x61, 0x28, 0x26,
2952 0x08, 0x83, 0x31, 0x41, 0x18, 0x8e, 0x09, 0xc2, 0x02, 0x4c, 0x10, 0x06,
2953 0x64, 0x82, 0x30, 0x24, 0x13, 0x84, 0x41, 0x99, 0x20, 0x0c, 0xcb, 0x04,
2954 0x61, 0x60, 0x36, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x86, 0xa1, 0x0d, 0x04,
2955 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35, 0x78, 0x83, 0x37, 0xd8, 0x40,
2956 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21, 0x28, 0x36, 0x04, 0xc6, 0x86,
2957 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0xb2, 0x21, 0xf0, 0x83,
2958 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24, 0x0f, 0x14, 0x6d, 0x40, 0xda,
2959 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d, 0xd4, 0x1b, 0xc8, 0xc1, 0x1b,
2960 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c, 0xdb, 0x1c, 0xb8, 0xc1, 0x1b,
2961 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78, 0xdf, 0x06, 0x69, 0x0d, 0x2a,
2962 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c, 0x13, 0x05, 0x30, 0x88, 0x83,
2963 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31, 0xd8, 0xa0, 0xd4, 0x01, 0x19,
2964 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98, 0x01, 0x74, 0x06, 0x1b, 0x12,
2965 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20, 0x49, 0x03, 0x48, 0x0d, 0x36,
2966 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0xb0, 0x61, 0x80, 0x83,
2967 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8, 0x11, 0x1b, 0x9b, 0x5d, 0x9b,
2968 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99, 0x8b, 0x19, 0x5b, 0xd8, 0xd9,
2969 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b,
2970 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0, 0x0e, 0xba, 0x84, 0xa5, 0xc9,
2971 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0xf0, 0xa0,
2972 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98, 0xdb, 0x59, 0x5d, 0xd8, 0x59,
2973 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x20, 0x0f,
2974 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd, 0xb5, 0xc1, 0xa5, 0xb1, 0x95,
2975 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x19, 0xf4, 0x60,
2976 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c, 0x8b, 0x99, 0x5c, 0xd8, 0x59,
2977 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14, 0x00, 0x00, 0xa9, 0x18, 0x00,
2978 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80,
2979 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43,
2980 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e,
2981 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d,
2982 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4,
2983 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81,
2984 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08,
2985 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01,
2986 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c,
2987 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c,
2988 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c,
2989 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1,
2990 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00,
2991 0x00, 0x6e, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00,
2992 0x00, 0x02, 0x00, 0x00, 0x00, 0xc4, 0x6a, 0x80, 0xda, 0x08, 0x00, 0x00,
2993 0x00, 0xf1, 0x30, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8,
2994 0x90, 0x51, 0x22, 0x88, 0x58, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x13, 0x06,
2995 0x16, 0x86, 0x49, 0x03, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74,
2996 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70,
2997 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x61,
2998 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f,
2999 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d,
3000 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x29, 0x61, 0x69, 0x72, 0x2d,
3001 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
3002 0x61, 0x72, 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
3003 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61,
3004 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
3005 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65,
3006 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32,
3007 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
3008 0x69, 0x6e, 0x74, 0x00, 0x00, 0x13, 0x04, 0xab, 0x99, 0x20, 0x58, 0xce,
3009 0x04, 0xc1, 0x7a, 0x26, 0x08, 0x16, 0xb4, 0x42, 0xa0, 0x05, 0x55, 0x58,
3010 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15,
3011 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03,
3012 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60, 0x61, 0x43,
3013 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02,
3014 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02,
3015 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18,
3016 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0, 0x0b, 0xbd, 0x20, 0x0b, 0x00,
3017 0x00, 0x9b, 0x0c, 0x05, 0x23, 0x51, 0x20, 0xc8, 0x26, 0xc3, 0xe1, 0x58,
3018 0x14, 0x08, 0x62, 0xc1, 0x22, 0x1f, 0x0b, 0x08, 0xf8, 0x6c, 0x32, 0x2c,
3019 0xd2, 0x44, 0x01, 0x18, 0x23, 0x06, 0x05, 0x11, 0x82, 0x60, 0x20, 0x79,
3020 0xc1, 0x26, 0x83, 0x53, 0x79, 0x14, 0x0c, 0x32, 0x62, 0x60, 0x10, 0x21,
3021 0x08, 0x16, 0x1f, 0x24, 0x06, 0xc1, 0x88, 0x81, 0x53, 0x84, 0x20, 0x58,
3022 0x7c, 0x0e, 0x19, 0x40, 0xcf, 0x41, 0x38, 0x8d, 0x13, 0x78, 0x19, 0x04,
3023 0xc4, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20,
3024 0xc8, 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c,
3025 0xba, 0x80, 0xec, 0xc2, 0x96, 0xe3, 0x08, 0x7e, 0xe1, 0xd0, 0x05, 0x64,
3026 0x17, 0xb6, 0x1c, 0x4a, 0x00, 0x0e, 0x87, 0x2e, 0x20, 0xbb, 0xb0, 0xa5,
3027 0x60, 0x8e, 0x5d, 0x40, 0x74, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3028 0x00, 0x71, 0x20, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10,
3029 0x22, 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40,
3030 0x88, 0x90, 0xa1, 0x05, 0x84, 0x01, 0x80, 0x44, 0xbe, 0x04, 0x30, 0xcf,
3031 0x42, 0xfc, 0x13, 0x71, 0x4d, 0x54, 0x44, 0xfc, 0xf6, 0xf0, 0x03, 0x51,
3032 0x04, 0x60, 0x7e, 0x85, 0x17, 0xb7, 0xad, 0x00, 0x92, 0x06, 0xcf, 0xb6,
3033 0x20, 0xd3, 0x17, 0x39, 0x8c, 0xdd, 0x69, 0x51, 0x04, 0x60, 0x26, 0x70,
3034 0x01, 0x48, 0xe4, 0x0b, 0x4e, 0x53, 0x11, 0xd1, 0xe4, 0x17, 0x7e, 0x71,
3035 0xdb, 0x3e, 0xe5, 0x23, 0xb7, 0x6d, 0x03, 0x17, 0x80, 0x44, 0xbe, 0xe0,
3036 0x34, 0x15, 0x11, 0x4d, 0x3e, 0xe5, 0x23, 0xb7, 0xed, 0x17, 0x7e, 0x71,
3037 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
3038};
3039const unsigned int BlitFrom2DArray_metallib_len = 3969;
3040const unsigned char BlitFrom3D_metallib[] = {
3041 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
3042 0x00, 0x00, 0x00, 0x00, 0x4c, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3043 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
3044 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3045 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
3046 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3047 0xec, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0e, 0x00, 0x00,
3048 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
3049 0x4e, 0x41, 0x4d, 0x45, 0x0b, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
3050 0x6f, 0x6d, 0x33, 0x44, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01,
3051 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0xa6, 0x7b, 0x96, 0x3b, 0xd9, 0xec,
3052 0x41, 0x41, 0xc7, 0xf7, 0x7c, 0x61, 0x16, 0x29, 0x75, 0x45, 0x99, 0x12,
3053 0x6b, 0x92, 0xd0, 0x87, 0xbc, 0xf7, 0xfe, 0x23, 0x9b, 0x67, 0x99, 0xcc,
3054 0x0e, 0x4e, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x60, 0x0e, 0x00, 0x00,
3055 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00,
3056 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3057 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45,
3058 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
3059 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
3060 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b,
3061 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x44, 0x0e, 0x00, 0x00,
3062 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00,
3063 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8,
3064 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0x89, 0x03, 0x00, 0x00,
3065 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
3066 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
3067 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62,
3068 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14,
3069 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20,
3070 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
3071 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a,
3072 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00,
3073 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40,
3074 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1,
3075 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1,
3076 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a,
3077 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72,
3078 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a,
3079 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74,
3080 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40,
3081 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01,
3082 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1,
3083 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41,
3084 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79,
3085 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79,
3086 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77,
3087 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76,
3088 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70,
3089 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1,
3090 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01,
3091 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79,
3092 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70,
3093 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70,
3094 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2,
3095 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81,
3096 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0,
3097 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a,
3098 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a,
3099 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36,
3100 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1,
3101 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00,
3102 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41,
3103 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1,
3104 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a,
3105 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78,
3106 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1,
3107 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06,
3108 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e,
3109 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e,
3110 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05,
3111 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00,
3112 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d,
3113 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff,
3114 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f,
3115 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0,
3116 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00, 0x49, 0x18, 0x00, 0x00,
3117 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61,
3118 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00,
3119 0x89, 0x20, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09,
3120 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3,
3121 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c,
3122 0x10, 0x68, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73,
3123 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45,
3124 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04,
3125 0x42, 0x38, 0x4a, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89,
3126 0x8a, 0x88, 0xff, 0x1e, 0xfe, 0x69, 0x8c, 0x00, 0x18, 0x44, 0x30, 0x82,
3127 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff, 0x25, 0x80, 0x79, 0x16, 0x22,
3128 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01, 0x11, 0x8a, 0x11, 0x44, 0x28,
3129 0x27, 0x91, 0x1a, 0x46, 0x18, 0x80, 0x39, 0x82, 0x60, 0x18, 0x61, 0x18,
3130 0x4a, 0x12, 0x4e, 0x62, 0xcd, 0x35, 0x30, 0xe8, 0x15, 0x01, 0x0c, 0x8a,
3131 0x03, 0x01, 0x29, 0x30, 0xe6, 0x08, 0x40, 0x61, 0x10, 0x41, 0x10, 0x06,
3132 0x11, 0x00, 0x61, 0x10, 0x61, 0x10, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
3133 0x13, 0xaa, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70,
3134 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x83, 0x74, 0x78, 0x87, 0x79,
3135 0x88, 0x83, 0x38, 0x70, 0x03, 0x38, 0x70, 0x03, 0x38, 0xd8, 0x70, 0x1b,
3136 0xe5, 0xd0, 0x06, 0xf0, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
3137 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07,
3138 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07,
3139 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07,
3140 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07,
3141 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e,
3142 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
3143 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07,
3144 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
3145 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07,
3146 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f,
3147 0x72, 0x40, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
3148 0x6d, 0x60, 0x0f, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07,
3149 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07,
3150 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07,
3151 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f,
3152 0x79, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07,
3153 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07,
3154 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06,
3155 0xf6, 0x10, 0x07, 0x79, 0x20, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07,
3156 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07,
3157 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07,
3158 0x76, 0xd0, 0x06, 0xf6, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07,
3159 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f,
3160 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07,
3161 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e,
3162 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0x30, 0xe4,
3163 0x51, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60,
3164 0xc8, 0xf3, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
3165 0xc0, 0x90, 0x27, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
3166 0x00, 0x00, 0x8d, 0x10, 0x86, 0x54, 0xb6, 0x05, 0x99, 0xbe, 0xc8, 0x61,
3167 0xee, 0x4e, 0x62, 0x83, 0x40, 0x51, 0xbe, 0x01, 0x00, 0x80, 0x2c, 0x10,
3168 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90,
3169 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85,
3170 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x54, 0x47,
3171 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xe8, 0x58, 0x42, 0x24, 0x00, 0x00,
3172 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c,
3173 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3,
3174 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6,
3175 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e,
3176 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43,
3177 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03,
3178 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48,
3179 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20,
3180 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e,
3181 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d,
3182 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89,
3183 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83,
3184 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68,
3185 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90,
3186 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78,
3187 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98,
3188 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5,
3189 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c,
3190 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c,
3191 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43,
3192 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43,
3193 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82,
3194 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58,
3195 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18,
3196 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2,
3197 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec,
3198 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e,
3199 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d,
3200 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83,
3201 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60,
3202 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0,
3203 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d,
3204 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d,
3205 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43,
3206 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3,
3207 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18,
3208 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3,
3209 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1,
3210 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e,
3211 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3,
3212 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3,
3213 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60,
3214 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec,
3215 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5,
3216 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5,
3217 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8,
3218 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17,
3219 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d,
3220 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03,
3221 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78,
3222 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce,
3223 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef,
3224 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08,
3225 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0,
3226 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8,
3227 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00,
3228 0xf1, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0xaa, 0x01, 0x19,
3229 0xdc, 0x13, 0x00, 0x00, 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14,
3230 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42,
3231 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x60, 0xcd, 0x72,
3232 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73,
3233 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a,
3234 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c,
3235 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30,
3236 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c,
3237 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29,
3238 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d,
3239 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73,
3240 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
3241 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74,
3242 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
3243 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
3244 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f,
3245 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
3246 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74,
3247 0x61, 0x72, 0x67, 0x65, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67,
3248 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c,
3249 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67,
3250 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65,
3251 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78,
3252 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65,
3253 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73,
3254 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74,
3255 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d,
3256 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69,
3257 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70,
3258 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f,
3259 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61,
3260 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69,
3261 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
3262 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e,
3263 0x72, 0x65, 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75,
3264 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
3265 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44,
3266 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e,
3267 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f,
3268 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70,
3269 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79,
3270 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61,
3271 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67,
3272 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
3273 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
3274 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65,
3275 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d,
3276 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x33, 0x64,
3277 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70,
3278 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78,
3279 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70,
3280 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f,
3281 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00,
3282 0x13, 0x84, 0x61, 0x98, 0x20, 0x50, 0xd0, 0x04, 0x61, 0x20, 0x26, 0x08,
3283 0x43, 0x31, 0x41, 0x18, 0x8c, 0x09, 0xc2, 0x02, 0x4c, 0x10, 0x86, 0x63,
3284 0x82, 0x30, 0x20, 0x13, 0x84, 0x21, 0x99, 0x20, 0x0c, 0xca, 0x04, 0x61,
3285 0x58, 0x36, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x86, 0xa1, 0x0d, 0x04, 0x37,
3286 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35, 0x78, 0x83, 0x37, 0xd8, 0x40, 0x10,
3287 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21, 0x28, 0x36, 0x04, 0xc6, 0x86, 0xe0,
3288 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0xb2, 0x21, 0xf0, 0x83, 0x0d,
3289 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24, 0x0f, 0x14, 0x6d, 0x40, 0xda, 0x40,
3290 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d, 0xd4, 0x1b, 0xc8, 0xc1, 0x1b, 0x3c,
3291 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c, 0xdb, 0x1c, 0xb8, 0xc1, 0x1b, 0x70,
3292 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78, 0xdf, 0x06, 0x69, 0x0d, 0x2a, 0x2b,
3293 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c, 0x13, 0x05, 0x30, 0x88, 0x83, 0x30,
3294 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31, 0xd8, 0xa0, 0xd4, 0x01, 0x19, 0x5c,
3295 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98, 0x01, 0x74, 0x06, 0x1b, 0x12, 0x37,
3296 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20, 0x49, 0x03, 0x48, 0x0d, 0x36, 0x14,
3297 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0xb0, 0x61, 0x80, 0x83, 0x3f,
3298 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8, 0x11, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b,
3299 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99, 0x8b, 0x19, 0x5b, 0xd8, 0xd9, 0xdc,
3300 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0x1a,
3301 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0, 0x0e, 0xba, 0x84, 0xa5, 0xc9, 0xb9,
3302 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0xf0, 0xa0, 0x54,
3303 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98, 0xdb, 0x59, 0x5d, 0xd8, 0x59, 0xd9,
3304 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x20, 0x0f, 0x3a,
3305 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd, 0xb5, 0xc1, 0xa5, 0xb1, 0x95, 0x7d,
3306 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x19, 0xf4, 0x60, 0x0f,
3307 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c, 0x8b, 0x99, 0x5c, 0xd8, 0x59, 0x5b,
3308 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00,
3309 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07,
3310 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39,
3311 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2,
3312 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16,
3313 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40,
3314 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07,
3315 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07,
3316 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b,
3317 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc,
3318 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8,
3319 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2,
3320 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50,
3321 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00,
3322 0x70, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00,
3323 0x05, 0x00, 0x00, 0x00, 0x34, 0x66, 0x00, 0xa8, 0xd5, 0x00, 0xb9, 0x39,
3324 0x06, 0x83, 0xb0, 0x46, 0x00, 0xa8, 0x16, 0x01, 0x89, 0x19, 0x00, 0x00,
3325 0xf1, 0x30, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90,
3326 0x51, 0x22, 0x48, 0x4f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xc3, 0x59, 0x18,
3327 0x26, 0x0d, 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65,
3328 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c,
3329 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x61, 0x69,
3330 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
3331 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x33,
3332 0x44, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
3333 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29,
3334 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
3335 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73,
3336 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
3337 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73,
3338 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
3339 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x00, 0x00, 0x00,
3340 0x13, 0x84, 0x8a, 0x99, 0x20, 0x54, 0xcd, 0x04, 0xa1, 0x72, 0x26, 0x08,
3341 0xd5, 0xb3, 0x42, 0xa0, 0x05, 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac,
3342 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b,
3343 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c,
3344 0x18, 0x72, 0x21, 0x17, 0x60, 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b,
3345 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c,
3346 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4,
3347 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61,
3348 0xc3, 0xf0, 0x0b, 0xbd, 0x20, 0x0b, 0x00, 0x00, 0x9b, 0x0c, 0x09, 0x64,
3349 0x51, 0x20, 0xc8, 0x26, 0xc3, 0x22, 0x69, 0x14, 0x08, 0x62, 0xc1, 0x23,
3350 0x1f, 0x0b, 0x08, 0xf8, 0x0c, 0x32, 0x04, 0x87, 0xb2, 0xc9, 0x00, 0x5d,
3351 0x18, 0x05, 0x60, 0xcc, 0x31, 0x0c, 0xc1, 0xb2, 0xc9, 0x30, 0x69, 0x63,
3352 0x40, 0xc1, 0x20, 0x23, 0x06, 0x06, 0x11, 0x82, 0x60, 0xf1, 0x45, 0x66,
3353 0x10, 0x8c, 0x18, 0x34, 0x45, 0x08, 0x82, 0xc5, 0xf7, 0xa0, 0x41, 0x45,
3354 0x11, 0x12, 0x24, 0x05, 0x63, 0x90, 0x41, 0x40, 0x0c, 0x00, 0x00, 0x00,
3355 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8, 0x85, 0x43, 0x17, 0x90,
3356 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba, 0x80, 0xec, 0xc2, 0x96,
3357 0x03, 0x09, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17, 0xb6, 0x1c, 0x4b, 0x00,
3358 0x0e, 0x87, 0x2e, 0x20, 0xbb, 0xb0, 0xa5, 0x68, 0x8e, 0x5d, 0x40, 0x74,
3359 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00,
3360 0x12, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22, 0x64, 0x82, 0xa4, 0x1c,
3361 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88, 0x90, 0xa1, 0x05, 0x6c,
3362 0x00, 0x12, 0xf9, 0x12, 0xc0, 0x3c, 0x0b, 0xf1, 0x4f, 0xc4, 0x35, 0x51,
3363 0x11, 0xf1, 0xdf, 0x83, 0x5f, 0xe1, 0xc5, 0x6d, 0x2b, 0x80, 0xa2, 0x81,
3364 0xb2, 0x2d, 0xc8, 0xf4, 0x45, 0x0e, 0x73, 0x77, 0x26, 0x70, 0x01, 0x48,
3365 0xe4, 0x0b, 0x4e, 0x53, 0x11, 0xd1, 0xe4, 0x17, 0x7e, 0x71, 0xdb, 0x3e,
3366 0xe5, 0x23, 0xb7, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3367 0x00, 0x00, 0x00, 0x00
3368};
3369const unsigned int BlitFrom3D_metallib_len = 3916;
3370const unsigned char BlitFromCube_metallib[] = {
3371 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
3372 0x00, 0x00, 0x00, 0x00, 0x6e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3373 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
3374 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3375 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x00, 0x00, 0x00,
3376 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3377 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00,
3378 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
3379 0x4e, 0x41, 0x4d, 0x45, 0x0d, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
3380 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01,
3381 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x84, 0x23, 0xba, 0x0e,
3382 0x3e, 0xf6, 0xd4, 0x75, 0x36, 0x22, 0x97, 0x33, 0x03, 0x87, 0xf0, 0x46,
3383 0x87, 0x1f, 0x18, 0x98, 0x57, 0x63, 0x0f, 0xcb, 0x69, 0x1d, 0x68, 0x8d,
3384 0x00, 0x5b, 0x3c, 0xb5, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x80, 0x0f,
3385 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00,
3386 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3387 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3388 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
3389 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e,
3390 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0,
3391 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x68, 0x0f,
3392 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14,
3393 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10,
3394 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0xd2, 0x03,
3395 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00,
3396 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10,
3397 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04,
3398 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10,
3399 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90,
3400 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48,
3401 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83,
3402 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x83, 0x00,
3403 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58,
3404 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d,
3405 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c,
3406 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90,
3407 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60,
3408 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18,
3409 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0,
3410 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d,
3411 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d,
3412 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c,
3413 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e,
3414 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0,
3415 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30,
3416 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48,
3417 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48,
3418 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28,
3419 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20,
3420 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d,
3421 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0,
3422 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70,
3423 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68,
3424 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c,
3425 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d,
3426 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e,
3427 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d,
3428 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68,
3429 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38,
3430 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e,
3431 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d,
3432 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e,
3433 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c,
3434 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00,
3435 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30,
3436 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e,
3437 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0, 0x00, 0x55,
3438 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20, 0x0e, 0xf5,
3439 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0, 0x0e, 0x6d,
3440 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06, 0x63, 0x28,
3441 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40,
3442 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01,
3443 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff,
3444 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff,
3445 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff,
3446 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00, 0x49, 0x18,
3447 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c,
3448 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03,
3449 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x32, 0x22,
3450 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93,
3451 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84,
3452 0xa4, 0x4c, 0x10, 0x74, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20,
3453 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac,
3454 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80,
3455 0x41, 0x04, 0x42, 0x38, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22,
3456 0xae, 0x89, 0x8a, 0x88, 0x5f, 0xa0, 0x02, 0xe2, 0x9f, 0xc6, 0x08, 0x80,
3457 0x41, 0x04, 0x23, 0xb8, 0x48, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x5f, 0x02,
3458 0x98, 0x67, 0x21, 0xa2, 0x7f, 0x1a, 0x23, 0x00, 0x06, 0x11, 0x10, 0xa1,
3459 0x18, 0x41, 0x84, 0x72, 0x12, 0xa9, 0x61, 0x84, 0x01, 0x98, 0x23, 0x08,
3460 0xca, 0x11, 0x4e, 0x62, 0x0d, 0x0c, 0x72, 0x45, 0x00, 0x83, 0x60, 0x11,
3461 0x06, 0x20, 0x39, 0x10, 0x90, 0x02, 0x63, 0x8e, 0x00, 0x14, 0x06, 0x11,
3462 0x04, 0x61, 0x10, 0x01, 0x10, 0xa6, 0x00, 0x46, 0x00, 0x86, 0x11, 0x86,
3463 0x61, 0x10, 0x61, 0x10, 0x00, 0x00, 0x13, 0xaa, 0x70, 0x48, 0x07, 0x79,
3464 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72,
3465 0x68, 0x83, 0x74, 0x78, 0x87, 0x79, 0x88, 0x83, 0x38, 0x70, 0x03, 0x38,
3466 0x70, 0x03, 0x38, 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0, 0xa0, 0x07,
3467 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
3468 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06,
3469 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e,
3470 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07,
3471 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07,
3472 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
3473 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07,
3474 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e,
3475 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
3476 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07,
3477 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a, 0x30, 0x07,
3478 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73, 0x20, 0x07,
3479 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f,
3480 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
3481 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
3482 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a, 0x10, 0x07,
3483 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f,
3484 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07,
3485 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79, 0x20, 0x07,
3486 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07,
3487 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07,
3488 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x50, 0x07,
3489 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07,
3490 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07,
3491 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07,
3492 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07,
3493 0x7a, 0x30, 0x07, 0x72, 0x30, 0xe4, 0x51, 0x00, 0x00, 0x08, 0x00, 0x00,
3494 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0xc8, 0xe3, 0x00, 0x01, 0x20, 0x00,
3495 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x07, 0x02, 0x02, 0x60,
3496 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x21, 0x8f, 0x04, 0x04,
3497 0xc0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x21, 0x0c,
3498 0xc9, 0x6c, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0x70, 0x54, 0x40, 0x48, 0x6c,
3499 0x10, 0x28, 0xfa, 0x3b, 0x00, 0x00, 0x90, 0x05, 0x02, 0x00, 0x0b, 0x00,
3500 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09,
3501 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02,
3502 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x64, 0x47, 0x00, 0x0a,
3503 0xa2, 0x40, 0x0a, 0x85, 0xea, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18,
3504 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1,
3505 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42,
3506 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f,
3507 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1,
3508 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84,
3509 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc,
3510 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70,
3511 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19,
3512 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f,
3513 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21,
3514 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc,
3515 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84,
3516 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37,
3517 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70,
3518 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77,
3519 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79,
3520 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e,
3521 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1,
3522 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81,
3523 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98,
3524 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88,
3525 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4,
3526 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72,
3527 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74,
3528 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e,
3529 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e,
3530 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21,
3531 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01,
3532 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc,
3533 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77,
3534 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e,
3535 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1,
3536 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61,
3537 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0,
3538 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0,
3539 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74,
3540 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e,
3541 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41,
3542 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48,
3543 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c,
3544 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4,
3545 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71,
3546 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f,
3547 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f,
3548 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f,
3549 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23,
3550 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21,
3551 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21,
3552 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94,
3553 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a,
3554 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e,
3555 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e,
3556 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74,
3557 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74,
3558 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78,
3559 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xf2, 0x00,
3560 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0xaa, 0x01, 0x19, 0xe4, 0x13,
3561 0x00, 0x00, 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12,
3562 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c,
3563 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x68, 0xcd, 0x72, 0x34, 0x00,
3564 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
3565 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41,
3566 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76,
3567 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33,
3568 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65,
3569 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65,
3570 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69,
3571 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64,
3572 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f,
3573 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d,
3574 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69,
3575 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72,
3576 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65,
3577 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69,
3578 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72,
3579 0x67, 0x65, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74,
3580 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61,
3581 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65,
3582 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65,
3583 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76,
3584 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74,
3585 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65,
3586 0x63, 0x74, 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61,
3587 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74,
3588 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
3589 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72,
3590 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61,
3591 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72,
3592 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65,
3593 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
3594 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65,
3595 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
3596 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56,
3597 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d,
3598 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d,
3599 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74,
3600 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68,
3601 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65,
3602 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67,
3603 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f,
3604 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
3605 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
3606 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74,
3607 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c,
3608 0x65, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65,
3609 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70,
3610 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78,
3611 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70,
3612 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f,
3613 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00,
3614 0x00, 0x00, 0x13, 0x84, 0x81, 0x98, 0x20, 0x54, 0xd1, 0x04, 0x61, 0x28,
3615 0x26, 0x08, 0x83, 0x31, 0x41, 0x18, 0x8e, 0x09, 0xc2, 0x02, 0x4c, 0x10,
3616 0x06, 0x64, 0x82, 0x30, 0x24, 0x13, 0x84, 0x41, 0x99, 0x20, 0x0c, 0xcb,
3617 0x04, 0x61, 0x60, 0x36, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x86, 0xa1, 0x0d,
3618 0x04, 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35, 0x78, 0x83, 0x37, 0xd8,
3619 0x40, 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21, 0x28, 0x36, 0x04, 0xc6,
3620 0x86, 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0xb2, 0x21, 0xf0,
3621 0x83, 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24, 0x0f, 0x14, 0x6d, 0x40,
3622 0xda, 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d, 0xd4, 0x1b, 0xc8, 0xc1,
3623 0x1b, 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c, 0xdb, 0x1c, 0xb8, 0xc1,
3624 0x1b, 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78, 0xdf, 0x06, 0x69, 0x0d,
3625 0x2a, 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c, 0x13, 0x05, 0x30, 0x88,
3626 0x83, 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31, 0xd8, 0xa0, 0xd4, 0x01,
3627 0x19, 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98, 0x01, 0x74, 0x06, 0x1b,
3628 0x12, 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20, 0x49, 0x03, 0x48, 0x0d,
3629 0x36, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0xb0, 0x61, 0x80,
3630 0x83, 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8, 0x11, 0x1b, 0x9b, 0x5d,
3631 0x9b, 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99, 0x8b, 0x19, 0x5b, 0xd8,
3632 0xd9, 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b,
3633 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0, 0x0e, 0xba, 0x84, 0xa5,
3634 0xc9, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0xf0,
3635 0xa0, 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98, 0xdb, 0x59, 0x5d, 0xd8,
3636 0x59, 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x20,
3637 0x0f, 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd, 0xb5, 0xc1, 0xa5, 0xb1,
3638 0x95, 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x19, 0xf4,
3639 0x60, 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c, 0x8b, 0x99, 0x5c, 0xd8,
3640 0x59, 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14, 0x00, 0x00, 0xa9, 0x18,
3641 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77,
3642 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0,
3643 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41,
3644 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1,
3645 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f,
3646 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80,
3647 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71,
3648 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4,
3649 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21,
3650 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20,
3651 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61,
3652 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f,
3653 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20,
3654 0x00, 0x00, 0xad, 0x00, 0x00, 0x00, 0x13, 0x04, 0x48, 0x2c, 0x10, 0x00,
3655 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x34, 0x4a, 0x81, 0x5a, 0x0d, 0x90,
3656 0x2d, 0x81, 0x22, 0xa0, 0x3d, 0xd6, 0x00, 0x04, 0x02, 0x81, 0x19, 0x80,
3657 0x31, 0x02, 0x10, 0x04, 0x41, 0x10, 0x14, 0x66, 0x00, 0xc6, 0x08, 0x40,
3658 0x10, 0x04, 0xf1, 0x5f, 0x18, 0x23, 0x00, 0x41, 0x10, 0xc4, 0xbf, 0x11,
3659 0x80, 0x31, 0x02, 0x10, 0x04, 0x41, 0x10, 0x0c, 0x28, 0xcc, 0x41, 0x80,
3660 0x01, 0xc7, 0x79, 0x73, 0x10, 0x1f, 0xc7, 0x79, 0x73, 0x10, 0x1c, 0x18,
3661 0x70, 0xde, 0x1c, 0x04, 0xf7, 0x71, 0xde, 0x1c, 0x04, 0xc7, 0x81, 0x81,
3662 0x37, 0x07, 0xc1, 0x71, 0x9f, 0x37, 0x07, 0x11, 0x06, 0x61, 0x10, 0x06,
3663 0xde, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x45, 0x00,
3664 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0xc8, 0x4f, 0x00, 0x00,
3665 0x00, 0x00, 0xcf, 0xe3, 0x59, 0x18, 0x26, 0x0d, 0x00, 0x00, 0x6f, 0x6d,
3666 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61,
3667 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20,
3668 0x54, 0x42, 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
3669 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69,
3670 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x29, 0x61, 0x69,
3671 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
3672 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d,
3673 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
3674 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d,
3675 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
3676 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53,
3677 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
3678 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x00, 0x13, 0x04, 0xab, 0x99, 0x20, 0x58,
3679 0xce, 0x04, 0xc1, 0x7a, 0x26, 0x08, 0x16, 0xb4, 0x42, 0xa0, 0x05, 0x55,
3680 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81,
3681 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d,
3682 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60, 0x61,
3683 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4,
3684 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4,
3685 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c,
3686 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0, 0x0b, 0xbd, 0x20, 0x0b,
3687 0x00, 0x00, 0x9b, 0x0c, 0x97, 0x47, 0x06, 0x14, 0x08, 0xb2, 0xc9, 0x90,
3688 0x81, 0x01, 0x1a, 0x50, 0x20, 0x88, 0x05, 0x9d, 0x7c, 0x2c, 0x20, 0xe0,
3689 0x33, 0x86, 0x10, 0x90, 0x81, 0x05, 0x90, 0x7c, 0x2c, 0xa0, 0xe0, 0x33,
3690 0x86, 0x40, 0x6c, 0x16, 0x4c, 0xf2, 0xb1, 0xe0, 0x82, 0xcf, 0x26, 0xc3,
3691 0x18, 0xa8, 0xc1, 0x1a, 0x50, 0x00, 0xc6, 0x88, 0x41, 0x41, 0x84, 0x20,
3692 0x18, 0x48, 0x76, 0x10, 0x0c, 0xf3, 0x0c, 0xc1, 0x71, 0x04, 0x85, 0x40,
3693 0x0c, 0x0c, 0x61, 0x14, 0x97, 0x61, 0x1d, 0x11, 0x9f, 0x39, 0x06, 0x2c,
3694 0x10, 0x03, 0xfb, 0x92, 0xf8, 0xcc, 0x31, 0x08, 0xc1, 0x18, 0xcc, 0x12,
3695 0x1c, 0x16, 0x06, 0x48, 0x7c, 0xe6, 0x18, 0xb6, 0xc0, 0x0c, 0xe6, 0x18,
3696 0x82, 0xc6, 0x0c, 0x66, 0x09, 0x8e, 0x39, 0x06, 0xce, 0xa1, 0x03, 0x2b,
3697 0x03, 0x26, 0x3e, 0x73, 0x0c, 0x42, 0x90, 0x06, 0xb3, 0x04, 0xc7, 0x1c,
3698 0x83, 0x17, 0xdd, 0xc1, 0x1c, 0x43, 0xf0, 0xac, 0xc1, 0x2c, 0xc1, 0x61,
3699 0x69, 0x00, 0xc5, 0x67, 0x8e, 0x01, 0x0c, 0x28, 0x3d, 0x98, 0x63, 0x08,
3700 0x84, 0x37, 0x98, 0x25, 0x38, 0x8c, 0x0d, 0xac, 0xf8, 0x58, 0x1b, 0x50,
3701 0xf1, 0x99, 0x63, 0x18, 0x03, 0xc1, 0x0f, 0xe6, 0x18, 0x02, 0x61, 0x0e,
3702 0x66, 0x09, 0x8e, 0x81, 0x9e, 0x40, 0x30, 0x94, 0x02, 0x22, 0xa8, 0x41,
3703 0x13, 0xc0, 0x20, 0x40, 0x05, 0x60, 0x90, 0x21, 0x20, 0x83, 0x39, 0xd8,
3704 0x64, 0xd8, 0x03, 0x51, 0x58, 0x05, 0x0a, 0x06, 0x19, 0x31, 0x30, 0x88,
3705 0x10, 0x04, 0x8b, 0x0f, 0x7a, 0x85, 0x60, 0xc4, 0x60, 0x29, 0x42, 0x10,
3706 0x2c, 0x3e, 0x27, 0x16, 0xfa, 0x80, 0x0f, 0x08, 0x3d, 0x08, 0x56, 0x21,
3707 0x83, 0x80, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e,
3708 0x20, 0xc8, 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e,
3709 0x1c, 0xba, 0x80, 0xec, 0xc2, 0x96, 0xa3, 0x09, 0x7e, 0xe1, 0xd0, 0x05,
3710 0x64, 0x17, 0xb6, 0x1c, 0x6c, 0x10, 0x80, 0xc3, 0xa1, 0x0b, 0xc8, 0x2e,
3711 0x6c, 0x29, 0xdc, 0xe0, 0xd8, 0x05, 0x44, 0x17, 0x00, 0x00, 0x00, 0x00,
3712 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x52, 0x0e,
3713 0x10, 0x22, 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39,
3714 0x40, 0x88, 0x90, 0xa1, 0x09, 0x5c, 0x00, 0x12, 0xf9, 0x82, 0xd3, 0x54,
3715 0x44, 0x34, 0xf9, 0x85, 0x5f, 0xdc, 0xb6, 0x4f, 0xf9, 0xc8, 0x6d, 0xdb,
3716 0xc0, 0x05, 0x20, 0x91, 0x2f, 0x38, 0x4d, 0x45, 0x44, 0x93, 0x4f, 0xf9,
3717 0xc8, 0x6d, 0xfb, 0x85, 0x5f, 0xdc, 0xb6, 0x05, 0x74, 0x00, 0x12, 0xf9,
3718 0x12, 0xc0, 0x3c, 0x0b, 0xf1, 0x4f, 0xc4, 0x35, 0x51, 0x11, 0xf1, 0x0b,
3719 0x54, 0x40, 0xf8, 0x15, 0x5e, 0xdc, 0xb6, 0x02, 0x40, 0x1a, 0x30, 0xdb,
3720 0x82, 0x4c, 0x5f, 0xe4, 0x30, 0x1c, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00,
3721 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
3722};
3723const unsigned int BlitFromCube_metallib_len = 4206;
3724const unsigned char BlitFromCubeArray_metallib[] = {
3725 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
3726 0x00, 0x00, 0x00, 0x00, 0x93, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3727 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
3728 0x00, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3729 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x00, 0x00, 0x00,
3730 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3731 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x0f, 0x00, 0x00,
3732 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
3733 0x4e, 0x41, 0x4d, 0x45, 0x12, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
3734 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00,
3735 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20,
3736 0x00, 0xc0, 0x20, 0x04, 0x6d, 0x7e, 0x4e, 0x15, 0x63, 0x93, 0x87, 0x50,
3737 0x1c, 0x5c, 0x8b, 0x9f, 0xd1, 0x04, 0xae, 0xc0, 0x6b, 0xfa, 0x63, 0x35,
3738 0xa0, 0x74, 0x03, 0x1a, 0xfa, 0x44, 0x0a, 0xf2, 0xcc, 0x4d, 0x44, 0x53,
3739 0x5a, 0x08, 0x00, 0xa0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f,
3740 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3741 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3742 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02,
3743 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04,
3744 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45,
3745 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14,
3746 0x00, 0x00, 0x00, 0x8c, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42,
3747 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62,
3748 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21,
3749 0x0c, 0x00, 0x00, 0xdb, 0x03, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02,
3750 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41,
3751 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25,
3752 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42,
3753 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a,
3754 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00,
3755 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41,
3756 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51,
3757 0x18, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff,
3758 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0,
3759 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc,
3760 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8,
3761 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87,
3762 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87,
3763 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83,
3764 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0,
3765 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8,
3766 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda,
3767 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde,
3768 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8,
3769 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08,
3770 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87,
3771 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87,
3772 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07,
3773 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4,
3774 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc,
3775 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2,
3776 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08,
3777 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03,
3778 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8,
3779 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6,
3780 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca,
3781 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda,
3782 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07,
3783 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07,
3784 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07,
3785 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8,
3786 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8,
3787 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea,
3788 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4,
3789 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07,
3790 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07,
3791 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0,
3792 0x09, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20,
3793 0x0f, 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0,
3794 0x06, 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30,
3795 0x0f, 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff,
3796 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5,
3797 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50,
3798 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36,
3799 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94,
3800 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24,
3801 0xa0, 0x02, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13,
3802 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01,
3803 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x2a,
3804 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93,
3805 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
3806 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x74, 0x33, 0x00, 0xc3,
3807 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34,
3808 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2,
3809 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4e, 0x9a, 0x22,
3810 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0x5f, 0xa0, 0x02,
3811 0xe2, 0x07, 0xa2, 0x08, 0xc0, 0xfe, 0x69, 0x8c, 0x00, 0x18, 0x44, 0x30,
3812 0x82, 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff, 0x25, 0x80, 0x79, 0x16,
3813 0x22, 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01, 0x11, 0x8a, 0x11, 0x44,
3814 0x28, 0x27, 0x91, 0x1a, 0x46, 0x18, 0x80, 0x39, 0x82, 0xa0, 0x20, 0xe1,
3815 0x24, 0x36, 0x1a, 0x18, 0xe4, 0x8a, 0x00, 0x06, 0xc1, 0x22, 0x0c, 0x40,
3816 0x72, 0x20, 0x20, 0x05, 0xc6, 0x1c, 0x01, 0x28, 0x0c, 0x22, 0x08, 0xc2,
3817 0x20, 0x02, 0x20, 0x4c, 0x01, 0x8c, 0x00, 0x0c, 0x23, 0x0c, 0xc3, 0x20,
3818 0xc2, 0x20, 0x00, 0x13, 0xaa, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a,
3819 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x83, 0x74,
3820 0x78, 0x87, 0x79, 0x88, 0x83, 0x38, 0x70, 0x03, 0x38, 0x70, 0x03, 0x38,
3821 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0, 0xa0, 0x07, 0x76, 0x40, 0x07,
3822 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x90, 0x0e,
3823 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x80, 0x07,
3824 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07,
3825 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x90, 0x0e,
3826 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
3827 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
3828 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
3829 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x76, 0x40, 0x07,
3830 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f,
3831 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07,
3832 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07,
3833 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
3834 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x74, 0x80, 0x07,
3835 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f,
3836 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
3837 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07,
3838 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x20, 0x07,
3839 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07,
3840 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79, 0x20, 0x07, 0x7a, 0x20, 0x07,
3841 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f,
3842 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07,
3843 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x50, 0x07, 0x71, 0x20, 0x07,
3844 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07,
3845 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07,
3846 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07,
3847 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07,
3848 0x72, 0x30, 0xe4, 0x51, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00,
3849 0x00, 0x00, 0x60, 0xc8, 0xe3, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x08,
3850 0x00, 0x00, 0x00, 0xc0, 0x90, 0x07, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00,
3851 0x10, 0x00, 0x00, 0x00, 0x80, 0x21, 0x8f, 0x04, 0x04, 0xc0, 0x00, 0x00,
3852 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x21, 0x0c, 0x19, 0x6d, 0x0b,
3853 0x32, 0x7d, 0x91, 0xc3, 0x70, 0x54, 0x40, 0x68, 0x51, 0x04, 0x60, 0x12,
3854 0x1b, 0x04, 0x8a, 0x1a, 0x0f, 0x00, 0x00, 0x64, 0x81, 0x00, 0x00, 0x0b,
3855 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c,
3856 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30,
3857 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x64, 0x47, 0x00,
3858 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xea, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1,
3859 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
3860 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
3861 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
3862 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
3863 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
3864 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d,
3865 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87,
3866 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87,
3867 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30,
3868 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde,
3869 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b,
3870 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c,
3871 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
3872 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87,
3873 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87,
3874 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87,
3875 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0,
3876 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc,
3877 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4,
3878 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39,
3879 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38,
3880 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
3881 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87,
3882 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87,
3883 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50,
3884 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50,
3885 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2,
3886 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea,
3887 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b,
3888 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87,
3889 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50,
3890 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde,
3891 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0,
3892 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d,
3893 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b,
3894 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87,
3895 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10,
3896 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2,
3897 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66,
3898 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38,
3899 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b,
3900 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07,
3901 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60,
3902 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20,
3903 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30,
3904 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30,
3905 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec,
3906 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8,
3907 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39,
3908 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07,
3909 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87,
3910 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30,
3911 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87,
3912 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87,
3913 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07,
3914 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xf3,
3915 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0xaa, 0x01, 0x19, 0xfc,
3916 0x13, 0x00, 0x00, 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19,
3917 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25,
3918 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x80, 0x41, 0xb3, 0x1c,
3919 0x0d, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69,
3920 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65,
3921 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20,
3922 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32,
3923 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66,
3924 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d,
3925 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
3926 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f,
3927 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63,
3928 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f,
3929 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61,
3930 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66,
3931 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66,
3932 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61,
3933 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61,
3934 0x72, 0x67, 0x65, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f,
3935 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f,
3936 0x61, 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d,
3937 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e,
3938 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44,
3939 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e,
3940 0x74, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70,
3941 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32,
3942 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
3943 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74,
3944 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65,
3945 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73,
3946 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69,
3947 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a,
3948 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
3949 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72,
3950 0x65, 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63,
3951 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55,
3952 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69,
3953 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74,
3954 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61,
3955 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74,
3956 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70,
3957 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
3958 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e,
3959 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
3960 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
3961 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78,
3962 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70,
3963 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62,
3964 0x65, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61,
3965 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f,
3966 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61,
3967 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61,
3968 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53,
3969 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x13, 0x84, 0x81, 0x98, 0x20,
3970 0x54, 0xd1, 0x04, 0x61, 0x28, 0x26, 0x08, 0x83, 0x31, 0x41, 0x18, 0x8e,
3971 0x09, 0xc2, 0x02, 0x4c, 0x10, 0x06, 0x64, 0x82, 0x30, 0x24, 0x13, 0x84,
3972 0x41, 0x99, 0x20, 0x0c, 0xcb, 0x04, 0x61, 0x60, 0x36, 0x0c, 0x6b, 0x10,
3973 0xb0, 0xc1, 0x86, 0xa1, 0x0d, 0x04, 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86,
3974 0x35, 0x78, 0x83, 0x37, 0xd8, 0x40, 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0,
3975 0x21, 0x28, 0x36, 0x04, 0xc6, 0x86, 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0,
3976 0x06, 0x89, 0xb2, 0x21, 0xf0, 0x83, 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3,
3977 0x24, 0x0f, 0x14, 0x6d, 0x40, 0xda, 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8,
3978 0x0d, 0xd4, 0x1b, 0xc8, 0xc1, 0x1b, 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b,
3979 0x3c, 0xdb, 0x1c, 0xb8, 0xc1, 0x1b, 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b,
3980 0x78, 0xdf, 0x06, 0x69, 0x0d, 0x2a, 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03,
3981 0x2c, 0x13, 0x05, 0x30, 0x88, 0x83, 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0,
3982 0x31, 0xd8, 0xa0, 0xd4, 0x01, 0x19, 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90,
3983 0x98, 0x01, 0x74, 0x06, 0x1b, 0x12, 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda,
3984 0x20, 0x49, 0x03, 0x48, 0x0d, 0x36, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40,
3985 0x0a, 0xa5, 0xb0, 0x61, 0x80, 0x83, 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26,
3986 0xa8, 0x11, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b,
3987 0x99, 0x8b, 0x19, 0x5b, 0xd8, 0xd9, 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0,
3988 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94,
3989 0xe0, 0x0e, 0xba, 0x84, 0xa5, 0xc9, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5,
3990 0xbd, 0xb9, 0x4d, 0x09, 0xf0, 0xa0, 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b,
3991 0x98, 0xdb, 0x59, 0x5d, 0xd8, 0x59, 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c,
3992 0xda, 0x9b, 0xdb, 0x94, 0x20, 0x0f, 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c,
3993 0xbd, 0xb5, 0xc1, 0xa5, 0xb1, 0x95, 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd,
3994 0xb9, 0xcd, 0x4d, 0x19, 0xf4, 0x60, 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a,
3995 0x9c, 0x8b, 0x99, 0x5c, 0xd8, 0x59, 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0,
3996 0x14, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b,
3997 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43,
3998 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c,
3999 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d,
4000 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7,
4001 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7,
4002 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60,
4003 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58,
4004 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3,
4005 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c,
4006 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c,
4007 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1,
4008 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00,
4009 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x13,
4010 0x04, 0x48, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x34,
4011 0x8a, 0xa1, 0x14, 0xa8, 0xd5, 0x00, 0xd9, 0x12, 0x28, 0x02, 0xda, 0x63,
4012 0x0d, 0x40, 0x20, 0x10, 0x98, 0x01, 0x18, 0x23, 0x00, 0x41, 0x10, 0x04,
4013 0x41, 0x61, 0x06, 0x60, 0x8c, 0x00, 0x04, 0x41, 0x10, 0xff, 0x85, 0x31,
4014 0x02, 0x10, 0x04, 0x41, 0xfc, 0x1b, 0x01, 0x18, 0x23, 0x00, 0x41, 0x10,
4015 0x04, 0xc1, 0x80, 0xc2, 0x1c, 0x44, 0x18, 0x74, 0xdd, 0x37, 0x07, 0x01,
4016 0x06, 0x5d, 0xf7, 0xcd, 0x41, 0x74, 0x61, 0xd0, 0x7d, 0x73, 0x10, 0x1d,
4017 0x18, 0x74, 0xdf, 0x1c, 0x44, 0xd7, 0x85, 0xc1, 0x37, 0x07, 0xd1, 0x75,
4018 0x60, 0xf0, 0xcd, 0x41, 0x88, 0x81, 0x18, 0x88, 0xc1, 0x37, 0x03, 0x00,
4019 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x22,
4020 0x47, 0xc8, 0x90, 0x51, 0x22, 0x08, 0x59, 0x00, 0x00, 0x00, 0x00, 0xcf,
4021 0x33, 0x06, 0x16, 0x86, 0x49, 0x03, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70,
4022 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69,
4023 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41,
4024 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73,
4025 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
4026 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x29,
4027 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
4028 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29, 0x61, 0x69,
4029 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
4030 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69,
4031 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
4032 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a,
4033 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
4034 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x13, 0x04, 0xab, 0x99, 0x20,
4035 0x58, 0xce, 0x04, 0xc1, 0x7a, 0x26, 0x08, 0x16, 0xb4, 0x42, 0xa0, 0x05,
4036 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68,
4037 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85,
4038 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60,
4039 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b,
4040 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b,
4041 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c,
4042 0x6c, 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0, 0x0b, 0xbd, 0x20,
4043 0x0b, 0x00, 0x00, 0x9b, 0x0c, 0xd8, 0x57, 0x06, 0x14, 0x08, 0xb2, 0xc9,
4044 0xa0, 0x85, 0x41, 0x1a, 0x50, 0x20, 0x88, 0x05, 0x9e, 0x7c, 0x2c, 0x20,
4045 0xe0, 0x33, 0x86, 0x10, 0x94, 0x81, 0x05, 0x90, 0x7c, 0x2c, 0xa0, 0xe0,
4046 0x33, 0x86, 0x40, 0x6c, 0x16, 0x4c, 0xf2, 0xb1, 0xe0, 0x82, 0xcf, 0x26,
4047 0x03, 0x19, 0xac, 0x01, 0x1b, 0x50, 0x00, 0xc6, 0x88, 0x41, 0x41, 0x84,
4048 0x20, 0x18, 0x48, 0x77, 0x10, 0x54, 0x40, 0x06, 0x35, 0xcc, 0x33, 0x04,
4049 0xc7, 0x11, 0x14, 0x02, 0x31, 0x30, 0x84, 0x51, 0x60, 0x86, 0x79, 0x45,
4050 0x7c, 0xe6, 0x18, 0xb2, 0x60, 0x0c, 0x0c, 0x0c, 0x94, 0xf8, 0xcc, 0x31,
4051 0x08, 0x01, 0x19, 0xcc, 0x12, 0x1c, 0x26, 0x06, 0x49, 0x7c, 0xe6, 0x18,
4052 0xb8, 0xe0, 0x0c, 0xe6, 0x18, 0x02, 0xe7, 0x0c, 0x66, 0x09, 0x8e, 0x39,
4053 0x86, 0xee, 0xb1, 0x03, 0x33, 0x83, 0x26, 0x3e, 0x73, 0x0c, 0x42, 0xa0,
4054 0x06, 0xb3, 0x04, 0xc7, 0x1c, 0xc3, 0x27, 0xe5, 0xc1, 0x1c, 0x43, 0x00,
4055 0xb1, 0xc1, 0x2c, 0xc1, 0x61, 0x6a, 0x10, 0xc5, 0x67, 0x8e, 0x21, 0x0c,
4056 0x2a, 0x3e, 0x98, 0x63, 0x08, 0x04, 0x38, 0x98, 0x25, 0x38, 0xac, 0x0d,
4057 0xae, 0xf8, 0x98, 0x1b, 0x54, 0xf1, 0x99, 0x63, 0x20, 0x03, 0x01, 0x14,
4058 0xe6, 0x18, 0x02, 0x81, 0x0e, 0x66, 0x09, 0x8e, 0x81, 0x9e, 0x40, 0x30,
4059 0x94, 0x02, 0x22, 0xa8, 0x41, 0x13, 0xc0, 0x20, 0x50, 0x05, 0x60, 0x90,
4060 0x21, 0x28, 0x03, 0x3a, 0xa8, 0x4b, 0x0f, 0x66, 0x93, 0xc1, 0x0f, 0x4a,
4061 0xc1, 0x15, 0x28, 0x18, 0x64, 0xc4, 0xc0, 0x20, 0x42, 0x10, 0x2c, 0x3e,
4062 0x48, 0x16, 0x82, 0x11, 0x03, 0xa6, 0x08, 0x41, 0xb0, 0xf8, 0x1c, 0x5a,
4063 0x00, 0x85, 0x3f, 0x28, 0x08, 0x3e, 0x08, 0x5c, 0x21, 0x83, 0x80, 0x18,
4064 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8, 0x85,
4065 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba, 0x80,
4066 0xec, 0xc2, 0x96, 0xa3, 0x09, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17, 0xb6,
4067 0x1c, 0x6e, 0x10, 0x80, 0xc3, 0xa1, 0x0b, 0xc8, 0x2e, 0x6c, 0x29, 0xe0,
4068 0xe0, 0xd8, 0x05, 0x44, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71,
4069 0x20, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22, 0x64,
4070 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88, 0x90,
4071 0xa1, 0x09, 0x5c, 0x00, 0x12, 0xf9, 0x82, 0xd3, 0x54, 0x44, 0x34, 0xf9,
4072 0x85, 0x5f, 0xdc, 0xb6, 0x4f, 0xf9, 0xc8, 0x6d, 0xdb, 0xc0, 0x05, 0x20,
4073 0x91, 0x2f, 0x38, 0x4d, 0x45, 0x44, 0x93, 0x4f, 0xf9, 0xc8, 0x6d, 0xfb,
4074 0x85, 0x5f, 0xdc, 0xb6, 0x05, 0x8c, 0x01, 0x80, 0x44, 0xbe, 0x04, 0x30,
4075 0xcf, 0x42, 0xfc, 0x13, 0x71, 0x4d, 0x54, 0x44, 0xfc, 0x02, 0x15, 0x10,
4076 0x3f, 0x10, 0x45, 0x00, 0xe6, 0x57, 0x78, 0x71, 0xdb, 0x0a, 0x30, 0x69,
4077 0x10, 0x6d, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0x70, 0x54, 0x40, 0x68, 0x51,
4078 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00
4079};
4080const unsigned int BlitFromCubeArray_metallib_len = 4243;
4081#endif
4082#elif defined(SDL_PLATFORM_TVOS)
4083#if TARGET_OS_SIMULATOR
4084const unsigned char FullscreenVert_metallib[] = {
4085 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
4086 0x00, 0x00, 0x00, 0x00, 0x84, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4087 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
4088 0x00, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4089 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00,
4090 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4091 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x0b, 0x00, 0x00,
4092 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
4093 0x4e, 0x41, 0x4d, 0x45, 0x0f, 0x00, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63,
4094 0x72, 0x65, 0x65, 0x6e, 0x56, 0x65, 0x72, 0x74, 0x00, 0x54, 0x59, 0x50,
4095 0x45, 0x01, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x18, 0xba,
4096 0x14, 0xf8, 0x48, 0x37, 0x3e, 0x8a, 0x27, 0xb4, 0xbe, 0x2c, 0xd9, 0xea,
4097 0x9e, 0x12, 0x61, 0x60, 0x8d, 0x60, 0x05, 0xa9, 0xc3, 0xd0, 0x73, 0x99,
4098 0xf4, 0xee, 0xff, 0x3b, 0xc7, 0xb3, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00,
4099 0x90, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54,
4100 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4101 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4102 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x02, 0x00,
4103 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x45, 0x4e, 0x44, 0x54,
4104 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00,
4105 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00,
4106 0x14, 0x00, 0x00, 0x00, 0x7c, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
4107 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
4108 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00,
4109 0x21, 0x0c, 0x00, 0x00, 0x97, 0x02, 0x00, 0x00, 0x0b, 0x02, 0x21, 0x00,
4110 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91,
4111 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c,
4112 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02,
4113 0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b,
4114 0x0a, 0x32, 0x42, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5,
4115 0x00, 0x19, 0x32, 0x42, 0x04, 0x49, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50,
4116 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06,
4117 0x51, 0x18, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x1b, 0x7a, 0x24, 0xf8,
4118 0xff, 0xff, 0xff, 0xff, 0x01, 0x90, 0x00, 0x8a, 0x08, 0x07, 0x78, 0x80,
4119 0x07, 0x79, 0x78, 0x07, 0x7c, 0x68, 0x03, 0x73, 0xa8, 0x07, 0x77, 0x18,
4120 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40,
4121 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xda, 0x21, 0x1d,
4122 0xdc, 0xa1, 0x0d, 0xd8, 0xa1, 0x1c, 0xce, 0x21, 0x1c, 0xd8, 0xa1, 0x0d,
4123 0xec, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0xe0, 0x1e,
4124 0xd2, 0x81, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x38, 0x00, 0x06, 0x77, 0x78,
4125 0x87, 0x36, 0x10, 0x87, 0x7a, 0x48, 0x07, 0x76, 0xa0, 0x87, 0x74, 0x70,
4126 0x87, 0x79, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08,
4127 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0,
4128 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x00,
4129 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d,
4130 0xcc, 0x41, 0x1e, 0xc2, 0xa1, 0x1d, 0xca, 0xa1, 0x0d, 0xe0, 0xe1, 0x1d,
4131 0xd2, 0xc1, 0x1d, 0xe8, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xca, 0x81, 0x1d,
4132 0xd2, 0xa1, 0x1d, 0xda, 0xc0, 0x1d, 0xde, 0xc1, 0x1d, 0xda, 0x80, 0x1d,
4133 0xca, 0x21, 0x1c, 0xcc, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00,
4134 0x08, 0x77, 0x78, 0x87, 0x36, 0x48, 0x07, 0x77, 0x30, 0x87, 0x79, 0x68,
4135 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00,
4136 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d,
4137 0xdc, 0x21, 0x1c, 0xdc, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d,
4138 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28,
4139 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x83, 0x79, 0x48, 0x87, 0x73, 0x70,
4140 0x87, 0x72, 0x20, 0x87, 0x36, 0xd0, 0x87, 0x72, 0x90, 0x87, 0x77, 0x98,
4141 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40,
4142 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d,
4143 0xda, 0x80, 0x1e, 0xe4, 0x21, 0x1c, 0xe0, 0x01, 0x1e, 0xd2, 0xc1, 0x1d,
4144 0xce, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90,
4145 0x87, 0x7a, 0x28, 0x07, 0x80, 0x98, 0x07, 0x7a, 0x08, 0x87, 0x71, 0x58,
4146 0x87, 0x36, 0x80, 0x07, 0x79, 0x78, 0x07, 0x7a, 0x28, 0x87, 0x71, 0xa0,
4147 0x87, 0x77, 0x90, 0x87, 0x36, 0x10, 0x87, 0x7a, 0x30, 0x07, 0x73, 0x28,
4148 0x07, 0x79, 0x68, 0x83, 0x79, 0x48, 0x07, 0x7d, 0x28, 0x07, 0x00, 0x0f,
4149 0x00, 0xa2, 0x1e, 0xdc, 0x61, 0x1e, 0xc2, 0xc1, 0x1c, 0xca, 0xa1, 0x0d,
4150 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0,
4151 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x36, 0x18, 0xc2, 0xff, 0xff, 0xff,
4152 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x8c, 0xe1, 0xff, 0xff, 0xff, 0xff,
4153 0x07, 0x40, 0x02, 0x28, 0x00, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00,
4154 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06,
4155 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
4156 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84,
4157 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c,
4158 0x0b, 0x84, 0x84, 0x4c, 0x10, 0x38, 0x33, 0x00, 0xc3, 0x08, 0x02, 0x30,
4159 0x8c, 0x40, 0x00, 0x56, 0x08, 0x99, 0x23, 0x00, 0x83, 0x22, 0x0c, 0x51,
4160 0x15, 0x01, 0x88, 0x6e, 0x20, 0x20, 0x05, 0x68, 0x8e, 0x00, 0x14, 0x86,
4161 0x11, 0x08, 0x62, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0xc0, 0x20, 0x1c,
4162 0xd2, 0x41, 0x1e, 0xec, 0x80, 0x0e, 0xda, 0x20, 0x1c, 0xe0, 0x01, 0x1e,
4163 0xd8, 0xa1, 0x1c, 0xda, 0x80, 0x1e, 0xec, 0xe1, 0x1d, 0xe6, 0x21, 0x0e,
4164 0xe6, 0xc0, 0x0d, 0xe0, 0xc0, 0x0d, 0xe0, 0xa0, 0x0d, 0xe6, 0x21, 0x1d,
4165 0xda, 0xa1, 0x1e, 0xd8, 0x21, 0x1c, 0xe8, 0xe1, 0x1d, 0xe4, 0x61, 0xc3,
4166 0x6d, 0x94, 0x43, 0x1b, 0xc0, 0x83, 0x1e, 0xd8, 0x01, 0x1d, 0xe8, 0x81,
4167 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x41, 0x3a, 0xc4, 0x81,
4168 0x1e, 0xe0, 0x81, 0x1e, 0xe0, 0x41, 0x1b, 0xa4, 0x03, 0x1e, 0xe8, 0x01,
4169 0x1e, 0xe8, 0x01, 0x1e, 0xb4, 0x41, 0x3a, 0xc4, 0x81, 0x1d, 0xe8, 0x41,
4170 0x1c, 0xd8, 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xb4, 0x41, 0x3a, 0xcc, 0x81,
4171 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x41,
4172 0x3a, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01,
4173 0x1d, 0xb4, 0x81, 0x39, 0xcc, 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81,
4174 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x81, 0x39, 0xd8, 0x01, 0x1d, 0xe8, 0x81,
4175 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xc4, 0x81,
4176 0x1d, 0xe8, 0x41, 0x1c, 0xd8, 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xb4, 0x81,
4177 0x3d, 0xc8, 0x01, 0x1d, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81,
4178 0x1c, 0xb4, 0x81, 0x3d, 0xcc, 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81,
4179 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x81, 0x3d, 0xd0, 0x01, 0x1e, 0xe8, 0x81,
4180 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xd8, 0x01,
4181 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81,
4182 0x3d, 0xe4, 0x81, 0x1d, 0xe8, 0x41, 0x1c, 0xc8, 0x01, 0x1e, 0xe8, 0x41,
4183 0x1c, 0xc8, 0x01, 0x1e, 0xb4, 0x81, 0x3d, 0xc4, 0x81, 0x1c, 0xe0, 0x81,
4184 0x1e, 0xc4, 0x81, 0x1c, 0xe0, 0x81, 0x1e, 0xc4, 0x81, 0x1c, 0xe0, 0x41,
4185 0x1b, 0xd8, 0x43, 0x1c, 0xe4, 0x81, 0x1c, 0xe8, 0x81, 0x1c, 0xd4, 0x81,
4186 0x1d, 0xe8, 0x81, 0x1c, 0xd4, 0x81, 0x1d, 0xb4, 0x81, 0x3d, 0xc8, 0x41,
4187 0x1d, 0xd8, 0x81, 0x1e, 0xc8, 0x41, 0x1d, 0xd8, 0x81, 0x1e, 0xc8, 0x41,
4188 0x1d, 0xd8, 0x41, 0x1b, 0xd8, 0x43, 0x1d, 0xc4, 0x81, 0x1c, 0xe8, 0x41,
4189 0x1d, 0xc4, 0x81, 0x1c, 0xe8, 0x41, 0x1d, 0xc4, 0x81, 0x1c, 0xb4, 0x81,
4190 0x3d, 0xc4, 0x01, 0x1c, 0xc8, 0x01, 0x1d, 0xe8, 0x41, 0x1c, 0xc0, 0x81,
4191 0x1c, 0xd0, 0x81, 0x1e, 0xc4, 0x01, 0x1c, 0xc8, 0x01, 0x1d, 0xb4, 0x81,
4192 0x3b, 0xe0, 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xe8, 0xc1, 0x1c, 0xc8, 0x81,
4193 0x46, 0x08, 0x43, 0x3a, 0x1f, 0xb5, 0x2c, 0x92, 0x10, 0x11, 0x44, 0xf3,
4194 0x12, 0xd1, 0x34, 0x24, 0x02, 0x9c, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00,
4195 0x40, 0x00, 0x00, 0x00, 0x00, 0x86, 0x44, 0xce, 0x75, 0x00, 0x01, 0x20,
4196 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x06, 0x81, 0xa2,
4197 0x99, 0x02, 0x00, 0x00, 0x59, 0x20, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
4198 0x32, 0x1e, 0x98, 0x0c, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47,
4199 0xc6, 0x04, 0x43, 0xa2, 0x22, 0x28, 0x81, 0x42, 0x18, 0x01, 0x20, 0x1d,
4200 0x4b, 0x88, 0x04, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00,
4201 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88,
4202 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
4203 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e,
4204 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30,
4205 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8,
4206 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
4207 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76,
4208 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e,
4209 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e,
4210 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
4211 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4,
4212 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
4213 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37,
4214 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
4215 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71,
4216 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e,
4217 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1,
4218 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
4219 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90,
4220 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
4221 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc,
4222 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7,
4223 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78,
4224 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f,
4225 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f,
4226 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1,
4227 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0,
4228 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0,
4229 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b,
4230 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c,
4231 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61,
4232 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1,
4233 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc,
4234 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4,
4235 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79,
4236 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72,
4237 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e,
4238 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1,
4239 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4,
4240 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8,
4241 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71,
4242 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19,
4243 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f,
4244 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e,
4245 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e,
4246 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81,
4247 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21,
4248 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc,
4249 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70,
4250 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77,
4251 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e,
4252 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e,
4253 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a,
4254 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73,
4255 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00,
4256 0x79, 0x20, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x32, 0x9a, 0x08, 0x14,
4257 0x02, 0x85, 0x8c, 0x27, 0x46, 0x46, 0xc8, 0x11, 0x32, 0x64, 0xd4, 0x26,
4258 0xe8, 0x4c, 0x00, 0x00, 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x44,
4259 0x45, 0x06, 0x33, 0x30, 0xc6, 0xd0, 0x10, 0x02, 0x53, 0x44, 0x4b, 0x20,
4260 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72,
4261 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d,
4262 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
4263 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d,
4264 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33,
4265 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72,
4266 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e,
4267 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65,
4268 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
4269 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e,
4270 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
4271 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66,
4272 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e,
4273 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x74,
4274 0x65, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e,
4275 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44,
4276 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67,
4277 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c,
4278 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f,
4279 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70,
4280 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x66, 0x6c, 0x6f, 0x61, 0x74,
4281 0x34, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x74,
4282 0x65, 0x78, 0x5f, 0x69, 0x64, 0x75, 0x69, 0x6e, 0x74, 0x76, 0x49, 0x00,
4283 0x23, 0x08, 0x84, 0x30, 0x82, 0xa0, 0x18, 0x23, 0x08, 0xc4, 0x30, 0x82,
4284 0x40, 0x10, 0x23, 0x08, 0x44, 0x31, 0x82, 0x60, 0x00, 0x33, 0x0c, 0x54,
4285 0x50, 0xcd, 0x30, 0x58, 0xc2, 0x35, 0x43, 0x30, 0xcc, 0x30, 0x50, 0x14,
4286 0x36, 0x03, 0x41, 0x50, 0x18, 0x36, 0x43, 0x50, 0xcc, 0x10, 0x18, 0x33,
4287 0x04, 0xc7, 0x0c, 0x06, 0x92, 0x28, 0x0b, 0xd3, 0xcc, 0x50, 0x38, 0xca,
4288 0xc3, 0x40, 0x33, 0x08, 0x62, 0x30, 0x06, 0x33, 0x18, 0x58, 0xa4, 0x48,
4289 0xcc, 0x34, 0x43, 0x50, 0x06, 0x33, 0x0c, 0x19, 0x19, 0x98, 0x81, 0x8c,
4290 0x04, 0x26, 0xe8, 0x22, 0x36, 0x36, 0xbb, 0x36, 0x97, 0xb6, 0x37, 0xb2,
4291 0x3a, 0xb6, 0x32, 0x17, 0x33, 0xb6, 0xb0, 0xb3, 0xb9, 0x51, 0x84, 0x4c,
4292 0x3b, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e,
4293 0x94, 0x60, 0xbb, 0x25, 0x2c, 0x4d, 0xce, 0xc5, 0xae, 0x4c, 0x6e, 0x2e,
4294 0xed, 0xcd, 0x6d, 0x94, 0x80, 0x3b, 0x2a, 0x2c, 0x4d, 0xce, 0x85, 0x2d,
4295 0xcc, 0xed, 0xac, 0x2e, 0xec, 0xac, 0xec, 0xcb, 0xae, 0x4c, 0x6e, 0x2e,
4296 0xed, 0xcd, 0x6d, 0x94, 0xa0, 0xbb, 0x29, 0x2c, 0x4d, 0xce, 0x65, 0xec,
4297 0xad, 0x0d, 0x2e, 0x8d, 0xad, 0xec, 0xeb, 0x0d, 0x8e, 0x2e, 0xed, 0xcd,
4298 0x6d, 0x6e, 0x94, 0xc1, 0xfb, 0xc0, 0xe0, 0x94, 0xb0, 0x34, 0x39, 0x17,
4299 0xbb, 0x32, 0x39, 0xba, 0x32, 0xbc, 0x51, 0x02, 0x33, 0x00, 0x00, 0x00,
4300 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28,
4301 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3,
4302 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d,
4303 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d,
4304 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1,
4305 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4,
4306 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78,
4307 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3,
4308 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c,
4309 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c,
4310 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c,
4311 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4,
4312 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00,
4313 0xd1, 0x10, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0xcc, 0x3c, 0xa4,
4314 0x83, 0x3b, 0x9c, 0x03, 0x3b, 0x94, 0x03, 0x3d, 0xa0, 0x83, 0x3c, 0x94,
4315 0x43, 0x38, 0x90, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00,
4316 0x25, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00,
4317 0x12, 0x00, 0x00, 0x00, 0x44, 0x33, 0x00, 0xb4, 0x23, 0x00, 0x25, 0x40,
4318 0x3c, 0x07, 0x51, 0x0c, 0x08, 0x32, 0x16, 0x01, 0x04, 0xc6, 0x41, 0x30,
4319 0x03, 0x30, 0x02, 0x30, 0x46, 0x00, 0x82, 0x20, 0x88, 0x7f, 0x14, 0x33,
4320 0x00, 0x63, 0x09, 0x20, 0x08, 0x82, 0x20, 0x18, 0x80, 0x20, 0x08, 0x82,
4321 0xe0, 0x30, 0x96, 0x00, 0x82, 0x20, 0x88, 0xff, 0x02, 0x08, 0x82, 0x20,
4322 0xfe, 0xcd, 0x00, 0x90, 0xcc, 0x41, 0x34, 0x8d, 0xf3, 0xd0, 0xcc, 0x00,
4323 0x00, 0x00, 0x00, 0x00, 0xf5, 0x4c, 0x57, 0x41, 0xa5, 0x23, 0x06, 0xc6,
4324 0x10, 0x82, 0x60, 0xe1, 0x1f, 0xc7, 0x15, 0xcc, 0x31, 0x24, 0x01, 0x54,
4325 0x13, 0xa6, 0x23, 0x06, 0xc6, 0x10, 0x82, 0x60, 0xe1, 0x1f, 0x87, 0x16,
4326 0xcc, 0x31, 0x0c, 0x81, 0x64, 0x01, 0x23, 0xfe, 0x16, 0x30, 0xe0, 0x3f,
4327 0xc8, 0x10, 0x30, 0xd4, 0x20, 0x43, 0xc0, 0x50, 0xb3, 0x0d, 0x4c, 0x01,
4328 0xcc, 0x36, 0x04, 0x42, 0x90, 0x01, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00,
4329 0x03, 0x00, 0x00, 0x00, 0x32, 0x0e, 0x10, 0x22, 0x84, 0x00, 0xf2, 0x04,
4330 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00,
4331 0x25, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x28, 0x01, 0x00, 0x00, 0x00,
4332 0x03, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
4333 0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00,
4334 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
4335 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00,
4336 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
4337 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00,
4338 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
4339 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
4340 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
4341 0x00, 0x24, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
4342 0x0e, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
4343 0x08, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x0c, 0x00, 0x00,
4344 0x17, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0xad, 0x00, 0x00, 0x00, 0x00,
4345 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x56, 0x65,
4346 0x72, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72,
4347 0x74, 0x2e, 0x66, 0x2e, 0x66, 0x33, 0x32, 0x2e, 0x75, 0x2e, 0x69, 0x33,
4348 0x32, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x61, 0x69, 0x72,
4349 0x36, 0x34, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2d, 0x74, 0x76, 0x6f,
4350 0x73, 0x31, 0x33, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x73, 0x69, 0x6d, 0x75,
4351 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
4352};
4353const unsigned int FullscreenVert_metallib_len = 3204;
4354const unsigned char BlitFrom2D_metallib[] = {
4355 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
4356 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4357 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
4358 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4359 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00,
4360 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4361 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x0f, 0x00, 0x00,
4362 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
4363 0x4e, 0x41, 0x4d, 0x45, 0x0b, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
4364 0x6f, 0x6d, 0x32, 0x44, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01,
4365 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x83, 0xf6, 0x5f, 0x87, 0x15, 0xe1,
4366 0xf8, 0x61, 0x9f, 0x99, 0x6f, 0x2d, 0xff, 0x50, 0x5c, 0x0f, 0x44, 0x29,
4367 0x09, 0x9b, 0x2c, 0x65, 0x6e, 0xaa, 0xf5, 0x0c, 0x31, 0xf5, 0xd2, 0xfd,
4368 0x91, 0x39, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x90, 0x0f, 0x00, 0x00,
4369 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00,
4370 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4371 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45,
4372 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
4373 0x45, 0x4e, 0x44, 0x54, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00,
4374 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
4375 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
4376 0x74, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde,
4377 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24,
4378 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00,
4379 0x8a, 0x03, 0x00, 0x00, 0x0b, 0x02, 0x21, 0x00, 0x02, 0x00, 0x00, 0x00,
4380 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49,
4381 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19,
4382 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42,
4383 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88,
4384 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42,
4385 0x04, 0x49, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c,
4386 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00,
4387 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff,
4388 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4,
4389 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda,
4390 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00,
4391 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87,
4392 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87,
4393 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07,
4394 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc,
4395 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2,
4396 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4,
4397 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc,
4398 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda,
4399 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
4400 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87,
4401 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07,
4402 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03,
4403 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca,
4404 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6,
4405 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0,
4406 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
4407 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87,
4408 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea,
4409 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce,
4410 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde,
4411 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8,
4412 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87,
4413 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07,
4414 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8,
4415 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6,
4416 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6,
4417 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc,
4418 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00,
4419 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87,
4420 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07,
4421 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0,
4422 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20,
4423 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0,
4424 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06,
4425 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff,
4426 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02,
4427 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e,
4428 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff,
4429 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff,
4430 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00,
4431 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18,
4432 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48,
4433 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00,
4434 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84,
4435 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c,
4436 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x68, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30,
4437 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30,
4438 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10,
4439 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4a, 0x9a, 0x22, 0x4a, 0x98, 0xfc,
4440 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0xdf, 0x1e, 0xfe, 0x69, 0x8c, 0x00,
4441 0x18, 0x44, 0x30, 0x82, 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff, 0x25,
4442 0x80, 0x79, 0x16, 0x22, 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01, 0x11,
4443 0x8a, 0x11, 0x44, 0x28, 0x27, 0x91, 0x9a, 0x23, 0x40, 0x8c, 0x10, 0xd8,
4444 0x1c, 0x41, 0x30, 0x8c, 0x20, 0x0c, 0x45, 0x69, 0x27, 0x09, 0xf7, 0x1c,
4445 0x00, 0x83, 0x60, 0x11, 0xc0, 0x20, 0x39, 0x10, 0x90, 0x02, 0x63, 0x8e,
4446 0x00, 0x14, 0x06, 0x11, 0x04, 0x61, 0x10, 0x61, 0x10, 0x46, 0x00, 0x00,
4447 0x13, 0xc0, 0x20, 0x1c, 0xd2, 0x41, 0x1e, 0xec, 0x80, 0x0e, 0xda, 0x20,
4448 0x1c, 0xe0, 0x01, 0x1e, 0xd8, 0xa1, 0x1c, 0xda, 0x80, 0x1e, 0xec, 0xe1,
4449 0x1d, 0xe6, 0x21, 0x0e, 0xe6, 0xc0, 0x0d, 0xe0, 0xc0, 0x0d, 0xe0, 0xa0,
4450 0x0d, 0xe6, 0x21, 0x1d, 0xda, 0xa1, 0x1e, 0xd8, 0x21, 0x1c, 0xe8, 0xe1,
4451 0x1d, 0xe4, 0x61, 0xc3, 0x6d, 0x94, 0x43, 0x1b, 0xc0, 0x83, 0x1e, 0xd8,
4452 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4,
4453 0x41, 0x3a, 0xc4, 0x81, 0x1e, 0xe0, 0x81, 0x1e, 0xe0, 0x41, 0x1b, 0xa4,
4454 0x03, 0x1e, 0xe8, 0x01, 0x1e, 0xe8, 0x01, 0x1e, 0xb4, 0x41, 0x3a, 0xc4,
4455 0x81, 0x1d, 0xe8, 0x41, 0x1c, 0xd8, 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xb4,
4456 0x41, 0x3a, 0xcc, 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc,
4457 0x81, 0x1c, 0xb4, 0x41, 0x3a, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0,
4458 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x39, 0xcc, 0x81, 0x1c, 0xe8,
4459 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x81, 0x39, 0xd8,
4460 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4,
4461 0x81, 0x3d, 0xc4, 0x81, 0x1d, 0xe8, 0x41, 0x1c, 0xd8, 0x81, 0x1e, 0xc4,
4462 0x81, 0x1d, 0xb4, 0x81, 0x3d, 0xc8, 0x01, 0x1d, 0xe8, 0xc1, 0x1c, 0xc8,
4463 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x81, 0x3d, 0xcc, 0x81, 0x1c, 0xe8,
4464 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x81, 0x3d, 0xd0,
4465 0x01, 0x1e, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4,
4466 0x81, 0x3d, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8,
4467 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xe4, 0x81, 0x1d, 0xe8, 0x41, 0x1c, 0xc8,
4468 0x01, 0x1e, 0xe8, 0x41, 0x1c, 0xc8, 0x01, 0x1e, 0xb4, 0x81, 0x3d, 0xc4,
4469 0x81, 0x1c, 0xe0, 0x81, 0x1e, 0xc4, 0x81, 0x1c, 0xe0, 0x81, 0x1e, 0xc4,
4470 0x81, 0x1c, 0xe0, 0x41, 0x1b, 0xd8, 0x43, 0x1c, 0xe4, 0x81, 0x1c, 0xe8,
4471 0x81, 0x1c, 0xd4, 0x81, 0x1d, 0xe8, 0x81, 0x1c, 0xd4, 0x81, 0x1d, 0xb4,
4472 0x81, 0x3d, 0xc8, 0x41, 0x1d, 0xd8, 0x81, 0x1e, 0xc8, 0x41, 0x1d, 0xd8,
4473 0x81, 0x1e, 0xc8, 0x41, 0x1d, 0xd8, 0x41, 0x1b, 0xd8, 0x43, 0x1d, 0xc4,
4474 0x81, 0x1c, 0xe8, 0x41, 0x1d, 0xc4, 0x81, 0x1c, 0xe8, 0x41, 0x1d, 0xc4,
4475 0x81, 0x1c, 0xb4, 0x81, 0x3d, 0xc4, 0x01, 0x1c, 0xc8, 0x01, 0x1d, 0xe8,
4476 0x41, 0x1c, 0xc0, 0x81, 0x1c, 0xd0, 0x81, 0x1e, 0xc4, 0x01, 0x1c, 0xc8,
4477 0x01, 0x1d, 0xb4, 0x81, 0x3b, 0xe0, 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xe8,
4478 0xc1, 0x1c, 0xc8, 0x81, 0x46, 0x08, 0x43, 0x2a, 0xdb, 0x82, 0x4c, 0x5f,
4479 0xe4, 0x30, 0x76, 0x37, 0x24, 0x02, 0x14, 0x05, 0x00, 0x80, 0x00, 0x00,
4480 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x86, 0x44, 0xca, 0x06, 0x01, 0x01,
4481 0x20, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xa8, 0x0c,
4482 0x2e, 0x09, 0x08, 0x80, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
4483 0x24, 0x36, 0x08, 0x14, 0x65, 0x1c, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x00,
4484 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90,
4485 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85,
4486 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x64, 0x47,
4487 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xea, 0x58, 0x42, 0x24, 0x00, 0x00,
4488 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c,
4489 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3,
4490 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6,
4491 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e,
4492 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43,
4493 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03,
4494 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48,
4495 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20,
4496 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e,
4497 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d,
4498 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89,
4499 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83,
4500 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68,
4501 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90,
4502 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78,
4503 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98,
4504 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5,
4505 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c,
4506 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c,
4507 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43,
4508 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43,
4509 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82,
4510 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58,
4511 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18,
4512 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2,
4513 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec,
4514 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e,
4515 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d,
4516 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83,
4517 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60,
4518 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0,
4519 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d,
4520 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d,
4521 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43,
4522 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3,
4523 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18,
4524 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3,
4525 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1,
4526 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e,
4527 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3,
4528 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3,
4529 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60,
4530 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec,
4531 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5,
4532 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5,
4533 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8,
4534 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17,
4535 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d,
4536 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03,
4537 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78,
4538 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce,
4539 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef,
4540 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08,
4541 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0,
4542 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8,
4543 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x20, 0x00, 0x00,
4544 0xff, 0x00, 0x00, 0x00, 0x32, 0x9a, 0x08, 0x14, 0x02, 0x85, 0x8c, 0x27,
4545 0x46, 0x46, 0xc8, 0x11, 0x32, 0x64, 0xd4, 0xd4, 0x80, 0x0c, 0xee, 0x09,
4546 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c,
4547 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14,
4548 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x60, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00,
4549 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77,
4550 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70,
4551 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72,
4552 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39,
4553 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33,
4554 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61,
4555 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
4556 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73,
4557 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
4558 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74,
4559 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
4560 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d,
4561 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63,
4562 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
4563 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65,
4564 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70,
4565 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34,
4566 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74,
4567 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
4568 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f,
4569 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
4570 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74,
4571 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72,
4572 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78,
4573 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
4574 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70,
4575 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72,
4576 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62,
4577 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69,
4578 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
4579 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64,
4580 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74,
4581 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65,
4582 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e,
4583 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70,
4584 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61,
4585 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69,
4586 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73,
4587 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74,
4588 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69,
4589 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
4590 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
4591 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72,
4592 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74,
4593 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f,
4594 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73,
4595 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
4596 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73,
4597 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
4598 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0xc4, 0x62, 0x00, 0x00,
4599 0x00, 0x00, 0x00, 0x00, 0x30, 0x82, 0x30, 0x0c, 0x23, 0x08, 0x15, 0x34,
4600 0x82, 0x30, 0x10, 0x23, 0x08, 0x43, 0x31, 0x82, 0x30, 0x18, 0x23, 0x08,
4601 0x0b, 0x30, 0x82, 0x30, 0x1c, 0x23, 0x08, 0x03, 0x32, 0x82, 0x30, 0x24,
4602 0x23, 0x08, 0x83, 0x32, 0x82, 0x30, 0x2c, 0x33, 0x0c, 0x6b, 0x10, 0xb0,
4603 0xc1, 0x0c, 0x43, 0x1b, 0x08, 0x6e, 0x30, 0x43, 0x30, 0xcc, 0x30, 0xac,
4604 0xc1, 0x1a, 0xbc, 0xc1, 0x0c, 0x04, 0xb1, 0x06, 0x6f, 0xf0, 0x06, 0x33,
4605 0x04, 0xc5, 0x0c, 0x81, 0x31, 0x43, 0x70, 0xcc, 0x50, 0x20, 0x6f, 0xf0,
4606 0x06, 0x89, 0x32, 0x43, 0xe0, 0x07, 0x33, 0x24, 0x6f, 0xb0, 0x30, 0x8d,
4607 0x93, 0x3c, 0x50, 0x34, 0x03, 0xd2, 0x06, 0x52, 0x33, 0x25, 0x0a, 0x44,
4608 0xcd, 0x40, 0xbd, 0x81, 0x1c, 0xbc, 0xc1, 0xa3, 0xc9, 0x81, 0x1c, 0xbc,
4609 0xc1, 0xb3, 0xcd, 0x81, 0x1b, 0xbc, 0x01, 0xd7, 0xd1, 0x81, 0x1b, 0xbc,
4610 0x81, 0xf7, 0xcd, 0x20, 0xad, 0x41, 0x65, 0xc5, 0xc1, 0xf5, 0x06, 0x6d,
4611 0x80, 0x65, 0xa2, 0x00, 0x06, 0x71, 0x10, 0x06, 0x72, 0x90, 0x88, 0x01,
4612 0x34, 0x06, 0x33, 0x28, 0x75, 0x40, 0x06, 0xd7, 0x1b, 0xb4, 0x41, 0x19,
4613 0x24, 0x66, 0x00, 0x9d, 0xc1, 0x0c, 0x89, 0x1b, 0xa0, 0xc1, 0xf5, 0x06,
4614 0x6d, 0x90, 0xa4, 0x01, 0xa4, 0x06, 0x33, 0x14, 0xa0, 0x10, 0x0a, 0xa3,
4615 0x40, 0x0a, 0xa5, 0x30, 0xc3, 0x00, 0x07, 0x7f, 0x60, 0x0a, 0xd5, 0x01,
4616 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0xb9, 0x81, 0x1b, 0x58,
4617 0x74, 0xa0, 0x07, 0x96, 0x65, 0xe9, 0x01, 0xc7, 0x0a, 0xa6, 0x00, 0x1b,
4618 0x7e, 0x61, 0x0f, 0xea, 0xc0, 0x0a, 0x32, 0x12, 0x98, 0xa0, 0x8b, 0xd8,
4619 0xd8, 0xec, 0xda, 0x5c, 0xda, 0xde, 0xc8, 0xea, 0xd8, 0xca, 0x5c, 0xcc,
4620 0xd8, 0xc2, 0xce, 0xe6, 0x46, 0x11, 0xea, 0xc0, 0x0e, 0x4e, 0x61, 0x63,
4621 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0xb8, 0x83,
4622 0x5b, 0xc2, 0xd2, 0xe4, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc,
4623 0x46, 0x09, 0xf0, 0xe0, 0xa8, 0xb0, 0x34, 0x39, 0x17, 0xb6, 0x30, 0xb7,
4624 0xb3, 0xba, 0xb0, 0xb3, 0xb2, 0x2f, 0xbb, 0x32, 0xb9, 0xb9, 0xb4, 0x37,
4625 0xb7, 0x51, 0x82, 0x3c, 0xb8, 0x29, 0x2c, 0x4d, 0xce, 0x65, 0xec, 0xad,
4626 0x0d, 0x2e, 0x8d, 0xad, 0xec, 0xeb, 0x0d, 0x8e, 0x2e, 0xed, 0xcd, 0x6d,
4627 0x6e, 0x94, 0x41, 0x0f, 0xf6, 0x80, 0x0f, 0x8e, 0x09, 0x4b, 0x93, 0x73,
4628 0x31, 0x93, 0x0b, 0x3b, 0x6b, 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0x30, 0x05,
4629 0x00, 0x00, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
4630 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98,
4631 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6,
4632 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21,
4633 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e,
4634 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f,
4635 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70,
4636 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72,
4637 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94,
4638 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20,
4639 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61,
4640 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61,
4641 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e,
4642 0x00, 0x00, 0x00, 0x00, 0xd1, 0x10, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
4643 0x07, 0xcc, 0x3c, 0xa4, 0x83, 0x3b, 0x9c, 0x03, 0x3b, 0x94, 0x03, 0x3d,
4644 0xa0, 0x83, 0x3c, 0x94, 0x43, 0x38, 0x90, 0xc3, 0x01, 0x00, 0x00, 0x00,
4645 0x61, 0x20, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c,
4646 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xe4, 0x6a, 0x80, 0xde,
4647 0x08, 0x00, 0x81, 0x11, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00,
4648 0x43, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0x48, 0x4f,
4649 0x00, 0x00, 0x00, 0x00, 0xcf, 0xc3, 0x59, 0x18, 0x26, 0x0d, 0x00, 0x00,
4650 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63,
4651 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b,
4652 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
4653 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42,
4654 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x32, 0x44, 0x29, 0x61, 0x69,
4655 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
4656 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d,
4657 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
4658 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d,
4659 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
4660 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53,
4661 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
4662 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x13, 0x04, 0x8b, 0x99,
4663 0x20, 0x58, 0xcd, 0x04, 0xc1, 0x72, 0x26, 0x08, 0xd6, 0xb3, 0x42, 0xa0,
4664 0x05, 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16,
4665 0x68, 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48,
4666 0x85, 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17,
4667 0x60, 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3,
4668 0x2b, 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89,
4669 0x2b, 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2,
4670 0x2c, 0x6c, 0x18, 0x7e, 0xa1, 0x17, 0x64, 0x01, 0x9b, 0x0c, 0x46, 0x33,
4671 0x51, 0x20, 0xc8, 0x26, 0x03, 0xf2, 0x5c, 0x14, 0x08, 0x62, 0x01, 0x23,
4672 0xfe, 0x16, 0x10, 0xe0, 0xbf, 0xc9, 0xc0, 0x4c, 0x1c, 0x05, 0x83, 0x8c,
4673 0x18, 0x18, 0x44, 0x08, 0x82, 0x85, 0x7f, 0x48, 0x5f, 0x30, 0x62, 0xd0,
4674 0x14, 0x21, 0x08, 0x06, 0x50, 0x18, 0x38, 0x0d, 0xc1, 0x2c, 0x4c, 0xa0,
4675 0x70, 0xa3, 0x09, 0x01, 0x90, 0x41, 0x40, 0x0c, 0x09, 0x00, 0x00, 0x00,
4676 0x5b, 0x8e, 0x20, 0xc8, 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c,
4677 0x41, 0x2e, 0x1c, 0xba, 0x80, 0xec, 0xc2, 0x96, 0xe3, 0x08, 0x7e, 0xe1,
4678 0xd0, 0x05, 0x64, 0x17, 0xb6, 0x14, 0xc9, 0xb1, 0x0b, 0x88, 0x2e, 0x00,
4679 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
4680 0x32, 0x0e, 0x10, 0x22, 0x84, 0x00, 0xa5, 0x06, 0x00, 0x00, 0x00, 0x00,
4681 0x00, 0x00, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00,
4682 0x12, 0x03, 0x94, 0x60, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
4683 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
4684 0x01, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4685 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00,
4686 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
4687 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
4688 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4689 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4690 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4691 0x0a, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x24, 0x00, 0x00,
4692 0x0a, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
4693 0x1b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00, 0x00,
4694 0x25, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
4695 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00, 0x00,
4696 0x00, 0x00, 0x00, 0x00, 0x5d, 0x0c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
4697 0x12, 0x03, 0x94, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x42, 0x6c, 0x69, 0x74,
4698 0x46, 0x72, 0x6f, 0x6d, 0x32, 0x44, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61,
4699 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
4700 0x5f, 0x32, 0x64, 0x2e, 0x76, 0x34, 0x66, 0x33, 0x32, 0x61, 0x69, 0x72,
4701 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e, 0x66, 0x2e, 0x66,
4702 0x33, 0x32, 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32, 0x33, 0x32, 0x30, 0x32,
4703 0x33, 0x2e, 0x39, 0x38, 0x61, 0x69, 0x72, 0x36, 0x34, 0x2d, 0x61, 0x70,
4704 0x70, 0x6c, 0x65, 0x2d, 0x74, 0x76, 0x6f, 0x73, 0x31, 0x33, 0x2e, 0x30,
4705 0x2e, 0x30, 0x2d, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72,
4706 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
4707};
4708const unsigned int BlitFrom2D_metallib_len = 4224;
4709const unsigned char BlitFrom2DArray_metallib[] = {
4710 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
4711 0x00, 0x00, 0x00, 0x00, 0x15, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4712 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
4713 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4714 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xed, 0x00, 0x00, 0x00,
4715 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4716 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00,
4717 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
4718 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
4719 0x6f, 0x6d, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00, 0x54, 0x59,
4720 0x50, 0x45, 0x01, 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0xf5,
4721 0x54, 0x44, 0x16, 0xa8, 0xfa, 0x68, 0xff, 0x3c, 0x89, 0x80, 0x33, 0x57,
4722 0x3a, 0xa2, 0xdc, 0x0e, 0x3b, 0x84, 0x4e, 0x37, 0xff, 0xa5, 0xaf, 0xe5,
4723 0x03, 0x3d, 0xa2, 0xe6, 0xd6, 0x07, 0x8c, 0x4d, 0x44, 0x53, 0x5a, 0x08,
4724 0x00, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46,
4725 0x54, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4726 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4727 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x02,
4728 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x45, 0x4e, 0x44,
4729 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00,
4730 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00,
4731 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0xff, 0xff, 0xff,
4732 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00,
4733 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00,
4734 0x00, 0x21, 0x0c, 0x00, 0x00, 0x9f, 0x03, 0x00, 0x00, 0x0b, 0x02, 0x21,
4735 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23,
4736 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84,
4737 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45,
4738 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18,
4739 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88,
4740 0xa5, 0x00, 0x19, 0x32, 0x42, 0x04, 0x49, 0x0e, 0x90, 0x91, 0x22, 0xc4,
4741 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46,
4742 0x06, 0x51, 0x18, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24,
4743 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22,
4744 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1,
4745 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21,
4746 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80,
4747 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70,
4748 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79,
4749 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40,
4750 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21,
4751 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1,
4752 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00,
4753 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0,
4754 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72,
4755 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76,
4756 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72,
4757 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77,
4758 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80,
4759 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20,
4760 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0,
4761 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72,
4762 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79,
4763 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74,
4764 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1,
4765 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40,
4766 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1,
4767 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a,
4768 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70,
4769 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70,
4770 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62,
4771 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1,
4772 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40,
4773 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21,
4774 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79,
4775 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76,
4776 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01,
4777 0xd8, 0xe0, 0x09, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e,
4778 0xe9, 0x20, 0x0f, 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e,
4779 0xf2, 0xd0, 0x06, 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e,
4780 0xe1, 0x30, 0x0f, 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28,
4781 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48,
4782 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00,
4783 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09,
4784 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50,
4785 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35,
4786 0x00, 0x24, 0xa0, 0x02, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00,
4787 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e,
4788 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00,
4789 0x00, 0x2a, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85,
4790 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90,
4791 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x74, 0x33,
4792 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70,
4793 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12,
4794 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4d,
4795 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0xdf,
4796 0x1e, 0x7e, 0x20, 0x8a, 0x00, 0xec, 0x9f, 0xc6, 0x08, 0x80, 0x41, 0x04,
4797 0x23, 0xb8, 0x48, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x5f, 0x02, 0x98, 0x67,
4798 0x21, 0xa2, 0x7f, 0x1a, 0x23, 0x00, 0x06, 0x11, 0x10, 0xa1, 0x18, 0x41,
4799 0x84, 0x72, 0x12, 0xa9, 0x39, 0x02, 0xc4, 0x08, 0x81, 0xcd, 0x11, 0x04,
4800 0xc3, 0x08, 0xc2, 0x50, 0x96, 0x76, 0x92, 0x18, 0xee, 0x39, 0x00, 0x06,
4801 0xc1, 0x22, 0x80, 0x41, 0xb2, 0x08, 0x03, 0x10, 0x1d, 0x08, 0x48, 0x81,
4802 0x31, 0x47, 0x00, 0x0a, 0x83, 0x08, 0x82, 0x30, 0x88, 0x00, 0x08, 0x83,
4803 0x08, 0x83, 0x30, 0x02, 0x00, 0x13, 0xc0, 0x20, 0x1c, 0xd2, 0x41, 0x1e,
4804 0xec, 0x80, 0x0e, 0xda, 0x20, 0x1c, 0xe0, 0x01, 0x1e, 0xd8, 0xa1, 0x1c,
4805 0xda, 0x80, 0x1e, 0xec, 0xe1, 0x1d, 0xe6, 0x21, 0x0e, 0xe6, 0xc0, 0x0d,
4806 0xe0, 0xc0, 0x0d, 0xe0, 0xa0, 0x0d, 0xe6, 0x21, 0x1d, 0xda, 0xa1, 0x1e,
4807 0xd8, 0x21, 0x1c, 0xe8, 0xe1, 0x1d, 0xe4, 0x61, 0xc3, 0x6d, 0x94, 0x43,
4808 0x1b, 0xc0, 0x83, 0x1e, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81,
4809 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x41, 0x3a, 0xc4, 0x81, 0x1e, 0xe0, 0x81,
4810 0x1e, 0xe0, 0x41, 0x1b, 0xa4, 0x03, 0x1e, 0xe8, 0x01, 0x1e, 0xe8, 0x01,
4811 0x1e, 0xb4, 0x41, 0x3a, 0xc4, 0x81, 0x1d, 0xe8, 0x41, 0x1c, 0xd8, 0x81,
4812 0x1e, 0xc4, 0x81, 0x1d, 0xb4, 0x41, 0x3a, 0xcc, 0x81, 0x1c, 0xe8, 0xc1,
4813 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x41, 0x3a, 0xd8, 0x01,
4814 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81,
4815 0x39, 0xcc, 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81,
4816 0x1c, 0xb4, 0x81, 0x39, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81,
4817 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xc4, 0x81, 0x1d, 0xe8, 0x41,
4818 0x1c, 0xd8, 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xb4, 0x81, 0x3d, 0xc8, 0x01,
4819 0x1d, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x81,
4820 0x3d, 0xcc, 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81,
4821 0x1c, 0xb4, 0x81, 0x3d, 0xd0, 0x01, 0x1e, 0xe8, 0x81, 0x1d, 0xd0, 0x81,
4822 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xd8, 0x01, 0x1d, 0xe8, 0x81,
4823 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xe4, 0x81,
4824 0x1d, 0xe8, 0x41, 0x1c, 0xc8, 0x01, 0x1e, 0xe8, 0x41, 0x1c, 0xc8, 0x01,
4825 0x1e, 0xb4, 0x81, 0x3d, 0xc4, 0x81, 0x1c, 0xe0, 0x81, 0x1e, 0xc4, 0x81,
4826 0x1c, 0xe0, 0x81, 0x1e, 0xc4, 0x81, 0x1c, 0xe0, 0x41, 0x1b, 0xd8, 0x43,
4827 0x1c, 0xe4, 0x81, 0x1c, 0xe8, 0x81, 0x1c, 0xd4, 0x81, 0x1d, 0xe8, 0x81,
4828 0x1c, 0xd4, 0x81, 0x1d, 0xb4, 0x81, 0x3d, 0xc8, 0x41, 0x1d, 0xd8, 0x81,
4829 0x1e, 0xc8, 0x41, 0x1d, 0xd8, 0x81, 0x1e, 0xc8, 0x41, 0x1d, 0xd8, 0x41,
4830 0x1b, 0xd8, 0x43, 0x1d, 0xc4, 0x81, 0x1c, 0xe8, 0x41, 0x1d, 0xc4, 0x81,
4831 0x1c, 0xe8, 0x41, 0x1d, 0xc4, 0x81, 0x1c, 0xb4, 0x81, 0x3d, 0xc4, 0x01,
4832 0x1c, 0xc8, 0x01, 0x1d, 0xe8, 0x41, 0x1c, 0xc0, 0x81, 0x1c, 0xd0, 0x81,
4833 0x1e, 0xc4, 0x01, 0x1c, 0xc8, 0x01, 0x1d, 0xb4, 0x81, 0x3b, 0xe0, 0x81,
4834 0x1e, 0xc4, 0x81, 0x1d, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x46, 0x08, 0x43,
4835 0x3e, 0xdb, 0x82, 0x4c, 0x5f, 0xe4, 0x30, 0x76, 0xa7, 0x45, 0x11, 0x80,
4836 0x0d, 0x89, 0x80, 0x47, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00,
4837 0x00, 0x00, 0x80, 0x21, 0xd1, 0x13, 0x06, 0x10, 0x10, 0x00, 0x02, 0x00,
4838 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x89, 0xe0, 0xe0, 0x92, 0x80,
4839 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0x48, 0x74,
4840 0x0a, 0x17, 0x05, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
4841 0x00, 0x12, 0x1b, 0x04, 0x8a, 0x86, 0x0e, 0x00, 0x00, 0x64, 0x81, 0x00,
4842 0x00, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c,
4843 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02,
4844 0x85, 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x84,
4845 0x47, 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xee, 0x58, 0x42, 0x24, 0x00,
4846 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80,
4847 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84,
4848 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c,
4849 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42,
4850 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88,
4851 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c,
4852 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79,
4853 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70,
4854 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f,
4855 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4,
4856 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30,
4857 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc,
4858 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b,
4859 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70,
4860 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76,
4861 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72,
4862 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e,
4863 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1,
4864 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21,
4865 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8,
4866 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94,
4867 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc,
4868 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70,
4869 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74,
4870 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f,
4871 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e,
4872 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41,
4873 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1,
4874 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c,
4875 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37,
4876 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f,
4877 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21,
4878 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21,
4879 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0,
4880 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88,
4881 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77,
4882 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c,
4883 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23,
4884 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01,
4885 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84,
4886 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8,
4887 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76,
4888 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e,
4889 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f,
4890 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e,
4891 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e,
4892 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1,
4893 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21,
4894 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8,
4895 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77,
4896 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19,
4897 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e,
4898 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30,
4899 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71,
4900 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77,
4901 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x20, 0x00,
4902 0x00, 0x01, 0x01, 0x00, 0x00, 0x32, 0x9a, 0x08, 0x14, 0x02, 0x85, 0x8c,
4903 0x27, 0x46, 0x46, 0xc8, 0x11, 0x32, 0x64, 0xd4, 0xd4, 0x80, 0x0c, 0xfa,
4904 0x09, 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5,
4905 0x3c, 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81,
4906 0x14, 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x78, 0xcd, 0x72, 0x34, 0x00, 0x00,
4907 0x00, 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
4908 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70,
4909 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65,
4910 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e,
4911 0x39, 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d,
4912 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74,
4913 0x61, 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c,
4914 0x65, 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69,
4915 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d,
4916 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61,
4917 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72,
4918 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61,
4919 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74,
4920 0x63, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72,
4921 0x2e, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67,
4922 0x65, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79,
4923 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74,
4924 0x34, 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e,
4925 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72,
4926 0x61, 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32,
4927 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65,
4928 0x72, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63,
4929 0x74, 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69,
4930 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65,
4931 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
4932 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73,
4933 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69,
4934 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e,
4935 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61,
4936 0x69, 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
4937 0x69, 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61,
4938 0x64, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f,
4939 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c,
4940 0x65, 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65,
4941 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69,
4942 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c,
4943 0x61, 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61,
4944 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
4945 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f,
4946 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73,
4947 0x69, 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67,
4948 0x69, 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67,
4949 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75,
4950 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65,
4951 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x5f, 0x61, 0x72,
4952 0x72, 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73,
4953 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
4954 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73,
4955 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65,
4956 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c,
4957 0x65, 0x72, 0x00, 0x00, 0x00, 0xc4, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00,
4958 0x00, 0x30, 0x82, 0x30, 0x10, 0x23, 0x08, 0x57, 0x34, 0x82, 0x30, 0x14,
4959 0x23, 0x08, 0x83, 0x31, 0x82, 0x30, 0x1c, 0x23, 0x08, 0x0b, 0x30, 0x82,
4960 0x30, 0x20, 0x23, 0x08, 0x43, 0x32, 0x82, 0x30, 0x28, 0x23, 0x08, 0xc3,
4961 0x32, 0x82, 0x30, 0x30, 0x33, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x0c, 0x43,
4962 0x1b, 0x08, 0x6e, 0x30, 0x43, 0x30, 0xcc, 0x30, 0xac, 0xc1, 0x1a, 0xbc,
4963 0xc1, 0x0c, 0x04, 0xb1, 0x06, 0x6f, 0xf0, 0x06, 0x33, 0x04, 0xc5, 0x0c,
4964 0x81, 0x31, 0x43, 0x70, 0xcc, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0x32,
4965 0x43, 0xe0, 0x07, 0x33, 0x24, 0x6f, 0xb0, 0x30, 0x8d, 0x93, 0x3c, 0x50,
4966 0x34, 0x03, 0xd2, 0x06, 0x52, 0x33, 0x25, 0x0a, 0x44, 0xcd, 0x40, 0xbd,
4967 0x81, 0x1c, 0xbc, 0xc1, 0xa3, 0xc9, 0x81, 0x1c, 0xbc, 0xc1, 0xb3, 0xcd,
4968 0x81, 0x1b, 0xbc, 0x01, 0xd7, 0xd1, 0x81, 0x1b, 0xbc, 0x81, 0xf7, 0xcd,
4969 0x20, 0xad, 0x41, 0x65, 0xc5, 0xc1, 0xf5, 0x06, 0x6d, 0x80, 0x65, 0xa2,
4970 0x00, 0x06, 0x71, 0x10, 0x06, 0x72, 0x90, 0x88, 0x01, 0x34, 0x06, 0x33,
4971 0x28, 0x75, 0x40, 0x06, 0xd7, 0x1b, 0xb4, 0x41, 0x19, 0x24, 0x66, 0x00,
4972 0x9d, 0xc1, 0x0c, 0x89, 0x1b, 0xa0, 0xc1, 0xf5, 0x06, 0x6d, 0x90, 0xa4,
4973 0x01, 0xa4, 0x06, 0x33, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5,
4974 0x30, 0xc3, 0x00, 0x07, 0x7f, 0x60, 0x0a, 0xd5, 0x01, 0x1c, 0xc7, 0x71,
4975 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0xb9, 0x81, 0x1b, 0x58, 0x74, 0xa0, 0x07,
4976 0x96, 0x65, 0xe9, 0x01, 0xc7, 0x0a, 0xa6, 0x00, 0x1b, 0x7e, 0x61, 0x0f,
4977 0xea, 0xc0, 0x0a, 0x32, 0x12, 0x98, 0xa0, 0x8b, 0xd8, 0xd8, 0xec, 0xda,
4978 0x5c, 0xda, 0xde, 0xc8, 0xea, 0xd8, 0xca, 0x5c, 0xcc, 0xd8, 0xc2, 0xce,
4979 0xe6, 0x46, 0x11, 0xea, 0xc0, 0x0e, 0x4e, 0x61, 0x63, 0xb3, 0x6b, 0x73,
4980 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0xb8, 0x83, 0x5b, 0xc2, 0xd2,
4981 0xe4, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0x46, 0x09, 0xf0,
4982 0xe0, 0xa8, 0xb0, 0x34, 0x39, 0x17, 0xb6, 0x30, 0xb7, 0xb3, 0xba, 0xb0,
4983 0xb3, 0xb2, 0x2f, 0xbb, 0x32, 0xb9, 0xb9, 0xb4, 0x37, 0xb7, 0x51, 0x82,
4984 0x3c, 0xb8, 0x29, 0x2c, 0x4d, 0xce, 0x65, 0xec, 0xad, 0x0d, 0x2e, 0x8d,
4985 0xad, 0xec, 0xeb, 0x0d, 0x8e, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x94, 0x41,
4986 0x0f, 0xf6, 0x80, 0x0f, 0x8e, 0x09, 0x4b, 0x93, 0x73, 0x31, 0x93, 0x0b,
4987 0x3b, 0x6b, 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0x30, 0x05, 0x00, 0x00, 0x00,
4988 0x00, 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72,
4989 0x28, 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8,
4990 0xc3, 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1,
4991 0x0d, 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21,
4992 0x1d, 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f,
4993 0xe1, 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e,
4994 0xf4, 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76,
4995 0x78, 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c,
4996 0xc3, 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b,
4997 0x1c, 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61,
4998 0x1c, 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1,
4999 0x1c, 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f,
5000 0xf4, 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00,
5001 0x00, 0xd1, 0x10, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0xcc, 0x3c,
5002 0xa4, 0x83, 0x3b, 0x9c, 0x03, 0x3b, 0x94, 0x03, 0x3d, 0xa0, 0x83, 0x3c,
5003 0x94, 0x43, 0x38, 0x90, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00,
5004 0x00, 0x70, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00,
5005 0x00, 0x03, 0x00, 0x00, 0x00, 0xe4, 0x6a, 0x80, 0xde, 0x08, 0x00, 0x81,
5006 0x11, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x46, 0x00, 0x00,
5007 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0x88, 0x58, 0x00, 0x00, 0x00,
5008 0x00, 0xcf, 0x13, 0x06, 0x16, 0x86, 0x49, 0x03, 0x00, 0x6f, 0x6d, 0x6e,
5009 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72,
5010 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54,
5011 0x42, 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73,
5012 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74,
5013 0x46, 0x72, 0x6f, 0x6d, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x29,
5014 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
5015 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29, 0x61, 0x69,
5016 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
5017 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69,
5018 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
5019 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a,
5020 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
5021 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x00, 0x00, 0x13, 0x04, 0xac,
5022 0x99, 0x20, 0x60, 0xce, 0x04, 0x01, 0x7b, 0x26, 0x08, 0x18, 0xb4, 0x42,
5023 0xa0, 0x05, 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1,
5024 0x16, 0x68, 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21,
5025 0x48, 0x85, 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21,
5026 0x17, 0x60, 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d,
5027 0xc3, 0x2b, 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d,
5028 0x89, 0x2b, 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8,
5029 0xc2, 0x2c, 0x6c, 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0, 0x0b,
5030 0xbd, 0x20, 0x0b, 0x00, 0x00, 0x9b, 0x0c, 0x46, 0x33, 0x51, 0x20, 0xc8,
5031 0x26, 0x03, 0xf2, 0x5c, 0x14, 0x08, 0x62, 0x01, 0x23, 0xfe, 0x16, 0x10,
5032 0xe0, 0xbf, 0xc9, 0xc0, 0x4c, 0x14, 0x05, 0x60, 0x8c, 0x18, 0x14, 0x44,
5033 0x08, 0x82, 0x01, 0xf5, 0x05, 0x9b, 0x0c, 0x8f, 0xf5, 0x51, 0x30, 0xc8,
5034 0x88, 0x81, 0x41, 0x84, 0x20, 0x58, 0xf8, 0x87, 0x34, 0x06, 0xc1, 0x88,
5035 0x81, 0x53, 0x84, 0x20, 0x18, 0x40, 0x65, 0x10, 0x41, 0x07, 0xf1, 0x38,
5036 0x4f, 0xd0, 0x7c, 0xa3, 0x09, 0x01, 0x90, 0x41, 0x40, 0x0c, 0x00, 0x00,
5037 0x00, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8, 0x85, 0x43, 0x17,
5038 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba, 0x80, 0xec, 0xc2,
5039 0x96, 0xe3, 0x08, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17, 0xb6, 0x1c, 0x4a,
5040 0x00, 0x0e, 0x87, 0x2e, 0x20, 0xbb, 0xb0, 0xa5, 0x60, 0x8e, 0x5d, 0x40,
5041 0x74, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00,
5042 0x00, 0x03, 0x00, 0x00, 0x00, 0x32, 0x0e, 0x10, 0x22, 0x84, 0x00, 0xaf,
5043 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0c, 0x00,
5044 0x00, 0x31, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x78, 0x01, 0x00, 0x00,
5045 0x00, 0x03, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
5046 0x00, 0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00,
5047 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
5048 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00,
5049 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
5050 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00,
5051 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
5052 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
5053 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
5054 0xff, 0x00, 0x24, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
5055 0x00, 0x0f, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
5056 0xff, 0x08, 0x24, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00,
5057 0x00, 0x30, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
5058 0xff, 0x08, 0x24, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00,
5059 0x00, 0x47, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
5060 0xff, 0x08, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x0c, 0x00,
5061 0x00, 0x25, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x26, 0x01, 0x00, 0x00,
5062 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x32, 0x44, 0x41,
5063 0x72, 0x72, 0x61, 0x79, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70,
5064 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x32,
5065 0x64, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x76, 0x34, 0x66, 0x33,
5066 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74,
5067 0x2e, 0x66, 0x2e, 0x66, 0x33, 0x32, 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32,
5068 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e,
5069 0x75, 0x2e, 0x69, 0x33, 0x32, 0x2e, 0x66, 0x2e, 0x66, 0x33, 0x32, 0x33,
5070 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x61, 0x69, 0x72, 0x36, 0x34,
5071 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2d, 0x74, 0x76, 0x6f, 0x73, 0x31,
5072 0x33, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61,
5073 0x74, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5074 0x00, 0x00, 0x00, 0x00, 0x00
5075};
5076const unsigned int BlitFrom2DArray_metallib_len = 4373;
5077const unsigned char BlitFrom3D_metallib[] = {
5078 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
5079 0x00, 0x00, 0x00, 0x00, 0xc0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5080 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
5081 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5082 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00,
5083 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5084 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x0f, 0x00, 0x00,
5085 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
5086 0x4e, 0x41, 0x4d, 0x45, 0x0b, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
5087 0x6f, 0x6d, 0x33, 0x44, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01,
5088 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x5d, 0xdf, 0x8c, 0x46, 0xb9, 0x71,
5089 0xed, 0xf3, 0x7b, 0x87, 0x7e, 0xbf, 0x5f, 0x41, 0x31, 0xc2, 0x34, 0x24,
5090 0xa7, 0xbc, 0xfe, 0xd5, 0x77, 0xa9, 0xce, 0xea, 0xbf, 0xa0, 0xae, 0xb2,
5091 0x21, 0xdc, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0xd0, 0x0f, 0x00, 0x00,
5092 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00,
5093 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5094 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45,
5095 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
5096 0x45, 0x4e, 0x44, 0x54, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00,
5097 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
5098 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
5099 0xb0, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde,
5100 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24,
5101 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00,
5102 0x99, 0x03, 0x00, 0x00, 0x0b, 0x02, 0x21, 0x00, 0x02, 0x00, 0x00, 0x00,
5103 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49,
5104 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19,
5105 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42,
5106 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88,
5107 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42,
5108 0x04, 0x49, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c,
5109 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00,
5110 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff,
5111 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4,
5112 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda,
5113 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00,
5114 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87,
5115 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87,
5116 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07,
5117 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc,
5118 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2,
5119 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4,
5120 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc,
5121 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda,
5122 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
5123 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87,
5124 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07,
5125 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03,
5126 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca,
5127 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6,
5128 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0,
5129 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
5130 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87,
5131 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea,
5132 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce,
5133 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde,
5134 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8,
5135 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87,
5136 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07,
5137 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8,
5138 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6,
5139 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6,
5140 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc,
5141 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00,
5142 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87,
5143 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07,
5144 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0,
5145 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20,
5146 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0,
5147 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06,
5148 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff,
5149 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02,
5150 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e,
5151 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff,
5152 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff,
5153 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00,
5154 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18,
5155 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48,
5156 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00,
5157 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84,
5158 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c,
5159 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x70, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30,
5160 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30,
5161 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10,
5162 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4a, 0x9a, 0x22, 0x4a, 0x98, 0xfc,
5163 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0xff, 0x1e, 0xfe, 0x69, 0x8c, 0x00,
5164 0x18, 0x44, 0x30, 0x82, 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff, 0x25,
5165 0x80, 0x79, 0x16, 0x22, 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01, 0x11,
5166 0x8a, 0x11, 0x44, 0x28, 0x27, 0x91, 0x9a, 0x23, 0x40, 0x8c, 0x10, 0xd8,
5167 0x30, 0xc2, 0x00, 0xcc, 0x11, 0x04, 0xc3, 0x08, 0xc3, 0x50, 0x94, 0x76,
5168 0x92, 0x7b, 0xf0, 0x01, 0x30, 0x28, 0x16, 0x01, 0x0c, 0x9a, 0x03, 0x01,
5169 0x29, 0x30, 0xe6, 0x08, 0x40, 0x61, 0x10, 0x41, 0x10, 0x06, 0x11, 0x00,
5170 0x61, 0x10, 0x61, 0x10, 0x46, 0x00, 0x00, 0x00, 0x13, 0xc0, 0x20, 0x1c,
5171 0xd2, 0x41, 0x1e, 0xec, 0x80, 0x0e, 0xda, 0x20, 0x1c, 0xe0, 0x01, 0x1e,
5172 0xd8, 0xa1, 0x1c, 0xda, 0x80, 0x1e, 0xec, 0xe1, 0x1d, 0xe6, 0x21, 0x0e,
5173 0xe6, 0xc0, 0x0d, 0xe0, 0xc0, 0x0d, 0xe0, 0xa0, 0x0d, 0xe6, 0x21, 0x1d,
5174 0xda, 0xa1, 0x1e, 0xd8, 0x21, 0x1c, 0xe8, 0xe1, 0x1d, 0xe4, 0x61, 0xc3,
5175 0x6d, 0x94, 0x43, 0x1b, 0xc0, 0x83, 0x1e, 0xd8, 0x01, 0x1d, 0xe8, 0x81,
5176 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x41, 0x3a, 0xc4, 0x81,
5177 0x1e, 0xe0, 0x81, 0x1e, 0xe0, 0x41, 0x1b, 0xa4, 0x03, 0x1e, 0xe8, 0x01,
5178 0x1e, 0xe8, 0x01, 0x1e, 0xb4, 0x41, 0x3a, 0xc4, 0x81, 0x1d, 0xe8, 0x41,
5179 0x1c, 0xd8, 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xb4, 0x41, 0x3a, 0xcc, 0x81,
5180 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x41,
5181 0x3a, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01,
5182 0x1d, 0xb4, 0x81, 0x39, 0xcc, 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81,
5183 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x81, 0x39, 0xd8, 0x01, 0x1d, 0xe8, 0x81,
5184 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xc4, 0x81,
5185 0x1d, 0xe8, 0x41, 0x1c, 0xd8, 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xb4, 0x81,
5186 0x3d, 0xc8, 0x01, 0x1d, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81,
5187 0x1c, 0xb4, 0x81, 0x3d, 0xcc, 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81,
5188 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x81, 0x3d, 0xd0, 0x01, 0x1e, 0xe8, 0x81,
5189 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xd8, 0x01,
5190 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81,
5191 0x3d, 0xe4, 0x81, 0x1d, 0xe8, 0x41, 0x1c, 0xc8, 0x01, 0x1e, 0xe8, 0x41,
5192 0x1c, 0xc8, 0x01, 0x1e, 0xb4, 0x81, 0x3d, 0xc4, 0x81, 0x1c, 0xe0, 0x81,
5193 0x1e, 0xc4, 0x81, 0x1c, 0xe0, 0x81, 0x1e, 0xc4, 0x81, 0x1c, 0xe0, 0x41,
5194 0x1b, 0xd8, 0x43, 0x1c, 0xe4, 0x81, 0x1c, 0xe8, 0x81, 0x1c, 0xd4, 0x81,
5195 0x1d, 0xe8, 0x81, 0x1c, 0xd4, 0x81, 0x1d, 0xb4, 0x81, 0x3d, 0xc8, 0x41,
5196 0x1d, 0xd8, 0x81, 0x1e, 0xc8, 0x41, 0x1d, 0xd8, 0x81, 0x1e, 0xc8, 0x41,
5197 0x1d, 0xd8, 0x41, 0x1b, 0xd8, 0x43, 0x1d, 0xc4, 0x81, 0x1c, 0xe8, 0x41,
5198 0x1d, 0xc4, 0x81, 0x1c, 0xe8, 0x41, 0x1d, 0xc4, 0x81, 0x1c, 0xb4, 0x81,
5199 0x3d, 0xc4, 0x01, 0x1c, 0xc8, 0x01, 0x1d, 0xe8, 0x41, 0x1c, 0xc0, 0x81,
5200 0x1c, 0xd0, 0x81, 0x1e, 0xc4, 0x01, 0x1c, 0xc8, 0x01, 0x1d, 0xb4, 0x81,
5201 0x3b, 0xe0, 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xe8, 0xc1, 0x1c, 0xc8, 0x81,
5202 0x46, 0x08, 0x43, 0x2a, 0xdb, 0x82, 0x4c, 0x5f, 0xe4, 0x30, 0x77, 0x37,
5203 0x24, 0x02, 0x14, 0x05, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
5204 0x00, 0x00, 0x86, 0x44, 0xca, 0x16, 0x01, 0x01, 0x20, 0x00, 0x00, 0x00,
5205 0x08, 0x00, 0x00, 0x00, 0xc0, 0x90, 0xa8, 0x0c, 0xae, 0x09, 0x08, 0x80,
5206 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x36, 0x08, 0x14,
5207 0xdd, 0x1c, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x00, 0x0b, 0x00, 0x00, 0x00,
5208 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47,
5209 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30,
5210 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x74, 0x47, 0x00, 0x0a, 0xa2, 0x40,
5211 0x0a, 0x85, 0xec, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00,
5212 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66,
5213 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07,
5214 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10,
5215 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce,
5216 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b,
5217 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c,
5218 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07,
5219 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11,
5220 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0,
5221 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8,
5222 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b,
5223 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b,
5224 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87,
5225 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07,
5226 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87,
5227 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81,
5228 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30,
5229 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4,
5230 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca,
5231 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39,
5232 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b,
5233 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b,
5234 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83,
5235 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87,
5236 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90,
5237 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20,
5238 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc,
5239 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66,
5240 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24,
5241 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07,
5242 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e,
5243 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e,
5244 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54,
5245 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39,
5246 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c,
5247 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07,
5248 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0,
5249 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4,
5250 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b,
5251 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39,
5252 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c,
5253 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87,
5254 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0,
5255 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50,
5256 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0,
5257 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec,
5258 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6,
5259 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66,
5260 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39,
5261 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07,
5262 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10,
5263 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90,
5264 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07,
5265 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07,
5266 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07,
5267 0x00, 0x00, 0x00, 0x00, 0x79, 0x20, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
5268 0x32, 0x9a, 0x08, 0x14, 0x02, 0x85, 0x8c, 0x27, 0x46, 0x46, 0xc8, 0x11,
5269 0x32, 0x64, 0xd4, 0xd4, 0x80, 0x0c, 0xee, 0x09, 0x8b, 0xf2, 0x06, 0xc5,
5270 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2,
5271 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc,
5272 0xa2, 0x60, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20,
5273 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72,
5274 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d,
5275 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
5276 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d,
5277 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33,
5278 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72,
5279 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e,
5280 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65,
5281 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
5282 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e,
5283 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
5284 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66,
5285 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e,
5286 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64,
5287 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61, 0x69, 0x72,
5288 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61,
5289 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e,
5290 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70,
5291 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28,
5292 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69,
5293 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e,
5294 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x66,
5295 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67,
5296 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e,
5297 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e,
5298 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69,
5299 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66,
5300 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65,
5301 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f,
5302 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78,
5303 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e,
5304 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
5305 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f,
5306 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
5307 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65,
5308 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f,
5309 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
5310 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61,
5311 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
5312 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f,
5313 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f,
5314 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69,
5315 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72,
5316 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74, 0x75,
5317 0x72, 0x65, 0x33, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20,
5318 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63,
5319 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e,
5320 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c,
5321 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70,
5322 0x6c, 0x65, 0x72, 0x00, 0xc4, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5323 0x30, 0x82, 0x30, 0x0c, 0x23, 0x08, 0x16, 0x34, 0x82, 0x30, 0x10, 0x23,
5324 0x08, 0x43, 0x31, 0x82, 0x30, 0x18, 0x23, 0x08, 0x0b, 0x30, 0x82, 0x30,
5325 0x1c, 0x23, 0x08, 0x03, 0x32, 0x82, 0x30, 0x24, 0x23, 0x08, 0x83, 0x32,
5326 0x82, 0x30, 0x2c, 0x33, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x0c, 0x43, 0x1b,
5327 0x08, 0x6e, 0x30, 0x43, 0x30, 0xcc, 0x30, 0xac, 0xc1, 0x1a, 0xbc, 0xc1,
5328 0x0c, 0x04, 0xb1, 0x06, 0x6f, 0xf0, 0x06, 0x33, 0x04, 0xc5, 0x0c, 0x81,
5329 0x31, 0x43, 0x70, 0xcc, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0x32, 0x43,
5330 0xe0, 0x07, 0x33, 0x24, 0x6f, 0xb0, 0x30, 0x8d, 0x93, 0x3c, 0x50, 0x34,
5331 0x03, 0xd2, 0x06, 0x52, 0x33, 0x25, 0x0a, 0x44, 0xcd, 0x40, 0xbd, 0x81,
5332 0x1c, 0xbc, 0xc1, 0xa3, 0xc9, 0x81, 0x1c, 0xbc, 0xc1, 0xb3, 0xcd, 0x81,
5333 0x1b, 0xbc, 0x01, 0xd7, 0xd1, 0x81, 0x1b, 0xbc, 0x81, 0xf7, 0xcd, 0x20,
5334 0xad, 0x41, 0x65, 0xc5, 0xc1, 0xf5, 0x06, 0x6d, 0x80, 0x65, 0xa2, 0x00,
5335 0x06, 0x71, 0x10, 0x06, 0x72, 0x90, 0x88, 0x01, 0x34, 0x06, 0x33, 0x28,
5336 0x75, 0x40, 0x06, 0xd7, 0x1b, 0xb4, 0x41, 0x19, 0x24, 0x66, 0x00, 0x9d,
5337 0xc1, 0x0c, 0x89, 0x1b, 0xa0, 0xc1, 0xf5, 0x06, 0x6d, 0x90, 0xa4, 0x01,
5338 0xa4, 0x06, 0x33, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0x30,
5339 0xc3, 0x00, 0x07, 0x7f, 0x60, 0x0a, 0xd5, 0x01, 0x1c, 0xc7, 0x71, 0x1c,
5340 0xc7, 0x71, 0x1c, 0xc7, 0xb9, 0x81, 0x1b, 0x58, 0x74, 0xa0, 0x07, 0x96,
5341 0x65, 0xe9, 0x01, 0xc7, 0x0a, 0xa6, 0x00, 0x1b, 0x7e, 0x61, 0x0f, 0xea,
5342 0xc0, 0x0a, 0x32, 0x12, 0x98, 0xa0, 0x8b, 0xd8, 0xd8, 0xec, 0xda, 0x5c,
5343 0xda, 0xde, 0xc8, 0xea, 0xd8, 0xca, 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6,
5344 0x46, 0x11, 0xea, 0xc0, 0x0e, 0x4e, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49,
5345 0x23, 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0xb8, 0x83, 0x5b, 0xc2, 0xd2, 0xe4,
5346 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0x46, 0x09, 0xf0, 0xe0,
5347 0xa8, 0xb0, 0x34, 0x39, 0x17, 0xb6, 0x30, 0xb7, 0xb3, 0xba, 0xb0, 0xb3,
5348 0xb2, 0x2f, 0xbb, 0x32, 0xb9, 0xb9, 0xb4, 0x37, 0xb7, 0x51, 0x82, 0x3c,
5349 0xb8, 0x29, 0x2c, 0x4d, 0xce, 0x65, 0xec, 0xad, 0x0d, 0x2e, 0x8d, 0xad,
5350 0xec, 0xeb, 0x0d, 0x8e, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x94, 0x41, 0x0f,
5351 0xf6, 0x80, 0x0f, 0x8e, 0x09, 0x4b, 0x93, 0x73, 0x31, 0x93, 0x0b, 0x3b,
5352 0x6b, 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0x30, 0x05, 0x00, 0x00, 0x00, 0x00,
5353 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28,
5354 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3,
5355 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d,
5356 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d,
5357 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1,
5358 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4,
5359 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78,
5360 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3,
5361 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c,
5362 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c,
5363 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c,
5364 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4,
5365 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00,
5366 0xd1, 0x10, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0xcc, 0x3c, 0xa4,
5367 0x83, 0x3b, 0x9c, 0x03, 0x3b, 0x94, 0x03, 0x3d, 0xa0, 0x83, 0x3c, 0x94,
5368 0x43, 0x38, 0x90, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00,
5369 0x72, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00,
5370 0x06, 0x00, 0x00, 0x00, 0x34, 0x66, 0x00, 0xe8, 0xd5, 0x00, 0xc1, 0x39,
5371 0x06, 0x83, 0xb0, 0x46, 0x00, 0xe8, 0x16, 0x01, 0x81, 0x11, 0x00, 0x12,
5372 0x33, 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00,
5373 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0x48, 0x4f, 0x00, 0x00, 0x00, 0x00,
5374 0xcf, 0xc3, 0x59, 0x18, 0x26, 0x0d, 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69,
5375 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53,
5376 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42,
5377 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
5378 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46,
5379 0x72, 0x6f, 0x6d, 0x33, 0x44, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
5380 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72,
5381 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
5382 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70,
5383 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
5384 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74,
5385 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f,
5386 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e,
5387 0x74, 0x00, 0x00, 0x00, 0x13, 0x84, 0x8b, 0x99, 0x20, 0x5c, 0xcd, 0x04,
5388 0xe1, 0x72, 0x26, 0x08, 0xd7, 0xb3, 0x42, 0xa0, 0x05, 0x55, 0x58, 0x31,
5389 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15, 0x56,
5390 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03, 0x2a,
5391 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60, 0x61, 0x43, 0x50,
5392 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02, 0x2c,
5393 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02, 0x2c,
5394 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18, 0x7e,
5395 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0, 0x0b, 0xbd, 0x20, 0x0b, 0x00, 0x00,
5396 0x9b, 0x0c, 0x4a, 0x74, 0x51, 0x20, 0xc8, 0x26, 0x03, 0x33, 0x6d, 0x14,
5397 0x08, 0x62, 0x01, 0x24, 0xfe, 0x16, 0x10, 0xe0, 0x3f, 0xc8, 0x10, 0x1c,
5398 0xcb, 0x26, 0x43, 0x84, 0x65, 0x14, 0x80, 0x31, 0xc7, 0x30, 0x04, 0xcc,
5399 0x26, 0x03, 0xb5, 0x91, 0x01, 0x05, 0x83, 0x8c, 0x18, 0x18, 0x44, 0x08,
5400 0x82, 0x85, 0x7f, 0x4c, 0x67, 0x10, 0x8c, 0x18, 0x34, 0x45, 0x08, 0x82,
5401 0x41, 0x94, 0x06, 0x56, 0x45, 0x4c, 0xd1, 0x14, 0x3c, 0x64, 0x30, 0x9a,
5402 0x10, 0x00, 0x19, 0x04, 0xc4, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
5403 0x5b, 0x8e, 0x20, 0xc8, 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c,
5404 0x41, 0x2e, 0x1c, 0xba, 0x80, 0xec, 0xc2, 0x96, 0x03, 0x09, 0x7e, 0xe1,
5405 0xd0, 0x05, 0x64, 0x17, 0xb6, 0x1c, 0x4b, 0x00, 0x0e, 0x87, 0x2e, 0x20,
5406 0xbb, 0xb0, 0xa5, 0x68, 0x8e, 0x5d, 0x40, 0x74, 0x01, 0x00, 0x00, 0x00,
5407 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5408 0x32, 0x0e, 0x10, 0x22, 0x84, 0x00, 0xa7, 0x06, 0x00, 0x00, 0x00, 0x00,
5409 0x00, 0x00, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00,
5410 0x12, 0x03, 0x94, 0x60, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
5411 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
5412 0x01, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5413 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00,
5414 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
5415 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
5416 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5417 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5418 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5419 0x0a, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x24, 0x00, 0x00,
5420 0x0a, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
5421 0x1b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00, 0x00,
5422 0x25, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
5423 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08, 0x24, 0x00, 0x00,
5424 0x00, 0x00, 0x00, 0x00, 0x5d, 0x0c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
5425 0x12, 0x03, 0x94, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x42, 0x6c, 0x69, 0x74,
5426 0x46, 0x72, 0x6f, 0x6d, 0x33, 0x44, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61,
5427 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
5428 0x5f, 0x33, 0x64, 0x2e, 0x76, 0x34, 0x66, 0x33, 0x32, 0x61, 0x69, 0x72,
5429 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e, 0x66, 0x2e, 0x66,
5430 0x33, 0x32, 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32, 0x33, 0x32, 0x30, 0x32,
5431 0x33, 0x2e, 0x39, 0x38, 0x61, 0x69, 0x72, 0x36, 0x34, 0x2d, 0x61, 0x70,
5432 0x70, 0x6c, 0x65, 0x2d, 0x74, 0x76, 0x6f, 0x73, 0x31, 0x33, 0x2e, 0x30,
5433 0x2e, 0x30, 0x2d, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72,
5434 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5435 0x00, 0x00, 0x00, 0x00
5436};
5437const unsigned int BlitFrom3D_metallib_len = 4288;
5438const unsigned char BlitFromCube_metallib[] = {
5439 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
5440 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5441 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
5442 0x00, 0x00, 0x00, 0x00, 0xe2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5443 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00,
5444 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5445 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00,
5446 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
5447 0x4e, 0x41, 0x4d, 0x45, 0x0d, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
5448 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01,
5449 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0xb4, 0x6a, 0x15, 0x7c,
5450 0x22, 0xda, 0x68, 0x03, 0x5b, 0xbe, 0x0b, 0x6f, 0xcc, 0xd8, 0x01, 0x52,
5451 0x48, 0x35, 0xd4, 0x71, 0xd3, 0xbf, 0xac, 0x61, 0x1b, 0x54, 0x43, 0x41,
5452 0xc0, 0x2c, 0x83, 0xa0, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x10, 0x11,
5453 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00,
5454 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5455 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5456 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00,
5457 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00,
5458 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e,
5459 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00,
5460 0x00, 0x00, 0xf0, 0x10, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43,
5461 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c,
5462 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c,
5463 0x00, 0x00, 0xdc, 0x03, 0x00, 0x00, 0x0b, 0x02, 0x21, 0x00, 0x02, 0x00,
5464 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8,
5465 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05,
5466 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92,
5467 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32,
5468 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19,
5469 0x32, 0x42, 0x04, 0x49, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51,
5470 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18,
5471 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff,
5472 0xff, 0xff, 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01,
5473 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61,
5474 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01,
5475 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74,
5476 0x70, 0x87, 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36,
5477 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b,
5478 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00,
5479 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81,
5480 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0,
5481 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21,
5482 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21,
5483 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77,
5484 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36,
5485 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36,
5486 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77,
5487 0x68, 0x03, 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1,
5488 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1,
5489 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81,
5490 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77,
5491 0x78, 0x87, 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73,
5492 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41,
5493 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21,
5494 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41,
5495 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21,
5496 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80,
5497 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78,
5498 0x48, 0x07, 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74,
5499 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21,
5500 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1,
5501 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1,
5502 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1,
5503 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73,
5504 0x28, 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a,
5505 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09,
5506 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f,
5507 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06,
5508 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f,
5509 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff,
5510 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1,
5511 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d,
5512 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18,
5513 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4,
5514 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0,
5515 0x02, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86,
5516 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32,
5517 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x2b, 0x00,
5518 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22,
5519 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c,
5520 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x7c, 0x33, 0x00, 0xc3, 0x08,
5521 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45,
5522 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34,
5523 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4b, 0x9a, 0x22, 0x4a,
5524 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0x5f, 0xa0, 0x02, 0xe2,
5525 0x9f, 0xc6, 0x08, 0x80, 0x41, 0x04, 0x23, 0xb8, 0x48, 0x9a, 0x22, 0x4a,
5526 0x98, 0xfc, 0x5f, 0x02, 0x98, 0x67, 0x21, 0xa2, 0x7f, 0x1a, 0x23, 0x00,
5527 0x06, 0x11, 0x10, 0xa1, 0x18, 0x41, 0x84, 0x72, 0x12, 0xa9, 0x39, 0x02,
5528 0xc4, 0x08, 0x81, 0x0d, 0x23, 0x0c, 0xc0, 0x1c, 0x41, 0x50, 0x90, 0x76,
5529 0x92, 0x7b, 0x00, 0x0c, 0x82, 0x45, 0x00, 0x83, 0x64, 0x11, 0x06, 0x20,
5530 0x3a, 0x10, 0x90, 0x02, 0x63, 0x8e, 0x00, 0x14, 0x06, 0x11, 0x04, 0x61,
5531 0x10, 0x01, 0x10, 0xa6, 0x00, 0x46, 0x00, 0x86, 0x11, 0x86, 0x61, 0x10,
5532 0x61, 0x10, 0x00, 0x00, 0x00, 0x00, 0x13, 0xc0, 0x20, 0x1c, 0xd2, 0x41,
5533 0x1e, 0xec, 0x80, 0x0e, 0xda, 0x20, 0x1c, 0xe0, 0x01, 0x1e, 0xd8, 0xa1,
5534 0x1c, 0xda, 0x80, 0x1e, 0xec, 0xe1, 0x1d, 0xe6, 0x21, 0x0e, 0xe6, 0xc0,
5535 0x0d, 0xe0, 0xc0, 0x0d, 0xe0, 0xa0, 0x0d, 0xe6, 0x21, 0x1d, 0xda, 0xa1,
5536 0x1e, 0xd8, 0x21, 0x1c, 0xe8, 0xe1, 0x1d, 0xe4, 0x61, 0xc3, 0x6d, 0x94,
5537 0x43, 0x1b, 0xc0, 0x83, 0x1e, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0,
5538 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x41, 0x3a, 0xc4, 0x81, 0x1e, 0xe0,
5539 0x81, 0x1e, 0xe0, 0x41, 0x1b, 0xa4, 0x03, 0x1e, 0xe8, 0x01, 0x1e, 0xe8,
5540 0x01, 0x1e, 0xb4, 0x41, 0x3a, 0xc4, 0x81, 0x1d, 0xe8, 0x41, 0x1c, 0xd8,
5541 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xb4, 0x41, 0x3a, 0xcc, 0x81, 0x1c, 0xe8,
5542 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x41, 0x3a, 0xd8,
5543 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4,
5544 0x81, 0x39, 0xcc, 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc,
5545 0x81, 0x1c, 0xb4, 0x81, 0x39, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0,
5546 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xc4, 0x81, 0x1d, 0xe8,
5547 0x41, 0x1c, 0xd8, 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xb4, 0x81, 0x3d, 0xc8,
5548 0x01, 0x1d, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4,
5549 0x81, 0x3d, 0xcc, 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc,
5550 0x81, 0x1c, 0xb4, 0x81, 0x3d, 0xd0, 0x01, 0x1e, 0xe8, 0x81, 0x1d, 0xd0,
5551 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xd8, 0x01, 0x1d, 0xe8,
5552 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xe4,
5553 0x81, 0x1d, 0xe8, 0x41, 0x1c, 0xc8, 0x01, 0x1e, 0xe8, 0x41, 0x1c, 0xc8,
5554 0x01, 0x1e, 0xb4, 0x81, 0x3d, 0xc4, 0x81, 0x1c, 0xe0, 0x81, 0x1e, 0xc4,
5555 0x81, 0x1c, 0xe0, 0x81, 0x1e, 0xc4, 0x81, 0x1c, 0xe0, 0x41, 0x1b, 0xd8,
5556 0x43, 0x1c, 0xe4, 0x81, 0x1c, 0xe8, 0x81, 0x1c, 0xd4, 0x81, 0x1d, 0xe8,
5557 0x81, 0x1c, 0xd4, 0x81, 0x1d, 0xb4, 0x81, 0x3d, 0xc8, 0x41, 0x1d, 0xd8,
5558 0x81, 0x1e, 0xc8, 0x41, 0x1d, 0xd8, 0x81, 0x1e, 0xc8, 0x41, 0x1d, 0xd8,
5559 0x41, 0x1b, 0xd8, 0x43, 0x1d, 0xc4, 0x81, 0x1c, 0xe8, 0x41, 0x1d, 0xc4,
5560 0x81, 0x1c, 0xe8, 0x41, 0x1d, 0xc4, 0x81, 0x1c, 0xb4, 0x81, 0x3d, 0xc4,
5561 0x01, 0x1c, 0xc8, 0x01, 0x1d, 0xe8, 0x41, 0x1c, 0xc0, 0x81, 0x1c, 0xd0,
5562 0x81, 0x1e, 0xc4, 0x01, 0x1c, 0xc8, 0x01, 0x1d, 0xb4, 0x81, 0x3b, 0xe0,
5563 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x46, 0x08,
5564 0x43, 0x32, 0xdb, 0x82, 0x4c, 0x5f, 0xe4, 0x30, 0x1c, 0x15, 0x10, 0x43,
5565 0x22, 0x80, 0x51, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
5566 0x00, 0x60, 0x48, 0xc4, 0x74, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x80,
5567 0x00, 0x00, 0x00, 0x00, 0x0c, 0x89, 0xd2, 0xe0, 0x92, 0x80, 0x00, 0x18,
5568 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0x48, 0x04, 0x0a, 0x17,
5569 0x05, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x12,
5570 0x1b, 0x04, 0x8a, 0x7a, 0x0f, 0x00, 0x00, 0x64, 0x81, 0x00, 0x0b, 0x00,
5571 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09,
5572 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02,
5573 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x84, 0x47, 0x00, 0x0a,
5574 0xa2, 0x40, 0x0a, 0x85, 0xee, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18,
5575 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1,
5576 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42,
5577 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f,
5578 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1,
5579 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84,
5580 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc,
5581 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70,
5582 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19,
5583 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f,
5584 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21,
5585 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc,
5586 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84,
5587 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37,
5588 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70,
5589 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77,
5590 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79,
5591 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e,
5592 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1,
5593 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81,
5594 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98,
5595 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88,
5596 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4,
5597 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72,
5598 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74,
5599 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e,
5600 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e,
5601 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21,
5602 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01,
5603 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc,
5604 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77,
5605 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e,
5606 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1,
5607 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61,
5608 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0,
5609 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0,
5610 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74,
5611 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e,
5612 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41,
5613 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48,
5614 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c,
5615 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4,
5616 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71,
5617 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f,
5618 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f,
5619 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f,
5620 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23,
5621 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21,
5622 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21,
5623 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94,
5624 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a,
5625 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e,
5626 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e,
5627 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74,
5628 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74,
5629 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78,
5630 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x20, 0x00, 0x00, 0x00, 0x01,
5631 0x00, 0x00, 0x32, 0x9a, 0x08, 0x14, 0x02, 0x85, 0x8c, 0x27, 0x46, 0x46,
5632 0xc8, 0x11, 0x32, 0x64, 0xd4, 0xd4, 0x80, 0x0c, 0xf2, 0x09, 0x8b, 0xf2,
5633 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33,
5634 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74,
5635 0x31, 0xcc, 0xa2, 0x68, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44,
5636 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68,
5637 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65,
5638 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,
5639 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20,
5640 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30,
5641 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61,
5642 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64,
5643 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62,
5644 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c,
5645 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f,
5646 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f,
5647 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62,
5648 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f,
5649 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65,
5650 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61,
5651 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
5652 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69,
5653 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69,
5654 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
5655 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29,
5656 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69,
5657 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76,
5658 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61,
5659 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69,
5660 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69,
5661 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63,
5662 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62,
5663 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66,
5664 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e,
5665 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64,
5666 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69,
5667 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70,
5668 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74,
5669 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69,
5670 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65,
5671 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65,
5672 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e,
5673 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a,
5674 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70,
5675 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65,
5676 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
5677 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
5678 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61,
5679 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78,
5680 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65, 0x3c, 0x66, 0x6c, 0x6f,
5681 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73,
5682 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
5683 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73,
5684 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
5685 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0xc4, 0x62,
5686 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x82, 0x30, 0x10, 0x23, 0x08,
5687 0x57, 0x34, 0x82, 0x30, 0x14, 0x23, 0x08, 0x83, 0x31, 0x82, 0x30, 0x1c,
5688 0x23, 0x08, 0x0b, 0x30, 0x82, 0x30, 0x20, 0x23, 0x08, 0x43, 0x32, 0x82,
5689 0x30, 0x28, 0x23, 0x08, 0xc3, 0x32, 0x82, 0x30, 0x30, 0x33, 0x0c, 0x6b,
5690 0x10, 0xb0, 0xc1, 0x0c, 0x43, 0x1b, 0x08, 0x6e, 0x30, 0x43, 0x30, 0xcc,
5691 0x30, 0xac, 0xc1, 0x1a, 0xbc, 0xc1, 0x0c, 0x04, 0xb1, 0x06, 0x6f, 0xf0,
5692 0x06, 0x33, 0x04, 0xc5, 0x0c, 0x81, 0x31, 0x43, 0x70, 0xcc, 0x50, 0x20,
5693 0x6f, 0xf0, 0x06, 0x89, 0x32, 0x43, 0xe0, 0x07, 0x33, 0x24, 0x6f, 0xb0,
5694 0x30, 0x8d, 0x93, 0x3c, 0x50, 0x34, 0x03, 0xd2, 0x06, 0x52, 0x33, 0x25,
5695 0x0a, 0x44, 0xcd, 0x40, 0xbd, 0x81, 0x1c, 0xbc, 0xc1, 0xa3, 0xc9, 0x81,
5696 0x1c, 0xbc, 0xc1, 0xb3, 0xcd, 0x81, 0x1b, 0xbc, 0x01, 0xd7, 0xd1, 0x81,
5697 0x1b, 0xbc, 0x81, 0xf7, 0xcd, 0x20, 0xad, 0x41, 0x65, 0xc5, 0xc1, 0xf5,
5698 0x06, 0x6d, 0x80, 0x65, 0xa2, 0x00, 0x06, 0x71, 0x10, 0x06, 0x72, 0x90,
5699 0x88, 0x01, 0x34, 0x06, 0x33, 0x28, 0x75, 0x40, 0x06, 0xd7, 0x1b, 0xb4,
5700 0x41, 0x19, 0x24, 0x66, 0x00, 0x9d, 0xc1, 0x0c, 0x89, 0x1b, 0xa0, 0xc1,
5701 0xf5, 0x06, 0x6d, 0x90, 0xa4, 0x01, 0xa4, 0x06, 0x33, 0x14, 0xa0, 0x10,
5702 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0x30, 0xc3, 0x00, 0x07, 0x7f, 0x60, 0x0a,
5703 0xd5, 0x01, 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0x71, 0x1c, 0xc7, 0xb9, 0x81,
5704 0x1b, 0x58, 0x74, 0xa0, 0x07, 0x96, 0x65, 0xe9, 0x01, 0xc7, 0x0a, 0xa6,
5705 0x00, 0x1b, 0x7e, 0x61, 0x0f, 0xea, 0xc0, 0x0a, 0x32, 0x12, 0x98, 0xa0,
5706 0x8b, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xda, 0xde, 0xc8, 0xea, 0xd8, 0xca,
5707 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6, 0x46, 0x11, 0xea, 0xc0, 0x0e, 0x4e,
5708 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23, 0x2b, 0x73, 0xa3, 0x1b, 0x25,
5709 0xb8, 0x83, 0x5b, 0xc2, 0xd2, 0xe4, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2,
5710 0xde, 0xdc, 0x46, 0x09, 0xf0, 0xe0, 0xa8, 0xb0, 0x34, 0x39, 0x17, 0xb6,
5711 0x30, 0xb7, 0xb3, 0xba, 0xb0, 0xb3, 0xb2, 0x2f, 0xbb, 0x32, 0xb9, 0xb9,
5712 0xb4, 0x37, 0xb7, 0x51, 0x82, 0x3c, 0xb8, 0x29, 0x2c, 0x4d, 0xce, 0x65,
5713 0xec, 0xad, 0x0d, 0x2e, 0x8d, 0xad, 0xec, 0xeb, 0x0d, 0x8e, 0x2e, 0xed,
5714 0xcd, 0x6d, 0x6e, 0x94, 0x41, 0x0f, 0xf6, 0x80, 0x0f, 0x8e, 0x09, 0x4b,
5715 0x93, 0x73, 0x31, 0x93, 0x0b, 0x3b, 0x6b, 0x2b, 0x73, 0xa3, 0x1b, 0x25,
5716 0x30, 0x05, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00,
5717 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58,
5718 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3,
5719 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d,
5720 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3,
5721 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1,
5722 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28,
5723 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28,
5724 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83,
5725 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c,
5726 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e,
5727 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d,
5728 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4,
5729 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x10, 0x00, 0x00, 0x06, 0x00,
5730 0x00, 0x00, 0x07, 0xcc, 0x3c, 0xa4, 0x83, 0x3b, 0x9c, 0x03, 0x3b, 0x94,
5731 0x03, 0x3d, 0xa0, 0x83, 0x3c, 0x94, 0x43, 0x38, 0x90, 0xc3, 0x01, 0x00,
5732 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0xae, 0x00, 0x00, 0x00, 0x13, 0x04,
5733 0x48, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x34, 0x4a,
5734 0x81, 0x5e, 0x0d, 0x10, 0x2e, 0x81, 0x22, 0xa0, 0x3e, 0xd6, 0x00, 0x04,
5735 0x02, 0x81, 0x19, 0x80, 0x31, 0x02, 0x10, 0x04, 0x41, 0x10, 0x14, 0x66,
5736 0x00, 0xc6, 0x08, 0x40, 0x10, 0x04, 0xf1, 0x5f, 0x18, 0x01, 0x18, 0x23,
5737 0x00, 0x41, 0x10, 0xc4, 0xbf, 0x31, 0x02, 0x10, 0x04, 0x41, 0x10, 0x0c,
5738 0x28, 0xcc, 0x41, 0x84, 0x01, 0xc7, 0x79, 0x73, 0x10, 0x1f, 0xc7, 0x79,
5739 0x73, 0x10, 0x5c, 0x18, 0x70, 0xde, 0x1c, 0x04, 0xf7, 0x71, 0xde, 0x1c,
5740 0x04, 0xc7, 0x85, 0x81, 0x37, 0x07, 0xc1, 0x71, 0x9f, 0x37, 0x07, 0x01,
5741 0x06, 0x60, 0x00, 0x06, 0xde, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x30,
5742 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22,
5743 0xc8, 0x4f, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xe3, 0x59, 0x18, 0x26, 0x0d,
5744 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74,
5745 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20,
5746 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d,
5747 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73,
5748 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75, 0x62,
5749 0x65, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
5750 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29,
5751 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
5752 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73,
5753 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
5754 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73,
5755 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
5756 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x00, 0x13, 0x04,
5757 0xac, 0x99, 0x20, 0x60, 0xce, 0x04, 0x01, 0x7b, 0x26, 0x08, 0x18, 0xb4,
5758 0x42, 0xa0, 0x05, 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a,
5759 0xc1, 0x16, 0x68, 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0,
5760 0x21, 0x48, 0x85, 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72,
5761 0x21, 0x17, 0x60, 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85,
5762 0x0d, 0xc3, 0x2b, 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85,
5763 0x0d, 0x89, 0x2b, 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c,
5764 0xf8, 0xc2, 0x2c, 0x6c, 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0,
5765 0x0b, 0xbd, 0x20, 0x0b, 0x00, 0x00, 0x9b, 0x0c, 0x97, 0x47, 0x06, 0x14,
5766 0x08, 0xb2, 0xc9, 0x90, 0x81, 0x01, 0x1a, 0x50, 0x20, 0x88, 0x05, 0x9d,
5767 0xf8, 0x5b, 0x40, 0x80, 0xff, 0x18, 0x42, 0x40, 0x06, 0x16, 0x40, 0xe2,
5768 0x6f, 0x01, 0x05, 0xfe, 0x63, 0x08, 0xc4, 0x66, 0xc1, 0x24, 0xfe, 0x16,
5769 0x5c, 0xe0, 0xbf, 0xc9, 0x30, 0x06, 0x6a, 0xb0, 0x06, 0x14, 0x80, 0x31,
5770 0x62, 0x50, 0x10, 0x21, 0x08, 0x06, 0x94, 0x1d, 0x04, 0xc3, 0x3c, 0x43,
5771 0x70, 0x1c, 0x41, 0x21, 0x10, 0x03, 0x43, 0x18, 0xc5, 0x65, 0x58, 0x47,
5772 0x84, 0xff, 0x1c, 0x03, 0x16, 0x88, 0x81, 0x7d, 0x49, 0xf8, 0xcf, 0x31,
5773 0x08, 0xc1, 0x18, 0xcc, 0x12, 0x1c, 0x16, 0x06, 0x48, 0xf8, 0xcf, 0x31,
5774 0x6c, 0x81, 0x19, 0xcc, 0x31, 0x04, 0x8d, 0x19, 0xcc, 0x12, 0x1c, 0x73,
5775 0x0c, 0x9c, 0x43, 0x07, 0x56, 0x06, 0x4c, 0xf8, 0xcf, 0x31, 0x08, 0x41,
5776 0x1a, 0xcc, 0x12, 0x1c, 0x73, 0x0c, 0x5e, 0x74, 0x07, 0x73, 0x0c, 0xc1,
5777 0xb3, 0x06, 0xb3, 0x04, 0x87, 0xa5, 0x01, 0x14, 0xfe, 0x73, 0x0c, 0x60,
5778 0x40, 0xe9, 0xc1, 0x1c, 0x43, 0x20, 0xbc, 0xc1, 0x2c, 0xc1, 0x61, 0x6c,
5779 0x60, 0x85, 0xbf, 0xb5, 0x01, 0x15, 0xfe, 0x73, 0x0c, 0x63, 0x20, 0xf8,
5780 0xc1, 0x1c, 0x43, 0x20, 0xcc, 0xc1, 0x2c, 0xc1, 0x31, 0xd0, 0x13, 0x08,
5781 0x86, 0x52, 0x40, 0x04, 0x35, 0x68, 0x02, 0x18, 0x04, 0xa8, 0x00, 0x0c,
5782 0x32, 0x04, 0x64, 0x30, 0x07, 0x9b, 0x0c, 0x7b, 0x20, 0x0a, 0xab, 0x40,
5783 0xc1, 0x20, 0x23, 0x06, 0x06, 0x11, 0x82, 0x60, 0xe1, 0x1f, 0xd2, 0x2b,
5784 0x04, 0x23, 0x06, 0x4b, 0x11, 0x82, 0x60, 0x00, 0xc5, 0x42, 0x1f, 0xf0,
5785 0x01, 0xa1, 0x07, 0x81, 0x1c, 0xac, 0xc2, 0x68, 0x42, 0x00, 0x64, 0x10,
5786 0x10, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8, 0x85, 0x43,
5787 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba, 0x80, 0xec,
5788 0xc2, 0x96, 0xa3, 0x09, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17, 0xb6, 0x1c,
5789 0x6c, 0x10, 0x80, 0xc3, 0xa1, 0x0b, 0xc8, 0x2e, 0x6c, 0x29, 0xdc, 0xe0,
5790 0xd8, 0x05, 0x44, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20,
5791 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x32, 0x0e, 0x10, 0x22, 0x84, 0x00,
5792 0xae, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0c,
5793 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x78, 0x01, 0x00,
5794 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x08, 0x00,
5795 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x00,
5796 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00,
5797 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00,
5798 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
5799 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x00,
5800 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
5801 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
5802 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xff, 0xff,
5803 0xff, 0xff, 0x00, 0x24, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x00,
5804 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xff, 0xff,
5805 0xff, 0xff, 0x08, 0x24, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x17, 0x00,
5806 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff,
5807 0xff, 0xff, 0x08, 0x24, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x17, 0x00,
5808 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff,
5809 0xff, 0xff, 0x08, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x0c,
5810 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0xff, 0x00, 0x00,
5811 0x00, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75,
5812 0x62, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65,
5813 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x75, 0x62,
5814 0x65, 0x2e, 0x76, 0x34, 0x66, 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63,
5815 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e, 0x66, 0x2e, 0x66, 0x33, 0x32,
5816 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f,
5817 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32, 0x2e,
5818 0x66, 0x2e, 0x66, 0x33, 0x32, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39,
5819 0x38, 0x61, 0x69, 0x72, 0x36, 0x34, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x65,
5820 0x2d, 0x74, 0x76, 0x6f, 0x73, 0x31, 0x33, 0x2e, 0x30, 0x2e, 0x30, 0x2d,
5821 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x00, 0x00, 0x00,
5822 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5823 0x00, 0x00
5824};
5825const unsigned int BlitFromCube_metallib_len = 4610;
5826const unsigned char BlitFromCubeArray_metallib[] = {
5827 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
5828 0x00, 0x00, 0x00, 0x00, 0x27, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5829 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
5830 0x00, 0x00, 0x00, 0x00, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5831 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00,
5832 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5833 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x11, 0x00, 0x00,
5834 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
5835 0x4e, 0x41, 0x4d, 0x45, 0x12, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
5836 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00,
5837 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20,
5838 0x00, 0xc9, 0x8a, 0x40, 0xdc, 0x67, 0x03, 0xfe, 0xf6, 0x11, 0xe1, 0x84,
5839 0xd3, 0xb3, 0xb1, 0x2e, 0x53, 0xda, 0x0b, 0x40, 0xef, 0x2e, 0xe4, 0xfd,
5840 0xd4, 0xbe, 0x3a, 0xea, 0x8b, 0x87, 0x2e, 0x70, 0x3b, 0x4d, 0x44, 0x53,
5841 0x5a, 0x08, 0x00, 0x30, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f,
5842 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5843 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
5844 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02,
5845 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x45,
5846 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04,
5847 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00,
5848 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x11, 0x00, 0x00, 0xff,
5849 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03,
5850 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14,
5851 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0xe3, 0x03, 0x00, 0x00, 0x0b,
5852 0x02, 0x21, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07,
5853 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92,
5854 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80,
5855 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38,
5856 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43,
5857 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0x04, 0x49, 0x0e, 0x90, 0x91,
5858 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04,
5859 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x1b,
5860 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40, 0x02,
5861 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d,
5862 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d,
5863 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28,
5864 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72, 0x38,
5865 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78,
5866 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00,
5867 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c,
5868 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20,
5869 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c,
5870 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e,
5871 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8,
5872 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08,
5873 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0,
5874 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x68,
5875 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70, 0x30,
5876 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d,
5877 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e,
5878 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8,
5879 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70, 0x70,
5880 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0,
5881 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d,
5882 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c,
5883 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c,
5884 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90,
5885 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90,
5886 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36, 0x68,
5887 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c,
5888 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e,
5889 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e,
5890 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d,
5891 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70,
5892 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78, 0x68,
5893 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e,
5894 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8,
5895 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e, 0xe6,
5896 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e, 0xec,
5897 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8,
5898 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b,
5899 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86,
5900 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f,
5901 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80,
5902 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d,
5903 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05,
5904 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c,
5905 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89,
5906 0x20, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20,
5907 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84,
5908 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10,
5909 0x7c, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04,
5910 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02,
5911 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42,
5912 0x38, 0x4e, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a,
5913 0x88, 0x5f, 0xa0, 0x02, 0xe2, 0x07, 0xa2, 0x08, 0xc0, 0xfe, 0x69, 0x8c,
5914 0x00, 0x18, 0x44, 0x30, 0x82, 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff,
5915 0x25, 0x80, 0x79, 0x16, 0x22, 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01,
5916 0x11, 0x8a, 0x11, 0x44, 0x28, 0x27, 0x91, 0x9a, 0x23, 0x40, 0x8c, 0x10,
5917 0xd8, 0x30, 0xc2, 0x00, 0xcc, 0x11, 0x04, 0x25, 0x69, 0x27, 0xb9, 0xf1,
5918 0x00, 0x18, 0x04, 0x8b, 0x00, 0x06, 0xc9, 0x22, 0x0c, 0x40, 0x74, 0x20,
5919 0x20, 0x05, 0xc6, 0x1c, 0x01, 0x28, 0x0c, 0x22, 0x08, 0xc2, 0x20, 0x02,
5920 0x20, 0x4c, 0x01, 0x8c, 0x00, 0x0c, 0x23, 0x0c, 0xc3, 0x20, 0xc2, 0x20,
5921 0x00, 0x00, 0x00, 0x13, 0xc0, 0x20, 0x1c, 0xd2, 0x41, 0x1e, 0xec, 0x80,
5922 0x0e, 0xda, 0x20, 0x1c, 0xe0, 0x01, 0x1e, 0xd8, 0xa1, 0x1c, 0xda, 0x80,
5923 0x1e, 0xec, 0xe1, 0x1d, 0xe6, 0x21, 0x0e, 0xe6, 0xc0, 0x0d, 0xe0, 0xc0,
5924 0x0d, 0xe0, 0xa0, 0x0d, 0xe6, 0x21, 0x1d, 0xda, 0xa1, 0x1e, 0xd8, 0x21,
5925 0x1c, 0xe8, 0xe1, 0x1d, 0xe4, 0x61, 0xc3, 0x6d, 0x94, 0x43, 0x1b, 0xc0,
5926 0x83, 0x1e, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8,
5927 0x01, 0x1d, 0xb4, 0x41, 0x3a, 0xc4, 0x81, 0x1e, 0xe0, 0x81, 0x1e, 0xe0,
5928 0x41, 0x1b, 0xa4, 0x03, 0x1e, 0xe8, 0x01, 0x1e, 0xe8, 0x01, 0x1e, 0xb4,
5929 0x41, 0x3a, 0xc4, 0x81, 0x1d, 0xe8, 0x41, 0x1c, 0xd8, 0x81, 0x1e, 0xc4,
5930 0x81, 0x1d, 0xb4, 0x41, 0x3a, 0xcc, 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8,
5931 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x41, 0x3a, 0xd8, 0x01, 0x1d, 0xe8,
5932 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x39, 0xcc,
5933 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4,
5934 0x81, 0x39, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8,
5935 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xc4, 0x81, 0x1d, 0xe8, 0x41, 0x1c, 0xd8,
5936 0x81, 0x1e, 0xc4, 0x81, 0x1d, 0xb4, 0x81, 0x3d, 0xc8, 0x01, 0x1d, 0xe8,
5937 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4, 0x81, 0x3d, 0xcc,
5938 0x81, 0x1c, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x1e, 0xcc, 0x81, 0x1c, 0xb4,
5939 0x81, 0x3d, 0xd0, 0x01, 0x1e, 0xe8, 0x81, 0x1d, 0xd0, 0x81, 0x1e, 0xd8,
5940 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xd8, 0x01, 0x1d, 0xe8, 0x81, 0x1d, 0xd0,
5941 0x81, 0x1e, 0xd8, 0x01, 0x1d, 0xb4, 0x81, 0x3d, 0xe4, 0x81, 0x1d, 0xe8,
5942 0x41, 0x1c, 0xc8, 0x01, 0x1e, 0xe8, 0x41, 0x1c, 0xc8, 0x01, 0x1e, 0xb4,
5943 0x81, 0x3d, 0xc4, 0x81, 0x1c, 0xe0, 0x81, 0x1e, 0xc4, 0x81, 0x1c, 0xe0,
5944 0x81, 0x1e, 0xc4, 0x81, 0x1c, 0xe0, 0x41, 0x1b, 0xd8, 0x43, 0x1c, 0xe4,
5945 0x81, 0x1c, 0xe8, 0x81, 0x1c, 0xd4, 0x81, 0x1d, 0xe8, 0x81, 0x1c, 0xd4,
5946 0x81, 0x1d, 0xb4, 0x81, 0x3d, 0xc8, 0x41, 0x1d, 0xd8, 0x81, 0x1e, 0xc8,
5947 0x41, 0x1d, 0xd8, 0x81, 0x1e, 0xc8, 0x41, 0x1d, 0xd8, 0x41, 0x1b, 0xd8,
5948 0x43, 0x1d, 0xc4, 0x81, 0x1c, 0xe8, 0x41, 0x1d, 0xc4, 0x81, 0x1c, 0xe8,
5949 0x41, 0x1d, 0xc4, 0x81, 0x1c, 0xb4, 0x81, 0x3d, 0xc4, 0x01, 0x1c, 0xc8,
5950 0x01, 0x1d, 0xe8, 0x41, 0x1c, 0xc0, 0x81, 0x1c, 0xd0, 0x81, 0x1e, 0xc4,
5951 0x01, 0x1c, 0xc8, 0x01, 0x1d, 0xb4, 0x81, 0x3b, 0xe0, 0x81, 0x1e, 0xc4,
5952 0x81, 0x1d, 0xe8, 0xc1, 0x1c, 0xc8, 0x81, 0x46, 0x08, 0x43, 0x46, 0xdb,
5953 0x82, 0x4c, 0x5f, 0xe4, 0x30, 0x1c, 0x15, 0x10, 0x5a, 0x14, 0x01, 0xd8,
5954 0x90, 0x08, 0x88, 0x14, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00,
5955 0x00, 0x00, 0x18, 0x12, 0x45, 0x63, 0x00, 0x01, 0x01, 0x20, 0x00, 0x00,
5956 0x00, 0x08, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x88, 0x0e, 0x2e, 0x09, 0x08,
5957 0x80, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x86, 0x44, 0xab,
5958 0x70, 0x51, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
5959 0x20, 0xb1, 0x41, 0xa0, 0x68, 0xf9, 0x00, 0x00, 0x40, 0x16, 0x08, 0x0b,
5960 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c,
5961 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30,
5962 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x84, 0x47, 0x00,
5963 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xee, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1,
5964 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
5965 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
5966 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
5967 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
5968 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
5969 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d,
5970 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87,
5971 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87,
5972 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30,
5973 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde,
5974 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b,
5975 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c,
5976 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
5977 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87,
5978 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87,
5979 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87,
5980 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0,
5981 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc,
5982 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4,
5983 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39,
5984 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38,
5985 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
5986 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87,
5987 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87,
5988 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50,
5989 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50,
5990 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2,
5991 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea,
5992 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b,
5993 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87,
5994 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50,
5995 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde,
5996 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0,
5997 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d,
5998 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b,
5999 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87,
6000 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10,
6001 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2,
6002 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66,
6003 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38,
6004 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b,
6005 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07,
6006 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60,
6007 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20,
6008 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30,
6009 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30,
6010 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec,
6011 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8,
6012 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39,
6013 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07,
6014 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87,
6015 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30,
6016 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87,
6017 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87,
6018 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07,
6019 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x20, 0x00, 0x00, 0x01,
6020 0x01, 0x00, 0x00, 0x32, 0x9a, 0x08, 0x14, 0x02, 0x85, 0x8c, 0x27, 0x46,
6021 0x46, 0xc8, 0x11, 0x32, 0x64, 0xd4, 0xd4, 0x80, 0x0c, 0xfe, 0x09, 0x8b,
6022 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06,
6023 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c,
6024 0x74, 0x31, 0xcc, 0xa2, 0x80, 0x41, 0xb3, 0x1c, 0x0d, 0x00, 0x00, 0x53,
6025 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63,
6026 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c,
6027 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73,
6028 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38,
6029 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32,
6030 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c,
6031 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
6032 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61,
6033 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69,
6034 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68,
6035 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63,
6036 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65,
6037 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68,
6038 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72,
6039 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
6040 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65,
6041 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61,
6042 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f,
6043 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
6044 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66,
6045 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61,
6046 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69,
6047 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e,
6048 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61,
6049 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61,
6050 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65,
6051 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e,
6052 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75,
6053 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72,
6054 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e,
6055 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61,
6056 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79,
6057 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66,
6058 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73,
6059 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c,
6060 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79,
6061 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72,
6062 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69,
6063 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79,
6064 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a,
6065 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f,
6066 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f,
6067 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
6068 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
6069 0x78, 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65, 0x5f, 0x61, 0x72,
6070 0x72, 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73,
6071 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
6072 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73,
6073 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65,
6074 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c,
6075 0x65, 0x72, 0x00, 0xc4, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
6076 0x82, 0x30, 0x10, 0x23, 0x08, 0x57, 0x34, 0x82, 0x30, 0x14, 0x23, 0x08,
6077 0x83, 0x31, 0x82, 0x30, 0x1c, 0x23, 0x08, 0x0b, 0x30, 0x82, 0x30, 0x20,
6078 0x23, 0x08, 0x43, 0x32, 0x82, 0x30, 0x28, 0x23, 0x08, 0xc3, 0x32, 0x82,
6079 0x30, 0x30, 0x33, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x0c, 0x43, 0x1b, 0x08,
6080 0x6e, 0x30, 0x43, 0x30, 0xcc, 0x30, 0xac, 0xc1, 0x1a, 0xbc, 0xc1, 0x0c,
6081 0x04, 0xb1, 0x06, 0x6f, 0xf0, 0x06, 0x33, 0x04, 0xc5, 0x0c, 0x81, 0x31,
6082 0x43, 0x70, 0xcc, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0x32, 0x43, 0xe0,
6083 0x07, 0x33, 0x24, 0x6f, 0xb0, 0x30, 0x8d, 0x93, 0x3c, 0x50, 0x34, 0x03,
6084 0xd2, 0x06, 0x52, 0x33, 0x25, 0x0a, 0x44, 0xcd, 0x40, 0xbd, 0x81, 0x1c,
6085 0xbc, 0xc1, 0xa3, 0xc9, 0x81, 0x1c, 0xbc, 0xc1, 0xb3, 0xcd, 0x81, 0x1b,
6086 0xbc, 0x01, 0xd7, 0xd1, 0x81, 0x1b, 0xbc, 0x81, 0xf7, 0xcd, 0x20, 0xad,
6087 0x41, 0x65, 0xc5, 0xc1, 0xf5, 0x06, 0x6d, 0x80, 0x65, 0xa2, 0x00, 0x06,
6088 0x71, 0x10, 0x06, 0x72, 0x90, 0x88, 0x01, 0x34, 0x06, 0x33, 0x28, 0x75,
6089 0x40, 0x06, 0xd7, 0x1b, 0xb4, 0x41, 0x19, 0x24, 0x66, 0x00, 0x9d, 0xc1,
6090 0x0c, 0x89, 0x1b, 0xa0, 0xc1, 0xf5, 0x06, 0x6d, 0x90, 0xa4, 0x01, 0xa4,
6091 0x06, 0x33, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0x30, 0xc3,
6092 0x00, 0x07, 0x7f, 0x60, 0x0a, 0xd5, 0x01, 0x1c, 0xc7, 0x71, 0x1c, 0xc7,
6093 0x71, 0x1c, 0xc7, 0xb9, 0x81, 0x1b, 0x58, 0x74, 0xa0, 0x07, 0x96, 0x65,
6094 0xe9, 0x01, 0xc7, 0x0a, 0xa6, 0x00, 0x1b, 0x7e, 0x61, 0x0f, 0xea, 0xc0,
6095 0x0a, 0x32, 0x12, 0x98, 0xa0, 0x8b, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xda,
6096 0xde, 0xc8, 0xea, 0xd8, 0xca, 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6, 0x46,
6097 0x11, 0xea, 0xc0, 0x0e, 0x4e, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49, 0x23,
6098 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0xb8, 0x83, 0x5b, 0xc2, 0xd2, 0xe4, 0x5c,
6099 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0x46, 0x09, 0xf0, 0xe0, 0xa8,
6100 0xb0, 0x34, 0x39, 0x17, 0xb6, 0x30, 0xb7, 0xb3, 0xba, 0xb0, 0xb3, 0xb2,
6101 0x2f, 0xbb, 0x32, 0xb9, 0xb9, 0xb4, 0x37, 0xb7, 0x51, 0x82, 0x3c, 0xb8,
6102 0x29, 0x2c, 0x4d, 0xce, 0x65, 0xec, 0xad, 0x0d, 0x2e, 0x8d, 0xad, 0xec,
6103 0xeb, 0x0d, 0x8e, 0x2e, 0xed, 0xcd, 0x6d, 0x6e, 0x94, 0x41, 0x0f, 0xf6,
6104 0x80, 0x0f, 0x8e, 0x09, 0x4b, 0x93, 0x73, 0x31, 0x93, 0x0b, 0x3b, 0x6b,
6105 0x2b, 0x73, 0xa3, 0x1b, 0x25, 0x30, 0x05, 0x00, 0x00, 0x00, 0x00, 0xa9,
6106 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87,
6107 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38,
6108 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8,
6109 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde,
6110 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20,
6111 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0,
6112 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87,
6113 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38,
6114 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8,
6115 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc,
6116 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8,
6117 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20,
6118 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xd1,
6119 0x10, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0xcc, 0x3c, 0xa4, 0x83,
6120 0x3b, 0x9c, 0x03, 0x3b, 0x94, 0x03, 0x3d, 0xa0, 0x83, 0x3c, 0x94, 0x43,
6121 0x38, 0x90, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0xb2,
6122 0x00, 0x00, 0x00, 0x13, 0x04, 0x48, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x19,
6123 0x00, 0x00, 0x00, 0x34, 0x8a, 0xa1, 0x14, 0xe8, 0xd5, 0x00, 0xe1, 0x12,
6124 0x28, 0x02, 0xea, 0x63, 0x0d, 0x40, 0x20, 0x10, 0x98, 0x01, 0x18, 0x23,
6125 0x00, 0x41, 0x10, 0x04, 0x41, 0x61, 0x06, 0x60, 0x8c, 0x00, 0x04, 0x41,
6126 0x10, 0xff, 0x85, 0x11, 0x80, 0x31, 0x02, 0x10, 0x04, 0x41, 0xfc, 0x1b,
6127 0x23, 0x00, 0x41, 0x10, 0x04, 0xc1, 0x80, 0xc2, 0x1c, 0x84, 0x18, 0x74,
6128 0xdd, 0x37, 0x07, 0x01, 0x06, 0x5d, 0xf7, 0xcd, 0x41, 0x74, 0x62, 0xd0,
6129 0x7d, 0x73, 0x10, 0x1d, 0x18, 0x74, 0xdf, 0x1c, 0x44, 0xd7, 0x89, 0xc1,
6130 0x37, 0x07, 0xd1, 0x75, 0x60, 0xf0, 0xcd, 0x41, 0x84, 0x41, 0x18, 0x84,
6131 0xc1, 0x37, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x46,
6132 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0x08, 0x59, 0x00,
6133 0x00, 0x00, 0x00, 0xcf, 0x33, 0x06, 0x16, 0x86, 0x49, 0x03, 0x00, 0x6f,
6134 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68,
6135 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b,
6136 0x20, 0x54, 0x42, 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69,
6137 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c,
6138 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41, 0x72,
6139 0x72, 0x61, 0x79, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
6140 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28,
6141 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
6142 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65,
6143 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
6144 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72,
6145 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72,
6146 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x13,
6147 0x04, 0xac, 0x99, 0x20, 0x60, 0xce, 0x04, 0x01, 0x7b, 0x26, 0x08, 0x18,
6148 0xb4, 0x42, 0xa0, 0x05, 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2,
6149 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad,
6150 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18,
6151 0x72, 0x21, 0x17, 0x60, 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0,
6152 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80,
6153 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82,
6154 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3,
6155 0xf0, 0x0b, 0xbd, 0x20, 0x0b, 0x00, 0x00, 0x9b, 0x0c, 0xd8, 0x57, 0x06,
6156 0x14, 0x08, 0xb2, 0xc9, 0xa0, 0x85, 0x41, 0x1a, 0x50, 0x20, 0x88, 0x05,
6157 0x9e, 0xf8, 0x5b, 0x40, 0x80, 0xff, 0x18, 0x42, 0x50, 0x06, 0x16, 0x40,
6158 0xe2, 0x6f, 0x01, 0x05, 0xfe, 0x63, 0x08, 0xc4, 0x66, 0xc1, 0x24, 0xfe,
6159 0x16, 0x5c, 0xe0, 0xbf, 0xc9, 0x40, 0x06, 0x6b, 0xc0, 0x06, 0x14, 0x80,
6160 0x31, 0x62, 0x50, 0x10, 0x21, 0x08, 0x06, 0xd4, 0x1d, 0x04, 0x15, 0x90,
6161 0x41, 0x0d, 0xf3, 0x0c, 0xc1, 0x71, 0x04, 0x85, 0x40, 0x0c, 0x0c, 0x61,
6162 0x14, 0x98, 0x61, 0x5e, 0x11, 0xfe, 0x73, 0x0c, 0x59, 0x30, 0x06, 0x06,
6163 0x06, 0x4a, 0xf8, 0xcf, 0x31, 0x08, 0x01, 0x19, 0xcc, 0x12, 0x1c, 0x26,
6164 0x06, 0x49, 0xf8, 0xcf, 0x31, 0x70, 0xc1, 0x19, 0xcc, 0x31, 0x04, 0xce,
6165 0x19, 0xcc, 0x12, 0x1c, 0x73, 0x0c, 0xdd, 0x63, 0x07, 0x66, 0x06, 0x4d,
6166 0xf8, 0xcf, 0x31, 0x08, 0x81, 0x1a, 0xcc, 0x12, 0x1c, 0x73, 0x0c, 0x9f,
6167 0x94, 0x07, 0x73, 0x0c, 0x01, 0xc4, 0x06, 0xb3, 0x04, 0x87, 0xa9, 0x41,
6168 0x14, 0xfe, 0x73, 0x0c, 0x61, 0x50, 0xf1, 0xc1, 0x1c, 0x43, 0x20, 0xc0,
6169 0xc1, 0x2c, 0xc1, 0x61, 0x6d, 0x70, 0x85, 0xbf, 0xb9, 0x41, 0x15, 0xfe,
6170 0x73, 0x0c, 0x64, 0x20, 0x80, 0xc2, 0x1c, 0x43, 0x20, 0xd0, 0xc1, 0x2c,
6171 0xc1, 0x31, 0xd0, 0x13, 0x08, 0x86, 0x52, 0x40, 0x04, 0x35, 0x68, 0x02,
6172 0x18, 0x04, 0xaa, 0x00, 0x0c, 0x32, 0x04, 0x65, 0x40, 0x07, 0x75, 0xe9,
6173 0xc1, 0x6c, 0x32, 0xf8, 0x41, 0x29, 0xb8, 0x02, 0x05, 0x83, 0x8c, 0x18,
6174 0x18, 0x44, 0x08, 0x82, 0x85, 0x7f, 0x48, 0xb2, 0x10, 0x8c, 0x18, 0x30,
6175 0x45, 0x08, 0x82, 0x01, 0x44, 0x0b, 0xa0, 0xf0, 0x07, 0x05, 0xc1, 0x07,
6176 0x01, 0x1d, 0xb8, 0xc2, 0x68, 0x42, 0x00, 0x64, 0x10, 0x10, 0x03, 0x0c,
6177 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8, 0x85, 0x43, 0x17, 0x90, 0x5d,
6178 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba, 0x80, 0xec, 0xc2, 0x96, 0xa3,
6179 0x09, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17, 0xb6, 0x1c, 0x6e, 0x10, 0x80,
6180 0xc3, 0xa1, 0x0b, 0xc8, 0x2e, 0x6c, 0x29, 0xe0, 0xe0, 0xd8, 0x05, 0x44,
6181 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x03,
6182 0x00, 0x00, 0x00, 0x32, 0x0e, 0x10, 0x22, 0x84, 0x00, 0xb1, 0x06, 0x00,
6183 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00, 0x31,
6184 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x78, 0x01, 0x00, 0x00, 0x00, 0x03,
6185 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4c,
6186 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00,
6187 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xb8,
6188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x20,
6189 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x8a,
6190 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00,
6191 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
6192 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00,
6193 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00,
6194 0x24, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x11,
6195 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08,
6196 0x24, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x34,
6197 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08,
6198 0x24, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x4b,
6199 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x08,
6200 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x0c, 0x00, 0x00, 0x26,
6201 0x00, 0x00, 0x00, 0x12, 0x03, 0x94, 0x2a, 0x01, 0x00, 0x00, 0x00, 0x42,
6202 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41,
6203 0x72, 0x72, 0x61, 0x79, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70,
6204 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63,
6205 0x75, 0x62, 0x65, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x76, 0x34,
6206 0x66, 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65,
6207 0x72, 0x74, 0x2e, 0x66, 0x2e, 0x66, 0x33, 0x32, 0x2e, 0x75, 0x2e, 0x69,
6208 0x33, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72,
6209 0x74, 0x2e, 0x75, 0x2e, 0x69, 0x33, 0x32, 0x2e, 0x66, 0x2e, 0x66, 0x33,
6210 0x32, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x61, 0x69, 0x72,
6211 0x36, 0x34, 0x2d, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2d, 0x74, 0x76, 0x6f,
6212 0x73, 0x31, 0x33, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x73, 0x69, 0x6d, 0x75,
6213 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6214 0x00, 0x00, 0x00
6215};
6216const unsigned int BlitFromCubeArray_metallib_len = 4647;
6217#else
6218const unsigned char FullscreenVert_metallib[] = {
6219 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
6220 0x00, 0x00, 0x00, 0x00, 0x70, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6221 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
6222 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6223 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00,
6224 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6225 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x00,
6226 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
6227 0x4e, 0x41, 0x4d, 0x45, 0x0f, 0x00, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63,
6228 0x72, 0x65, 0x65, 0x6e, 0x56, 0x65, 0x72, 0x74, 0x00, 0x54, 0x59, 0x50,
6229 0x45, 0x01, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0xc2, 0x1b,
6230 0xbe, 0xc9, 0x54, 0xf3, 0xe3, 0x79, 0x24, 0x19, 0xfa, 0xbf, 0x8d, 0xc9,
6231 0x13, 0xdf, 0x02, 0xd7, 0x17, 0xc0, 0xb3, 0x4f, 0xf4, 0x9c, 0x44, 0x17,
6232 0xbb, 0x57, 0xc5, 0x24, 0x4d, 0x36, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00,
6233 0x80, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54,
6234 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6235 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6236 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00,
6237 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00,
6238 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
6239 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
6240 0x68, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde,
6241 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24,
6242 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00,
6243 0x92, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00,
6244 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49,
6245 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19,
6246 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42,
6247 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88,
6248 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42,
6249 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c,
6250 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00,
6251 0x6c, 0x00, 0x00, 0x00, 0x1b, 0x7a, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff,
6252 0x01, 0x90, 0x00, 0x8a, 0x08, 0x07, 0x78, 0x80, 0x07, 0x79, 0x78, 0x07,
6253 0x7c, 0x68, 0x03, 0x73, 0xa8, 0x07, 0x77, 0x18, 0x87, 0x36, 0x30, 0x07,
6254 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4,
6255 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xda, 0x21, 0x1d, 0xdc, 0xa1, 0x0d, 0xd8,
6256 0xa1, 0x1c, 0xce, 0x21, 0x1c, 0xd8, 0xa1, 0x0d, 0xec, 0xa1, 0x1c, 0xc6,
6257 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0xe0, 0x1e, 0xd2, 0x81, 0x1c, 0xe8,
6258 0x01, 0x1d, 0x00, 0x38, 0x00, 0x06, 0x77, 0x78, 0x87, 0x36, 0x10, 0x87,
6259 0x7a, 0x48, 0x07, 0x76, 0xa0, 0x87, 0x74, 0x70, 0x87, 0x79, 0x00, 0x08,
6260 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87,
6261 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87,
6262 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x00, 0xe8, 0x41, 0x1e, 0xea,
6263 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xcc, 0x41, 0x1e, 0xc2,
6264 0xa1, 0x1d, 0xca, 0xa1, 0x0d, 0xe0, 0xe1, 0x1d, 0xd2, 0xc1, 0x1d, 0xe8,
6265 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xca, 0x81, 0x1d, 0xd2, 0xa1, 0x1d, 0xda,
6266 0xc0, 0x1d, 0xde, 0xc1, 0x1d, 0xda, 0x80, 0x1d, 0xca, 0x21, 0x1c, 0xcc,
6267 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
6268 0x36, 0x48, 0x07, 0x77, 0x30, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87,
6269 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea,
6270 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xdc, 0x21, 0x1c, 0xdc,
6271 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8,
6272 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87,
6273 0x77, 0x68, 0x83, 0x79, 0x48, 0x87, 0x73, 0x70, 0x87, 0x72, 0x20, 0x87,
6274 0x36, 0xd0, 0x87, 0x72, 0x90, 0x87, 0x77, 0x98, 0x87, 0x36, 0x30, 0x07,
6275 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4,
6276 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x80, 0x1e, 0xe4,
6277 0x21, 0x1c, 0xe0, 0x01, 0x1e, 0xd2, 0xc1, 0x1d, 0xce, 0xa1, 0x0d, 0xda,
6278 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07,
6279 0x80, 0x98, 0x07, 0x7a, 0x08, 0x87, 0x71, 0x58, 0x87, 0x36, 0x80, 0x07,
6280 0x79, 0x78, 0x07, 0x7a, 0x28, 0x87, 0x71, 0xa0, 0x87, 0x77, 0x90, 0x87,
6281 0x36, 0x10, 0x87, 0x7a, 0x30, 0x07, 0x73, 0x28, 0x07, 0x79, 0x68, 0x83,
6282 0x79, 0x48, 0x07, 0x7d, 0x28, 0x07, 0x00, 0x0f, 0x00, 0xa2, 0x1e, 0xdc,
6283 0x61, 0x1e, 0xc2, 0xc1, 0x1c, 0xca, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda,
6284 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87,
6285 0x72, 0x00, 0x36, 0x18, 0xc2, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04,
6286 0x50, 0x1b, 0x8c, 0xe1, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0x28,
6287 0x00, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
6288 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00,
6289 0x89, 0x20, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09,
6290 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3,
6291 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c,
6292 0x10, 0x38, 0x33, 0x00, 0xc3, 0x08, 0x02, 0x30, 0x8c, 0x40, 0x00, 0x56,
6293 0x08, 0x99, 0x23, 0x00, 0x83, 0x22, 0x0c, 0x51, 0x15, 0x01, 0x88, 0x6e,
6294 0x20, 0x20, 0x05, 0x68, 0x8e, 0x00, 0x14, 0x86, 0x11, 0x08, 0x62, 0x04,
6295 0x00, 0x00, 0x00, 0x00, 0x13, 0xac, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03,
6296 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x03,
6297 0x7a, 0xb0, 0x87, 0x77, 0x98, 0x87, 0x38, 0x88, 0x03, 0x37, 0x80, 0x03,
6298 0x37, 0x80, 0x83, 0x0d, 0xb7, 0x51, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x60,
6299 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0,
6300 0x06, 0xe9, 0x10, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90,
6301 0x0e, 0x78, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x10,
6302 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xd0,
6303 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30,
6304 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40,
6305 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x30, 0x07, 0x72, 0xa0,
6306 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60,
6307 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0,
6308 0x06, 0xf6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x10,
6309 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x73, 0x20,
6310 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x30, 0x07, 0x72, 0xa0,
6311 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x40,
6312 0x07, 0x78, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0,
6313 0x06, 0xf6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60,
6314 0x07, 0x74, 0xd0, 0x06, 0xf6, 0x90, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x20,
6315 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10,
6316 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10,
6317 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x90, 0x07, 0x72, 0xa0,
6318 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0,
6319 0x06, 0xf6, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60,
6320 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x75, 0x10,
6321 0x07, 0x72, 0xa0, 0x07, 0x75, 0x10, 0x07, 0x72, 0xa0, 0x07, 0x75, 0x10,
6322 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0,
6323 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20,
6324 0x07, 0x74, 0xd0, 0x06, 0xee, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0,
6325 0x07, 0x73, 0x20, 0x07, 0x43, 0x9e, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00,
6326 0x40, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x07, 0x10, 0x00, 0x02, 0x00,
6327 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x68, 0x84, 0x30, 0xa4, 0xf3, 0x51,
6328 0xcb, 0x22, 0x09, 0x11, 0x41, 0x34, 0x2f, 0x11, 0x4d, 0x12, 0x1b, 0x04,
6329 0x8a, 0x26, 0x0a, 0x00, 0x00, 0x64, 0x81, 0x00, 0x07, 0x00, 0x00, 0x00,
6330 0x32, 0x1e, 0x98, 0x0c, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47,
6331 0xc6, 0x04, 0x43, 0xa2, 0x22, 0x28, 0x81, 0x42, 0x18, 0x01, 0x20, 0x1d,
6332 0x4b, 0x88, 0x04, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00,
6333 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88,
6334 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
6335 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e,
6336 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30,
6337 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8,
6338 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
6339 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76,
6340 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e,
6341 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e,
6342 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
6343 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4,
6344 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
6345 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37,
6346 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
6347 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71,
6348 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e,
6349 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1,
6350 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
6351 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90,
6352 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
6353 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc,
6354 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7,
6355 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78,
6356 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f,
6357 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f,
6358 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1,
6359 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0,
6360 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0,
6361 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b,
6362 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c,
6363 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61,
6364 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1,
6365 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc,
6366 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4,
6367 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79,
6368 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72,
6369 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e,
6370 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1,
6371 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4,
6372 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8,
6373 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71,
6374 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19,
6375 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f,
6376 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e,
6377 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e,
6378 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81,
6379 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21,
6380 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc,
6381 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70,
6382 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77,
6383 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e,
6384 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e,
6385 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a,
6386 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73,
6387 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00,
6388 0x79, 0x18, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90,
6389 0x51, 0x4e, 0xd0, 0x99, 0x00, 0x00, 0x00, 0x00, 0x8b, 0xf2, 0x06, 0xc5,
6390 0xc6, 0x91, 0x41, 0x44, 0x45, 0x06, 0x33, 0x30, 0xc6, 0xd0, 0x10, 0x02,
6391 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77,
6392 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70,
6393 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72,
6394 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39,
6395 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33,
6396 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61,
6397 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
6398 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73,
6399 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
6400 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74,
6401 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
6402 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d,
6403 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63,
6404 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
6405 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75,
6406 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33,
6407 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72,
6408 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61,
6409 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e,
6410 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61,
6411 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x66,
6412 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e,
6413 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x64, 0x75, 0x69, 0x6e,
6414 0x74, 0x76, 0x49, 0x00, 0x13, 0x04, 0x42, 0x98, 0x20, 0x28, 0xc6, 0x04,
6415 0x81, 0x18, 0x26, 0x08, 0x04, 0x31, 0x41, 0x20, 0x8a, 0x09, 0x82, 0x01,
6416 0x6c, 0x18, 0xa8, 0xa0, 0xda, 0x30, 0x58, 0xc2, 0xb5, 0x21, 0x18, 0x36,
6417 0x0c, 0x14, 0x86, 0x6d, 0x20, 0x08, 0x0a, 0xc3, 0x36, 0x04, 0xc5, 0x86,
6418 0xc0, 0xd8, 0x10, 0x1c, 0x1b, 0x0c, 0x24, 0x51, 0x16, 0xa6, 0xd9, 0x50,
6419 0x38, 0xca, 0xc3, 0x40, 0x1b, 0x04, 0x31, 0x18, 0x83, 0x0d, 0x06, 0x16,
6420 0x29, 0x12, 0x33, 0x6d, 0x08, 0xca, 0x60, 0xc3, 0x90, 0x91, 0x81, 0x19,
6421 0x68, 0x24, 0x30, 0x41, 0x8d, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xda, 0xde,
6422 0xc8, 0xea, 0xd8, 0xca, 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6, 0xa6, 0x08,
6423 0x99, 0x56, 0x85, 0x8d, 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d,
6424 0x6e, 0x4a, 0xb0, 0x75, 0x09, 0x4b, 0x93, 0x73, 0xb1, 0x2b, 0x93, 0x9b,
6425 0x4b, 0x7b, 0x73, 0x9b, 0x12, 0x70, 0xa5, 0xc2, 0xd2, 0xe4, 0x5c, 0xd8,
6426 0xc2, 0xdc, 0xce, 0xea, 0xc2, 0xce, 0xca, 0xbe, 0xec, 0xca, 0xe4, 0xe6,
6427 0xd2, 0xde, 0xdc, 0xa6, 0x04, 0x5d, 0xa7, 0xb0, 0x34, 0x39, 0x97, 0xb1,
6428 0xb7, 0x36, 0xb8, 0x34, 0xb6, 0xb2, 0xaf, 0x37, 0x38, 0xba, 0xb4, 0x37,
6429 0xb7, 0xb9, 0x29, 0x83, 0xf7, 0x81, 0x41, 0x95, 0xb0, 0x34, 0x39, 0x17,
6430 0xbb, 0x32, 0x39, 0xba, 0x32, 0xbc, 0x29, 0x81, 0x19, 0x00, 0x00, 0x00,
6431 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28,
6432 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3,
6433 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d,
6434 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d,
6435 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1,
6436 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4,
6437 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78,
6438 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3,
6439 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c,
6440 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c,
6441 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c,
6442 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4,
6443 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00,
6444 0x61, 0x20, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c,
6445 0x10, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x44, 0x33, 0x00, 0xb4,
6446 0x23, 0x00, 0x25, 0x40, 0x3c, 0x07, 0x51, 0x0c, 0x08, 0x32, 0x16, 0x01,
6447 0x04, 0xc6, 0x41, 0x30, 0x03, 0x30, 0x02, 0x30, 0x46, 0x00, 0x82, 0x20,
6448 0x88, 0x7f, 0x14, 0x33, 0x00, 0x63, 0x09, 0x20, 0x08, 0x82, 0x20, 0x18,
6449 0x80, 0x20, 0x08, 0x82, 0xe0, 0x30, 0x96, 0x00, 0x82, 0x20, 0x88, 0xff,
6450 0x02, 0x08, 0x82, 0x20, 0xfe, 0xcd, 0x00, 0x90, 0xcc, 0x41, 0x34, 0x8d,
6451 0xf3, 0xd0, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x4c, 0x57, 0x41,
6452 0xa5, 0x23, 0x06, 0xc6, 0x10, 0x82, 0x60, 0xf1, 0x1d, 0x57, 0x30, 0xc7,
6453 0x90, 0x04, 0x50, 0x4d, 0x98, 0x8e, 0x18, 0x18, 0x43, 0x08, 0x82, 0xc5,
6454 0x77, 0x68, 0xc1, 0x1c, 0xc3, 0x10, 0x48, 0x16, 0x30, 0xf2, 0xb1, 0x80,
6455 0x81, 0xcf, 0x20, 0x43, 0xc0, 0x50, 0x83, 0x0c, 0x01, 0x43, 0xcd, 0x36,
6456 0x30, 0x05, 0x30, 0xdb, 0x10, 0x08, 0x41, 0x06, 0x00, 0x00, 0x00, 0x00,
6457 0x71, 0x20, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22,
6458 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88,
6459 0x90, 0xa1, 0x02, 0x88, 0x13, 0x38, 0x1f, 0xb5, 0x2c, 0x92, 0x10, 0x11,
6460 0x44, 0xf3, 0x12, 0xd1, 0x64, 0x01, 0x17, 0x80, 0x44, 0xbe, 0xe0, 0x34,
6461 0x15, 0x11, 0x4d, 0x7e, 0xe1, 0x17, 0xb7, 0xed, 0x53, 0x3e, 0x72, 0xdb,
6462 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
6463};
6464const unsigned int FullscreenVert_metallib_len = 2928;
6465const unsigned char BlitFrom2D_metallib[] = {
6466 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
6467 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6468 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
6469 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6470 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
6471 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6472 0xec, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0e, 0x00, 0x00,
6473 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
6474 0x4e, 0x41, 0x4d, 0x45, 0x0b, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
6475 0x6f, 0x6d, 0x32, 0x44, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01,
6476 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x56, 0x91, 0x28, 0xcb, 0x9f, 0x5b,
6477 0xfa, 0x21, 0x93, 0xb3, 0x48, 0x1f, 0xf2, 0xdb, 0xc0, 0x5b, 0x10, 0xe5,
6478 0xca, 0x08, 0x8e, 0x88, 0x61, 0x2f, 0x27, 0xa2, 0x82, 0x4c, 0x06, 0x6a,
6479 0x36, 0x08, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x20, 0x0e, 0x00, 0x00,
6480 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00,
6481 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6482 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45,
6483 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6484 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
6485 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b,
6486 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x0c, 0x0e, 0x00, 0x00,
6487 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00,
6488 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8,
6489 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0x7b, 0x03, 0x00, 0x00,
6490 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
6491 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
6492 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62,
6493 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14,
6494 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20,
6495 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
6496 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a,
6497 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00,
6498 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40,
6499 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1,
6500 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1,
6501 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a,
6502 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72,
6503 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a,
6504 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74,
6505 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40,
6506 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01,
6507 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1,
6508 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41,
6509 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79,
6510 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79,
6511 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77,
6512 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76,
6513 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70,
6514 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1,
6515 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01,
6516 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79,
6517 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70,
6518 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70,
6519 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2,
6520 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81,
6521 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0,
6522 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a,
6523 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a,
6524 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36,
6525 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1,
6526 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00,
6527 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41,
6528 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1,
6529 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a,
6530 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78,
6531 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1,
6532 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06,
6533 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e,
6534 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e,
6535 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05,
6536 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00,
6537 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d,
6538 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff,
6539 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f,
6540 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0,
6541 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00, 0x49, 0x18, 0x00, 0x00,
6542 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61,
6543 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00,
6544 0x89, 0x20, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09,
6545 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3,
6546 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c,
6547 0x10, 0x60, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73,
6548 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45,
6549 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04,
6550 0x42, 0x38, 0x4a, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89,
6551 0x8a, 0x88, 0xdf, 0x1e, 0xfe, 0x69, 0x8c, 0x00, 0x18, 0x44, 0x30, 0x82,
6552 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff, 0x25, 0x80, 0x79, 0x16, 0x22,
6553 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01, 0x11, 0x8a, 0x11, 0x44, 0x28,
6554 0x27, 0x91, 0x9a, 0x23, 0x08, 0x86, 0x11, 0x84, 0xa1, 0x24, 0xe1, 0x24,
6555 0xc1, 0x1a, 0x03, 0x83, 0x5c, 0x11, 0xc0, 0x20, 0x38, 0x10, 0x90, 0x02,
6556 0x63, 0x8e, 0x00, 0x14, 0x06, 0x11, 0x04, 0x61, 0x10, 0x61, 0x10, 0x46,
6557 0x00, 0x00, 0x00, 0x00, 0x13, 0xac, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03,
6558 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x03,
6559 0x7a, 0xb0, 0x87, 0x77, 0x98, 0x87, 0x38, 0x88, 0x03, 0x37, 0x80, 0x03,
6560 0x37, 0x80, 0x83, 0x0d, 0xb7, 0x51, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x60,
6561 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0,
6562 0x06, 0xe9, 0x10, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90,
6563 0x0e, 0x78, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x10,
6564 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xd0,
6565 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30,
6566 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40,
6567 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x30, 0x07, 0x72, 0xa0,
6568 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60,
6569 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0,
6570 0x06, 0xf6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x10,
6571 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x73, 0x20,
6572 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x30, 0x07, 0x72, 0xa0,
6573 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x40,
6574 0x07, 0x78, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0,
6575 0x06, 0xf6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60,
6576 0x07, 0x74, 0xd0, 0x06, 0xf6, 0x90, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x20,
6577 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10,
6578 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10,
6579 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x90, 0x07, 0x72, 0xa0,
6580 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0,
6581 0x06, 0xf6, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60,
6582 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x75, 0x10,
6583 0x07, 0x72, 0xa0, 0x07, 0x75, 0x10, 0x07, 0x72, 0xa0, 0x07, 0x75, 0x10,
6584 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0,
6585 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20,
6586 0x07, 0x74, 0xd0, 0x06, 0xee, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0,
6587 0x07, 0x73, 0x20, 0x07, 0x43, 0x1e, 0x05, 0x00, 0x80, 0x00, 0x00, 0x00,
6588 0x40, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x0e, 0x10, 0x00, 0x02, 0x00,
6589 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x20, 0x20, 0x00, 0x06,
6590 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xd0, 0x08, 0x61, 0x48, 0x65,
6591 0x5b, 0x90, 0xe9, 0x8b, 0x1c, 0xc6, 0xee, 0x24, 0x36, 0x08, 0x14, 0x75,
6592 0x1b, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
6593 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47,
6594 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30,
6595 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x44, 0x47, 0x00, 0x0a, 0xa2, 0x40,
6596 0x0a, 0x85, 0xe6, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00,
6597 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66,
6598 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07,
6599 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10,
6600 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce,
6601 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b,
6602 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c,
6603 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07,
6604 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11,
6605 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0,
6606 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8,
6607 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b,
6608 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b,
6609 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87,
6610 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07,
6611 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87,
6612 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81,
6613 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30,
6614 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4,
6615 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca,
6616 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39,
6617 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b,
6618 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b,
6619 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83,
6620 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87,
6621 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90,
6622 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20,
6623 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc,
6624 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66,
6625 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24,
6626 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07,
6627 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e,
6628 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e,
6629 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54,
6630 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39,
6631 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c,
6632 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07,
6633 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0,
6634 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4,
6635 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b,
6636 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39,
6637 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c,
6638 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87,
6639 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0,
6640 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50,
6641 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0,
6642 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec,
6643 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6,
6644 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66,
6645 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39,
6646 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07,
6647 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10,
6648 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90,
6649 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07,
6650 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07,
6651 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07,
6652 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xf1, 0x00, 0x00, 0x00,
6653 0x22, 0x47, 0xc8, 0x90, 0x51, 0xaa, 0x01, 0x19, 0xdc, 0x13, 0x00, 0x00,
6654 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c,
6655 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14,
6656 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x60, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00,
6657 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77,
6658 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70,
6659 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72,
6660 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39,
6661 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33,
6662 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61,
6663 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
6664 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73,
6665 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
6666 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74,
6667 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
6668 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d,
6669 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63,
6670 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
6671 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65,
6672 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70,
6673 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34,
6674 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74,
6675 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
6676 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f,
6677 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
6678 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74,
6679 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72,
6680 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78,
6681 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
6682 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70,
6683 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72,
6684 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62,
6685 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69,
6686 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
6687 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64,
6688 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74,
6689 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65,
6690 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e,
6691 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70,
6692 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61,
6693 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69,
6694 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73,
6695 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74,
6696 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69,
6697 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
6698 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
6699 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72,
6700 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74,
6701 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f,
6702 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73,
6703 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
6704 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73,
6705 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
6706 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x13, 0x84, 0x61, 0x98,
6707 0x20, 0x4c, 0xd0, 0x04, 0x61, 0x20, 0x26, 0x08, 0x43, 0x31, 0x41, 0x18,
6708 0x8c, 0x09, 0xc2, 0x02, 0x4c, 0x10, 0x86, 0x63, 0x82, 0x30, 0x20, 0x13,
6709 0x84, 0x21, 0x99, 0x20, 0x0c, 0xca, 0x04, 0x61, 0x58, 0x36, 0x0c, 0x6b,
6710 0x10, 0xb0, 0xc1, 0x86, 0xa1, 0x0d, 0x04, 0x37, 0xd8, 0x10, 0x0c, 0x1b,
6711 0x86, 0x35, 0x78, 0x83, 0x37, 0xd8, 0x40, 0x10, 0x6b, 0xf0, 0x06, 0x6f,
6712 0xb0, 0x21, 0x28, 0x36, 0x04, 0xc6, 0x86, 0xe0, 0xd8, 0x50, 0x20, 0x6f,
6713 0xf0, 0x06, 0x89, 0xb2, 0x21, 0xf0, 0x83, 0x0d, 0xc9, 0x1b, 0x2c, 0x4c,
6714 0xe3, 0x24, 0x0f, 0x14, 0x6d, 0x40, 0xda, 0x40, 0x6a, 0xa6, 0x44, 0x81,
6715 0xa8, 0x0d, 0xd4, 0x1b, 0xc8, 0xc1, 0x1b, 0x3c, 0x9a, 0x1c, 0xc8, 0xc1,
6716 0x1b, 0x3c, 0xdb, 0x1c, 0xb8, 0xc1, 0x1b, 0x70, 0x1d, 0x1d, 0xb8, 0xc1,
6717 0x1b, 0x78, 0xdf, 0x06, 0x69, 0x0d, 0x2a, 0x2b, 0x0e, 0xae, 0x37, 0x68,
6718 0x03, 0x2c, 0x13, 0x05, 0x30, 0x88, 0x83, 0x30, 0x90, 0x83, 0x44, 0x0c,
6719 0xa0, 0x31, 0xd8, 0xa0, 0xd4, 0x01, 0x19, 0x5c, 0x6f, 0xd0, 0x06, 0x65,
6720 0x90, 0x98, 0x01, 0x74, 0x06, 0x1b, 0x12, 0x37, 0x40, 0x83, 0xeb, 0x0d,
6721 0xda, 0x20, 0x49, 0x03, 0x48, 0x0d, 0x36, 0x14, 0xa0, 0x10, 0x0a, 0xa3,
6722 0x40, 0x0a, 0xa5, 0xb0, 0x61, 0x80, 0x83, 0x3f, 0x30, 0x05, 0x8d, 0x04,
6723 0x26, 0xa8, 0x11, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0xdb, 0x1b, 0x59, 0x1d,
6724 0x5b, 0x99, 0x8b, 0x19, 0x5b, 0xd8, 0xd9, 0xdc, 0x14, 0xa1, 0x0e, 0xec,
6725 0xa0, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd,
6726 0x94, 0xe0, 0x0e, 0xba, 0x84, 0xa5, 0xc9, 0xb9, 0xd8, 0x95, 0xc9, 0xcd,
6727 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0xf0, 0xa0, 0x54, 0x58, 0x9a, 0x9c, 0x0b,
6728 0x5b, 0x98, 0xdb, 0x59, 0x5d, 0xd8, 0x59, 0xd9, 0x97, 0x5d, 0x99, 0xdc,
6729 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x20, 0x0f, 0x3a, 0x85, 0xa5, 0xc9, 0xb9,
6730 0x8c, 0xbd, 0xb5, 0xc1, 0xa5, 0xb1, 0x95, 0x7d, 0xbd, 0xc1, 0xd1, 0xa5,
6731 0xbd, 0xb9, 0xcd, 0x4d, 0x19, 0xf4, 0x60, 0x0f, 0xf8, 0xa0, 0x4c, 0x58,
6732 0x9a, 0x9c, 0x8b, 0x99, 0x5c, 0xd8, 0x59, 0x5b, 0x99, 0x1b, 0xdd, 0x94,
6733 0xc0, 0x14, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
6734 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98,
6735 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6,
6736 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21,
6737 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e,
6738 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f,
6739 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70,
6740 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72,
6741 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94,
6742 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20,
6743 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61,
6744 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61,
6745 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e,
6746 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00,
6747 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
6748 0xc4, 0x6a, 0x80, 0xda, 0x08, 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00,
6749 0x43, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0x48, 0x4f,
6750 0x00, 0x00, 0x00, 0x00, 0xcf, 0xc3, 0x59, 0x18, 0x26, 0x0d, 0x00, 0x00,
6751 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63,
6752 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b,
6753 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
6754 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42,
6755 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x32, 0x44, 0x29, 0x61, 0x69,
6756 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
6757 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d,
6758 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
6759 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d,
6760 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
6761 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53,
6762 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
6763 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x13, 0x04, 0x8a, 0x99,
6764 0x20, 0x50, 0xcd, 0x04, 0x81, 0x72, 0x26, 0x08, 0xd4, 0xb3, 0x42, 0xa0,
6765 0x05, 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16,
6766 0x68, 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48,
6767 0x85, 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17,
6768 0x60, 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3,
6769 0x2b, 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89,
6770 0x2b, 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2,
6771 0x2c, 0x6c, 0x18, 0x7e, 0xa1, 0x17, 0x64, 0x01, 0x9b, 0x0c, 0x05, 0x23,
6772 0x51, 0x20, 0xc8, 0x26, 0xc3, 0xe1, 0x58, 0x14, 0x08, 0x62, 0xc1, 0x22,
6773 0x1f, 0x0b, 0x08, 0xf8, 0x6c, 0x32, 0x2c, 0xd2, 0x46, 0xc1, 0x20, 0x23,
6774 0x06, 0x06, 0x11, 0x82, 0x60, 0xf1, 0x41, 0x5e, 0x30, 0x62, 0xd0, 0x14,
6775 0x21, 0x08, 0x16, 0x9f, 0x03, 0x06, 0x0d, 0x43, 0x2c, 0xca, 0x12, 0x6c,
6776 0x19, 0x04, 0xc4, 0x00, 0x09, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8,
6777 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba,
6778 0x80, 0xec, 0xc2, 0x96, 0xe3, 0x08, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17,
6779 0xb6, 0x14, 0xc9, 0xb1, 0x0b, 0x88, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,
6780 0x71, 0x20, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22,
6781 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88,
6782 0x90, 0xa1, 0x05, 0x6c, 0x00, 0x12, 0xf9, 0x12, 0xc0, 0x3c, 0x0b, 0xf1,
6783 0x4f, 0xc4, 0x35, 0x51, 0x11, 0xf1, 0xdb, 0x83, 0x5f, 0xe1, 0xc5, 0x6d,
6784 0x2b, 0x40, 0xa2, 0x81, 0xb2, 0x2d, 0xc8, 0xf4, 0x45, 0x0e, 0x63, 0x77,
6785 0x26, 0x70, 0x01, 0x48, 0xe4, 0x0b, 0x4e, 0x53, 0x11, 0xd1, 0xe4, 0x17,
6786 0x7e, 0x71, 0xdb, 0x3e, 0xe5, 0x23, 0xb7, 0x0d, 0x00, 0x00, 0x00, 0x00
6787};
6788const unsigned int BlitFrom2D_metallib_len = 3852;
6789const unsigned char BlitFrom2DArray_metallib[] = {
6790 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
6791 0x00, 0x00, 0x00, 0x00, 0x81, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6792 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
6793 0x00, 0x00, 0x00, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6794 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x00, 0x00, 0x00,
6795 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6796 0xf1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x0e, 0x00, 0x00,
6797 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
6798 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
6799 0x6f, 0x6d, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00, 0x54, 0x59,
6800 0x50, 0x45, 0x01, 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x0c,
6801 0x06, 0x1b, 0xdc, 0xbe, 0x55, 0xb4, 0x6d, 0xfc, 0x36, 0x82, 0xc9, 0xb3,
6802 0x0a, 0xb3, 0x3b, 0x53, 0xce, 0xcf, 0x61, 0x91, 0x4c, 0x9c, 0x8c, 0x5c,
6803 0x6e, 0x59, 0xcc, 0xcb, 0x0c, 0x31, 0x3d, 0x4d, 0x44, 0x53, 0x5a, 0x08,
6804 0x00, 0x90, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46,
6805 0x54, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6806 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6807 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00,
6808 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00,
6809 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44,
6810 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00,
6811 0x00, 0x7c, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0,
6812 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30,
6813 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00,
6814 0x00, 0x97, 0x03, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00,
6815 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04,
6816 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08,
6817 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b,
6818 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52,
6819 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32,
6820 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81,
6821 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00,
6822 0x00, 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff,
6823 0xff, 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e,
6824 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c,
6825 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d,
6826 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70,
6827 0x87, 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0,
6828 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48,
6829 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18,
6830 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e,
6831 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c,
6832 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d,
6833 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d,
6834 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78,
6835 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80,
6836 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28,
6837 0x07, 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68,
6838 0x03, 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e,
6839 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c,
6840 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e,
6841 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78,
6842 0x87, 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80,
6843 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e,
6844 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d,
6845 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e,
6846 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c,
6847 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70,
6848 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48,
6849 0x07, 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00,
6850 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c,
6851 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c,
6852 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c,
6853 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c,
6854 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28,
6855 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40,
6856 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03,
6857 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d,
6858 0x20, 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee,
6859 0xf0, 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0,
6860 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff,
6861 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28,
6862 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30,
6863 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8,
6864 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff,
6865 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02,
6866 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40,
6867 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61,
6868 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x29, 0x00, 0x00,
6869 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4,
6870 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a,
6871 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x6c, 0x33, 0x00, 0xc3, 0x08, 0x04,
6872 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94,
6873 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88,
6874 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4d, 0x9a, 0x22, 0x4a, 0x98,
6875 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0xdf, 0x1e, 0x7e, 0x20, 0x8a,
6876 0x00, 0xec, 0x9f, 0xc6, 0x08, 0x80, 0x41, 0x04, 0x23, 0xb8, 0x48, 0x9a,
6877 0x22, 0x4a, 0x98, 0xfc, 0x5f, 0x02, 0x98, 0x67, 0x21, 0xa2, 0x7f, 0x1a,
6878 0x23, 0x00, 0x06, 0x11, 0x10, 0xa1, 0x18, 0x41, 0x84, 0x72, 0x12, 0xa9,
6879 0x39, 0x82, 0x60, 0x18, 0x41, 0x18, 0x8a, 0x12, 0x4e, 0x12, 0x83, 0x35,
6880 0x06, 0x06, 0xb9, 0x22, 0x80, 0x41, 0xb0, 0x08, 0x03, 0x90, 0x1c, 0x08,
6881 0x48, 0x81, 0x31, 0x47, 0x00, 0x0a, 0x83, 0x08, 0x82, 0x30, 0x88, 0x00,
6882 0x08, 0x83, 0x08, 0x83, 0x30, 0x02, 0x00, 0x00, 0x00, 0x13, 0xac, 0x70,
6883 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78,
6884 0x60, 0x87, 0x72, 0x68, 0x03, 0x7a, 0xb0, 0x87, 0x77, 0x98, 0x87, 0x38,
6885 0x88, 0x03, 0x37, 0x80, 0x03, 0x37, 0x80, 0x83, 0x0d, 0xb7, 0x51, 0x0e,
6886 0x6d, 0x00, 0x0f, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
6887 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe9, 0x10, 0x07, 0x7a, 0x80, 0x07,
6888 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x78, 0xa0, 0x07,
6889 0x78, 0xd0, 0x06, 0xe9, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07,
6890 0x7a, 0x10, 0x07, 0x76, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07,
6891 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x60, 0x07,
6892 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06,
6893 0xe6, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
6894 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
6895 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x76, 0xa0, 0x07,
6896 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x20, 0x07,
6897 0x74, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06,
6898 0xf6, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
6899 0x72, 0xd0, 0x06, 0xf6, 0x40, 0x07, 0x78, 0xa0, 0x07, 0x76, 0x40, 0x07,
6900 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xf6, 0x60, 0x07, 0x74, 0xa0, 0x07,
6901 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xf6, 0x90, 0x07,
6902 0x76, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07,
6903 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07,
6904 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f,
6905 0x71, 0x90, 0x07, 0x72, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07,
6906 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x20, 0x07, 0x75, 0x60, 0x07,
6907 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07,
6908 0x6d, 0x60, 0x0f, 0x75, 0x10, 0x07, 0x72, 0xa0, 0x07, 0x75, 0x10, 0x07,
6909 0x72, 0xa0, 0x07, 0x75, 0x10, 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x10, 0x07,
6910 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07,
6911 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xd0, 0x06, 0xee, 0x80, 0x07,
6912 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x43, 0x1e, 0x05,
6913 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c,
6914 0x0e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0c,
6915 0x79, 0x20, 0x20, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
6916 0x18, 0xf2, 0x48, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
6917 0x00, 0xa0, 0x11, 0xc2, 0x90, 0xcf, 0xb6, 0x20, 0xd3, 0x17, 0x39, 0x8c,
6918 0xdd, 0x69, 0x51, 0x04, 0x60, 0x12, 0x1b, 0x04, 0x8a, 0x0a, 0x0e, 0x00,
6919 0x00, 0x64, 0x81, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98,
6920 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43,
6921 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20,
6922 0x85, 0x52, 0x06, 0x64, 0x47, 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xea,
6923 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00,
6924 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d,
6925 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07,
6926 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80,
6927 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66,
6928 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d,
6929 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07,
6930 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03,
6931 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90,
6932 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50,
6933 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2,
6934 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39,
6935 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14,
6936 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07,
6937 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07,
6938 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87,
6939 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0,
6940 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8,
6941 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc,
6942 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6,
6943 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39,
6944 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f,
6945 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c,
6946 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07,
6947 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53,
6948 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40,
6949 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc,
6950 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc,
6951 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38,
6952 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07,
6953 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51,
6954 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca,
6955 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4,
6956 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38,
6957 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c,
6958 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87,
6959 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07,
6960 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50,
6961 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8,
6962 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d,
6963 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c,
6964 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4,
6965 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87,
6966 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20,
6967 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10,
6968 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0,
6969 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2,
6970 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4,
6971 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b,
6972 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc,
6973 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87,
6974 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10,
6975 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50,
6976 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87,
6977 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85,
6978 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00,
6979 0x00, 0x79, 0x18, 0x00, 0x00, 0xf3, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8,
6980 0x90, 0x51, 0xaa, 0x01, 0x19, 0xf4, 0x13, 0x00, 0x00, 0x8b, 0xf2, 0x06,
6981 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30,
6982 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31,
6983 0xcc, 0xa2, 0x78, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b,
6984 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61,
6985 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20,
6986 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
6987 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28,
6988 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32,
6989 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69,
6990 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65,
6991 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c,
6992 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
6993 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65,
6994 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d,
6995 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75,
6996 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65,
6997 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e,
6998 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61, 0x69,
6999 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e,
7000 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69, 0x72,
7001 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e,
7002 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
7003 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61,
7004 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69, 0x72,
7005 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
7006 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
7007 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72,
7008 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72,
7009 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74,
7010 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75,
7011 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66,
7012 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c,
7013 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65,
7014 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69, 0x72,
7015 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65,
7016 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54,
7017 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f,
7018 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76,
7019 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72,
7020 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61,
7021 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
7022 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65,
7023 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53,
7024 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73,
7025 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61,
7026 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69,
7027 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74,
7028 0x75, 0x72, 0x65, 0x32, 0x64, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3c,
7029 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c,
7030 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74,
7031 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c,
7032 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75,
7033 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00,
7034 0x00, 0x13, 0x84, 0x81, 0x98, 0x20, 0x54, 0xd1, 0x04, 0x61, 0x28, 0x26,
7035 0x08, 0x83, 0x31, 0x41, 0x18, 0x8e, 0x09, 0xc2, 0x02, 0x4c, 0x10, 0x06,
7036 0x64, 0x82, 0x30, 0x24, 0x13, 0x84, 0x41, 0x99, 0x20, 0x0c, 0xcb, 0x04,
7037 0x61, 0x60, 0x36, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x86, 0xa1, 0x0d, 0x04,
7038 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35, 0x78, 0x83, 0x37, 0xd8, 0x40,
7039 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21, 0x28, 0x36, 0x04, 0xc6, 0x86,
7040 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0xb2, 0x21, 0xf0, 0x83,
7041 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24, 0x0f, 0x14, 0x6d, 0x40, 0xda,
7042 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d, 0xd4, 0x1b, 0xc8, 0xc1, 0x1b,
7043 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c, 0xdb, 0x1c, 0xb8, 0xc1, 0x1b,
7044 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78, 0xdf, 0x06, 0x69, 0x0d, 0x2a,
7045 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c, 0x13, 0x05, 0x30, 0x88, 0x83,
7046 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31, 0xd8, 0xa0, 0xd4, 0x01, 0x19,
7047 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98, 0x01, 0x74, 0x06, 0x1b, 0x12,
7048 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20, 0x49, 0x03, 0x48, 0x0d, 0x36,
7049 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0xb0, 0x61, 0x80, 0x83,
7050 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8, 0x11, 0x1b, 0x9b, 0x5d, 0x9b,
7051 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99, 0x8b, 0x19, 0x5b, 0xd8, 0xd9,
7052 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b,
7053 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0, 0x0e, 0xba, 0x84, 0xa5, 0xc9,
7054 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0xf0, 0xa0,
7055 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98, 0xdb, 0x59, 0x5d, 0xd8, 0x59,
7056 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x20, 0x0f,
7057 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd, 0xb5, 0xc1, 0xa5, 0xb1, 0x95,
7058 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x19, 0xf4, 0x60,
7059 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c, 0x8b, 0x99, 0x5c, 0xd8, 0x59,
7060 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14, 0x00, 0x00, 0xa9, 0x18, 0x00,
7061 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80,
7062 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43,
7063 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e,
7064 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d,
7065 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4,
7066 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81,
7067 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08,
7068 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01,
7069 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c,
7070 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c,
7071 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c,
7072 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1,
7073 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00,
7074 0x00, 0x6e, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00,
7075 0x00, 0x02, 0x00, 0x00, 0x00, 0xc4, 0x6a, 0x80, 0xda, 0x08, 0x00, 0x00,
7076 0x00, 0xf1, 0x30, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8,
7077 0x90, 0x51, 0x22, 0x88, 0x58, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x13, 0x06,
7078 0x16, 0x86, 0x49, 0x03, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74,
7079 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70,
7080 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x61,
7081 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f,
7082 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d,
7083 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x29, 0x61, 0x69, 0x72, 0x2d,
7084 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
7085 0x61, 0x72, 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
7086 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61,
7087 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
7088 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65,
7089 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32,
7090 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
7091 0x69, 0x6e, 0x74, 0x00, 0x00, 0x13, 0x04, 0xab, 0x99, 0x20, 0x58, 0xce,
7092 0x04, 0xc1, 0x7a, 0x26, 0x08, 0x16, 0xb4, 0x42, 0xa0, 0x05, 0x55, 0x58,
7093 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15,
7094 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03,
7095 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60, 0x61, 0x43,
7096 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02,
7097 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02,
7098 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18,
7099 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0, 0x0b, 0xbd, 0x20, 0x0b, 0x00,
7100 0x00, 0x9b, 0x0c, 0x05, 0x23, 0x51, 0x20, 0xc8, 0x26, 0xc3, 0xe1, 0x58,
7101 0x14, 0x08, 0x62, 0xc1, 0x22, 0x1f, 0x0b, 0x08, 0xf8, 0x6c, 0x32, 0x2c,
7102 0xd2, 0x44, 0x01, 0x18, 0x23, 0x06, 0x05, 0x11, 0x82, 0x60, 0x20, 0x79,
7103 0xc1, 0x26, 0x83, 0x53, 0x79, 0x14, 0x0c, 0x32, 0x62, 0x60, 0x10, 0x21,
7104 0x08, 0x16, 0x1f, 0x24, 0x06, 0xc1, 0x88, 0x81, 0x53, 0x84, 0x20, 0x58,
7105 0x7c, 0x0e, 0x19, 0x40, 0xcf, 0x41, 0x38, 0x8d, 0x13, 0x78, 0x19, 0x04,
7106 0xc4, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20,
7107 0xc8, 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c,
7108 0xba, 0x80, 0xec, 0xc2, 0x96, 0xe3, 0x08, 0x7e, 0xe1, 0xd0, 0x05, 0x64,
7109 0x17, 0xb6, 0x1c, 0x4a, 0x00, 0x0e, 0x87, 0x2e, 0x20, 0xbb, 0xb0, 0xa5,
7110 0x60, 0x8e, 0x5d, 0x40, 0x74, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7111 0x00, 0x71, 0x20, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10,
7112 0x22, 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40,
7113 0x88, 0x90, 0xa1, 0x05, 0x84, 0x01, 0x80, 0x44, 0xbe, 0x04, 0x30, 0xcf,
7114 0x42, 0xfc, 0x13, 0x71, 0x4d, 0x54, 0x44, 0xfc, 0xf6, 0xf0, 0x03, 0x51,
7115 0x04, 0x60, 0x7e, 0x85, 0x17, 0xb7, 0xad, 0x00, 0x92, 0x06, 0xcf, 0xb6,
7116 0x20, 0xd3, 0x17, 0x39, 0x8c, 0xdd, 0x69, 0x51, 0x04, 0x60, 0x26, 0x70,
7117 0x01, 0x48, 0xe4, 0x0b, 0x4e, 0x53, 0x11, 0xd1, 0xe4, 0x17, 0x7e, 0x71,
7118 0xdb, 0x3e, 0xe5, 0x23, 0xb7, 0x6d, 0x03, 0x17, 0x80, 0x44, 0xbe, 0xe0,
7119 0x34, 0x15, 0x11, 0x4d, 0x3e, 0xe5, 0x23, 0xb7, 0xed, 0x17, 0x7e, 0x71,
7120 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
7121};
7122const unsigned int BlitFrom2DArray_metallib_len = 3969;
7123const unsigned char BlitFrom3D_metallib[] = {
7124 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
7125 0x00, 0x00, 0x00, 0x00, 0x4c, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7126 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
7127 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7128 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
7129 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7130 0xec, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0e, 0x00, 0x00,
7131 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
7132 0x4e, 0x41, 0x4d, 0x45, 0x0b, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
7133 0x6f, 0x6d, 0x33, 0x44, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01,
7134 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x9d, 0xdf, 0x58, 0x99, 0xbf, 0xfd,
7135 0x68, 0xc2, 0x60, 0x6b, 0xa2, 0x99, 0x72, 0xa4, 0x60, 0xf9, 0x05, 0xee,
7136 0xe2, 0x9c, 0xe3, 0x9a, 0x33, 0x67, 0x8c, 0xd7, 0x9d, 0x16, 0xda, 0xfe,
7137 0x0f, 0x09, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x60, 0x0e, 0x00, 0x00,
7138 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00,
7139 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7140 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45,
7141 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
7142 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
7143 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b,
7144 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x48, 0x0e, 0x00, 0x00,
7145 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00,
7146 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8,
7147 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0x8a, 0x03, 0x00, 0x00,
7148 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
7149 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
7150 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62,
7151 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14,
7152 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20,
7153 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
7154 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a,
7155 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00,
7156 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40,
7157 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1,
7158 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1,
7159 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a,
7160 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72,
7161 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a,
7162 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74,
7163 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40,
7164 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01,
7165 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1,
7166 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41,
7167 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79,
7168 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79,
7169 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77,
7170 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76,
7171 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70,
7172 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1,
7173 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01,
7174 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79,
7175 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70,
7176 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70,
7177 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2,
7178 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81,
7179 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0,
7180 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a,
7181 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a,
7182 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36,
7183 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1,
7184 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00,
7185 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41,
7186 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1,
7187 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a,
7188 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78,
7189 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1,
7190 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06,
7191 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e,
7192 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e,
7193 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05,
7194 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00,
7195 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d,
7196 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff,
7197 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f,
7198 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0,
7199 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00, 0x49, 0x18, 0x00, 0x00,
7200 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61,
7201 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00,
7202 0x89, 0x20, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09,
7203 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3,
7204 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c,
7205 0x10, 0x68, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73,
7206 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45,
7207 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04,
7208 0x42, 0x38, 0x4a, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89,
7209 0x8a, 0x88, 0xff, 0x1e, 0xfe, 0x69, 0x8c, 0x00, 0x18, 0x44, 0x30, 0x82,
7210 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff, 0x25, 0x80, 0x79, 0x16, 0x22,
7211 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01, 0x11, 0x8a, 0x11, 0x44, 0x28,
7212 0x27, 0x91, 0x1a, 0x46, 0x18, 0x80, 0x39, 0x82, 0x60, 0x18, 0x61, 0x18,
7213 0x4a, 0x12, 0x4e, 0x62, 0xcd, 0x35, 0x30, 0xe8, 0x15, 0x01, 0x0c, 0x8a,
7214 0x03, 0x01, 0x29, 0x30, 0xe6, 0x08, 0x40, 0x61, 0x10, 0x41, 0x10, 0x06,
7215 0x11, 0x00, 0x61, 0x10, 0x61, 0x10, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
7216 0x13, 0xac, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70,
7217 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x03, 0x7a, 0xb0, 0x87, 0x77,
7218 0x98, 0x87, 0x38, 0x88, 0x03, 0x37, 0x80, 0x03, 0x37, 0x80, 0x83, 0x0d,
7219 0xb7, 0x51, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
7220 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe9, 0x10, 0x07,
7221 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07,
7222 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x10, 0x07, 0x76, 0xa0, 0x07,
7223 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xd0, 0x06, 0xe9, 0x30, 0x07,
7224 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06,
7225 0xe9, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
7226 0x74, 0xd0, 0x06, 0xe6, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
7227 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07,
7228 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xf6, 0x10, 0x07,
7229 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xd0, 0x06,
7230 0xf6, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
7231 0x72, 0xd0, 0x06, 0xf6, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
7232 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x40, 0x07, 0x78, 0xa0, 0x07,
7233 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xf6, 0x60, 0x07,
7234 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06,
7235 0xf6, 0x90, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07,
7236 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x72, 0x80, 0x07,
7237 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07,
7238 0x6d, 0x60, 0x0f, 0x71, 0x90, 0x07, 0x72, 0xa0, 0x07, 0x72, 0x50, 0x07,
7239 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x20, 0x07,
7240 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07,
7241 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x75, 0x10, 0x07, 0x72, 0xa0, 0x07,
7242 0x75, 0x10, 0x07, 0x72, 0xa0, 0x07, 0x75, 0x10, 0x07, 0x72, 0xd0, 0x06,
7243 0xf6, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07,
7244 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xd0, 0x06,
7245 0xee, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07,
7246 0x43, 0x1e, 0x05, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
7247 0x00, 0x86, 0x3c, 0x0f, 0x10, 0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x00,
7248 0x00, 0x00, 0x0c, 0x79, 0x22, 0x20, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01,
7249 0x00, 0x00, 0x00, 0xd0, 0x08, 0x61, 0x48, 0x65, 0x5b, 0x90, 0xe9, 0x8b,
7250 0x1c, 0xe6, 0xee, 0x24, 0x36, 0x08, 0x14, 0xed, 0x1b, 0x00, 0x00, 0xc8,
7251 0x02, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14,
7252 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a,
7253 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85,
7254 0x52, 0x06, 0x54, 0x47, 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xe8, 0x58,
7255 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00,
7256 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88,
7257 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
7258 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e,
7259 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30,
7260 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8,
7261 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
7262 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76,
7263 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e,
7264 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e,
7265 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
7266 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4,
7267 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
7268 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37,
7269 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
7270 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71,
7271 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e,
7272 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1,
7273 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
7274 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90,
7275 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
7276 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc,
7277 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7,
7278 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78,
7279 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f,
7280 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f,
7281 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1,
7282 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0,
7283 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0,
7284 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b,
7285 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c,
7286 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61,
7287 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1,
7288 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc,
7289 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4,
7290 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79,
7291 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72,
7292 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e,
7293 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1,
7294 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4,
7295 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8,
7296 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71,
7297 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19,
7298 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f,
7299 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e,
7300 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e,
7301 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81,
7302 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21,
7303 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc,
7304 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70,
7305 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77,
7306 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e,
7307 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e,
7308 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a,
7309 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73,
7310 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00,
7311 0x79, 0x18, 0x00, 0x00, 0xf1, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90,
7312 0x51, 0xaa, 0x01, 0x19, 0xdc, 0x13, 0x00, 0x00, 0x8b, 0xf2, 0x06, 0xc5,
7313 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2,
7314 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc,
7315 0xa2, 0x60, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20,
7316 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72,
7317 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d,
7318 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
7319 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d,
7320 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33,
7321 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72,
7322 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e,
7323 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65,
7324 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
7325 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e,
7326 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
7327 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66,
7328 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e,
7329 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64,
7330 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61, 0x69, 0x72,
7331 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61,
7332 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e,
7333 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70,
7334 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28,
7335 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69,
7336 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e,
7337 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x66,
7338 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67,
7339 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e,
7340 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e,
7341 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69,
7342 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66,
7343 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65,
7344 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f,
7345 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78,
7346 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e,
7347 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
7348 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f,
7349 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
7350 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65,
7351 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f,
7352 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
7353 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61,
7354 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
7355 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f,
7356 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f,
7357 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69,
7358 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72,
7359 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74, 0x75,
7360 0x72, 0x65, 0x33, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20,
7361 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63,
7362 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e,
7363 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c,
7364 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70,
7365 0x6c, 0x65, 0x72, 0x00, 0x13, 0x84, 0x61, 0x98, 0x20, 0x50, 0xd0, 0x04,
7366 0x61, 0x20, 0x26, 0x08, 0x43, 0x31, 0x41, 0x18, 0x8c, 0x09, 0xc2, 0x02,
7367 0x4c, 0x10, 0x86, 0x63, 0x82, 0x30, 0x20, 0x13, 0x84, 0x21, 0x99, 0x20,
7368 0x0c, 0xca, 0x04, 0x61, 0x58, 0x36, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x86,
7369 0xa1, 0x0d, 0x04, 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35, 0x78, 0x83,
7370 0x37, 0xd8, 0x40, 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21, 0x28, 0x36,
7371 0x04, 0xc6, 0x86, 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0xb2,
7372 0x21, 0xf0, 0x83, 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24, 0x0f, 0x14,
7373 0x6d, 0x40, 0xda, 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d, 0xd4, 0x1b,
7374 0xc8, 0xc1, 0x1b, 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c, 0xdb, 0x1c,
7375 0xb8, 0xc1, 0x1b, 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78, 0xdf, 0x06,
7376 0x69, 0x0d, 0x2a, 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c, 0x13, 0x05,
7377 0x30, 0x88, 0x83, 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31, 0xd8, 0xa0,
7378 0xd4, 0x01, 0x19, 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98, 0x01, 0x74,
7379 0x06, 0x1b, 0x12, 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20, 0x49, 0x03,
7380 0x48, 0x0d, 0x36, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0xb0,
7381 0x61, 0x80, 0x83, 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8, 0x11, 0x1b,
7382 0x9b, 0x5d, 0x9b, 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99, 0x8b, 0x19,
7383 0x5b, 0xd8, 0xd9, 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a, 0x1b, 0x9b,
7384 0x5d, 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0, 0x0e, 0xba,
7385 0x84, 0xa5, 0xc9, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d,
7386 0x09, 0xf0, 0xa0, 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98, 0xdb, 0x59,
7387 0x5d, 0xd8, 0x59, 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb,
7388 0x94, 0x20, 0x0f, 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd, 0xb5, 0xc1,
7389 0xa5, 0xb1, 0x95, 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d,
7390 0x19, 0xf4, 0x60, 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c, 0x8b, 0x99,
7391 0x5c, 0xd8, 0x59, 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14, 0x00, 0x00,
7392 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28,
7393 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3,
7394 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d,
7395 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d,
7396 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1,
7397 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4,
7398 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78,
7399 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3,
7400 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c,
7401 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c,
7402 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c,
7403 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4,
7404 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00,
7405 0x61, 0x20, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c,
7406 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x66, 0x00, 0xa8,
7407 0xd5, 0x00, 0xb9, 0x39, 0x06, 0x83, 0xb0, 0x46, 0x00, 0xa8, 0x16, 0x01,
7408 0x89, 0x19, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00,
7409 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0x48, 0x4f, 0x00, 0x00, 0x00, 0x00,
7410 0xcf, 0xc3, 0x59, 0x18, 0x26, 0x0d, 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69,
7411 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53,
7412 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42,
7413 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d,
7414 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46,
7415 0x72, 0x6f, 0x6d, 0x33, 0x44, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
7416 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72,
7417 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
7418 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70,
7419 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
7420 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74,
7421 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f,
7422 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e,
7423 0x74, 0x00, 0x00, 0x00, 0x13, 0x84, 0x8a, 0x99, 0x20, 0x54, 0xcd, 0x04,
7424 0xa1, 0x72, 0x26, 0x08, 0xd5, 0xb3, 0x42, 0xa0, 0x05, 0x55, 0x58, 0x31,
7425 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81, 0x15, 0x56,
7426 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d, 0x03, 0x2a,
7427 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60, 0x61, 0x43, 0x50,
7428 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4, 0x02, 0x2c,
7429 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4, 0x02, 0x2c,
7430 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c, 0x18, 0x7e,
7431 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0, 0x0b, 0xbd, 0x20, 0x0b, 0x00, 0x00,
7432 0x9b, 0x0c, 0x09, 0x64, 0x51, 0x20, 0xc8, 0x26, 0xc3, 0x22, 0x69, 0x14,
7433 0x08, 0x62, 0xc1, 0x23, 0x1f, 0x0b, 0x08, 0xf8, 0x0c, 0x32, 0x04, 0x87,
7434 0xb2, 0xc9, 0x00, 0x5d, 0x18, 0x05, 0x60, 0xcc, 0x31, 0x0c, 0xc1, 0xb2,
7435 0xc9, 0x30, 0x69, 0x63, 0x40, 0xc1, 0x20, 0x23, 0x06, 0x06, 0x11, 0x82,
7436 0x60, 0xf1, 0x45, 0x66, 0x10, 0x8c, 0x18, 0x34, 0x45, 0x08, 0x82, 0xc5,
7437 0xf7, 0xa0, 0x41, 0x45, 0x11, 0x12, 0x24, 0x05, 0x63, 0x90, 0x41, 0x40,
7438 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8,
7439 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba,
7440 0x80, 0xec, 0xc2, 0x96, 0x03, 0x09, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17,
7441 0xb6, 0x1c, 0x4b, 0x00, 0x0e, 0x87, 0x2e, 0x20, 0xbb, 0xb0, 0xa5, 0x68,
7442 0x8e, 0x5d, 0x40, 0x74, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7443 0x71, 0x20, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22,
7444 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88,
7445 0x90, 0xa1, 0x05, 0x6c, 0x00, 0x12, 0xf9, 0x12, 0xc0, 0x3c, 0x0b, 0xf1,
7446 0x4f, 0xc4, 0x35, 0x51, 0x11, 0xf1, 0xdf, 0x83, 0x5f, 0xe1, 0xc5, 0x6d,
7447 0x2b, 0xc0, 0xa2, 0x81, 0xb2, 0x2d, 0xc8, 0xf4, 0x45, 0x0e, 0x73, 0x77,
7448 0x26, 0x70, 0x01, 0x48, 0xe4, 0x0b, 0x4e, 0x53, 0x11, 0xd1, 0xe4, 0x17,
7449 0x7e, 0x71, 0xdb, 0x3e, 0xe5, 0x23, 0xb7, 0x0d, 0x00, 0x00, 0x00, 0x00,
7450 0x00, 0x00, 0x00, 0x00
7451};
7452const unsigned int BlitFrom3D_metallib_len = 3916;
7453const unsigned char BlitFromCube_metallib[] = {
7454 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
7455 0x00, 0x00, 0x00, 0x00, 0x6e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7456 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
7457 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7458 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x00, 0x00, 0x00,
7459 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7460 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00,
7461 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
7462 0x4e, 0x41, 0x4d, 0x45, 0x0d, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
7463 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01,
7464 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x23, 0xeb, 0x53, 0x00,
7465 0x23, 0x64, 0x0d, 0xa8, 0xc3, 0xbc, 0x66, 0x04, 0x75, 0x0c, 0xbb, 0x74,
7466 0x11, 0x38, 0x3e, 0x6e, 0xdf, 0xdb, 0xb7, 0x39, 0x53, 0xfd, 0x8a, 0x73,
7467 0x1f, 0x9a, 0x91, 0xd4, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x80, 0x0f,
7468 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00,
7469 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7470 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7471 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
7472 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e,
7473 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0,
7474 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x68, 0x0f,
7475 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14,
7476 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10,
7477 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0xd2, 0x03,
7478 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00,
7479 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10,
7480 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04,
7481 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10,
7482 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90,
7483 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48,
7484 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83,
7485 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x83, 0x00,
7486 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58,
7487 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d,
7488 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c,
7489 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90,
7490 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60,
7491 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18,
7492 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0,
7493 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d,
7494 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d,
7495 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c,
7496 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e,
7497 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0,
7498 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30,
7499 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48,
7500 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48,
7501 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28,
7502 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20,
7503 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d,
7504 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0,
7505 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70,
7506 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68,
7507 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c,
7508 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d,
7509 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e,
7510 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d,
7511 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68,
7512 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38,
7513 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e,
7514 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d,
7515 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e,
7516 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c,
7517 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00,
7518 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30,
7519 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e,
7520 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0, 0x09, 0x03, 0xb0, 0x00, 0x55,
7521 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20, 0x0f, 0x6d, 0x20, 0x0e, 0xf5,
7522 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0, 0x06, 0xee, 0xf0, 0x0e, 0x6d,
7523 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0xc0, 0x06, 0x63, 0x28,
7524 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40,
7525 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01,
7526 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff,
7527 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff,
7528 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff,
7529 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00, 0x49, 0x18,
7530 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c,
7531 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03,
7532 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x32, 0x22,
7533 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93,
7534 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84,
7535 0xa4, 0x4c, 0x10, 0x74, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20,
7536 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac,
7537 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80,
7538 0x41, 0x04, 0x42, 0x38, 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22,
7539 0xae, 0x89, 0x8a, 0x88, 0x5f, 0xa0, 0x02, 0xe2, 0x9f, 0xc6, 0x08, 0x80,
7540 0x41, 0x04, 0x23, 0xb8, 0x48, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x5f, 0x02,
7541 0x98, 0x67, 0x21, 0xa2, 0x7f, 0x1a, 0x23, 0x00, 0x06, 0x11, 0x10, 0xa1,
7542 0x18, 0x41, 0x84, 0x72, 0x12, 0xa9, 0x61, 0x84, 0x01, 0x98, 0x23, 0x08,
7543 0xca, 0x11, 0x4e, 0x62, 0x0d, 0x0c, 0x72, 0x45, 0x00, 0x83, 0x60, 0x11,
7544 0x06, 0x20, 0x39, 0x10, 0x90, 0x02, 0x63, 0x8e, 0x00, 0x14, 0x06, 0x11,
7545 0x04, 0x61, 0x10, 0x01, 0x10, 0xa6, 0x00, 0x46, 0x00, 0x86, 0x11, 0x86,
7546 0x61, 0x10, 0x61, 0x10, 0x00, 0x00, 0x13, 0xac, 0x70, 0x48, 0x07, 0x79,
7547 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72,
7548 0x68, 0x03, 0x7a, 0xb0, 0x87, 0x77, 0x98, 0x87, 0x38, 0x88, 0x03, 0x37,
7549 0x80, 0x03, 0x37, 0x80, 0x83, 0x0d, 0xb7, 0x51, 0x0e, 0x6d, 0x00, 0x0f,
7550 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
7551 0x74, 0xd0, 0x06, 0xe9, 0x10, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07,
7552 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06,
7553 0xe9, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07,
7554 0x76, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07,
7555 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x60, 0x07, 0x74, 0xa0, 0x07,
7556 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x30, 0x07,
7557 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06,
7558 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
7559 0x74, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07,
7560 0x7a, 0x10, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x20, 0x07, 0x74, 0xa0, 0x07,
7561 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x30, 0x07,
7562 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06,
7563 0xf6, 0x40, 0x07, 0x78, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
7564 0x74, 0xd0, 0x06, 0xf6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
7565 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xf6, 0x90, 0x07, 0x76, 0xa0, 0x07,
7566 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06,
7567 0xf6, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07,
7568 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x90, 0x07,
7569 0x72, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07,
7570 0x76, 0xd0, 0x06, 0xf6, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07,
7571 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f,
7572 0x75, 0x10, 0x07, 0x72, 0xa0, 0x07, 0x75, 0x10, 0x07, 0x72, 0xa0, 0x07,
7573 0x75, 0x10, 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x70, 0x20, 0x07,
7574 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07,
7575 0x70, 0x20, 0x07, 0x74, 0xd0, 0x06, 0xee, 0x80, 0x07, 0x7a, 0x10, 0x07,
7576 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x43, 0x1e, 0x05, 0x00, 0x80, 0x00,
7577 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x0e, 0x10, 0x00,
7578 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x20, 0x20,
7579 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x48,
7580 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa0, 0x11,
7581 0xc2, 0x90, 0xcc, 0xb6, 0x20, 0xd3, 0x17, 0x39, 0x0c, 0x47, 0x05, 0x84,
7582 0xc4, 0x06, 0x81, 0xa2, 0xbf, 0x03, 0x00, 0x00, 0x59, 0x20, 0x0b, 0x00,
7583 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09,
7584 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02,
7585 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x64, 0x47, 0x00, 0x0a,
7586 0xa2, 0x40, 0x0a, 0x85, 0xea, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1, 0x18,
7587 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1,
7588 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42,
7589 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f,
7590 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1,
7591 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84,
7592 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc,
7593 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70,
7594 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19,
7595 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f,
7596 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21,
7597 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc,
7598 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84,
7599 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37,
7600 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70,
7601 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77,
7602 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79,
7603 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e,
7604 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1,
7605 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81,
7606 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98,
7607 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88,
7608 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4,
7609 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72,
7610 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74,
7611 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e,
7612 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e,
7613 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21,
7614 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01,
7615 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc,
7616 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77,
7617 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e,
7618 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1,
7619 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61,
7620 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0,
7621 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0,
7622 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74,
7623 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e,
7624 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41,
7625 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48,
7626 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c,
7627 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4,
7628 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71,
7629 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f,
7630 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f,
7631 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f,
7632 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23,
7633 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21,
7634 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21,
7635 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94,
7636 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a,
7637 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e,
7638 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e,
7639 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74,
7640 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74,
7641 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78,
7642 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xf2, 0x00,
7643 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0xaa, 0x01, 0x19, 0xe4, 0x13,
7644 0x00, 0x00, 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19, 0x12,
7645 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c,
7646 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x68, 0xcd, 0x72, 0x34, 0x00,
7647 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
7648 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41,
7649 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76,
7650 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33,
7651 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65,
7652 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d, 0x65,
7653 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69,
7654 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64,
7655 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f,
7656 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d,
7657 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69,
7658 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72,
7659 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65,
7660 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69,
7661 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72,
7662 0x67, 0x65, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74,
7663 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61,
7664 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65,
7665 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65,
7666 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76,
7667 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74,
7668 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65,
7669 0x63, 0x74, 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61,
7670 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74,
7671 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
7672 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72,
7673 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61,
7674 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72,
7675 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65,
7676 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
7677 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65,
7678 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
7679 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56,
7680 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d,
7681 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d,
7682 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74,
7683 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68,
7684 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65,
7685 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67,
7686 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f,
7687 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
7688 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
7689 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74,
7690 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c,
7691 0x65, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65,
7692 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70,
7693 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78,
7694 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70,
7695 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f,
7696 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00,
7697 0x00, 0x00, 0x13, 0x84, 0x81, 0x98, 0x20, 0x54, 0xd1, 0x04, 0x61, 0x28,
7698 0x26, 0x08, 0x83, 0x31, 0x41, 0x18, 0x8e, 0x09, 0xc2, 0x02, 0x4c, 0x10,
7699 0x06, 0x64, 0x82, 0x30, 0x24, 0x13, 0x84, 0x41, 0x99, 0x20, 0x0c, 0xcb,
7700 0x04, 0x61, 0x60, 0x36, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x86, 0xa1, 0x0d,
7701 0x04, 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35, 0x78, 0x83, 0x37, 0xd8,
7702 0x40, 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21, 0x28, 0x36, 0x04, 0xc6,
7703 0x86, 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0xb2, 0x21, 0xf0,
7704 0x83, 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24, 0x0f, 0x14, 0x6d, 0x40,
7705 0xda, 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d, 0xd4, 0x1b, 0xc8, 0xc1,
7706 0x1b, 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c, 0xdb, 0x1c, 0xb8, 0xc1,
7707 0x1b, 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78, 0xdf, 0x06, 0x69, 0x0d,
7708 0x2a, 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c, 0x13, 0x05, 0x30, 0x88,
7709 0x83, 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31, 0xd8, 0xa0, 0xd4, 0x01,
7710 0x19, 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98, 0x01, 0x74, 0x06, 0x1b,
7711 0x12, 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20, 0x49, 0x03, 0x48, 0x0d,
7712 0x36, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0xb0, 0x61, 0x80,
7713 0x83, 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8, 0x11, 0x1b, 0x9b, 0x5d,
7714 0x9b, 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99, 0x8b, 0x19, 0x5b, 0xd8,
7715 0xd9, 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b,
7716 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0, 0x0e, 0xba, 0x84, 0xa5,
7717 0xc9, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0xf0,
7718 0xa0, 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98, 0xdb, 0x59, 0x5d, 0xd8,
7719 0x59, 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x20,
7720 0x0f, 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd, 0xb5, 0xc1, 0xa5, 0xb1,
7721 0x95, 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x19, 0xf4,
7722 0x60, 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c, 0x8b, 0x99, 0x5c, 0xd8,
7723 0x59, 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14, 0x00, 0x00, 0xa9, 0x18,
7724 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77,
7725 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0,
7726 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41,
7727 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1,
7728 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f,
7729 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80,
7730 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71,
7731 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4,
7732 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21,
7733 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20,
7734 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61,
7735 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f,
7736 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20,
7737 0x00, 0x00, 0xad, 0x00, 0x00, 0x00, 0x13, 0x04, 0x48, 0x2c, 0x10, 0x00,
7738 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x34, 0x4a, 0x81, 0x5a, 0x0d, 0x90,
7739 0x2d, 0x81, 0x22, 0xa0, 0x3d, 0xd6, 0x00, 0x04, 0x02, 0x81, 0x19, 0x80,
7740 0x31, 0x02, 0x10, 0x04, 0x41, 0x10, 0x14, 0x66, 0x00, 0xc6, 0x08, 0x40,
7741 0x10, 0x04, 0xf1, 0x5f, 0x18, 0x23, 0x00, 0x41, 0x10, 0xc4, 0xbf, 0x11,
7742 0x80, 0x31, 0x02, 0x10, 0x04, 0x41, 0x10, 0x0c, 0x28, 0xcc, 0x41, 0x80,
7743 0x01, 0xc7, 0x79, 0x73, 0x10, 0x1f, 0xc7, 0x79, 0x73, 0x10, 0x1c, 0x18,
7744 0x70, 0xde, 0x1c, 0x04, 0xf7, 0x71, 0xde, 0x1c, 0x04, 0xc7, 0x81, 0x81,
7745 0x37, 0x07, 0xc1, 0x71, 0x9f, 0x37, 0x07, 0x11, 0x06, 0x61, 0x10, 0x06,
7746 0xde, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x45, 0x00,
7747 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x22, 0xc8, 0x4f, 0x00, 0x00,
7748 0x00, 0x00, 0xcf, 0xe3, 0x59, 0x18, 0x26, 0x0d, 0x00, 0x00, 0x6f, 0x6d,
7749 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61,
7750 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20,
7751 0x54, 0x42, 0x41, 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61,
7752 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69,
7753 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x29, 0x61, 0x69,
7754 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
7755 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29, 0x61, 0x69, 0x72, 0x2d,
7756 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
7757 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d,
7758 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d,
7759 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a, 0x54, 0x53,
7760 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
7761 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x00, 0x13, 0x04, 0xab, 0x99, 0x20, 0x58,
7762 0xce, 0x04, 0xc1, 0x7a, 0x26, 0x08, 0x16, 0xb4, 0x42, 0xa0, 0x05, 0x55,
7763 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68, 0x81,
7764 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85, 0x0d,
7765 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60, 0x61,
7766 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b, 0xe4,
7767 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b, 0xe4,
7768 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c, 0x6c,
7769 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0, 0x0b, 0xbd, 0x20, 0x0b,
7770 0x00, 0x00, 0x9b, 0x0c, 0x97, 0x47, 0x06, 0x14, 0x08, 0xb2, 0xc9, 0x90,
7771 0x81, 0x01, 0x1a, 0x50, 0x20, 0x88, 0x05, 0x9d, 0x7c, 0x2c, 0x20, 0xe0,
7772 0x33, 0x86, 0x10, 0x90, 0x81, 0x05, 0x90, 0x7c, 0x2c, 0xa0, 0xe0, 0x33,
7773 0x86, 0x40, 0x6c, 0x16, 0x4c, 0xf2, 0xb1, 0xe0, 0x82, 0xcf, 0x26, 0xc3,
7774 0x18, 0xa8, 0xc1, 0x1a, 0x50, 0x00, 0xc6, 0x88, 0x41, 0x41, 0x84, 0x20,
7775 0x18, 0x48, 0x76, 0x10, 0x0c, 0xf3, 0x0c, 0xc1, 0x71, 0x04, 0x85, 0x40,
7776 0x0c, 0x0c, 0x61, 0x14, 0x97, 0x61, 0x1d, 0x11, 0x9f, 0x39, 0x06, 0x2c,
7777 0x10, 0x03, 0xfb, 0x92, 0xf8, 0xcc, 0x31, 0x08, 0xc1, 0x18, 0xcc, 0x12,
7778 0x1c, 0x16, 0x06, 0x48, 0x7c, 0xe6, 0x18, 0xb6, 0xc0, 0x0c, 0xe6, 0x18,
7779 0x82, 0xc6, 0x0c, 0x66, 0x09, 0x8e, 0x39, 0x06, 0xce, 0xa1, 0x03, 0x2b,
7780 0x03, 0x26, 0x3e, 0x73, 0x0c, 0x42, 0x90, 0x06, 0xb3, 0x04, 0xc7, 0x1c,
7781 0x83, 0x17, 0xdd, 0xc1, 0x1c, 0x43, 0xf0, 0xac, 0xc1, 0x2c, 0xc1, 0x61,
7782 0x69, 0x00, 0xc5, 0x67, 0x8e, 0x01, 0x0c, 0x28, 0x3d, 0x98, 0x63, 0x08,
7783 0x84, 0x37, 0x98, 0x25, 0x38, 0x8c, 0x0d, 0xac, 0xf8, 0x58, 0x1b, 0x50,
7784 0xf1, 0x99, 0x63, 0x18, 0x03, 0xc1, 0x0f, 0xe6, 0x18, 0x02, 0x61, 0x0e,
7785 0x66, 0x09, 0x8e, 0x81, 0x9e, 0x40, 0x30, 0x94, 0x02, 0x22, 0xa8, 0x41,
7786 0x13, 0xc0, 0x20, 0x40, 0x05, 0x60, 0x90, 0x21, 0x20, 0x83, 0x39, 0xd8,
7787 0x64, 0xd8, 0x03, 0x51, 0x58, 0x05, 0x0a, 0x06, 0x19, 0x31, 0x30, 0x88,
7788 0x10, 0x04, 0x8b, 0x0f, 0x7a, 0x85, 0x60, 0xc4, 0x60, 0x29, 0x42, 0x10,
7789 0x2c, 0x3e, 0x27, 0x16, 0xfa, 0x80, 0x0f, 0x08, 0x3d, 0x08, 0x56, 0x21,
7790 0x83, 0x80, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e,
7791 0x20, 0xc8, 0x85, 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e,
7792 0x1c, 0xba, 0x80, 0xec, 0xc2, 0x96, 0xa3, 0x09, 0x7e, 0xe1, 0xd0, 0x05,
7793 0x64, 0x17, 0xb6, 0x1c, 0x6c, 0x10, 0x80, 0xc3, 0xa1, 0x0b, 0xc8, 0x2e,
7794 0x6c, 0x29, 0xdc, 0xe0, 0xd8, 0x05, 0x44, 0x17, 0x00, 0x00, 0x00, 0x00,
7795 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x52, 0x0e,
7796 0x10, 0x22, 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39,
7797 0x40, 0x88, 0x90, 0xa1, 0x09, 0x5c, 0x00, 0x12, 0xf9, 0x82, 0xd3, 0x54,
7798 0x44, 0x34, 0xf9, 0x85, 0x5f, 0xdc, 0xb6, 0x4f, 0xf9, 0xc8, 0x6d, 0xdb,
7799 0xc0, 0x05, 0x20, 0x91, 0x2f, 0x38, 0x4d, 0x45, 0x44, 0x93, 0x4f, 0xf9,
7800 0xc8, 0x6d, 0xfb, 0x85, 0x5f, 0xdc, 0xb6, 0x05, 0x74, 0x00, 0x12, 0xf9,
7801 0x12, 0xc0, 0x3c, 0x0b, 0xf1, 0x4f, 0xc4, 0x35, 0x51, 0x11, 0xf1, 0x0b,
7802 0x54, 0x40, 0xf8, 0x15, 0x5e, 0xdc, 0xb6, 0x02, 0x40, 0x1a, 0x30, 0xdb,
7803 0x82, 0x4c, 0x5f, 0xe4, 0x30, 0x1c, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00,
7804 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
7805};
7806const unsigned int BlitFromCube_metallib_len = 4206;
7807const unsigned char BlitFromCubeArray_metallib[] = {
7808 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
7809 0x00, 0x00, 0x00, 0x00, 0x93, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7810 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
7811 0x00, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7812 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x00, 0x00, 0x00,
7813 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7814 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x0f, 0x00, 0x00,
7815 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
7816 0x4e, 0x41, 0x4d, 0x45, 0x12, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
7817 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00,
7818 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20,
7819 0x00, 0x43, 0x4d, 0x7f, 0xad, 0x88, 0x10, 0x17, 0xfc, 0x98, 0x85, 0x7a,
7820 0x57, 0x13, 0x56, 0x0a, 0xd8, 0xb9, 0x6a, 0xff, 0x17, 0x43, 0x4b, 0xd9,
7821 0x4d, 0xf1, 0xad, 0xb9, 0xeb, 0x85, 0xd4, 0x52, 0x72, 0x4d, 0x44, 0x53,
7822 0x5a, 0x08, 0x00, 0xa0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f,
7823 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7824 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7825 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02,
7826 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04,
7827 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45,
7828 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14,
7829 0x00, 0x00, 0x00, 0x8c, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42,
7830 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62,
7831 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21,
7832 0x0c, 0x00, 0x00, 0xdb, 0x03, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02,
7833 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41,
7834 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25,
7835 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42,
7836 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a,
7837 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00,
7838 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41,
7839 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51,
7840 0x18, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff,
7841 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0,
7842 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc,
7843 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8,
7844 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87,
7845 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87,
7846 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83,
7847 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0,
7848 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8,
7849 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda,
7850 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde,
7851 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8,
7852 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08,
7853 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87,
7854 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87,
7855 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07,
7856 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4,
7857 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc,
7858 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2,
7859 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08,
7860 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03,
7861 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8,
7862 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6,
7863 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca,
7864 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda,
7865 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07,
7866 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07,
7867 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07,
7868 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8,
7869 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8,
7870 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea,
7871 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4,
7872 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07,
7873 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07,
7874 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0xe0,
7875 0x09, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8, 0x10, 0x0e, 0xe9, 0x20,
7876 0x0f, 0x6d, 0x20, 0x0e, 0xf5, 0x60, 0x0e, 0xe6, 0x50, 0x0e, 0xf2, 0xd0,
7877 0x06, 0xee, 0xf0, 0x0e, 0x6d, 0x10, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30,
7878 0x0f, 0xc0, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff,
7879 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5,
7880 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50,
7881 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36,
7882 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94,
7883 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24,
7884 0xa0, 0x02, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13,
7885 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01,
7886 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x2a,
7887 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93,
7888 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
7889 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x74, 0x33, 0x00, 0xc3,
7890 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34,
7891 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2,
7892 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4e, 0x9a, 0x22,
7893 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0x5f, 0xa0, 0x02,
7894 0xe2, 0x07, 0xa2, 0x08, 0xc0, 0xfe, 0x69, 0x8c, 0x00, 0x18, 0x44, 0x30,
7895 0x82, 0x8b, 0xa4, 0x29, 0xa2, 0x84, 0xc9, 0xff, 0x25, 0x80, 0x79, 0x16,
7896 0x22, 0xfa, 0xa7, 0x31, 0x02, 0x60, 0x10, 0x01, 0x11, 0x8a, 0x11, 0x44,
7897 0x28, 0x27, 0x91, 0x1a, 0x46, 0x18, 0x80, 0x39, 0x82, 0xa0, 0x20, 0xe1,
7898 0x24, 0x36, 0x1a, 0x18, 0xe4, 0x8a, 0x00, 0x06, 0xc1, 0x22, 0x0c, 0x40,
7899 0x72, 0x20, 0x20, 0x05, 0xc6, 0x1c, 0x01, 0x28, 0x0c, 0x22, 0x08, 0xc2,
7900 0x20, 0x02, 0x20, 0x4c, 0x01, 0x8c, 0x00, 0x0c, 0x23, 0x0c, 0xc3, 0x20,
7901 0xc2, 0x20, 0x00, 0x13, 0xac, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a,
7902 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x03, 0x7a,
7903 0xb0, 0x87, 0x77, 0x98, 0x87, 0x38, 0x88, 0x03, 0x37, 0x80, 0x03, 0x37,
7904 0x80, 0x83, 0x0d, 0xb7, 0x51, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x60, 0x07,
7905 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06,
7906 0xe9, 0x10, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e,
7907 0x78, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x10, 0x07,
7908 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xd0, 0x06,
7909 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
7910 0x72, 0xd0, 0x06, 0xe9, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
7911 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x30, 0x07, 0x72, 0xa0, 0x07,
7912 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07,
7913 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06,
7914 0xf6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07,
7915 0x76, 0xd0, 0x06, 0xf6, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x73, 0x20, 0x07,
7916 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x30, 0x07, 0x72, 0xa0, 0x07,
7917 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xf6, 0x40, 0x07,
7918 0x78, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06,
7919 0xf6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
7920 0x74, 0xd0, 0x06, 0xf6, 0x90, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x20, 0x07,
7921 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07,
7922 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07,
7923 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x90, 0x07, 0x72, 0xa0, 0x07,
7924 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06,
7925 0xf6, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07,
7926 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x75, 0x10, 0x07,
7927 0x72, 0xa0, 0x07, 0x75, 0x10, 0x07, 0x72, 0xa0, 0x07, 0x75, 0x10, 0x07,
7928 0x72, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07,
7929 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07,
7930 0x74, 0xd0, 0x06, 0xee, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07,
7931 0x73, 0x20, 0x07, 0x43, 0x1e, 0x05, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40,
7932 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x0e, 0x10, 0x00, 0x02, 0x00, 0x00,
7933 0x80, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x20, 0x20, 0x00, 0x06, 0x00,
7934 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x48, 0x40, 0x00, 0x0c,
7935 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa0, 0x11, 0xc2, 0x90, 0xd1,
7936 0xb6, 0x20, 0xd3, 0x17, 0x39, 0x0c, 0x47, 0x05, 0x84, 0x16, 0x45, 0x00,
7937 0x26, 0xb1, 0x41, 0xa0, 0xa8, 0xf1, 0x00, 0x00, 0x40, 0x16, 0x08, 0x0b,
7938 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c,
7939 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30,
7940 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x64, 0x47, 0x00,
7941 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xea, 0x58, 0x42, 0x24, 0x00, 0x00, 0xb1,
7942 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
7943 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
7944 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
7945 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
7946 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
7947 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d,
7948 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87,
7949 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87,
7950 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30,
7951 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde,
7952 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b,
7953 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c,
7954 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
7955 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87,
7956 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87,
7957 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87,
7958 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0,
7959 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc,
7960 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4,
7961 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39,
7962 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38,
7963 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
7964 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87,
7965 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87,
7966 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50,
7967 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50,
7968 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2,
7969 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea,
7970 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b,
7971 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87,
7972 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50,
7973 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde,
7974 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0,
7975 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d,
7976 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b,
7977 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87,
7978 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10,
7979 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2,
7980 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66,
7981 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38,
7982 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b,
7983 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07,
7984 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60,
7985 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20,
7986 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30,
7987 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30,
7988 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec,
7989 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8,
7990 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39,
7991 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07,
7992 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87,
7993 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30,
7994 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87,
7995 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87,
7996 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07,
7997 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xf3,
7998 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0xaa, 0x01, 0x19, 0xfc,
7999 0x13, 0x00, 0x00, 0x8b, 0xf2, 0x06, 0xc5, 0xc6, 0x91, 0x41, 0x14, 0x19,
8000 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25,
8001 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x80, 0x41, 0xb3, 0x1c,
8002 0x0d, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69,
8003 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65,
8004 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20,
8005 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32,
8006 0x33, 0x2e, 0x39, 0x38, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66,
8007 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x39, 0x38, 0x29, 0x4d,
8008 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
8009 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f,
8010 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63,
8011 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f,
8012 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61,
8013 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66,
8014 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66,
8015 0x65, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61,
8016 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61,
8017 0x72, 0x67, 0x65, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f,
8018 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f,
8019 0x61, 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d,
8020 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e,
8021 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44,
8022 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e,
8023 0x74, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70,
8024 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32,
8025 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
8026 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74,
8027 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65,
8028 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73,
8029 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69,
8030 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a,
8031 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
8032 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72,
8033 0x65, 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63,
8034 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55,
8035 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69,
8036 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74,
8037 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61,
8038 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74,
8039 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70,
8040 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
8041 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e,
8042 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
8043 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
8044 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78,
8045 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70,
8046 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62,
8047 0x65, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61,
8048 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f,
8049 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61,
8050 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61,
8051 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53,
8052 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x13, 0x84, 0x81, 0x98, 0x20,
8053 0x54, 0xd1, 0x04, 0x61, 0x28, 0x26, 0x08, 0x83, 0x31, 0x41, 0x18, 0x8e,
8054 0x09, 0xc2, 0x02, 0x4c, 0x10, 0x06, 0x64, 0x82, 0x30, 0x24, 0x13, 0x84,
8055 0x41, 0x99, 0x20, 0x0c, 0xcb, 0x04, 0x61, 0x60, 0x36, 0x0c, 0x6b, 0x10,
8056 0xb0, 0xc1, 0x86, 0xa1, 0x0d, 0x04, 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86,
8057 0x35, 0x78, 0x83, 0x37, 0xd8, 0x40, 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0,
8058 0x21, 0x28, 0x36, 0x04, 0xc6, 0x86, 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0,
8059 0x06, 0x89, 0xb2, 0x21, 0xf0, 0x83, 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3,
8060 0x24, 0x0f, 0x14, 0x6d, 0x40, 0xda, 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8,
8061 0x0d, 0xd4, 0x1b, 0xc8, 0xc1, 0x1b, 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b,
8062 0x3c, 0xdb, 0x1c, 0xb8, 0xc1, 0x1b, 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b,
8063 0x78, 0xdf, 0x06, 0x69, 0x0d, 0x2a, 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03,
8064 0x2c, 0x13, 0x05, 0x30, 0x88, 0x83, 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0,
8065 0x31, 0xd8, 0xa0, 0xd4, 0x01, 0x19, 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90,
8066 0x98, 0x01, 0x74, 0x06, 0x1b, 0x12, 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda,
8067 0x20, 0x49, 0x03, 0x48, 0x0d, 0x36, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40,
8068 0x0a, 0xa5, 0xb0, 0x61, 0x80, 0x83, 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26,
8069 0xa8, 0x11, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b,
8070 0x99, 0x8b, 0x19, 0x5b, 0xd8, 0xd9, 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0,
8071 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94,
8072 0xe0, 0x0e, 0xba, 0x84, 0xa5, 0xc9, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5,
8073 0xbd, 0xb9, 0x4d, 0x09, 0xf0, 0xa0, 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b,
8074 0x98, 0xdb, 0x59, 0x5d, 0xd8, 0x59, 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c,
8075 0xda, 0x9b, 0xdb, 0x94, 0x20, 0x0f, 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c,
8076 0xbd, 0xb5, 0xc1, 0xa5, 0xb1, 0x95, 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd,
8077 0xb9, 0xcd, 0x4d, 0x19, 0xf4, 0x60, 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a,
8078 0x9c, 0x8b, 0x99, 0x5c, 0xd8, 0x59, 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0,
8079 0x14, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b,
8080 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43,
8081 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c,
8082 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d,
8083 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7,
8084 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7,
8085 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60,
8086 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58,
8087 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3,
8088 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c,
8089 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c,
8090 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1,
8091 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00,
8092 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x13,
8093 0x04, 0x48, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x34,
8094 0x8a, 0xa1, 0x14, 0xa8, 0xd5, 0x00, 0xd9, 0x12, 0x28, 0x02, 0xda, 0x63,
8095 0x0d, 0x40, 0x20, 0x10, 0x98, 0x01, 0x18, 0x23, 0x00, 0x41, 0x10, 0x04,
8096 0x41, 0x61, 0x06, 0x60, 0x8c, 0x00, 0x04, 0x41, 0x10, 0xff, 0x85, 0x31,
8097 0x02, 0x10, 0x04, 0x41, 0xfc, 0x1b, 0x01, 0x18, 0x23, 0x00, 0x41, 0x10,
8098 0x04, 0xc1, 0x80, 0xc2, 0x1c, 0x44, 0x18, 0x74, 0xdd, 0x37, 0x07, 0x01,
8099 0x06, 0x5d, 0xf7, 0xcd, 0x41, 0x74, 0x61, 0xd0, 0x7d, 0x73, 0x10, 0x1d,
8100 0x18, 0x74, 0xdf, 0x1c, 0x44, 0xd7, 0x85, 0xc1, 0x37, 0x07, 0xd1, 0x75,
8101 0x60, 0xf0, 0xcd, 0x41, 0x88, 0x81, 0x18, 0x88, 0xc1, 0x37, 0x03, 0x00,
8102 0x00, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x22,
8103 0x47, 0xc8, 0x90, 0x51, 0x22, 0x08, 0x59, 0x00, 0x00, 0x00, 0x00, 0xcf,
8104 0x33, 0x06, 0x16, 0x86, 0x49, 0x03, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70,
8105 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69,
8106 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41,
8107 0x41, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73,
8108 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
8109 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x29,
8110 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63,
8111 0x6f, 0x70, 0x65, 0x2d, 0x61, 0x72, 0x67, 0x28, 0x32, 0x29, 0x61, 0x69,
8112 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
8113 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69,
8114 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70,
8115 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5f, 0x5a,
8116 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
8117 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x13, 0x04, 0xab, 0x99, 0x20,
8118 0x58, 0xce, 0x04, 0xc1, 0x7a, 0x26, 0x08, 0x16, 0xb4, 0x42, 0xa0, 0x05,
8119 0x55, 0x58, 0x31, 0xd4, 0x02, 0x2d, 0xac, 0xc2, 0x8a, 0xc1, 0x16, 0x68,
8120 0x81, 0x15, 0x56, 0x0c, 0xb7, 0x40, 0x0b, 0xad, 0xb0, 0x21, 0x48, 0x85,
8121 0x0d, 0x03, 0x2a, 0xe0, 0x02, 0x2c, 0x6c, 0x18, 0x72, 0x21, 0x17, 0x60,
8122 0x61, 0x43, 0x50, 0x0b, 0x1b, 0x84, 0x5b, 0xb0, 0x85, 0x0d, 0xc3, 0x2b,
8123 0xe4, 0x02, 0x2c, 0x6c, 0x18, 0xbc, 0x5c, 0x80, 0x85, 0x0d, 0x89, 0x2b,
8124 0xe4, 0x02, 0x2c, 0xe4, 0x42, 0x2c, 0xf4, 0x82, 0x2c, 0xf8, 0xc2, 0x2c,
8125 0x6c, 0x18, 0x7e, 0xc1, 0x17, 0x66, 0x61, 0xc3, 0xf0, 0x0b, 0xbd, 0x20,
8126 0x0b, 0x00, 0x00, 0x9b, 0x0c, 0xd8, 0x57, 0x06, 0x14, 0x08, 0xb2, 0xc9,
8127 0xa0, 0x85, 0x41, 0x1a, 0x50, 0x20, 0x88, 0x05, 0x9e, 0x7c, 0x2c, 0x20,
8128 0xe0, 0x33, 0x86, 0x10, 0x94, 0x81, 0x05, 0x90, 0x7c, 0x2c, 0xa0, 0xe0,
8129 0x33, 0x86, 0x40, 0x6c, 0x16, 0x4c, 0xf2, 0xb1, 0xe0, 0x82, 0xcf, 0x26,
8130 0x03, 0x19, 0xac, 0x01, 0x1b, 0x50, 0x00, 0xc6, 0x88, 0x41, 0x41, 0x84,
8131 0x20, 0x18, 0x48, 0x77, 0x10, 0x54, 0x40, 0x06, 0x35, 0xcc, 0x33, 0x04,
8132 0xc7, 0x11, 0x14, 0x02, 0x31, 0x30, 0x84, 0x51, 0x60, 0x86, 0x79, 0x45,
8133 0x7c, 0xe6, 0x18, 0xb2, 0x60, 0x0c, 0x0c, 0x0c, 0x94, 0xf8, 0xcc, 0x31,
8134 0x08, 0x01, 0x19, 0xcc, 0x12, 0x1c, 0x26, 0x06, 0x49, 0x7c, 0xe6, 0x18,
8135 0xb8, 0xe0, 0x0c, 0xe6, 0x18, 0x02, 0xe7, 0x0c, 0x66, 0x09, 0x8e, 0x39,
8136 0x86, 0xee, 0xb1, 0x03, 0x33, 0x83, 0x26, 0x3e, 0x73, 0x0c, 0x42, 0xa0,
8137 0x06, 0xb3, 0x04, 0xc7, 0x1c, 0xc3, 0x27, 0xe5, 0xc1, 0x1c, 0x43, 0x00,
8138 0xb1, 0xc1, 0x2c, 0xc1, 0x61, 0x6a, 0x10, 0xc5, 0x67, 0x8e, 0x21, 0x0c,
8139 0x2a, 0x3e, 0x98, 0x63, 0x08, 0x04, 0x38, 0x98, 0x25, 0x38, 0xac, 0x0d,
8140 0xae, 0xf8, 0x98, 0x1b, 0x54, 0xf1, 0x99, 0x63, 0x20, 0x03, 0x01, 0x14,
8141 0xe6, 0x18, 0x02, 0x81, 0x0e, 0x66, 0x09, 0x8e, 0x81, 0x9e, 0x40, 0x30,
8142 0x94, 0x02, 0x22, 0xa8, 0x41, 0x13, 0xc0, 0x20, 0x50, 0x05, 0x60, 0x90,
8143 0x21, 0x28, 0x03, 0x3a, 0xa8, 0x4b, 0x0f, 0x66, 0x93, 0xc1, 0x0f, 0x4a,
8144 0xc1, 0x15, 0x28, 0x18, 0x64, 0xc4, 0xc0, 0x20, 0x42, 0x10, 0x2c, 0x3e,
8145 0x48, 0x16, 0x82, 0x11, 0x03, 0xa6, 0x08, 0x41, 0xb0, 0xf8, 0x1c, 0x5a,
8146 0x00, 0x85, 0x3f, 0x28, 0x08, 0x3e, 0x08, 0x5c, 0x21, 0x83, 0x80, 0x18,
8147 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x5b, 0x8e, 0x20, 0xc8, 0x85,
8148 0x43, 0x17, 0x90, 0x5d, 0xd8, 0x72, 0x0c, 0x41, 0x2e, 0x1c, 0xba, 0x80,
8149 0xec, 0xc2, 0x96, 0xa3, 0x09, 0x7e, 0xe1, 0xd0, 0x05, 0x64, 0x17, 0xb6,
8150 0x1c, 0x6e, 0x10, 0x80, 0xc3, 0xa1, 0x0b, 0xc8, 0x2e, 0x6c, 0x29, 0xe0,
8151 0xe0, 0xd8, 0x05, 0x44, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71,
8152 0x20, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22, 0x64,
8153 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88, 0x90,
8154 0xa1, 0x09, 0x5c, 0x00, 0x12, 0xf9, 0x82, 0xd3, 0x54, 0x44, 0x34, 0xf9,
8155 0x85, 0x5f, 0xdc, 0xb6, 0x4f, 0xf9, 0xc8, 0x6d, 0xdb, 0xc0, 0x05, 0x20,
8156 0x91, 0x2f, 0x38, 0x4d, 0x45, 0x44, 0x93, 0x4f, 0xf9, 0xc8, 0x6d, 0xfb,
8157 0x85, 0x5f, 0xdc, 0xb6, 0x05, 0x8c, 0x01, 0x80, 0x44, 0xbe, 0x04, 0x30,
8158 0xcf, 0x42, 0xfc, 0x13, 0x71, 0x4d, 0x54, 0x44, 0xfc, 0x02, 0x15, 0x10,
8159 0x3f, 0x10, 0x45, 0x00, 0xe6, 0x57, 0x78, 0x71, 0xdb, 0x0a, 0x30, 0x69,
8160 0x10, 0x6d, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0x70, 0x54, 0x40, 0x68, 0x51,
8161 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00
8162};
8163const unsigned int BlitFromCubeArray_metallib_len = 4243;
8164#endif
8165#else
8166const unsigned char FullscreenVert_metallib[] = {
8167 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x80, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
8168 0x00, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8169 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
8170 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8171 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00,
8172 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8173 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x0a, 0x00, 0x00,
8174 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00,
8175 0x4e, 0x41, 0x4d, 0x45, 0x0f, 0x00, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63,
8176 0x72, 0x65, 0x65, 0x6e, 0x56, 0x65, 0x72, 0x74, 0x00, 0x54, 0x59, 0x50,
8177 0x45, 0x01, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x37, 0xd4,
8178 0x1f, 0xe6, 0x89, 0xfc, 0x94, 0x59, 0xb9, 0x99, 0x81, 0x9b, 0x8c, 0x84,
8179 0x1a, 0x28, 0x67, 0xe0, 0x48, 0x02, 0x65, 0x0e, 0x4c, 0x9e, 0xd1, 0xab,
8180 0xea, 0xae, 0xc6, 0x42, 0x1b, 0x09, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00,
8181 0x90, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54,
8182 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8183 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8184 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00,
8185 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00,
8186 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
8187 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
8188 0x70, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde,
8189 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24,
8190 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00,
8191 0x94, 0x02, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00,
8192 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49,
8193 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19,
8194 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42,
8195 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88,
8196 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42,
8197 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c,
8198 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00,
8199 0x6c, 0x00, 0x00, 0x00, 0x1b, 0x7a, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff,
8200 0x01, 0x90, 0x00, 0x8a, 0x08, 0x07, 0x78, 0x80, 0x07, 0x79, 0x78, 0x07,
8201 0x7c, 0x68, 0x03, 0x73, 0xa8, 0x07, 0x77, 0x18, 0x87, 0x36, 0x30, 0x07,
8202 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4,
8203 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xda, 0x21, 0x1d, 0xdc, 0xa1, 0x0d, 0xd8,
8204 0xa1, 0x1c, 0xce, 0x21, 0x1c, 0xd8, 0xa1, 0x0d, 0xec, 0xa1, 0x1c, 0xc6,
8205 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0xe0, 0x1e, 0xd2, 0x81, 0x1c, 0xe8,
8206 0x01, 0x1d, 0x00, 0x38, 0x00, 0x06, 0x77, 0x78, 0x87, 0x36, 0x10, 0x87,
8207 0x7a, 0x48, 0x07, 0x76, 0xa0, 0x87, 0x74, 0x70, 0x87, 0x79, 0x00, 0x08,
8208 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87,
8209 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87,
8210 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x00, 0xe8, 0x41, 0x1e, 0xea,
8211 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xcc, 0x41, 0x1e, 0xc2,
8212 0xa1, 0x1d, 0xca, 0xa1, 0x0d, 0xe0, 0xe1, 0x1d, 0xd2, 0xc1, 0x1d, 0xe8,
8213 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xca, 0x81, 0x1d, 0xd2, 0xa1, 0x1d, 0xda,
8214 0xc0, 0x1d, 0xde, 0xc1, 0x1d, 0xda, 0x80, 0x1d, 0xca, 0x21, 0x1c, 0xcc,
8215 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87,
8216 0x36, 0x48, 0x07, 0x77, 0x30, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87,
8217 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea,
8218 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xdc, 0x21, 0x1c, 0xdc,
8219 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8,
8220 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87,
8221 0x77, 0x68, 0x83, 0x79, 0x48, 0x87, 0x73, 0x70, 0x87, 0x72, 0x20, 0x87,
8222 0x36, 0xd0, 0x87, 0x72, 0x90, 0x87, 0x77, 0x98, 0x87, 0x36, 0x30, 0x07,
8223 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4,
8224 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x80, 0x1e, 0xe4,
8225 0x21, 0x1c, 0xe0, 0x01, 0x1e, 0xd2, 0xc1, 0x1d, 0xce, 0xa1, 0x0d, 0xda,
8226 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07,
8227 0x80, 0x98, 0x07, 0x7a, 0x08, 0x87, 0x71, 0x58, 0x87, 0x36, 0x80, 0x07,
8228 0x79, 0x78, 0x07, 0x7a, 0x28, 0x87, 0x71, 0xa0, 0x87, 0x77, 0x90, 0x87,
8229 0x36, 0x10, 0x87, 0x7a, 0x30, 0x07, 0x73, 0x28, 0x07, 0x79, 0x68, 0x83,
8230 0x79, 0x48, 0x07, 0x7d, 0x28, 0x07, 0x00, 0x0f, 0x00, 0xa2, 0x1e, 0xdc,
8231 0x61, 0x1e, 0xc2, 0xc1, 0x1c, 0xca, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda,
8232 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87,
8233 0x72, 0x00, 0x36, 0x18, 0xc2, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04,
8234 0x50, 0x1b, 0x8c, 0xe1, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0x28,
8235 0x00, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
8236 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00,
8237 0x89, 0x20, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09,
8238 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3,
8239 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c,
8240 0x10, 0x38, 0x33, 0x00, 0xc3, 0x08, 0x02, 0x30, 0x8c, 0x40, 0x00, 0x56,
8241 0x08, 0x99, 0x23, 0x00, 0x83, 0x22, 0x0c, 0x51, 0x15, 0x01, 0x88, 0x6e,
8242 0x20, 0x20, 0x05, 0x68, 0x8e, 0x00, 0x14, 0x86, 0x11, 0x08, 0x62, 0x04,
8243 0x00, 0x00, 0x00, 0x00, 0x13, 0xb2, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03,
8244 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x83,
8245 0x76, 0x08, 0x87, 0x71, 0x78, 0x87, 0x79, 0xc0, 0x87, 0x38, 0x80, 0x03,
8246 0x37, 0x88, 0x83, 0x39, 0x70, 0x03, 0x38, 0xd8, 0x70, 0x1b, 0xe5, 0xd0,
8247 0x06, 0xf0, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0,
8248 0x07, 0x76, 0x40, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0,
8249 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80,
8250 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0,
8251 0x07, 0x71, 0x60, 0x07, 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30,
8252 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40,
8253 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60,
8254 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20,
8255 0x07, 0x6d, 0x60, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0,
8256 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10,
8257 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40,
8258 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60,
8259 0x0f, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20,
8260 0x07, 0x6d, 0x60, 0x0f, 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0,
8261 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60,
8262 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60,
8263 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80,
8264 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20,
8265 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10,
8266 0x07, 0x79, 0x20, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20,
8267 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0,
8268 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0,
8269 0x06, 0xf6, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20,
8270 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00,
8271 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0,
8272 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0,
8273 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0x30, 0xe4, 0x29, 0x00,
8274 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x73,
8275 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x46,
8276 0x08, 0x43, 0x3a, 0x1f, 0xb5, 0x2c, 0x92, 0x10, 0x11, 0x44, 0xf3, 0x12,
8277 0xd1, 0x24, 0xb1, 0x41, 0xa0, 0xe8, 0xa2, 0x00, 0x00, 0x40, 0x16, 0x08,
8278 0x07, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x0c, 0x19, 0x11, 0x4c, 0x90,
8279 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2, 0x22, 0x28, 0x81, 0x42,
8280 0x18, 0x01, 0x20, 0x1d, 0x4b, 0x70, 0x04, 0x00, 0xb1, 0x18, 0x00, 0x00,
8281 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66,
8282 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07,
8283 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10,
8284 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce,
8285 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b,
8286 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c,
8287 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07,
8288 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11,
8289 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0,
8290 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8,
8291 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b,
8292 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b,
8293 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87,
8294 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07,
8295 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87,
8296 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81,
8297 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30,
8298 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4,
8299 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca,
8300 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39,
8301 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b,
8302 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b,
8303 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83,
8304 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87,
8305 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90,
8306 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20,
8307 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc,
8308 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66,
8309 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24,
8310 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07,
8311 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e,
8312 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e,
8313 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54,
8314 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39,
8315 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c,
8316 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07,
8317 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0,
8318 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4,
8319 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b,
8320 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39,
8321 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c,
8322 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87,
8323 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0,
8324 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50,
8325 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0,
8326 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec,
8327 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6,
8328 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66,
8329 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39,
8330 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07,
8331 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10,
8332 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90,
8333 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07,
8334 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07,
8335 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07,
8336 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
8337 0x22, 0x47, 0xc8, 0x90, 0x51, 0x4e, 0x90, 0x9a, 0x00, 0x00, 0x00, 0x00,
8338 0x8b, 0x12, 0x07, 0xc5, 0xc6, 0x95, 0x41, 0x44, 0x45, 0x06, 0x33, 0x30,
8339 0xc6, 0xd0, 0x10, 0x02, 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73,
8340 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a,
8341 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c,
8342 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30,
8343 0x32, 0x33, 0x2e, 0x31, 0x30, 0x31, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61,
8344 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x31, 0x30,
8345 0x31, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63,
8346 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72,
8347 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69,
8348 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61,
8349 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62,
8350 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c,
8351 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65,
8352 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x69, 0x73, 0x61,
8353 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65,
8354 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65,
8355 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76,
8356 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f,
8357 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f,
8358 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e,
8359 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f,
8360 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34,
8361 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x76, 0x65, 0x72, 0x74, 0x65,
8362 0x78, 0x5f, 0x69, 0x64, 0x75, 0x69, 0x6e, 0x74, 0x76, 0x49, 0x00, 0x00,
8363 0x13, 0x04, 0x42, 0x98, 0x20, 0x28, 0xc6, 0x04, 0x81, 0x18, 0x26, 0x08,
8364 0x04, 0x31, 0x41, 0x20, 0x8a, 0x09, 0x82, 0x01, 0x6c, 0x18, 0xa8, 0xa0,
8365 0xda, 0x30, 0x58, 0xc2, 0xb5, 0x21, 0x18, 0x36, 0x0c, 0x14, 0x86, 0x6d,
8366 0x20, 0x08, 0x0a, 0xc3, 0x36, 0x04, 0xc5, 0x86, 0xc0, 0xd8, 0x10, 0x1c,
8367 0x1b, 0x0c, 0x24, 0x51, 0x16, 0xa6, 0xd9, 0x50, 0x38, 0xca, 0xc3, 0x40,
8368 0x1b, 0x04, 0x31, 0x18, 0x83, 0x0d, 0x06, 0x16, 0x29, 0x12, 0x33, 0x6d,
8369 0x08, 0xca, 0x60, 0xc3, 0x90, 0x91, 0x81, 0x19, 0x68, 0x24, 0x30, 0x41,
8370 0x8d, 0xd8, 0xd8, 0xec, 0xda, 0x5c, 0xda, 0xde, 0xc8, 0xea, 0xd8, 0xca,
8371 0x5c, 0xcc, 0xd8, 0xc2, 0xce, 0xe6, 0xa6, 0x08, 0x99, 0x56, 0x85, 0x8d,
8372 0xcd, 0xae, 0xcd, 0x25, 0x8d, 0xac, 0xcc, 0x8d, 0x6e, 0x4a, 0xb0, 0x75,
8373 0x09, 0x4b, 0x93, 0x73, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x9b,
8374 0x12, 0x70, 0xa5, 0xc2, 0xd2, 0xe4, 0x5c, 0xd8, 0xc2, 0xdc, 0xce, 0xea,
8375 0xc2, 0xce, 0xca, 0xbe, 0xec, 0xca, 0xe4, 0xe6, 0xd2, 0xde, 0xdc, 0xa6,
8376 0x04, 0x5d, 0xa7, 0xb0, 0x34, 0x39, 0x97, 0xb1, 0xb7, 0x36, 0xb8, 0x34,
8377 0xb6, 0xb2, 0xaf, 0x37, 0x38, 0xba, 0xb4, 0x37, 0xb7, 0xb9, 0x29, 0x83,
8378 0xf7, 0x81, 0x41, 0x95, 0xb0, 0x34, 0x39, 0x17, 0xbb, 0x32, 0x39, 0xba,
8379 0x32, 0xbc, 0x29, 0x81, 0x19, 0x00, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00,
8380 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07,
8381 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39,
8382 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2,
8383 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16,
8384 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40,
8385 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07,
8386 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07,
8387 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b,
8388 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc,
8389 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8,
8390 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2,
8391 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50,
8392 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00,
8393 0x25, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00,
8394 0x12, 0x00, 0x00, 0x00, 0x44, 0x33, 0x00, 0xb4, 0x23, 0x00, 0x25, 0x40,
8395 0x3c, 0x07, 0x51, 0x0c, 0x08, 0x32, 0x16, 0x01, 0x04, 0xc6, 0x41, 0x30,
8396 0x03, 0x30, 0x02, 0x30, 0x46, 0x00, 0x82, 0x20, 0x88, 0x7f, 0x14, 0x33,
8397 0x00, 0x63, 0x09, 0x20, 0x08, 0x82, 0x20, 0x18, 0x80, 0x20, 0x08, 0x82,
8398 0xe0, 0x30, 0x96, 0x00, 0x82, 0x20, 0x88, 0xff, 0x02, 0x08, 0x82, 0x20,
8399 0xfe, 0xcd, 0x00, 0x90, 0xcc, 0x41, 0x34, 0x8d, 0xf3, 0xd0, 0xcc, 0x00,
8400 0x00, 0x00, 0x00, 0x00, 0xf5, 0x4c, 0x57, 0x41, 0xa5, 0x23, 0x06, 0xc6,
8401 0x10, 0x82, 0x60, 0xf1, 0x1d, 0x57, 0x30, 0xc7, 0x90, 0x04, 0x50, 0x4d,
8402 0x98, 0x8e, 0x18, 0x18, 0x43, 0x08, 0x82, 0xc5, 0x77, 0x68, 0xc1, 0x1c,
8403 0xc3, 0x10, 0x48, 0x16, 0x30, 0xf2, 0xb1, 0x80, 0x81, 0xcf, 0x20, 0x43,
8404 0xc0, 0x50, 0x83, 0x0c, 0x01, 0x43, 0xcd, 0x36, 0x30, 0x05, 0x30, 0xdb,
8405 0x10, 0x08, 0x41, 0x06, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00,
8406 0x0e, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22, 0x64, 0x82, 0xa4, 0x1c,
8407 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88, 0x90, 0xa1, 0x02, 0x90,
8408 0x13, 0x38, 0x1f, 0xb5, 0x2c, 0x92, 0x10, 0x11, 0x44, 0xf3, 0x12, 0xd1,
8409 0x64, 0x01, 0x17, 0x80, 0x44, 0xbe, 0xe0, 0x34, 0x15, 0x11, 0x4d, 0x7e,
8410 0xe1, 0x17, 0xb7, 0xed, 0x53, 0x3e, 0x72, 0xdb, 0x00, 0x00, 0x00, 0x00,
8411 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8412 0x00, 0x00, 0x00, 0x00
8413};
8414const unsigned int FullscreenVert_metallib_len = 2944;
8415const unsigned char BlitFrom2D_metallib[] = {
8416 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x80, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
8417 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8418 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
8419 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8420 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
8421 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8422 0xec, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0d, 0x00, 0x00,
8423 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
8424 0x4e, 0x41, 0x4d, 0x45, 0x0b, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
8425 0x6f, 0x6d, 0x32, 0x44, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01,
8426 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x20, 0xe6, 0xdd, 0xa8, 0x7c, 0x71,
8427 0x9d, 0xaa, 0xc4, 0x75, 0xe1, 0x5c, 0xa0, 0xa3, 0x82, 0x38, 0x7c, 0x5c,
8428 0x22, 0x50, 0xa8, 0x73, 0x1d, 0x57, 0x95, 0xd7, 0x97, 0x5a, 0xc6, 0x61,
8429 0x95, 0xd6, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0xe0, 0x0d, 0x00, 0x00,
8430 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00,
8431 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8432 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45,
8433 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
8434 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
8435 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b,
8436 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xc8, 0x0d, 0x00, 0x00,
8437 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00,
8438 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8,
8439 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0x6a, 0x03, 0x00, 0x00,
8440 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
8441 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
8442 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62,
8443 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14,
8444 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20,
8445 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
8446 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a,
8447 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
8448 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40,
8449 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1,
8450 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1,
8451 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a,
8452 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72,
8453 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a,
8454 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74,
8455 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40,
8456 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01,
8457 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1,
8458 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41,
8459 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79,
8460 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79,
8461 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77,
8462 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76,
8463 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70,
8464 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1,
8465 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01,
8466 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79,
8467 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70,
8468 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70,
8469 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2,
8470 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81,
8471 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0,
8472 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a,
8473 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a,
8474 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36,
8475 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1,
8476 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00,
8477 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41,
8478 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1,
8479 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a,
8480 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78,
8481 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1,
8482 0x1e, 0xca, 0x01, 0xd8, 0x90, 0x08, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06,
8483 0xd8, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff,
8484 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1,
8485 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d,
8486 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18,
8487 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4,
8488 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0,
8489 0x02, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
8490 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09,
8491 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00,
8492 0x26, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04,
8493 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14,
8494 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x60, 0x33, 0x00,
8495 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93,
8496 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06,
8497 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4a, 0x9a,
8498 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0xdf, 0x1e,
8499 0xfe, 0x69, 0x8c, 0x00, 0x18, 0x44, 0x30, 0x82, 0x8b, 0xa4, 0x29, 0xa2,
8500 0x84, 0xc9, 0xff, 0x25, 0x80, 0x79, 0x16, 0x22, 0xfa, 0xa7, 0x31, 0x02,
8501 0x60, 0x10, 0x01, 0x11, 0x8a, 0x11, 0x44, 0x28, 0x27, 0x91, 0x9a, 0x23,
8502 0x08, 0x86, 0x11, 0x84, 0xa1, 0x24, 0xe1, 0x24, 0xc1, 0x1a, 0x03, 0x83,
8503 0x5c, 0x11, 0xc0, 0x20, 0x38, 0x10, 0x90, 0x02, 0x63, 0x8e, 0x00, 0x14,
8504 0x06, 0x11, 0x04, 0x61, 0x10, 0x61, 0x10, 0x46, 0x00, 0x00, 0x00, 0x00,
8505 0x13, 0xb2, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70,
8506 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x83, 0x76, 0x08, 0x87, 0x71,
8507 0x78, 0x87, 0x79, 0xc0, 0x87, 0x38, 0x80, 0x03, 0x37, 0x88, 0x83, 0x39,
8508 0x70, 0x03, 0x38, 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0, 0xa0, 0x07,
8509 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
8510 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06,
8511 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e,
8512 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07,
8513 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07,
8514 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07,
8515 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07,
8516 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e,
8517 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
8518 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07,
8519 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a, 0x30, 0x07,
8520 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73, 0x20, 0x07,
8521 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f,
8522 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07,
8523 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07,
8524 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a, 0x10, 0x07,
8525 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f,
8526 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07,
8527 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79, 0x20, 0x07,
8528 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07,
8529 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07,
8530 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x50, 0x07,
8531 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07,
8532 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07,
8533 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07,
8534 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07,
8535 0x7a, 0x30, 0x07, 0x72, 0x30, 0xe4, 0x51, 0x00, 0x00, 0x08, 0x00, 0x00,
8536 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0xc8, 0xe3, 0x00, 0x01, 0x20, 0x00,
8537 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x07, 0x02, 0x02, 0x60,
8538 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x10, 0x86, 0x54,
8539 0xb6, 0x05, 0x99, 0xbe, 0xc8, 0x61, 0xec, 0x4e, 0x62, 0x83, 0x40, 0xd1,
8540 0xae, 0x01, 0x00, 0x80, 0x2c, 0x10, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
8541 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47,
8542 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30,
8543 0x05, 0x51, 0x20, 0x85, 0x52, 0x06, 0x44, 0x47, 0x00, 0x0a, 0xa2, 0x40,
8544 0x0a, 0x85, 0xe6, 0x58, 0x82, 0x23, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00,
8545 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66,
8546 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07,
8547 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10,
8548 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce,
8549 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b,
8550 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c,
8551 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07,
8552 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11,
8553 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0,
8554 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8,
8555 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b,
8556 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b,
8557 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87,
8558 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07,
8559 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87,
8560 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81,
8561 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30,
8562 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4,
8563 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca,
8564 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39,
8565 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b,
8566 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b,
8567 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83,
8568 0x74, 0x68, 0x07, 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87,
8569 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90,
8570 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20,
8571 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc,
8572 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66,
8573 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24,
8574 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07,
8575 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e,
8576 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e,
8577 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54,
8578 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39,
8579 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c,
8580 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07,
8581 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0,
8582 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4,
8583 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b,
8584 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39,
8585 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c,
8586 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87,
8587 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0,
8588 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50,
8589 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0,
8590 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec,
8591 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6,
8592 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66,
8593 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39,
8594 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07,
8595 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10,
8596 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90,
8597 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07,
8598 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07,
8599 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07,
8600 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xf2, 0x00, 0x00, 0x00,
8601 0x22, 0x47, 0xc8, 0x90, 0x51, 0xaa, 0x01, 0x19, 0xe8, 0x13, 0x00, 0x00,
8602 0x8b, 0x12, 0x07, 0xc5, 0xc6, 0x95, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c,
8603 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14,
8604 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x60, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00,
8605 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77,
8606 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70,
8607 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72,
8608 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x31,
8609 0x30, 0x31, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d,
8610 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x31, 0x30, 0x31, 0x29, 0x4d, 0x65,
8611 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69,
8612 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64,
8613 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f,
8614 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d,
8615 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69,
8616 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72,
8617 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65,
8618 0x74, 0x63, 0x68, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61,
8619 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61,
8620 0x72, 0x67, 0x65, 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f,
8621 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f,
8622 0x61, 0x74, 0x34, 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d,
8623 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e,
8624 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44,
8625 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e,
8626 0x74, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70,
8627 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32,
8628 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
8629 0x74, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74,
8630 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65,
8631 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73,
8632 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69,
8633 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a,
8634 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
8635 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72,
8636 0x65, 0x61, 0x64, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63,
8637 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55,
8638 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69,
8639 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74,
8640 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61,
8641 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74,
8642 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70,
8643 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
8644 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e,
8645 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
8646 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
8647 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78,
8648 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70,
8649 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c,
8650 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c,
8651 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74,
8652 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c,
8653 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75,
8654 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00,
8655 0x13, 0x84, 0x61, 0x98, 0x20, 0x4c, 0xd0, 0x04, 0x61, 0x20, 0x26, 0x08,
8656 0x43, 0x31, 0x41, 0x18, 0x8c, 0x09, 0xc2, 0x02, 0x4c, 0x10, 0x86, 0x63,
8657 0x82, 0x30, 0x20, 0x13, 0x84, 0x21, 0x99, 0x20, 0x0c, 0xca, 0x04, 0x61,
8658 0x58, 0x36, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x86, 0xa1, 0x0d, 0x04, 0x37,
8659 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35, 0x78, 0x83, 0x37, 0xd8, 0x40, 0x10,
8660 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21, 0x28, 0x36, 0x04, 0xc6, 0x86, 0xe0,
8661 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0xb2, 0x21, 0xf0, 0x83, 0x0d,
8662 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24, 0x0f, 0x14, 0x6d, 0x40, 0xda, 0x40,
8663 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d, 0xd4, 0x1b, 0xc8, 0xc1, 0x1b, 0x3c,
8664 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c, 0xdb, 0x1c, 0xb8, 0xc1, 0x1b, 0x70,
8665 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78, 0xdf, 0x06, 0x69, 0x0d, 0x2a, 0x2b,
8666 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c, 0x13, 0x05, 0x30, 0x88, 0x83, 0x30,
8667 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31, 0xd8, 0xa0, 0xd4, 0x01, 0x19, 0x5c,
8668 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98, 0x01, 0x74, 0x06, 0x1b, 0x12, 0x37,
8669 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20, 0x49, 0x03, 0x48, 0x0d, 0x36, 0x14,
8670 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0xb0, 0x61, 0x80, 0x83, 0x3f,
8671 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8, 0x11, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b,
8672 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99, 0x8b, 0x19, 0x5b, 0xd8, 0xd9, 0xdc,
8673 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0x1a,
8674 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0, 0x0e, 0xba, 0x84, 0xa5, 0xc9, 0xb9,
8675 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0xf0, 0xa0, 0x54,
8676 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98, 0xdb, 0x59, 0x5d, 0xd8, 0x59, 0xd9,
8677 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x20, 0x0f, 0x3a,
8678 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd, 0xb5, 0xc1, 0xa5, 0xb1, 0x95, 0x7d,
8679 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x19, 0xf4, 0x60, 0x0f,
8680 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c, 0x8b, 0x99, 0x5c, 0xd8, 0x59, 0x5b,
8681 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00,
8682 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07,
8683 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39,
8684 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2,
8685 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16,
8686 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40,
8687 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07,
8688 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07,
8689 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b,
8690 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc,
8691 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8,
8692 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2,
8693 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50,
8694 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00,
8695 0x57, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00,
8696 0x02, 0x00, 0x00, 0x00, 0xc4, 0x6a, 0x80, 0xda, 0x08, 0x00, 0x00, 0x00,
8697 0xf1, 0x30, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90,
8698 0x51, 0x1e, 0xc8, 0x49, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x23, 0x0d, 0x1c,
8699 0x86, 0x01, 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65,
8700 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c,
8701 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x5f, 0x5a,
8702 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
8703 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x72, 0x2d, 0x61,
8704 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28,
8705 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x32, 0x44, 0x29, 0x61,
8706 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f,
8707 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61,
8708 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f,
8709 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x00,
8710 0x13, 0x04, 0x8a, 0x99, 0x20, 0x50, 0xcd, 0x04, 0x81, 0x72, 0x26, 0x08,
8711 0xd4, 0xb3, 0x42, 0x98, 0x05, 0x56, 0x58, 0x31, 0xd0, 0xc2, 0x2c, 0xb4,
8712 0xc2, 0x8a, 0xa1, 0x16, 0x66, 0xc1, 0x15, 0x36, 0x04, 0xa9, 0xb0, 0x61,
8713 0x40, 0x05, 0x5b, 0x78, 0x85, 0x0d, 0xc3, 0x2d, 0xdc, 0xc2, 0x2b, 0x6c,
8714 0x18, 0x56, 0xe1, 0x16, 0x5e, 0x61, 0xc3, 0xe0, 0xdd, 0xc2, 0x2b, 0x6c,
8715 0x48, 0x54, 0xe1, 0x16, 0x5e, 0xe1, 0x16, 0x60, 0x21, 0x17, 0x62, 0x41,
8716 0x17, 0x64, 0x61, 0xc3, 0xb0, 0x0b, 0xb9, 0x10, 0x0b, 0x1b, 0x84, 0x5a,
8717 0xa0, 0x05, 0x00, 0x00, 0x9b, 0x0c, 0x05, 0x23, 0x51, 0x20, 0xc8, 0x26,
8718 0xc3, 0xe1, 0x58, 0x14, 0x08, 0x62, 0xc1, 0x22, 0x1f, 0x0b, 0x08, 0xf8,
8719 0x6c, 0x32, 0x2c, 0xd2, 0x46, 0xc1, 0x20, 0x23, 0x06, 0x06, 0x11, 0x82,
8720 0x60, 0xf1, 0x41, 0x5e, 0x30, 0x62, 0xd0, 0x14, 0x21, 0x08, 0x16, 0x9f,
8721 0x03, 0x06, 0x0d, 0x43, 0x2c, 0xca, 0x12, 0x6c, 0x19, 0x04, 0xc4, 0x00,
8722 0x05, 0x00, 0x00, 0x00, 0x5b, 0x86, 0x20, 0xb8, 0x85, 0x2d, 0xc3, 0x10,
8723 0xdc, 0xc2, 0x96, 0xe1, 0x08, 0x76, 0x61, 0xcb, 0x90, 0x1c, 0xbc, 0x00,
8724 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
8725 0x52, 0x0e, 0x10, 0x22, 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4,
8726 0x48, 0x39, 0x40, 0x88, 0x90, 0xa1, 0x05, 0x6c, 0x00, 0x12, 0xf9, 0x12,
8727 0xc0, 0x3c, 0x0b, 0xf1, 0x4f, 0xc4, 0x35, 0x51, 0x11, 0xf1, 0xdb, 0x83,
8728 0x5f, 0xe1, 0xc5, 0x6d, 0x2b, 0x00, 0xa1, 0x81, 0xb2, 0x2d, 0xc8, 0xf4,
8729 0x45, 0x0e, 0x63, 0x77, 0x26, 0x70, 0x01, 0x48, 0xe4, 0x0b, 0x4e, 0x53,
8730 0x11, 0xd1, 0xe4, 0x17, 0x7e, 0x71, 0xdb, 0x3e, 0xe5, 0x23, 0xb7, 0x0d,
8731 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
8732};
8733const unsigned int BlitFrom2D_metallib_len = 3788;
8734const unsigned char BlitFrom2DArray_metallib[] = {
8735 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x80, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
8736 0x00, 0x00, 0x00, 0x00, 0x41, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8737 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
8738 0x00, 0x00, 0x00, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8739 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x00, 0x00, 0x00,
8740 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8741 0xf1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x0e, 0x00, 0x00,
8742 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
8743 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
8744 0x6f, 0x6d, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00, 0x54, 0x59,
8745 0x50, 0x45, 0x01, 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0x37,
8746 0xd7, 0xac, 0xd8, 0xd6, 0xf6, 0x6d, 0xe9, 0xe5, 0xe2, 0x23, 0xa4, 0xc2,
8747 0x4b, 0x1d, 0x6c, 0xed, 0x69, 0x2b, 0xa7, 0xbe, 0x9e, 0xb7, 0x4a, 0x6e,
8748 0x37, 0xca, 0x53, 0xcb, 0x11, 0xb3, 0xea, 0x4d, 0x44, 0x53, 0x5a, 0x08,
8749 0x00, 0x50, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46,
8750 0x54, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8751 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
8752 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00,
8753 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00,
8754 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44,
8755 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00,
8756 0x00, 0x30, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0,
8757 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30,
8758 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00,
8759 0x00, 0x84, 0x03, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00,
8760 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04,
8761 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08,
8762 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b,
8763 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52,
8764 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32,
8765 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81,
8766 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00,
8767 0x00, 0x7c, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff,
8768 0xff, 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e,
8769 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c,
8770 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d,
8771 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70,
8772 0x87, 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0,
8773 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48,
8774 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18,
8775 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e,
8776 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c,
8777 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d,
8778 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d,
8779 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78,
8780 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80,
8781 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28,
8782 0x07, 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68,
8783 0x03, 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e,
8784 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c,
8785 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e,
8786 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78,
8787 0x87, 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80,
8788 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e,
8789 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d,
8790 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e,
8791 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c,
8792 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70,
8793 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48,
8794 0x07, 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00,
8795 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c,
8796 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c,
8797 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c,
8798 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c,
8799 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28,
8800 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40,
8801 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0x90, 0x08, 0x03,
8802 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8,
8803 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b,
8804 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86,
8805 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f,
8806 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80,
8807 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d,
8808 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00,
8809 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44,
8810 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00,
8811 0x00, 0x89, 0x20, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48,
8812 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22,
8813 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4,
8814 0x4c, 0x10, 0x6c, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00,
8815 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43,
8816 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41,
8817 0x04, 0x42, 0x38, 0x4d, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae,
8818 0x89, 0x8a, 0x88, 0xdf, 0x1e, 0x7e, 0x20, 0x8a, 0x00, 0xec, 0x9f, 0xc6,
8819 0x08, 0x80, 0x41, 0x04, 0x23, 0xb8, 0x48, 0x9a, 0x22, 0x4a, 0x98, 0xfc,
8820 0x5f, 0x02, 0x98, 0x67, 0x21, 0xa2, 0x7f, 0x1a, 0x23, 0x00, 0x06, 0x11,
8821 0x10, 0xa1, 0x18, 0x41, 0x84, 0x72, 0x12, 0xa9, 0x39, 0x82, 0x60, 0x18,
8822 0x41, 0x18, 0x8a, 0x12, 0x4e, 0x12, 0x83, 0x35, 0x06, 0x06, 0xb9, 0x22,
8823 0x80, 0x41, 0xb0, 0x08, 0x03, 0x90, 0x1c, 0x08, 0x48, 0x81, 0x31, 0x47,
8824 0x00, 0x0a, 0x83, 0x08, 0x82, 0x30, 0x88, 0x00, 0x08, 0x83, 0x08, 0x83,
8825 0x30, 0x02, 0x00, 0x00, 0x00, 0x13, 0xb2, 0x70, 0x48, 0x07, 0x79, 0xb0,
8826 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68,
8827 0x83, 0x76, 0x08, 0x87, 0x71, 0x78, 0x87, 0x79, 0xc0, 0x87, 0x38, 0x80,
8828 0x03, 0x37, 0x88, 0x83, 0x39, 0x70, 0x03, 0x38, 0xd8, 0x70, 0x1b, 0xe5,
8829 0xd0, 0x06, 0xf0, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74,
8830 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78,
8831 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a,
8832 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76,
8833 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a,
8834 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76,
8835 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d,
8836 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
8837 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74,
8838 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a,
8839 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72,
8840 0x40, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
8841 0x60, 0x0f, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
8842 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74,
8843 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a,
8844 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79,
8845 0x60, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72,
8846 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71,
8847 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6,
8848 0x10, 0x07, 0x79, 0x20, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a,
8849 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76,
8850 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76,
8851 0xd0, 0x06, 0xf6, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71,
8852 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71,
8853 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74,
8854 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78,
8855 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0x30, 0xe4, 0x51,
8856 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0xc8,
8857 0xe3, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xc0,
8858 0x90, 0x07, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
8859 0x80, 0x21, 0x8f, 0x04, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
8860 0x00, 0x00, 0x1a, 0x21, 0x0c, 0xf9, 0x6c, 0x0b, 0x32, 0x7d, 0x91, 0xc3,
8861 0xd8, 0x9d, 0x16, 0x45, 0x00, 0x26, 0xb1, 0x41, 0xa0, 0xe8, 0xdb, 0x00,
8862 0x00, 0x40, 0x16, 0x08, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98,
8863 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43,
8864 0x1a, 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20,
8865 0x85, 0x52, 0x06, 0x64, 0x47, 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xea,
8866 0x58, 0x82, 0x23, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00,
8867 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d,
8868 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07,
8869 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80,
8870 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66,
8871 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d,
8872 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07,
8873 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03,
8874 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90,
8875 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50,
8876 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2,
8877 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39,
8878 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14,
8879 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07,
8880 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07,
8881 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87,
8882 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0,
8883 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8,
8884 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc,
8885 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6,
8886 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39,
8887 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f,
8888 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c,
8889 0xc7, 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07,
8890 0x78, 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53,
8891 0x0f, 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40,
8892 0x0f, 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc,
8893 0xc1, 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc,
8894 0xe0, 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38,
8895 0xb0, 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07,
8896 0x7b, 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51,
8897 0x4c, 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca,
8898 0x61, 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4,
8899 0xa1, 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38,
8900 0xcc, 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c,
8901 0xe4, 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87,
8902 0x79, 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07,
8903 0x72, 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50,
8904 0x0e, 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8,
8905 0xe1, 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d,
8906 0xb4, 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c,
8907 0xb8, 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4,
8908 0x71, 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87,
8909 0x19, 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20,
8910 0x0f, 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10,
8911 0x0e, 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0,
8912 0x0e, 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2,
8913 0x81, 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4,
8914 0x21, 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b,
8915 0xbc, 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc,
8916 0x70, 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87,
8917 0x77, 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10,
8918 0x0e, 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50,
8919 0x0e, 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87,
8920 0x7a, 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85,
8921 0x73, 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00,
8922 0x00, 0x79, 0x18, 0x00, 0x00, 0xf3, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8,
8923 0x90, 0x51, 0xaa, 0x01, 0x19, 0x80, 0x14, 0x00, 0x00, 0x8b, 0x12, 0x07,
8924 0xc5, 0xc6, 0x95, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30,
8925 0xd2, 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31,
8926 0xcc, 0xa2, 0x78, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b,
8927 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61,
8928 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20,
8929 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
8930 0x6e, 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x31, 0x30, 0x31, 0x20,
8931 0x28, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30,
8932 0x32, 0x33, 0x2e, 0x31, 0x30, 0x31, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c,
8933 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
8934 0x64, 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61,
8935 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69,
8936 0x6c, 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68,
8937 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63,
8938 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65,
8939 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68,
8940 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e,
8941 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65,
8942 0x74, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70,
8943 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34,
8944 0x61, 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74,
8945 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
8946 0x74, 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f,
8947 0x66, 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
8948 0x61, 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74,
8949 0x69, 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72,
8950 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78,
8951 0x61, 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
8952 0x61, 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70,
8953 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72,
8954 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62,
8955 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69,
8956 0x72, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
8957 0x6e, 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64,
8958 0x61, 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74,
8959 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65,
8960 0x66, 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e,
8961 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70,
8962 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61,
8963 0x79, 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69,
8964 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73,
8965 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74,
8966 0x79, 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69,
8967 0x7a, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
8968 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
8969 0x6f, 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72,
8970 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74,
8971 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x5f, 0x61, 0x72, 0x72,
8972 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61,
8973 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
8974 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61,
8975 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72,
8976 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65,
8977 0x72, 0x13, 0x84, 0x81, 0x98, 0x20, 0x54, 0xd1, 0x04, 0x61, 0x28, 0x26,
8978 0x08, 0x83, 0x31, 0x41, 0x18, 0x8e, 0x09, 0xc2, 0x02, 0x4c, 0x10, 0x06,
8979 0x64, 0x82, 0x30, 0x24, 0x13, 0x84, 0x41, 0x99, 0x20, 0x0c, 0xcb, 0x04,
8980 0x61, 0x60, 0x36, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x86, 0xa1, 0x0d, 0x04,
8981 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35, 0x78, 0x83, 0x37, 0xd8, 0x40,
8982 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21, 0x28, 0x36, 0x04, 0xc6, 0x86,
8983 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0xb2, 0x21, 0xf0, 0x83,
8984 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24, 0x0f, 0x14, 0x6d, 0x40, 0xda,
8985 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d, 0xd4, 0x1b, 0xc8, 0xc1, 0x1b,
8986 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c, 0xdb, 0x1c, 0xb8, 0xc1, 0x1b,
8987 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78, 0xdf, 0x06, 0x69, 0x0d, 0x2a,
8988 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c, 0x13, 0x05, 0x30, 0x88, 0x83,
8989 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31, 0xd8, 0xa0, 0xd4, 0x01, 0x19,
8990 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98, 0x01, 0x74, 0x06, 0x1b, 0x12,
8991 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20, 0x49, 0x03, 0x48, 0x0d, 0x36,
8992 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0xb0, 0x61, 0x80, 0x83,
8993 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8, 0x11, 0x1b, 0x9b, 0x5d, 0x9b,
8994 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99, 0x8b, 0x19, 0x5b, 0xd8, 0xd9,
8995 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b,
8996 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0, 0x0e, 0xba, 0x84, 0xa5, 0xc9,
8997 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0xf0, 0xa0,
8998 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98, 0xdb, 0x59, 0x5d, 0xd8, 0x59,
8999 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x20, 0x0f,
9000 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd, 0xb5, 0xc1, 0xa5, 0xb1, 0x95,
9001 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x19, 0xf4, 0x60,
9002 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c, 0x8b, 0x99, 0x5c, 0xd8, 0x59,
9003 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14, 0x00, 0x00, 0xa9, 0x18, 0x00,
9004 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80,
9005 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43,
9006 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e,
9007 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d,
9008 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4,
9009 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81,
9010 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08,
9011 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01,
9012 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c,
9013 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c,
9014 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c,
9015 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1,
9016 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00,
9017 0x00, 0x61, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00,
9018 0x00, 0x02, 0x00, 0x00, 0x00, 0xc4, 0x6a, 0x80, 0xda, 0x08, 0x00, 0x00,
9019 0x00, 0xf1, 0x30, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8,
9020 0x90, 0x51, 0x1e, 0x08, 0x4b, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x23, 0x0d,
9021 0x61, 0x80, 0x61, 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74,
9022 0x65, 0x6e, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70,
9023 0x6c, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x5f,
9024 0x5a, 0x54, 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
9025 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x72, 0x2d,
9026 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73,
9027 0x28, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x32, 0x44, 0x41,
9028 0x72, 0x72, 0x61, 0x79, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69,
9029 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d,
9030 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69,
9031 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78,
9032 0x74, 0x75, 0x72, 0x65, 0x73, 0x13, 0x04, 0xab, 0x99, 0x20, 0x58, 0xce,
9033 0x04, 0xc1, 0x7a, 0x26, 0x08, 0x16, 0xb4, 0x42, 0x98, 0x05, 0x56, 0x58,
9034 0x31, 0xd0, 0xc2, 0x2c, 0xb4, 0xc2, 0x8a, 0xa1, 0x16, 0x66, 0xc1, 0x15,
9035 0x36, 0x04, 0xa9, 0xb0, 0x61, 0x40, 0x05, 0x5b, 0x78, 0x85, 0x0d, 0xc3,
9036 0x2d, 0xdc, 0xc2, 0x2b, 0x6c, 0x18, 0x56, 0xe1, 0x16, 0x5e, 0x61, 0xc3,
9037 0xe0, 0xdd, 0xc2, 0x2b, 0x6c, 0x48, 0x54, 0xe1, 0x16, 0x5e, 0xe1, 0x16,
9038 0x60, 0x21, 0x17, 0x62, 0x41, 0x17, 0x64, 0x61, 0xc3, 0xb0, 0x0b, 0xba,
9039 0x20, 0x0b, 0x1b, 0x86, 0x5d, 0xc8, 0x85, 0x58, 0xd8, 0x20, 0xd4, 0x02,
9040 0x2d, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x0c, 0x05, 0x23, 0x51, 0x20, 0xc8,
9041 0x26, 0xc3, 0xe1, 0x58, 0x14, 0x08, 0x62, 0xc1, 0x22, 0x1f, 0x0b, 0x08,
9042 0xf8, 0x6c, 0x32, 0x2c, 0xd2, 0x44, 0x01, 0x18, 0x23, 0x06, 0x05, 0x11,
9043 0x82, 0x60, 0x20, 0x79, 0xc1, 0x26, 0x83, 0x53, 0x79, 0x14, 0x0c, 0x32,
9044 0x62, 0x60, 0x10, 0x21, 0x08, 0x16, 0x1f, 0x24, 0x06, 0xc1, 0x88, 0x81,
9045 0x53, 0x84, 0x20, 0x58, 0x7c, 0x0e, 0x19, 0x40, 0xcf, 0x41, 0x38, 0x8d,
9046 0x13, 0x78, 0x19, 0x04, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
9047 0x00, 0x5b, 0x86, 0x20, 0xb8, 0x85, 0x2d, 0xc3, 0x10, 0xdc, 0xc2, 0x96,
9048 0xe1, 0x08, 0x76, 0x61, 0xcb, 0xa0, 0x04, 0xbc, 0xb0, 0x65, 0x60, 0x8e,
9049 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00,
9050 0x00, 0x1a, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22, 0x64, 0x82, 0xa4,
9051 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88, 0x90, 0xa1, 0x05,
9052 0x84, 0x01, 0x80, 0x44, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xfc, 0x13, 0x71,
9053 0x4d, 0x54, 0x44, 0xfc, 0xf6, 0xf0, 0x03, 0x51, 0x04, 0x60, 0x7e, 0x85,
9054 0x17, 0xb7, 0xad, 0x00, 0x8c, 0x06, 0xcf, 0xb6, 0x20, 0xd3, 0x17, 0x39,
9055 0x8c, 0xdd, 0x69, 0x51, 0x04, 0x60, 0x26, 0x70, 0x01, 0x48, 0xe4, 0x0b,
9056 0x4e, 0x53, 0x11, 0xd1, 0xe4, 0x17, 0x7e, 0x71, 0xdb, 0x3e, 0xe5, 0x23,
9057 0xb7, 0x6d, 0x03, 0x17, 0x80, 0x44, 0xbe, 0xe0, 0x34, 0x15, 0x11, 0x4d,
9058 0x3e, 0xe5, 0x23, 0xb7, 0xed, 0x17, 0x7e, 0x71, 0xdb, 0x00, 0x00, 0x00,
9059 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9060 0x00, 0x00, 0x00, 0x00, 0x00
9061};
9062const unsigned int BlitFrom2DArray_metallib_len = 3905;
9063const unsigned char BlitFrom3D_metallib[] = {
9064 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x80, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
9065 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9066 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
9067 0x00, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9068 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00,
9069 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9070 0xec, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0e, 0x00, 0x00,
9071 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
9072 0x4e, 0x41, 0x4d, 0x45, 0x0b, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
9073 0x6f, 0x6d, 0x33, 0x44, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01,
9074 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0xff, 0xb6, 0x0d, 0x2b, 0xd9, 0x43,
9075 0xbc, 0xc0, 0x99, 0x9c, 0x7b, 0x59, 0x2d, 0x9c, 0x3a, 0x83, 0x36, 0xa5,
9076 0xb2, 0x51, 0x05, 0x3c, 0x92, 0x46, 0xa7, 0x42, 0xdc, 0x1e, 0x9e, 0xd6,
9077 0x57, 0x78, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x20, 0x0e, 0x00, 0x00,
9078 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00,
9079 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9080 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45,
9081 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
9082 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54,
9083 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b,
9084 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00,
9085 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00,
9086 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8,
9087 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0x78, 0x03, 0x00, 0x00,
9088 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
9089 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
9090 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62,
9091 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14,
9092 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20,
9093 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
9094 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a,
9095 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00,
9096 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40,
9097 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1,
9098 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1,
9099 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a,
9100 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72,
9101 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a,
9102 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74,
9103 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40,
9104 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01,
9105 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1,
9106 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41,
9107 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79,
9108 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79,
9109 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77,
9110 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76,
9111 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70,
9112 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1,
9113 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01,
9114 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79,
9115 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70,
9116 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70,
9117 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2,
9118 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81,
9119 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0,
9120 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a,
9121 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a,
9122 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36,
9123 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1,
9124 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00,
9125 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41,
9126 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1,
9127 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a,
9128 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78,
9129 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1,
9130 0x1e, 0xca, 0x01, 0xd8, 0x90, 0x08, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06,
9131 0xd8, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff,
9132 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1,
9133 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d,
9134 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18,
9135 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4,
9136 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0,
9137 0x02, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
9138 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09,
9139 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00,
9140 0x28, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04,
9141 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14,
9142 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x68, 0x33, 0x00,
9143 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93,
9144 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06,
9145 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38, 0x4a, 0x9a,
9146 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88, 0xff, 0x1e,
9147 0xfe, 0x69, 0x8c, 0x00, 0x18, 0x44, 0x30, 0x82, 0x8b, 0xa4, 0x29, 0xa2,
9148 0x84, 0xc9, 0xff, 0x25, 0x80, 0x79, 0x16, 0x22, 0xfa, 0xa7, 0x31, 0x02,
9149 0x60, 0x10, 0x01, 0x11, 0x8a, 0x11, 0x44, 0x28, 0x27, 0x91, 0x1a, 0x46,
9150 0x18, 0x80, 0x39, 0x82, 0x60, 0x18, 0x61, 0x18, 0x4a, 0x12, 0x4e, 0x62,
9151 0xcd, 0x35, 0x30, 0xe8, 0x15, 0x01, 0x0c, 0x8a, 0x03, 0x01, 0x29, 0x30,
9152 0xe6, 0x08, 0x40, 0x61, 0x10, 0x41, 0x10, 0x06, 0x11, 0x00, 0x61, 0x10,
9153 0x61, 0x10, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xb2, 0x70, 0x48,
9154 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80, 0x07, 0x78, 0x60,
9155 0x87, 0x72, 0x68, 0x83, 0x76, 0x08, 0x87, 0x71, 0x78, 0x87, 0x79, 0xc0,
9156 0x87, 0x38, 0x80, 0x03, 0x37, 0x88, 0x83, 0x39, 0x70, 0x03, 0x38, 0xd8,
9157 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a,
9158 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x90, 0x0e, 0x71,
9159 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9, 0x80, 0x07, 0x7a,
9160 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a,
9161 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x90, 0x0e, 0x73,
9162 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
9163 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76,
9164 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72,
9165 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x76, 0x40, 0x07, 0x7a,
9166 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x71,
9167 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d,
9168 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
9169 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72,
9170 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x74, 0x80, 0x07, 0x7a,
9171 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x76,
9172 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d,
9173 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a,
9174 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x20, 0x07, 0x78,
9175 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78,
9176 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79, 0x20, 0x07, 0x7a, 0x20, 0x07, 0x75,
9177 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72,
9178 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72,
9179 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a,
9180 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x6d,
9181 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70,
9182 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x6d,
9183 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72,
9184 0x30, 0xe4, 0x51, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
9185 0x00, 0x60, 0xc8, 0xf3, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x08, 0x00,
9186 0x00, 0x00, 0xc0, 0x90, 0x27, 0x02, 0x02, 0x60, 0x00, 0x00, 0x00, 0x10,
9187 0x00, 0x00, 0x00, 0x00, 0x8d, 0x10, 0x86, 0x54, 0xb6, 0x05, 0x99, 0xbe,
9188 0xc8, 0x61, 0xee, 0x4e, 0x62, 0x83, 0x40, 0xd1, 0xb5, 0x01, 0x00, 0x80,
9189 0x2c, 0x10, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14,
9190 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a,
9191 0x45, 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85,
9192 0x52, 0x06, 0x54, 0x47, 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xe8, 0x58,
9193 0x82, 0x23, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00,
9194 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88,
9195 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
9196 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e,
9197 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30,
9198 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8,
9199 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
9200 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76,
9201 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e,
9202 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e,
9203 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
9204 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4,
9205 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
9206 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37,
9207 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
9208 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71,
9209 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e,
9210 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1,
9211 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
9212 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90,
9213 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
9214 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc,
9215 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7,
9216 0x69, 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78,
9217 0x60, 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f,
9218 0xee, 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f,
9219 0xe1, 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1,
9220 0x1e, 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0,
9221 0x1c, 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0,
9222 0x43, 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b,
9223 0x68, 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c,
9224 0xf4, 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61,
9225 0x1c, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1,
9226 0x1c, 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc,
9227 0xc3, 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4,
9228 0x43, 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79,
9229 0x98, 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72,
9230 0x98, 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e,
9231 0xf3, 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1,
9232 0x1d, 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4,
9233 0x83, 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8,
9234 0xc1, 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71,
9235 0x08, 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19,
9236 0xdb, 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f,
9237 0xe5, 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e,
9238 0xe3, 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e,
9239 0xe4, 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81,
9240 0x1d, 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21,
9241 0x1d, 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc,
9242 0x43, 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70,
9243 0x70, 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77,
9244 0x70, 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e,
9245 0xec, 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e,
9246 0x33, 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a,
9247 0x70, 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73,
9248 0x90, 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00,
9249 0x79, 0x18, 0x00, 0x00, 0xf2, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90,
9250 0x51, 0xaa, 0x01, 0x19, 0xe8, 0x13, 0x00, 0x00, 0x8b, 0x12, 0x07, 0xc5,
9251 0xc6, 0x95, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2,
9252 0xa0, 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc,
9253 0xa2, 0x60, 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20,
9254 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72,
9255 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d,
9256 0x65, 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
9257 0x20, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x31, 0x30, 0x31, 0x20, 0x28,
9258 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32,
9259 0x33, 0x2e, 0x31, 0x30, 0x31, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61,
9260 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64,
9261 0x65, 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62,
9262 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c,
9263 0x65, 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f,
9264 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f,
9265 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62,
9266 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f,
9267 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72,
9268 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
9269 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65,
9270 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61,
9271 0x69, 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f,
9272 0x69, 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
9273 0x65, 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66,
9274 0x29, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61,
9275 0x69, 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69,
9276 0x76, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e,
9277 0x61, 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61,
9278 0x69, 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61,
9279 0x69, 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65,
9280 0x63, 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e,
9281 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75,
9282 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72,
9283 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e,
9284 0x64, 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61,
9285 0x69, 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79,
9286 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66,
9287 0x74, 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73,
9288 0x69, 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c,
9289 0x65, 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79,
9290 0x65, 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72,
9291 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69,
9292 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79,
9293 0x70, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a,
9294 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f,
9295 0x6e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f,
9296 0x6e, 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
9297 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
9298 0x78, 0x74, 0x75, 0x72, 0x65, 0x33, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61,
9299 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f,
9300 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61,
9301 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61,
9302 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53,
9303 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x13, 0x84, 0x61, 0x98,
9304 0x20, 0x50, 0xd0, 0x04, 0x61, 0x20, 0x26, 0x08, 0x43, 0x31, 0x41, 0x18,
9305 0x8c, 0x09, 0xc2, 0x02, 0x4c, 0x10, 0x86, 0x63, 0x82, 0x30, 0x20, 0x13,
9306 0x84, 0x21, 0x99, 0x20, 0x0c, 0xca, 0x04, 0x61, 0x58, 0x36, 0x0c, 0x6b,
9307 0x10, 0xb0, 0xc1, 0x86, 0xa1, 0x0d, 0x04, 0x37, 0xd8, 0x10, 0x0c, 0x1b,
9308 0x86, 0x35, 0x78, 0x83, 0x37, 0xd8, 0x40, 0x10, 0x6b, 0xf0, 0x06, 0x6f,
9309 0xb0, 0x21, 0x28, 0x36, 0x04, 0xc6, 0x86, 0xe0, 0xd8, 0x50, 0x20, 0x6f,
9310 0xf0, 0x06, 0x89, 0xb2, 0x21, 0xf0, 0x83, 0x0d, 0xc9, 0x1b, 0x2c, 0x4c,
9311 0xe3, 0x24, 0x0f, 0x14, 0x6d, 0x40, 0xda, 0x40, 0x6a, 0xa6, 0x44, 0x81,
9312 0xa8, 0x0d, 0xd4, 0x1b, 0xc8, 0xc1, 0x1b, 0x3c, 0x9a, 0x1c, 0xc8, 0xc1,
9313 0x1b, 0x3c, 0xdb, 0x1c, 0xb8, 0xc1, 0x1b, 0x70, 0x1d, 0x1d, 0xb8, 0xc1,
9314 0x1b, 0x78, 0xdf, 0x06, 0x69, 0x0d, 0x2a, 0x2b, 0x0e, 0xae, 0x37, 0x68,
9315 0x03, 0x2c, 0x13, 0x05, 0x30, 0x88, 0x83, 0x30, 0x90, 0x83, 0x44, 0x0c,
9316 0xa0, 0x31, 0xd8, 0xa0, 0xd4, 0x01, 0x19, 0x5c, 0x6f, 0xd0, 0x06, 0x65,
9317 0x90, 0x98, 0x01, 0x74, 0x06, 0x1b, 0x12, 0x37, 0x40, 0x83, 0xeb, 0x0d,
9318 0xda, 0x20, 0x49, 0x03, 0x48, 0x0d, 0x36, 0x14, 0xa0, 0x10, 0x0a, 0xa3,
9319 0x40, 0x0a, 0xa5, 0xb0, 0x61, 0x80, 0x83, 0x3f, 0x30, 0x05, 0x8d, 0x04,
9320 0x26, 0xa8, 0x11, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0xdb, 0x1b, 0x59, 0x1d,
9321 0x5b, 0x99, 0x8b, 0x19, 0x5b, 0xd8, 0xd9, 0xdc, 0x14, 0xa1, 0x0e, 0xec,
9322 0xa0, 0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd,
9323 0x94, 0xe0, 0x0e, 0xba, 0x84, 0xa5, 0xc9, 0xb9, 0xd8, 0x95, 0xc9, 0xcd,
9324 0xa5, 0xbd, 0xb9, 0x4d, 0x09, 0xf0, 0xa0, 0x54, 0x58, 0x9a, 0x9c, 0x0b,
9325 0x5b, 0x98, 0xdb, 0x59, 0x5d, 0xd8, 0x59, 0xd9, 0x97, 0x5d, 0x99, 0xdc,
9326 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x20, 0x0f, 0x3a, 0x85, 0xa5, 0xc9, 0xb9,
9327 0x8c, 0xbd, 0xb5, 0xc1, 0xa5, 0xb1, 0x95, 0x7d, 0xbd, 0xc1, 0xd1, 0xa5,
9328 0xbd, 0xb9, 0xcd, 0x4d, 0x19, 0xf4, 0x60, 0x0f, 0xf8, 0xa0, 0x4c, 0x58,
9329 0x9a, 0x9c, 0x8b, 0x99, 0x5c, 0xd8, 0x59, 0x5b, 0x99, 0x1b, 0xdd, 0x94,
9330 0xc0, 0x14, 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
9331 0x0b, 0x0a, 0x72, 0x28, 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98,
9332 0x43, 0x3d, 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6,
9333 0x1c, 0xc6, 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21,
9334 0x1d, 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e,
9335 0xe7, 0x50, 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f,
9336 0xe7, 0x50, 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70,
9337 0x60, 0x07, 0x76, 0x78, 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72,
9338 0x58, 0x70, 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94,
9339 0xc3, 0x02, 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20,
9340 0x1c, 0xe4, 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61,
9341 0x1c, 0xd0, 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61,
9342 0xc1, 0x01, 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e,
9343 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00,
9344 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
9345 0x34, 0x66, 0x00, 0xa8, 0xd5, 0x00, 0xb9, 0x39, 0x06, 0x83, 0xb0, 0x46,
9346 0x00, 0xa8, 0x16, 0x01, 0x89, 0x19, 0x00, 0x00, 0xf1, 0x30, 0x00, 0x00,
9347 0x3d, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x1e, 0xc8, 0x49,
9348 0x00, 0x00, 0x00, 0x00, 0xcf, 0x23, 0x0d, 0x1c, 0x86, 0x01, 0x00, 0x00,
9349 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63,
9350 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x43, 0x2b,
9351 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x5f, 0x5a, 0x54, 0x53, 0x31, 0x32,
9352 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
9353 0x69, 0x6e, 0x74, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73,
9354 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c, 0x69, 0x74,
9355 0x46, 0x72, 0x6f, 0x6d, 0x33, 0x44, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61,
9356 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73,
9357 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61,
9358 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74,
9359 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x00, 0x13, 0x84, 0x8a, 0x99,
9360 0x20, 0x54, 0xcd, 0x04, 0xa1, 0x72, 0x26, 0x08, 0xd5, 0xb3, 0x42, 0x98,
9361 0x05, 0x56, 0x58, 0x31, 0xd0, 0xc2, 0x2c, 0xb4, 0xc2, 0x8a, 0xa1, 0x16,
9362 0x66, 0xc1, 0x15, 0x36, 0x04, 0xa9, 0xb0, 0x61, 0x40, 0x05, 0x5b, 0x78,
9363 0x85, 0x0d, 0xc3, 0x2d, 0xdc, 0xc2, 0x2b, 0x6c, 0x18, 0x56, 0xe1, 0x16,
9364 0x5e, 0x61, 0xc3, 0xe0, 0xdd, 0xc2, 0x2b, 0x6c, 0x48, 0x54, 0xe1, 0x16,
9365 0x5e, 0xe1, 0x16, 0x60, 0x21, 0x17, 0x62, 0x41, 0x17, 0x64, 0x61, 0xc3,
9366 0xb0, 0x0b, 0xba, 0x20, 0x0b, 0x1b, 0x86, 0x5d, 0xc8, 0x85, 0x58, 0xd8,
9367 0x20, 0xd4, 0x02, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x0c, 0x09, 0x64,
9368 0x51, 0x20, 0xc8, 0x26, 0xc3, 0x22, 0x69, 0x14, 0x08, 0x62, 0xc1, 0x23,
9369 0x1f, 0x0b, 0x08, 0xf8, 0x0c, 0x32, 0x04, 0x87, 0xb2, 0xc9, 0x00, 0x5d,
9370 0x18, 0x05, 0x60, 0xcc, 0x31, 0x0c, 0xc1, 0xb2, 0xc9, 0x30, 0x69, 0x63,
9371 0x40, 0xc1, 0x20, 0x23, 0x06, 0x06, 0x11, 0x82, 0x60, 0xf1, 0x45, 0x66,
9372 0x10, 0x8c, 0x18, 0x34, 0x45, 0x08, 0x82, 0xc5, 0xf7, 0xa0, 0x41, 0x45,
9373 0x11, 0x12, 0x24, 0x05, 0x63, 0x90, 0x41, 0x40, 0x0c, 0x00, 0x00, 0x00,
9374 0x07, 0x00, 0x00, 0x00, 0x5b, 0x86, 0x20, 0xb8, 0x85, 0x2d, 0xc3, 0x10,
9375 0xdc, 0xc2, 0x96, 0x01, 0x09, 0x76, 0x61, 0xcb, 0xb0, 0x04, 0xbc, 0xb0,
9376 0x65, 0x68, 0x8e, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9377 0x71, 0x20, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22,
9378 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88,
9379 0x90, 0xa1, 0x05, 0x6c, 0x00, 0x12, 0xf9, 0x12, 0xc0, 0x3c, 0x0b, 0xf1,
9380 0x4f, 0xc4, 0x35, 0x51, 0x11, 0xf1, 0xdf, 0x83, 0x5f, 0xe1, 0xc5, 0x6d,
9381 0x2b, 0x80, 0xa1, 0x81, 0xb2, 0x2d, 0xc8, 0xf4, 0x45, 0x0e, 0x73, 0x77,
9382 0x26, 0x70, 0x01, 0x48, 0xe4, 0x0b, 0x4e, 0x53, 0x11, 0xd1, 0xe4, 0x17,
9383 0x7e, 0x71, 0xdb, 0x3e, 0xe5, 0x23, 0xb7, 0x0d, 0x00, 0x00, 0x00, 0x00,
9384 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
9385};
9386const unsigned int BlitFrom3D_metallib_len = 3852;
9387const unsigned char BlitFromCube_metallib[] = {
9388 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x80, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
9389 0x00, 0x00, 0x00, 0x00, 0x2e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9390 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
9391 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9392 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x00, 0x00, 0x00,
9393 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9394 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x0f, 0x00, 0x00,
9395 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00,
9396 0x4e, 0x41, 0x4d, 0x45, 0x0d, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
9397 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x00, 0x54, 0x59, 0x50, 0x45, 0x01,
9398 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20, 0x00, 0xd9, 0x65, 0xb1, 0xc1,
9399 0x15, 0x93, 0x69, 0x7f, 0x2f, 0x74, 0x16, 0x94, 0x99, 0xc0, 0x52, 0xb5,
9400 0x44, 0xbb, 0xd2, 0x9c, 0x21, 0x07, 0x9d, 0x3c, 0xcf, 0x46, 0x6d, 0x01,
9401 0x81, 0x77, 0xd7, 0xfd, 0x4d, 0x44, 0x53, 0x5a, 0x08, 0x00, 0x40, 0x0f,
9402 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x46, 0x46, 0x54, 0x18, 0x00,
9403 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9404 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9405 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
9406 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e,
9407 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0xde, 0xc0,
9408 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x24, 0x0f,
9409 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x43, 0xc0, 0xde, 0x35, 0x14,
9410 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62, 0x0c, 0x30, 0x24, 0x80, 0x10,
9411 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0xc1, 0x03,
9412 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00,
9413 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10,
9414 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04,
9415 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10,
9416 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90,
9417 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48,
9418 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83,
9419 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x7c, 0x00,
9420 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x58,
9421 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0, 0x01, 0x1e, 0xe4, 0xe1, 0x1d,
9422 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc, 0x61, 0x1c, 0xda, 0xc0, 0x1c,
9423 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90,
9424 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87, 0x74, 0x70, 0x87, 0x36, 0x60,
9425 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87, 0x36, 0xb0, 0x87, 0x72, 0x18,
9426 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83, 0x7b, 0x48, 0x07, 0x72, 0xa0,
9427 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0, 0x00, 0x18, 0xdc, 0xe1, 0x1d,
9428 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8, 0x81, 0x1e, 0xd2, 0xc1, 0x1d,
9429 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c,
9430 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e,
9431 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0xa0,
9432 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x30,
9433 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87, 0x36, 0x80, 0x87, 0x77, 0x48,
9434 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87, 0x36, 0x28, 0x07, 0x76, 0x48,
9435 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07, 0x77, 0x68, 0x03, 0x76, 0x28,
9436 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0x20,
9437 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc, 0xc1, 0x1c, 0xe6, 0xa1, 0x0d,
9438 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0xa0,
9439 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08, 0x77, 0x78, 0x87, 0x36, 0x70,
9440 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03, 0x73, 0x80, 0x87, 0x36, 0x68,
9441 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c,
9442 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xce, 0xc1, 0x1d,
9443 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca, 0x41, 0x1e, 0xde, 0x61, 0x1e,
9444 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d,
9445 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x70, 0x87, 0x77, 0x68,
9446 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07, 0x78, 0x48, 0x07, 0x77, 0x38,
9447 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8, 0x41, 0x1e,
9448 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8, 0x21, 0x1c, 0xc6, 0x61, 0x1d,
9449 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8, 0xa1, 0x1c, 0xc6, 0x81, 0x1e,
9450 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea, 0xc1, 0x1c, 0xcc, 0xa1, 0x1c,
9451 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4, 0xa1, 0x1c, 0x00, 0x3c, 0x00,
9452 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07, 0x73, 0x28, 0x87, 0x36, 0x30,
9453 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0x80, 0x1e,
9454 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0x90, 0x08, 0x03, 0xb0, 0x00, 0x55,
9455 0x90, 0x06, 0xd8, 0x06, 0x63, 0x28, 0x80, 0x05, 0xa8, 0x36, 0x28, 0xc4,
9456 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b, 0x00, 0x6b, 0x00, 0x48, 0x40,
9457 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa, 0x0d, 0x86, 0x21, 0x00, 0x0b,
9458 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0,
9459 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80, 0x04, 0x50, 0x1b,
9460 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07, 0xa0, 0x0d, 0x80, 0x35, 0x00,
9461 0x24, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x05, 0x00,
9462 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x0c, 0x44, 0x61, 0x4c, 0x08,
9463 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a, 0x03, 0x00, 0x00, 0x89, 0x20,
9464 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64,
9465 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1,
9466 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x74,
9467 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c, 0x20, 0x00, 0x73, 0x04, 0x60,
9468 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0xac, 0x43, 0x45, 0x02, 0xb1,
9469 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62, 0x80, 0x41, 0x04, 0x42, 0x38,
9470 0x4b, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f, 0x22, 0xae, 0x89, 0x8a, 0x88,
9471 0x5f, 0xa0, 0x02, 0xe2, 0x9f, 0xc6, 0x08, 0x80, 0x41, 0x04, 0x23, 0xb8,
9472 0x48, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x5f, 0x02, 0x98, 0x67, 0x21, 0xa2,
9473 0x7f, 0x1a, 0x23, 0x00, 0x06, 0x11, 0x10, 0xa1, 0x18, 0x41, 0x84, 0x72,
9474 0x12, 0xa9, 0x61, 0x84, 0x01, 0x98, 0x23, 0x08, 0xca, 0x11, 0x4e, 0x62,
9475 0x0d, 0x0c, 0x72, 0x45, 0x00, 0x83, 0x60, 0x11, 0x06, 0x20, 0x39, 0x10,
9476 0x90, 0x02, 0x63, 0x8e, 0x00, 0x14, 0x06, 0x11, 0x04, 0x61, 0x10, 0x01,
9477 0x10, 0xa6, 0x00, 0x46, 0x00, 0x86, 0x11, 0x86, 0x61, 0x10, 0x61, 0x10,
9478 0x00, 0x00, 0x13, 0xb2, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68,
9479 0x83, 0x70, 0x80, 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x83, 0x76, 0x08,
9480 0x87, 0x71, 0x78, 0x87, 0x79, 0xc0, 0x87, 0x38, 0x80, 0x03, 0x37, 0x88,
9481 0x83, 0x39, 0x70, 0x03, 0x38, 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0,
9482 0xa0, 0x07, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76,
9483 0x40, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78,
9484 0xd0, 0x06, 0xe9, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d,
9485 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71,
9486 0x60, 0x07, 0x6d, 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72,
9487 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a,
9488 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73,
9489 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
9490 0x60, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76,
9491 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76,
9492 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a,
9493 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73,
9494 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d,
9495 0x60, 0x0f, 0x74, 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76,
9496 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74,
9497 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a,
9498 0x10, 0x07, 0x72, 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d,
9499 0x60, 0x0f, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78,
9500 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79,
9501 0x20, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75,
9502 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72,
9503 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6,
9504 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a,
9505 0x50, 0x07, 0x71, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72,
9506 0x40, 0x07, 0x7a, 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71,
9507 0x00, 0x07, 0x72, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71,
9508 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0x30, 0xe4, 0x51, 0x00, 0x00, 0x08,
9509 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0xc8, 0xe3, 0x00, 0x01,
9510 0x20, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x07, 0x02,
9511 0x02, 0x60, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x21, 0x8f,
9512 0x04, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1a,
9513 0x21, 0x0c, 0xc9, 0x6c, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0x70, 0x54, 0x40,
9514 0x48, 0x6c, 0x10, 0x28, 0xea, 0x3a, 0x00, 0x00, 0x90, 0x05, 0x02, 0x00,
9515 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11,
9516 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45, 0x50,
9517 0x02, 0x85, 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52, 0x06,
9518 0x64, 0x47, 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xea, 0x58, 0x82, 0x23,
9519 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33, 0x08,
9520 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38,
9521 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71,
9522 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c,
9523 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d,
9524 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d,
9525 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07,
9526 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87,
9527 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30,
9528 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10,
9529 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66,
9530 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c,
9531 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07,
9532 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87,
9533 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05,
9534 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87,
9535 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0,
9536 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4,
9537 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca,
9538 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39,
9539 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38,
9540 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c,
9541 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69, 0x87,
9542 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60, 0x87,
9543 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee, 0x00,
9544 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1, 0x20,
9545 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e, 0xc2,
9546 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c, 0xe4,
9547 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43, 0x3a,
9548 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07,
9549 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4, 0x90,
9550 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c, 0xe8,
9551 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c, 0xcc,
9552 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3, 0x3b,
9553 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43, 0x3b,
9554 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98, 0x87,
9555 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98, 0x81,
9556 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3, 0x30,
9557 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d, 0xde,
9558 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83, 0x1b,
9559 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1, 0x39,
9560 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08, 0x07,
9561 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb, 0xc6,
9562 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5, 0x30,
9563 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3, 0x30,
9564 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4, 0x50,
9565 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8,
9566 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d, 0xd8,
9567 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43, 0x3d,
9568 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70, 0x07,
9569 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70, 0x87,
9570 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec, 0xc0,
9571 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33, 0x28,
9572 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70, 0x87,
9573 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90, 0x87,
9574 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18,
9575 0x00, 0x00, 0xf2, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0xaa,
9576 0x01, 0x19, 0xf0, 0x13, 0x00, 0x00, 0x8b, 0x12, 0x07, 0xc5, 0xc6, 0x95,
9577 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2, 0xa0, 0x3c,
9578 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc, 0xa2, 0x68,
9579 0xcd, 0x72, 0x34, 0x00, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20, 0x56, 0x65,
9580 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x73,
9581 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x74,
9582 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33,
9583 0x32, 0x30, 0x32, 0x33, 0x2e, 0x31, 0x30, 0x31, 0x20, 0x28, 0x6d, 0x65,
9584 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e,
9585 0x31, 0x30, 0x31, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69, 0x72,
9586 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x6e,
9587 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65,
9588 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e,
9589 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e,
9590 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70,
9591 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75, 0x66,
9592 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x69,
9593 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x6e,
9594 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61, 0x69,
9595 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e,
9596 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69, 0x72,
9597 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e,
9598 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
9599 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29, 0x61,
9600 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69, 0x72,
9601 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
9602 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72,
9603 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69, 0x72,
9604 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69, 0x72,
9605 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74,
9606 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75,
9607 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66, 0x66,
9608 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x6c,
9609 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65,
9610 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69, 0x72,
9611 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65,
9612 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74, 0x54,
9613 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f,
9614 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65, 0x76,
9615 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65, 0x72,
9616 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e, 0x61,
9617 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
9618 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65,
9619 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x53,
9620 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73,
9621 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61,
9622 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69,
9623 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78, 0x74,
9624 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65, 0x3c, 0x66, 0x6c, 0x6f, 0x61,
9625 0x74, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f,
9626 0x75, 0x72, 0x63, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61,
9627 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61,
9628 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53,
9629 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x13, 0x84, 0x81, 0x98, 0x20, 0x54,
9630 0xd1, 0x04, 0x61, 0x28, 0x26, 0x08, 0x83, 0x31, 0x41, 0x18, 0x8e, 0x09,
9631 0xc2, 0x02, 0x4c, 0x10, 0x06, 0x64, 0x82, 0x30, 0x24, 0x13, 0x84, 0x41,
9632 0x99, 0x20, 0x0c, 0xcb, 0x04, 0x61, 0x60, 0x36, 0x0c, 0x6b, 0x10, 0xb0,
9633 0xc1, 0x86, 0xa1, 0x0d, 0x04, 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35,
9634 0x78, 0x83, 0x37, 0xd8, 0x40, 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21,
9635 0x28, 0x36, 0x04, 0xc6, 0x86, 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06,
9636 0x89, 0xb2, 0x21, 0xf0, 0x83, 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24,
9637 0x0f, 0x14, 0x6d, 0x40, 0xda, 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d,
9638 0xd4, 0x1b, 0xc8, 0xc1, 0x1b, 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c,
9639 0xdb, 0x1c, 0xb8, 0xc1, 0x1b, 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78,
9640 0xdf, 0x06, 0x69, 0x0d, 0x2a, 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c,
9641 0x13, 0x05, 0x30, 0x88, 0x83, 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31,
9642 0xd8, 0xa0, 0xd4, 0x01, 0x19, 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98,
9643 0x01, 0x74, 0x06, 0x1b, 0x12, 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20,
9644 0x49, 0x03, 0x48, 0x0d, 0x36, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a,
9645 0xa5, 0xb0, 0x61, 0x80, 0x83, 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8,
9646 0x11, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99,
9647 0x8b, 0x19, 0x5b, 0xd8, 0xd9, 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a,
9648 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0,
9649 0x0e, 0xba, 0x84, 0xa5, 0xc9, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd,
9650 0xb9, 0x4d, 0x09, 0xf0, 0xa0, 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98,
9651 0xdb, 0x59, 0x5d, 0xd8, 0x59, 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda,
9652 0x9b, 0xdb, 0x94, 0x20, 0x0f, 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd,
9653 0xb5, 0xc1, 0xa5, 0xb1, 0x95, 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9,
9654 0xcd, 0x4d, 0x19, 0xf4, 0x60, 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c,
9655 0x8b, 0x99, 0x5c, 0xd8, 0x59, 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14,
9656 0x00, 0x00, 0xa9, 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a,
9657 0x72, 0x28, 0x87, 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d,
9658 0xb8, 0xc3, 0x38, 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6,
9659 0xa1, 0x0d, 0xe8, 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8,
9660 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50,
9661 0x0f, 0xe1, 0x20, 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50,
9662 0x0e, 0xf4, 0xb0, 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07,
9663 0x76, 0x78, 0x87, 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70,
9664 0x9c, 0xc3, 0x38, 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02,
9665 0x6b, 0x1c, 0xd8, 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4,
9666 0x61, 0x1c, 0xdc, 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0,
9667 0xa1, 0x1c, 0xc8, 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01,
9668 0x0f, 0xf4, 0x20, 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00,
9669 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0xa1, 0x00, 0x00, 0x00, 0x13, 0x04,
9670 0x48, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x34, 0x4a,
9671 0x81, 0x5a, 0x0d, 0x90, 0x2d, 0x81, 0x22, 0xa0, 0x3d, 0xd6, 0x00, 0x04,
9672 0x02, 0x81, 0x19, 0x80, 0x31, 0x02, 0x10, 0x04, 0x41, 0x10, 0x14, 0x66,
9673 0x00, 0xc6, 0x08, 0x40, 0x10, 0x04, 0xf1, 0x5f, 0x18, 0x23, 0x00, 0x41,
9674 0x10, 0xc4, 0xbf, 0x11, 0x80, 0x31, 0x02, 0x10, 0x04, 0x41, 0x10, 0x0c,
9675 0x28, 0xcc, 0x41, 0x80, 0x01, 0xc7, 0x79, 0x73, 0x10, 0x1f, 0xc7, 0x79,
9676 0x73, 0x10, 0x1c, 0x18, 0x70, 0xde, 0x1c, 0x04, 0xf7, 0x71, 0xde, 0x1c,
9677 0x04, 0xc7, 0x81, 0x81, 0x37, 0x07, 0xc1, 0x71, 0x9f, 0x37, 0x07, 0x11,
9678 0x06, 0x61, 0x10, 0x06, 0xde, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x30,
9679 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51, 0x1e,
9680 0x48, 0x4a, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x23, 0x0d, 0x1e, 0x86, 0x01,
9681 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74,
9682 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20,
9683 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x5f, 0x5a, 0x54, 0x53,
9684 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
9685 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69,
9686 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42, 0x6c,
9687 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x29, 0x61,
9688 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f,
9689 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61,
9690 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f,
9691 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x73, 0x00,
9692 0x00, 0x00, 0x13, 0x04, 0xab, 0x99, 0x20, 0x58, 0xce, 0x04, 0xc1, 0x7a,
9693 0x26, 0x08, 0x16, 0xb4, 0x42, 0x98, 0x05, 0x56, 0x58, 0x31, 0xd0, 0xc2,
9694 0x2c, 0xb4, 0xc2, 0x8a, 0xa1, 0x16, 0x66, 0xc1, 0x15, 0x36, 0x04, 0xa9,
9695 0xb0, 0x61, 0x40, 0x05, 0x5b, 0x78, 0x85, 0x0d, 0xc3, 0x2d, 0xdc, 0xc2,
9696 0x2b, 0x6c, 0x18, 0x56, 0xe1, 0x16, 0x5e, 0x61, 0xc3, 0xe0, 0xdd, 0xc2,
9697 0x2b, 0x6c, 0x48, 0x54, 0xe1, 0x16, 0x5e, 0xe1, 0x16, 0x60, 0x21, 0x17,
9698 0x62, 0x41, 0x17, 0x64, 0x61, 0xc3, 0xb0, 0x0b, 0xba, 0x20, 0x0b, 0x1b,
9699 0x86, 0x5d, 0xc8, 0x85, 0x58, 0xd8, 0x20, 0xd4, 0x02, 0x2d, 0x00, 0x00,
9700 0x00, 0x00, 0x9b, 0x0c, 0x97, 0x47, 0x06, 0x14, 0x08, 0xb2, 0xc9, 0x90,
9701 0x81, 0x01, 0x1a, 0x50, 0x20, 0x88, 0x05, 0x9d, 0x7c, 0x2c, 0x20, 0xe0,
9702 0x33, 0x86, 0x10, 0x90, 0x81, 0x05, 0x90, 0x7c, 0x2c, 0xa0, 0xe0, 0x33,
9703 0x86, 0x40, 0x6c, 0x16, 0x4c, 0xf2, 0xb1, 0xe0, 0x82, 0xcf, 0x26, 0xc3,
9704 0x18, 0xa8, 0xc1, 0x1a, 0x50, 0x00, 0xc6, 0x88, 0x41, 0x41, 0x84, 0x20,
9705 0x18, 0x48, 0x76, 0x10, 0x0c, 0xf3, 0x0c, 0xc1, 0x71, 0x04, 0x85, 0x40,
9706 0x0c, 0x0c, 0x61, 0x14, 0x97, 0x61, 0x1d, 0x11, 0x9f, 0x39, 0x06, 0x2c,
9707 0x10, 0x03, 0xfb, 0x92, 0xf8, 0xcc, 0x31, 0x08, 0xc1, 0x18, 0xcc, 0x12,
9708 0x1c, 0x16, 0x06, 0x48, 0x7c, 0xe6, 0x18, 0xb6, 0xc0, 0x0c, 0xe6, 0x18,
9709 0x82, 0xc6, 0x0c, 0x66, 0x09, 0x8e, 0x39, 0x06, 0xce, 0xa1, 0x03, 0x2b,
9710 0x03, 0x26, 0x3e, 0x73, 0x0c, 0x42, 0x90, 0x06, 0xb3, 0x04, 0xc7, 0x1c,
9711 0x83, 0x17, 0xdd, 0xc1, 0x1c, 0x43, 0xf0, 0xac, 0xc1, 0x2c, 0xc1, 0x61,
9712 0x69, 0x00, 0xc5, 0x67, 0x8e, 0x01, 0x0c, 0x28, 0x3d, 0x98, 0x63, 0x08,
9713 0x84, 0x37, 0x98, 0x25, 0x38, 0x8c, 0x0d, 0xac, 0xf8, 0x58, 0x1b, 0x50,
9714 0xf1, 0x99, 0x63, 0x18, 0x03, 0xc1, 0x0f, 0xe6, 0x18, 0x02, 0x61, 0x0e,
9715 0x66, 0x09, 0x8e, 0x81, 0x9e, 0x40, 0x30, 0x94, 0x02, 0x22, 0xa8, 0x41,
9716 0x13, 0xc0, 0x20, 0x40, 0x05, 0x60, 0x90, 0x21, 0x20, 0x83, 0x39, 0xd8,
9717 0x64, 0xd8, 0x03, 0x51, 0x58, 0x05, 0x0a, 0x06, 0x19, 0x31, 0x30, 0x88,
9718 0x10, 0x04, 0x8b, 0x0f, 0x7a, 0x85, 0x60, 0xc4, 0x60, 0x29, 0x42, 0x10,
9719 0x2c, 0x3e, 0x27, 0x16, 0xfa, 0x80, 0x0f, 0x08, 0x3d, 0x08, 0x56, 0x21,
9720 0x83, 0x80, 0x18, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x5b, 0x86,
9721 0x20, 0xb8, 0x85, 0x2d, 0xc3, 0x10, 0xdc, 0xc2, 0x96, 0xa1, 0x09, 0x76,
9722 0x61, 0xcb, 0xc0, 0x06, 0x01, 0x2f, 0x6c, 0x19, 0xdc, 0xe0, 0xe8, 0x05,
9723 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x18, 0x00,
9724 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22, 0x64, 0x82, 0xa4, 0x1c, 0x20, 0x44,
9725 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88, 0x90, 0xa1, 0x09, 0x5c, 0x00, 0x12,
9726 0xf9, 0x82, 0xd3, 0x54, 0x44, 0x34, 0xf9, 0x85, 0x5f, 0xdc, 0xb6, 0x4f,
9727 0xf9, 0xc8, 0x6d, 0xdb, 0xc0, 0x05, 0x20, 0x91, 0x2f, 0x38, 0x4d, 0x45,
9728 0x44, 0x93, 0x4f, 0xf9, 0xc8, 0x6d, 0xfb, 0x85, 0x5f, 0xdc, 0xb6, 0x05,
9729 0x74, 0x00, 0x12, 0xf9, 0x12, 0xc0, 0x3c, 0x0b, 0xf1, 0x4f, 0xc4, 0x35,
9730 0x51, 0x11, 0xf1, 0x0b, 0x54, 0x40, 0xf8, 0x15, 0x5e, 0xdc, 0xb6, 0x02,
9731 0x2c, 0x1a, 0x30, 0xdb, 0x82, 0x4c, 0x5f, 0xe4, 0x30, 0x1c, 0x15, 0x10,
9732 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9733 0x00, 0x00
9734};
9735const unsigned int BlitFromCube_metallib_len = 4142;
9736const unsigned char BlitFromCubeArray_metallib[] = {
9737 0x4d, 0x54, 0x4c, 0x42, 0x01, 0x80, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
9738 0x00, 0x00, 0x00, 0x00, 0x53, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9739 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
9740 0x00, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9741 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x00, 0x00, 0x00,
9742 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9743 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0f, 0x00, 0x00,
9744 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00,
9745 0x4e, 0x41, 0x4d, 0x45, 0x12, 0x00, 0x42, 0x6c, 0x69, 0x74, 0x46, 0x72,
9746 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00,
9747 0x54, 0x59, 0x50, 0x45, 0x01, 0x00, 0x01, 0x48, 0x41, 0x53, 0x48, 0x20,
9748 0x00, 0x45, 0x43, 0x42, 0x97, 0x89, 0xc4, 0x00, 0x22, 0x00, 0x8e, 0x0c,
9749 0xd8, 0xa0, 0x0c, 0x81, 0xe4, 0x1c, 0x17, 0xba, 0xa2, 0xc1, 0xdf, 0x37,
9750 0x8e, 0xac, 0xe8, 0xa1, 0x81, 0xd3, 0x26, 0x97, 0x0b, 0x4d, 0x44, 0x53,
9751 0x5a, 0x08, 0x00, 0x60, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f,
9752 0x46, 0x46, 0x54, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9753 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9754 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x45, 0x52, 0x53, 0x08, 0x00, 0x02,
9755 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04,
9756 0x00, 0x00, 0x00, 0x45, 0x4e, 0x44, 0x54, 0x04, 0x00, 0x00, 0x00, 0x45,
9757 0x4e, 0x44, 0x54, 0xde, 0xc0, 0x17, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x14,
9758 0x00, 0x00, 0x00, 0x4c, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42,
9759 0x43, 0xc0, 0xde, 0x35, 0x14, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x62,
9760 0x0c, 0x30, 0x24, 0x80, 0x10, 0x05, 0xc8, 0x14, 0x00, 0x00, 0x00, 0x21,
9761 0x0c, 0x00, 0x00, 0xcb, 0x03, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02,
9762 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41,
9763 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25,
9764 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x14, 0x45, 0x02, 0x42,
9765 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a,
9766 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00,
9767 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41,
9768 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51,
9769 0x18, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x1b, 0xc2, 0x24, 0xf8, 0xff,
9770 0xff, 0xff, 0xff, 0x01, 0x58, 0x03, 0x40, 0x02, 0x2a, 0x22, 0x1c, 0xe0,
9771 0x01, 0x1e, 0xe4, 0xe1, 0x1d, 0xf0, 0xa1, 0x0d, 0xcc, 0xa1, 0x1e, 0xdc,
9772 0x61, 0x1c, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8,
9773 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07, 0x80, 0x68, 0x87,
9774 0x74, 0x70, 0x87, 0x36, 0x60, 0x87, 0x72, 0x38, 0x87, 0x70, 0x60, 0x87,
9775 0x36, 0xb0, 0x87, 0x72, 0x18, 0x07, 0x7a, 0x78, 0x07, 0x79, 0x68, 0x83,
9776 0x7b, 0x48, 0x07, 0x72, 0xa0, 0x07, 0x74, 0x00, 0xe2, 0x40, 0x0e, 0xf0,
9777 0x00, 0x18, 0xdc, 0xe1, 0x1d, 0xda, 0x40, 0x1c, 0xea, 0x21, 0x1d, 0xd8,
9778 0x81, 0x1e, 0xd2, 0xc1, 0x1d, 0xe6, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda,
9779 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1, 0x1c, 0xda, 0x00, 0x1e, 0xde,
9780 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8,
9781 0x21, 0x1d, 0xda, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08,
9782 0x77, 0x78, 0x87, 0x36, 0x30, 0x07, 0x79, 0x08, 0x87, 0x76, 0x28, 0x87,
9783 0x36, 0x80, 0x87, 0x77, 0x48, 0x07, 0x77, 0xa0, 0x87, 0x72, 0x90, 0x87,
9784 0x36, 0x28, 0x07, 0x76, 0x48, 0x87, 0x76, 0x68, 0x03, 0x77, 0x78, 0x07,
9785 0x77, 0x68, 0x03, 0x76, 0x28, 0x87, 0x70, 0x30, 0x07, 0x80, 0x1e, 0xe4,
9786 0xa1, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0x20, 0x1d, 0xdc,
9787 0xc1, 0x1c, 0xe6, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2,
9788 0x81, 0x1e, 0xd0, 0x01, 0xa0, 0x07, 0x79, 0xa8, 0x87, 0x72, 0x00, 0x08,
9789 0x77, 0x78, 0x87, 0x36, 0x70, 0x87, 0x70, 0x70, 0x87, 0x79, 0x68, 0x03,
9790 0x73, 0x80, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07, 0x74, 0x00, 0xe8,
9791 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0xc2, 0x1d, 0xde, 0xa1, 0x0d, 0xe6,
9792 0x21, 0x1d, 0xce, 0xc1, 0x1d, 0xca, 0x81, 0x1c, 0xda, 0x40, 0x1f, 0xca,
9793 0x41, 0x1e, 0xde, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda,
9794 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x7a, 0x90, 0x87, 0x7a, 0x28, 0x07,
9795 0x80, 0x70, 0x87, 0x77, 0x68, 0x03, 0x7a, 0x90, 0x87, 0x70, 0x80, 0x07,
9796 0x78, 0x48, 0x07, 0x77, 0x38, 0x87, 0x36, 0x68, 0x87, 0x70, 0xa0, 0x07,
9797 0x74, 0x00, 0xe8, 0x41, 0x1e, 0xea, 0xa1, 0x1c, 0x00, 0x62, 0x1e, 0xe8,
9798 0x21, 0x1c, 0xc6, 0x61, 0x1d, 0xda, 0x00, 0x1e, 0xe4, 0xe1, 0x1d, 0xe8,
9799 0xa1, 0x1c, 0xc6, 0x81, 0x1e, 0xde, 0x41, 0x1e, 0xda, 0x40, 0x1c, 0xea,
9800 0xc1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x0d, 0xe6, 0x21, 0x1d, 0xf4,
9801 0xa1, 0x1c, 0x00, 0x3c, 0x00, 0x88, 0x7a, 0x70, 0x87, 0x79, 0x08, 0x07,
9802 0x73, 0x28, 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07,
9803 0x7a, 0x40, 0x07, 0x80, 0x1e, 0xe4, 0xa1, 0x1e, 0xca, 0x01, 0xd8, 0x90,
9804 0x08, 0x03, 0xb0, 0x00, 0x55, 0x90, 0x06, 0xd8, 0x06, 0x63, 0x28, 0x80,
9805 0x05, 0xa8, 0x36, 0x28, 0xc4, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x40, 0x1b,
9806 0x00, 0x6b, 0x00, 0x48, 0x40, 0xb5, 0xc1, 0x28, 0x02, 0x60, 0x01, 0xaa,
9807 0x0d, 0x86, 0x21, 0x00, 0x0b, 0x50, 0x6d, 0x30, 0x8e, 0xff, 0xff, 0xff,
9808 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff,
9809 0x0f, 0x80, 0x04, 0x50, 0x1b, 0x94, 0xe4, 0xff, 0xff, 0xff, 0xff, 0x07,
9810 0xa0, 0x0d, 0x80, 0x35, 0x00, 0x24, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x49,
9811 0x18, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26,
9812 0x0c, 0x44, 0x61, 0x4c, 0x08, 0x8e, 0x09, 0x01, 0x32, 0x61, 0x48, 0x0a,
9813 0x03, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x32,
9814 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04,
9815 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b,
9816 0x84, 0xa4, 0x4c, 0x10, 0x74, 0x33, 0x00, 0xc3, 0x08, 0x04, 0x30, 0x8c,
9817 0x20, 0x00, 0x73, 0x04, 0x60, 0x70, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9,
9818 0xac, 0x43, 0x45, 0x02, 0xb1, 0x12, 0x06, 0xe2, 0x34, 0x88, 0x10, 0x62,
9819 0x80, 0x41, 0x04, 0x42, 0x38, 0x4e, 0x9a, 0x22, 0x4a, 0x98, 0xfc, 0x7f,
9820 0x22, 0xae, 0x89, 0x8a, 0x88, 0x5f, 0xa0, 0x02, 0xe2, 0x07, 0xa2, 0x08,
9821 0xc0, 0xfe, 0x69, 0x8c, 0x00, 0x18, 0x44, 0x30, 0x82, 0x8b, 0xa4, 0x29,
9822 0xa2, 0x84, 0xc9, 0xff, 0x25, 0x80, 0x79, 0x16, 0x22, 0xfa, 0xa7, 0x31,
9823 0x02, 0x60, 0x10, 0x01, 0x11, 0x8a, 0x11, 0x44, 0x28, 0x27, 0x91, 0x1a,
9824 0x46, 0x18, 0x80, 0x39, 0x82, 0xa0, 0x20, 0xe1, 0x24, 0x36, 0x1a, 0x18,
9825 0xe4, 0x8a, 0x00, 0x06, 0xc1, 0x22, 0x0c, 0x40, 0x72, 0x20, 0x20, 0x05,
9826 0xc6, 0x1c, 0x01, 0x28, 0x0c, 0x22, 0x08, 0xc2, 0x20, 0x02, 0x20, 0x4c,
9827 0x01, 0x8c, 0x00, 0x0c, 0x23, 0x0c, 0xc3, 0x20, 0xc2, 0x20, 0x00, 0x13,
9828 0xb2, 0x70, 0x48, 0x07, 0x79, 0xb0, 0x03, 0x3a, 0x68, 0x83, 0x70, 0x80,
9829 0x07, 0x78, 0x60, 0x87, 0x72, 0x68, 0x83, 0x76, 0x08, 0x87, 0x71, 0x78,
9830 0x87, 0x79, 0xc0, 0x87, 0x38, 0x80, 0x03, 0x37, 0x88, 0x83, 0x39, 0x70,
9831 0x03, 0x38, 0xd8, 0x70, 0x1b, 0xe5, 0xd0, 0x06, 0xf0, 0xa0, 0x07, 0x76,
9832 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d,
9833 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x78, 0xa0, 0x07, 0x78, 0xd0, 0x06, 0xe9,
9834 0x80, 0x07, 0x7a, 0x80, 0x07, 0x7a, 0x80, 0x07, 0x6d, 0x90, 0x0e, 0x71,
9835 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x6d,
9836 0x90, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
9837 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74,
9838 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a,
9839 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x76,
9840 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d,
9841 0x60, 0x0f, 0x71, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x71,
9842 0x60, 0x07, 0x6d, 0x60, 0x0f, 0x72, 0x40, 0x07, 0x7a, 0x30, 0x07, 0x72,
9843 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x73, 0x20, 0x07, 0x7a,
9844 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x74,
9845 0x80, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d,
9846 0x60, 0x0f, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76,
9847 0x40, 0x07, 0x6d, 0x60, 0x0f, 0x79, 0x60, 0x07, 0x7a, 0x10, 0x07, 0x72,
9848 0x80, 0x07, 0x7a, 0x10, 0x07, 0x72, 0x80, 0x07, 0x6d, 0x60, 0x0f, 0x71,
9849 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71, 0x20, 0x07, 0x78, 0xa0, 0x07, 0x71,
9850 0x20, 0x07, 0x78, 0xd0, 0x06, 0xf6, 0x10, 0x07, 0x79, 0x20, 0x07, 0x7a,
9851 0x20, 0x07, 0x75, 0x60, 0x07, 0x7a, 0x20, 0x07, 0x75, 0x60, 0x07, 0x6d,
9852 0x60, 0x0f, 0x72, 0x50, 0x07, 0x76, 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76,
9853 0xa0, 0x07, 0x72, 0x50, 0x07, 0x76, 0xd0, 0x06, 0xf6, 0x50, 0x07, 0x71,
9854 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71, 0x20, 0x07, 0x7a, 0x50, 0x07, 0x71,
9855 0x20, 0x07, 0x6d, 0x60, 0x0f, 0x71, 0x00, 0x07, 0x72, 0x40, 0x07, 0x7a,
9856 0x10, 0x07, 0x70, 0x20, 0x07, 0x74, 0xa0, 0x07, 0x71, 0x00, 0x07, 0x72,
9857 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a,
9858 0x30, 0x07, 0x72, 0x30, 0xe4, 0x51, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
9859 0x04, 0x00, 0x00, 0x00, 0x60, 0xc8, 0xe3, 0x00, 0x01, 0x20, 0x00, 0x00,
9860 0x00, 0x08, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x07, 0x02, 0x02, 0x60, 0x00,
9861 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x21, 0x8f, 0x04, 0x04, 0xc0,
9862 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x21, 0x0c, 0x19,
9863 0x6d, 0x0b, 0x32, 0x7d, 0x91, 0xc3, 0x70, 0x54, 0x40, 0x68, 0x51, 0x04,
9864 0x60, 0x12, 0x1b, 0x04, 0x8a, 0xda, 0x0e, 0x00, 0x00, 0x64, 0x81, 0x00,
9865 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19,
9866 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x1a, 0x45,
9867 0x50, 0x02, 0x85, 0x30, 0x02, 0x50, 0x30, 0x05, 0x51, 0x20, 0x85, 0x52,
9868 0x06, 0x64, 0x47, 0x00, 0x0a, 0xa2, 0x40, 0x0a, 0x85, 0xea, 0x58, 0x82,
9869 0x23, 0x00, 0x00, 0xb1, 0x18, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x33,
9870 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43,
9871 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98,
9872 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33,
9873 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05,
9874 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43,
9875 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08,
9876 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78,
9877 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1,
9878 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33,
9879 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e,
9880 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03,
9881 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60,
9882 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80,
9883 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8,
9884 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18,
9885 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee,
9886 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c,
9887 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c,
9888 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43,
9889 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3,
9890 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83,
9891 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc7, 0x69,
9892 0x87, 0x70, 0x58, 0x87, 0x72, 0x70, 0x83, 0x74, 0x68, 0x07, 0x78, 0x60,
9893 0x87, 0x74, 0x18, 0x87, 0x74, 0xa0, 0x87, 0x19, 0xce, 0x53, 0x0f, 0xee,
9894 0x00, 0x0f, 0xf2, 0x50, 0x0e, 0xe4, 0x90, 0x0e, 0xe3, 0x40, 0x0f, 0xe1,
9895 0x20, 0x0e, 0xec, 0x50, 0x0e, 0x33, 0x20, 0x28, 0x1d, 0xdc, 0xc1, 0x1e,
9896 0xc2, 0x41, 0x1e, 0xd2, 0x21, 0x1c, 0xdc, 0x81, 0x1e, 0xdc, 0xe0, 0x1c,
9897 0xe4, 0xe1, 0x1d, 0xea, 0x01, 0x1e, 0x66, 0x18, 0x51, 0x38, 0xb0, 0x43,
9898 0x3a, 0x9c, 0x83, 0x3b, 0xcc, 0x50, 0x24, 0x76, 0x60, 0x07, 0x7b, 0x68,
9899 0x07, 0x37, 0x60, 0x87, 0x77, 0x78, 0x07, 0x78, 0x98, 0x51, 0x4c, 0xf4,
9900 0x90, 0x0f, 0xf0, 0x50, 0x0e, 0x33, 0x1e, 0x6a, 0x1e, 0xca, 0x61, 0x1c,
9901 0xe8, 0x21, 0x1d, 0xde, 0xc1, 0x1d, 0x7e, 0x01, 0x1e, 0xe4, 0xa1, 0x1c,
9902 0xcc, 0x21, 0x1d, 0xf0, 0x61, 0x06, 0x54, 0x85, 0x83, 0x38, 0xcc, 0xc3,
9903 0x3b, 0xb0, 0x43, 0x3d, 0xd0, 0x43, 0x39, 0xfc, 0xc2, 0x3c, 0xe4, 0x43,
9904 0x3b, 0x88, 0xc3, 0x3b, 0xb0, 0xc3, 0x8c, 0xc5, 0x0a, 0x87, 0x79, 0x98,
9905 0x87, 0x77, 0x18, 0x87, 0x74, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x98,
9906 0x81, 0x5c, 0xe3, 0x10, 0x0e, 0xec, 0xc0, 0x0e, 0xe5, 0x50, 0x0e, 0xf3,
9907 0x30, 0x23, 0xc1, 0xd2, 0x41, 0x1e, 0xe4, 0xe1, 0x17, 0xd8, 0xe1, 0x1d,
9908 0xde, 0x01, 0x1e, 0x66, 0x48, 0x19, 0x3b, 0xb0, 0x83, 0x3d, 0xb4, 0x83,
9909 0x1b, 0x84, 0xc3, 0x38, 0x8c, 0x43, 0x39, 0xcc, 0xc3, 0x3c, 0xb8, 0xc1,
9910 0x39, 0xc8, 0xc3, 0x3b, 0xd4, 0x03, 0x3c, 0xcc, 0x48, 0xb4, 0x71, 0x08,
9911 0x07, 0x76, 0x60, 0x07, 0x71, 0x08, 0x87, 0x71, 0x58, 0x87, 0x19, 0xdb,
9912 0xc6, 0x0e, 0xec, 0x60, 0x0f, 0xed, 0xe0, 0x06, 0xf0, 0x20, 0x0f, 0xe5,
9913 0x30, 0x0f, 0xe5, 0x20, 0x0f, 0xf6, 0x50, 0x0e, 0x6e, 0x10, 0x0e, 0xe3,
9914 0x30, 0x0e, 0xe5, 0x30, 0x0f, 0xf3, 0xe0, 0x06, 0xe9, 0xe0, 0x0e, 0xe4,
9915 0x50, 0x0e, 0xf8, 0x30, 0x23, 0xe2, 0xec, 0x61, 0x1c, 0xc2, 0x81, 0x1d,
9916 0xd8, 0xe1, 0x17, 0xec, 0x21, 0x1d, 0xe6, 0x21, 0x1d, 0xc4, 0x21, 0x1d,
9917 0xd8, 0x21, 0x1d, 0xe8, 0x21, 0x1f, 0x66, 0x20, 0x9d, 0x3b, 0xbc, 0x43,
9918 0x3d, 0xb8, 0x03, 0x39, 0x94, 0x83, 0x39, 0xcc, 0x58, 0xbc, 0x70, 0x70,
9919 0x07, 0x77, 0x78, 0x07, 0x7a, 0x08, 0x07, 0x7a, 0x48, 0x87, 0x77, 0x70,
9920 0x87, 0x19, 0xce, 0x87, 0x0e, 0xe5, 0x10, 0x0e, 0xf0, 0x10, 0x0e, 0xec,
9921 0xc0, 0x0e, 0xef, 0x30, 0x0e, 0xf3, 0x90, 0x0e, 0xf4, 0x50, 0x0e, 0x33,
9922 0x28, 0x30, 0x08, 0x87, 0x74, 0x90, 0x07, 0x37, 0x30, 0x87, 0x7a, 0x70,
9923 0x87, 0x71, 0xa0, 0x87, 0x74, 0x78, 0x07, 0x77, 0xf8, 0x85, 0x73, 0x90,
9924 0x87, 0x77, 0xa8, 0x07, 0x78, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0x79,
9925 0x18, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51,
9926 0xaa, 0x01, 0x19, 0x88, 0x14, 0x00, 0x00, 0x8b, 0x12, 0x07, 0xc5, 0xc6,
9927 0x95, 0x41, 0x14, 0x19, 0x12, 0xa5, 0x3c, 0x06, 0x33, 0x30, 0xd2, 0xa0,
9928 0x3c, 0x12, 0x42, 0x25, 0x0c, 0x81, 0x14, 0x4c, 0x74, 0x31, 0xcc, 0xa2,
9929 0x80, 0x41, 0xb3, 0x1c, 0x0d, 0x00, 0x00, 0x53, 0x44, 0x4b, 0x20, 0x56,
9930 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x77, 0x63, 0x68, 0x61, 0x72, 0x5f,
9931 0x73, 0x69, 0x7a, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x65,
9932 0x74, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,
9933 0x33, 0x32, 0x30, 0x32, 0x33, 0x2e, 0x31, 0x30, 0x31, 0x20, 0x28, 0x6d,
9934 0x65, 0x74, 0x61, 0x6c, 0x66, 0x65, 0x2d, 0x33, 0x32, 0x30, 0x32, 0x33,
9935 0x2e, 0x31, 0x30, 0x31, 0x29, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x61, 0x69,
9936 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x64, 0x65,
9937 0x6e, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c,
9938 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
9939 0x2e, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x65,
9940 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x63, 0x6f, 0x6d,
9941 0x70, 0x69, 0x6c, 0x65, 0x2e, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x62, 0x75,
9942 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x64,
9943 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65,
9944 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x61,
9945 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f,
9946 0x6e, 0x61, 0x6d, 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x61, 0x69,
9947 0x72, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69,
9948 0x6e, 0x70, 0x75, 0x74, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
9949 0x64, 0x28, 0x33, 0x74, 0x65, 0x78, 0x44, 0x76, 0x32, 0x5f, 0x66, 0x29,
9950 0x61, 0x69, 0x72, 0x2e, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x69,
9951 0x72, 0x2e, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x76,
9952 0x65, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x61, 0x69, 0x72, 0x2e, 0x61,
9953 0x72, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x78, 0x61, 0x69,
9954 0x72, 0x2e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x69,
9955 0x72, 0x2e, 0x6e, 0x6f, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x70, 0x65, 0x63,
9956 0x74, 0x69, 0x76, 0x65, 0x70, 0x6f, 0x73, 0x61, 0x69, 0x72, 0x2e, 0x62,
9957 0x75, 0x66, 0x66, 0x65, 0x72, 0x61, 0x69, 0x72, 0x2e, 0x62, 0x75, 0x66,
9958 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x61, 0x69, 0x72, 0x2e,
9959 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64,
9960 0x65, 0x78, 0x61, 0x69, 0x72, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x61, 0x69,
9961 0x72, 0x2e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70,
9962 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x55, 0x56, 0x4c, 0x65, 0x66, 0x74,
9963 0x54, 0x6f, 0x70, 0x55, 0x56, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69,
9964 0x6f, 0x6e, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x4d, 0x69, 0x70, 0x4c, 0x65,
9965 0x76, 0x65, 0x6c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4c, 0x61, 0x79, 0x65,
9966 0x72, 0x4f, 0x72, 0x44, 0x65, 0x70, 0x74, 0x68, 0x61, 0x69, 0x72, 0x2e,
9967 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x69, 0x7a,
9968 0x65, 0x61, 0x69, 0x72, 0x2e, 0x61, 0x72, 0x67, 0x5f, 0x74, 0x79, 0x70,
9969 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65,
9970 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
9971 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
9972 0x61, 0x69, 0x72, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61,
9973 0x69, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x78,
9974 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65, 0x5f, 0x61, 0x72, 0x72,
9975 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2c, 0x20, 0x73, 0x61,
9976 0x6d, 0x70, 0x6c, 0x65, 0x3e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
9977 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x61, 0x69, 0x72, 0x2e, 0x73, 0x61,
9978 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72,
9979 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65,
9980 0x72, 0x00, 0x00, 0x13, 0x84, 0x81, 0x98, 0x20, 0x54, 0xd1, 0x04, 0x61,
9981 0x28, 0x26, 0x08, 0x83, 0x31, 0x41, 0x18, 0x8e, 0x09, 0xc2, 0x02, 0x4c,
9982 0x10, 0x06, 0x64, 0x82, 0x30, 0x24, 0x13, 0x84, 0x41, 0x99, 0x20, 0x0c,
9983 0xcb, 0x04, 0x61, 0x60, 0x36, 0x0c, 0x6b, 0x10, 0xb0, 0xc1, 0x86, 0xa1,
9984 0x0d, 0x04, 0x37, 0xd8, 0x10, 0x0c, 0x1b, 0x86, 0x35, 0x78, 0x83, 0x37,
9985 0xd8, 0x40, 0x10, 0x6b, 0xf0, 0x06, 0x6f, 0xb0, 0x21, 0x28, 0x36, 0x04,
9986 0xc6, 0x86, 0xe0, 0xd8, 0x50, 0x20, 0x6f, 0xf0, 0x06, 0x89, 0xb2, 0x21,
9987 0xf0, 0x83, 0x0d, 0xc9, 0x1b, 0x2c, 0x4c, 0xe3, 0x24, 0x0f, 0x14, 0x6d,
9988 0x40, 0xda, 0x40, 0x6a, 0xa6, 0x44, 0x81, 0xa8, 0x0d, 0xd4, 0x1b, 0xc8,
9989 0xc1, 0x1b, 0x3c, 0x9a, 0x1c, 0xc8, 0xc1, 0x1b, 0x3c, 0xdb, 0x1c, 0xb8,
9990 0xc1, 0x1b, 0x70, 0x1d, 0x1d, 0xb8, 0xc1, 0x1b, 0x78, 0xdf, 0x06, 0x69,
9991 0x0d, 0x2a, 0x2b, 0x0e, 0xae, 0x37, 0x68, 0x03, 0x2c, 0x13, 0x05, 0x30,
9992 0x88, 0x83, 0x30, 0x90, 0x83, 0x44, 0x0c, 0xa0, 0x31, 0xd8, 0xa0, 0xd4,
9993 0x01, 0x19, 0x5c, 0x6f, 0xd0, 0x06, 0x65, 0x90, 0x98, 0x01, 0x74, 0x06,
9994 0x1b, 0x12, 0x37, 0x40, 0x83, 0xeb, 0x0d, 0xda, 0x20, 0x49, 0x03, 0x48,
9995 0x0d, 0x36, 0x14, 0xa0, 0x10, 0x0a, 0xa3, 0x40, 0x0a, 0xa5, 0xb0, 0x61,
9996 0x80, 0x83, 0x3f, 0x30, 0x05, 0x8d, 0x04, 0x26, 0xa8, 0x11, 0x1b, 0x9b,
9997 0x5d, 0x9b, 0x4b, 0xdb, 0x1b, 0x59, 0x1d, 0x5b, 0x99, 0x8b, 0x19, 0x5b,
9998 0xd8, 0xd9, 0xdc, 0x14, 0xa1, 0x0e, 0xec, 0xa0, 0x0a, 0x1b, 0x9b, 0x5d,
9999 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94, 0xe0, 0x0e, 0xba, 0x84,
10000 0xa5, 0xc9, 0xb9, 0xd8, 0x95, 0xc9, 0xcd, 0xa5, 0xbd, 0xb9, 0x4d, 0x09,
10001 0xf0, 0xa0, 0x54, 0x58, 0x9a, 0x9c, 0x0b, 0x5b, 0x98, 0xdb, 0x59, 0x5d,
10002 0xd8, 0x59, 0xd9, 0x97, 0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94,
10003 0x20, 0x0f, 0x3a, 0x85, 0xa5, 0xc9, 0xb9, 0x8c, 0xbd, 0xb5, 0xc1, 0xa5,
10004 0xb1, 0x95, 0x7d, 0xbd, 0xc1, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x19,
10005 0xf4, 0x60, 0x0f, 0xf8, 0xa0, 0x4c, 0x58, 0x9a, 0x9c, 0x8b, 0x99, 0x5c,
10006 0xd8, 0x59, 0x5b, 0x99, 0x1b, 0xdd, 0x94, 0xc0, 0x14, 0x00, 0x00, 0xa9,
10007 0x18, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x72, 0x28, 0x87,
10008 0x77, 0x80, 0x07, 0x7a, 0x58, 0x70, 0x98, 0x43, 0x3d, 0xb8, 0xc3, 0x38,
10009 0xb0, 0x43, 0x39, 0xd0, 0xc3, 0x82, 0xe6, 0x1c, 0xc6, 0xa1, 0x0d, 0xe8,
10010 0x41, 0x1e, 0xc2, 0xc1, 0x1d, 0xe6, 0x21, 0x1d, 0xe8, 0x21, 0x1d, 0xde,
10011 0xc1, 0x1d, 0x16, 0x34, 0xe3, 0x60, 0x0e, 0xe7, 0x50, 0x0f, 0xe1, 0x20,
10012 0x0f, 0xe4, 0x40, 0x0f, 0xe1, 0x20, 0x0f, 0xe7, 0x50, 0x0e, 0xf4, 0xb0,
10013 0x80, 0x81, 0x07, 0x79, 0x28, 0x87, 0x70, 0x60, 0x07, 0x76, 0x78, 0x87,
10014 0x71, 0x08, 0x07, 0x7a, 0x28, 0x07, 0x72, 0x58, 0x70, 0x9c, 0xc3, 0x38,
10015 0xb4, 0x01, 0x3b, 0xa4, 0x83, 0x3d, 0x94, 0xc3, 0x02, 0x6b, 0x1c, 0xd8,
10016 0x21, 0x1c, 0xdc, 0xe1, 0x1c, 0xdc, 0x20, 0x1c, 0xe4, 0x61, 0x1c, 0xdc,
10017 0x20, 0x1c, 0xe8, 0x81, 0x1e, 0xc2, 0x61, 0x1c, 0xd0, 0xa1, 0x1c, 0xc8,
10018 0x61, 0x1c, 0xc2, 0x81, 0x1d, 0xd8, 0x61, 0xc1, 0x01, 0x0f, 0xf4, 0x20,
10019 0x0f, 0xe1, 0x50, 0x0f, 0xf4, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x61,
10020 0x20, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x13, 0x04, 0x48, 0x2c, 0x10,
10021 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x34, 0x8a, 0xa1, 0x14, 0xa8,
10022 0xd5, 0x00, 0xd9, 0x12, 0x28, 0x02, 0xda, 0x63, 0x0d, 0x40, 0x20, 0x10,
10023 0x98, 0x01, 0x18, 0x23, 0x00, 0x41, 0x10, 0x04, 0x41, 0x61, 0x06, 0x60,
10024 0x8c, 0x00, 0x04, 0x41, 0x10, 0xff, 0x85, 0x31, 0x02, 0x10, 0x04, 0x41,
10025 0xfc, 0x1b, 0x01, 0x18, 0x23, 0x00, 0x41, 0x10, 0x04, 0xc1, 0x80, 0xc2,
10026 0x1c, 0x44, 0x18, 0x74, 0xdd, 0x37, 0x07, 0x01, 0x06, 0x5d, 0xf7, 0xcd,
10027 0x41, 0x74, 0x61, 0xd0, 0x7d, 0x73, 0x10, 0x1d, 0x18, 0x74, 0xdf, 0x1c,
10028 0x44, 0xd7, 0x85, 0xc1, 0x37, 0x07, 0xd1, 0x75, 0x60, 0xf0, 0xcd, 0x41,
10029 0x88, 0x81, 0x18, 0x88, 0xc1, 0x37, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf1,
10030 0x30, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x22, 0x47, 0xc8, 0x90, 0x51,
10031 0x1e, 0x88, 0x4b, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x23, 0x0d, 0x63, 0x80,
10032 0x61, 0x00, 0x00, 0x6f, 0x6d, 0x6e, 0x69, 0x70, 0x6f, 0x74, 0x65, 0x6e,
10033 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65,
10034 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x54, 0x42, 0x41, 0x41, 0x5f, 0x5a, 0x54,
10035 0x53, 0x31, 0x32, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x67,
10036 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c,
10037 0x69, 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x28, 0x42,
10038 0x6c, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x75, 0x62, 0x65, 0x41,
10039 0x72, 0x72, 0x61, 0x79, 0x29, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69,
10040 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x73, 0x61, 0x6d,
10041 0x70, 0x6c, 0x65, 0x72, 0x73, 0x61, 0x69, 0x72, 0x2d, 0x61, 0x6c, 0x69,
10042 0x61, 0x73, 0x2d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2d, 0x74, 0x65, 0x78,
10043 0x74, 0x75, 0x72, 0x65, 0x73, 0x00, 0x00, 0x13, 0x04, 0xab, 0x99, 0x20,
10044 0x58, 0xce, 0x04, 0xc1, 0x7a, 0x26, 0x08, 0x16, 0xb4, 0x42, 0x98, 0x05,
10045 0x56, 0x58, 0x31, 0xd0, 0xc2, 0x2c, 0xb4, 0xc2, 0x8a, 0xa1, 0x16, 0x66,
10046 0xc1, 0x15, 0x36, 0x04, 0xa9, 0xb0, 0x61, 0x40, 0x05, 0x5b, 0x78, 0x85,
10047 0x0d, 0xc3, 0x2d, 0xdc, 0xc2, 0x2b, 0x6c, 0x18, 0x56, 0xe1, 0x16, 0x5e,
10048 0x61, 0xc3, 0xe0, 0xdd, 0xc2, 0x2b, 0x6c, 0x48, 0x54, 0xe1, 0x16, 0x5e,
10049 0xe1, 0x16, 0x60, 0x21, 0x17, 0x62, 0x41, 0x17, 0x64, 0x61, 0xc3, 0xb0,
10050 0x0b, 0xba, 0x20, 0x0b, 0x1b, 0x86, 0x5d, 0xc8, 0x85, 0x58, 0xd8, 0x20,
10051 0xd4, 0x02, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x0c, 0xd8, 0x57, 0x06,
10052 0x14, 0x08, 0xb2, 0xc9, 0xa0, 0x85, 0x41, 0x1a, 0x50, 0x20, 0x88, 0x05,
10053 0x9e, 0x7c, 0x2c, 0x20, 0xe0, 0x33, 0x86, 0x10, 0x94, 0x81, 0x05, 0x90,
10054 0x7c, 0x2c, 0xa0, 0xe0, 0x33, 0x86, 0x40, 0x6c, 0x16, 0x4c, 0xf2, 0xb1,
10055 0xe0, 0x82, 0xcf, 0x26, 0x03, 0x19, 0xac, 0x01, 0x1b, 0x50, 0x00, 0xc6,
10056 0x88, 0x41, 0x41, 0x84, 0x20, 0x18, 0x48, 0x77, 0x10, 0x54, 0x40, 0x06,
10057 0x35, 0xcc, 0x33, 0x04, 0xc7, 0x11, 0x14, 0x02, 0x31, 0x30, 0x84, 0x51,
10058 0x60, 0x86, 0x79, 0x45, 0x7c, 0xe6, 0x18, 0xb2, 0x60, 0x0c, 0x0c, 0x0c,
10059 0x94, 0xf8, 0xcc, 0x31, 0x08, 0x01, 0x19, 0xcc, 0x12, 0x1c, 0x26, 0x06,
10060 0x49, 0x7c, 0xe6, 0x18, 0xb8, 0xe0, 0x0c, 0xe6, 0x18, 0x02, 0xe7, 0x0c,
10061 0x66, 0x09, 0x8e, 0x39, 0x86, 0xee, 0xb1, 0x03, 0x33, 0x83, 0x26, 0x3e,
10062 0x73, 0x0c, 0x42, 0xa0, 0x06, 0xb3, 0x04, 0xc7, 0x1c, 0xc3, 0x27, 0xe5,
10063 0xc1, 0x1c, 0x43, 0x00, 0xb1, 0xc1, 0x2c, 0xc1, 0x61, 0x6a, 0x10, 0xc5,
10064 0x67, 0x8e, 0x21, 0x0c, 0x2a, 0x3e, 0x98, 0x63, 0x08, 0x04, 0x38, 0x98,
10065 0x25, 0x38, 0xac, 0x0d, 0xae, 0xf8, 0x98, 0x1b, 0x54, 0xf1, 0x99, 0x63,
10066 0x20, 0x03, 0x01, 0x14, 0xe6, 0x18, 0x02, 0x81, 0x0e, 0x66, 0x09, 0x8e,
10067 0x81, 0x9e, 0x40, 0x30, 0x94, 0x02, 0x22, 0xa8, 0x41, 0x13, 0xc0, 0x20,
10068 0x50, 0x05, 0x60, 0x90, 0x21, 0x28, 0x03, 0x3a, 0xa8, 0x4b, 0x0f, 0x66,
10069 0x93, 0xc1, 0x0f, 0x4a, 0xc1, 0x15, 0x28, 0x18, 0x64, 0xc4, 0xc0, 0x20,
10070 0x42, 0x10, 0x2c, 0x3e, 0x48, 0x16, 0x82, 0x11, 0x03, 0xa6, 0x08, 0x41,
10071 0xb0, 0xf8, 0x1c, 0x5a, 0x00, 0x85, 0x3f, 0x28, 0x08, 0x3e, 0x08, 0x5c,
10072 0x21, 0x83, 0x80, 0x18, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x5b,
10073 0x86, 0x20, 0xb8, 0x85, 0x2d, 0xc3, 0x10, 0xdc, 0xc2, 0x96, 0xa1, 0x09,
10074 0x76, 0x61, 0xcb, 0xe0, 0x06, 0x01, 0x2f, 0x6c, 0x19, 0xe0, 0xe0, 0xe8,
10075 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x1a,
10076 0x00, 0x00, 0x00, 0x52, 0x0e, 0x10, 0x22, 0x64, 0x82, 0xa4, 0x1c, 0x20,
10077 0x44, 0xc8, 0xe4, 0x48, 0x39, 0x40, 0x88, 0x90, 0xa1, 0x09, 0x5c, 0x00,
10078 0x12, 0xf9, 0x82, 0xd3, 0x54, 0x44, 0x34, 0xf9, 0x85, 0x5f, 0xdc, 0xb6,
10079 0x4f, 0xf9, 0xc8, 0x6d, 0xdb, 0xc0, 0x05, 0x20, 0x91, 0x2f, 0x38, 0x4d,
10080 0x45, 0x44, 0x93, 0x4f, 0xf9, 0xc8, 0x6d, 0xfb, 0x85, 0x5f, 0xdc, 0xb6,
10081 0x05, 0x8c, 0x01, 0x80, 0x44, 0xbe, 0x04, 0x30, 0xcf, 0x42, 0xfc, 0x13,
10082 0x71, 0x4d, 0x54, 0x44, 0xfc, 0x02, 0x15, 0x10, 0x3f, 0x10, 0x45, 0x00,
10083 0xe6, 0x57, 0x78, 0x71, 0xdb, 0x0a, 0xf0, 0x68, 0x10, 0x6d, 0x0b, 0x32,
10084 0x7d, 0x91, 0xc3, 0x70, 0x54, 0x40, 0x68, 0x51, 0x04, 0x60, 0x00, 0x00,
10085 0x00, 0x00, 0x00
10086};
10087const unsigned int BlitFromCubeArray_metallib_len = 4179;
10088#endif
diff --git a/contrib/SDL-3.2.8/src/gpu/metal/Metal_Blit.metal b/contrib/SDL-3.2.8/src/gpu/metal/Metal_Blit.metal
new file mode 100644
index 0000000..212903d
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/metal/Metal_Blit.metal
@@ -0,0 +1,110 @@
1#include <metal_stdlib>
2using namespace metal;
3
4struct VertexToFragment {
5 float2 tex;
6 float4 pos [[position]];
7};
8
9struct SourceRegion {
10 float2 UVLeftTop;
11 float2 UVDimensions;
12 uint MipLevel;
13 float LayerOrDepth;
14};
15
16#if COMPILE_FullscreenVert
17vertex VertexToFragment FullscreenVert(uint vI [[vertex_id]]) {
18 float2 inTex = float2((vI << 1) & 2, vI & 2);
19 VertexToFragment out;
20 out.tex = inTex;
21 out.pos = float4(inTex * float2(2.0f, -2.0f) + float2(-1.0f, 1.0f), 0.0f, 1.0f);
22 return out;
23}
24#endif
25
26#if COMPILE_BlitFrom2D
27fragment float4 BlitFrom2D(
28 VertexToFragment input [[stage_in]],
29 constant SourceRegion &sourceRegion [[buffer(0)]],
30 texture2d<float> sourceTexture [[texture(0)]],
31 sampler sourceSampler [[sampler(0)]])
32{
33 float2 newCoord = sourceRegion.UVLeftTop + sourceRegion.UVDimensions * input.tex;
34 return sourceTexture.sample(sourceSampler, newCoord, level(sourceRegion.MipLevel));
35}
36#endif
37
38#if COMPILE_BlitFrom2DArray
39fragment float4 BlitFrom2DArray(
40 VertexToFragment input [[stage_in]],
41 constant SourceRegion &sourceRegion [[buffer(0)]],
42 texture2d_array<float> sourceTexture [[texture(0)]],
43 sampler sourceSampler [[sampler(0)]])
44{
45 float2 newCoord = sourceRegion.UVLeftTop + sourceRegion.UVDimensions * input.tex;
46 return sourceTexture.sample(sourceSampler, newCoord, (uint)sourceRegion.LayerOrDepth, level(sourceRegion.MipLevel));
47}
48#endif
49
50#if COMPILE_BlitFrom3D
51fragment float4 BlitFrom3D(
52 VertexToFragment input [[stage_in]],
53 constant SourceRegion &sourceRegion [[buffer(0)]],
54 texture3d<float> sourceTexture [[texture(0)]],
55 sampler sourceSampler [[sampler(0)]])
56{
57 float2 newCoord = sourceRegion.UVLeftTop + sourceRegion.UVDimensions * input.tex;
58 return sourceTexture.sample(sourceSampler, float3(newCoord, sourceRegion.LayerOrDepth), level(sourceRegion.MipLevel));
59}
60#endif
61
62#if COMPILE_BlitFromCube
63fragment float4 BlitFromCube(
64 VertexToFragment input [[stage_in]],
65 constant SourceRegion &sourceRegion [[buffer(0)]],
66 texturecube<float> sourceTexture [[texture(0)]],
67 sampler sourceSampler [[sampler(0)]])
68{
69 // Thanks, Wikipedia! https://en.wikipedia.org/wiki/Cube_mapping
70 float2 scaledUV = sourceRegion.UVLeftTop + sourceRegion.UVDimensions * input.tex;
71 float u = 2.0 * scaledUV.x - 1.0;
72 float v = 2.0 * scaledUV.y - 1.0;
73 float3 newCoord;
74 switch ((uint)sourceRegion.LayerOrDepth) {
75 case 0: newCoord = float3(1.0, -v, -u); break; // POSITIVE X
76 case 1: newCoord = float3(-1.0, -v, u); break; // NEGATIVE X
77 case 2: newCoord = float3(u, 1.0, -v); break; // POSITIVE Y
78 case 3: newCoord = float3(u, -1.0, v); break; // NEGATIVE Y
79 case 4: newCoord = float3(u, -v, 1.0); break; // POSITIVE Z
80 case 5: newCoord = float3(-u, -v, -1.0); break; // NEGATIVE Z
81 default: newCoord = float3(0, 0, 0); break; // silences warning
82 }
83 return sourceTexture.sample(sourceSampler, newCoord, level(sourceRegion.MipLevel));
84}
85#endif
86
87#if COMPILE_BlitFromCubeArray
88fragment float4 BlitFromCubeArray(
89 VertexToFragment input [[stage_in]],
90 constant SourceRegion &sourceRegion [[buffer(0)]],
91 texturecube_array<float> sourceTexture [[texture(0)]],
92 sampler sourceSampler [[sampler(0)]])
93{
94 // Thanks, Wikipedia! https://en.wikipedia.org/wiki/Cube_mapping
95 float2 scaledUV = sourceRegion.UVLeftTop + sourceRegion.UVDimensions * input.tex;
96 float u = 2.0 * scaledUV.x - 1.0;
97 float v = 2.0 * scaledUV.y - 1.0;
98 float3 newCoord;
99 switch (((uint)sourceRegion.LayerOrDepth) % 6) {
100 case 0: newCoord = float3(1.0, -v, -u); break; // POSITIVE X
101 case 1: newCoord = float3(-1.0, -v, u); break; // NEGATIVE X
102 case 2: newCoord = float3(u, 1.0, -v); break; // POSITIVE Y
103 case 3: newCoord = float3(u, -1.0, v); break; // NEGATIVE Y
104 case 4: newCoord = float3(u, -v, 1.0); break; // POSITIVE Z
105 case 5: newCoord = float3(-u, -v, -1.0); break; // NEGATIVE Z
106 default: newCoord = float3(0, 0, 0); break; // silences warning
107 }
108 return sourceTexture.sample(sourceSampler, newCoord, (uint)sourceRegion.LayerOrDepth / 6, level(sourceRegion.MipLevel));
109}
110#endif
diff --git a/contrib/SDL-3.2.8/src/gpu/metal/SDL_gpu_metal.m b/contrib/SDL-3.2.8/src/gpu/metal/SDL_gpu_metal.m
new file mode 100644
index 0000000..365b344
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/metal/SDL_gpu_metal.m
@@ -0,0 +1,4580 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#include "SDL_internal.h"
23
24#ifdef SDL_GPU_METAL
25
26#include <Metal/Metal.h>
27#include <QuartzCore/CoreAnimation.h>
28
29#include "../SDL_sysgpu.h"
30
31// Defines
32
33#define METAL_FIRST_VERTEX_BUFFER_SLOT 14
34#define WINDOW_PROPERTY_DATA "SDL_GPUMetalWindowPropertyData"
35#define SDL_GPU_SHADERSTAGE_COMPUTE 2
36
37#define TRACK_RESOURCE(resource, type, array, count, capacity) \
38 do { \
39 Uint32 i; \
40 \
41 for (i = 0; i < commandBuffer->count; i += 1) { \
42 if (commandBuffer->array[i] == (resource)) { \
43 return; \
44 } \
45 } \
46 \
47 if (commandBuffer->count == commandBuffer->capacity) { \
48 commandBuffer->capacity += 1; \
49 commandBuffer->array = SDL_realloc( \
50 commandBuffer->array, \
51 commandBuffer->capacity * sizeof(type)); \
52 } \
53 commandBuffer->array[commandBuffer->count] = (resource); \
54 commandBuffer->count += 1; \
55 SDL_AtomicIncRef(&(resource)->referenceCount); \
56 } while (0)
57
58#define SET_ERROR_AND_RETURN(fmt, msg, ret) \
59 do { \
60 if (renderer->debugMode) { \
61 SDL_LogError(SDL_LOG_CATEGORY_GPU, fmt, msg); \
62 } \
63 SDL_SetError(fmt, msg); \
64 return ret; \
65 } while (0)
66
67#define SET_STRING_ERROR_AND_RETURN(msg, ret) SET_ERROR_AND_RETURN("%s", msg, ret)
68
69// Blit Shaders
70
71#include "Metal_Blit.h"
72
73// Forward Declarations
74
75static bool METAL_Wait(SDL_GPURenderer *driverData);
76static void METAL_ReleaseWindow(
77 SDL_GPURenderer *driverData,
78 SDL_Window *window);
79static void METAL_INTERNAL_DestroyBlitResources(SDL_GPURenderer *driverData);
80
81// Conversions
82
83#define RETURN_FORMAT(availability, format) \
84 if (availability) { return format; } else { return MTLPixelFormatInvalid; }
85
86static MTLPixelFormat SDLToMetal_TextureFormat(SDL_GPUTextureFormat format)
87{
88 switch (format) {
89 case SDL_GPU_TEXTUREFORMAT_INVALID: return MTLPixelFormatInvalid;
90 case SDL_GPU_TEXTUREFORMAT_A8_UNORM: return MTLPixelFormatA8Unorm;
91 case SDL_GPU_TEXTUREFORMAT_R8_UNORM: return MTLPixelFormatR8Unorm;
92 case SDL_GPU_TEXTUREFORMAT_R8G8_UNORM: return MTLPixelFormatRG8Unorm;
93 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM: return MTLPixelFormatRGBA8Unorm;
94 case SDL_GPU_TEXTUREFORMAT_R16_UNORM: return MTLPixelFormatR16Unorm;
95 case SDL_GPU_TEXTUREFORMAT_R16G16_UNORM: return MTLPixelFormatRG16Unorm;
96 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM: return MTLPixelFormatRGBA16Unorm;
97 case SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM: return MTLPixelFormatRGB10A2Unorm;
98 case SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatB5G6R5Unorm);
99 case SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatBGR5A1Unorm);
100 case SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatABGR4Unorm);
101 case SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM: return MTLPixelFormatBGRA8Unorm;
102 case SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC1_RGBA);
103 case SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC2_RGBA);
104 case SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC3_RGBA);
105 case SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC4_RUnorm);
106 case SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC5_RGUnorm);
107 case SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC7_RGBAUnorm);
108 case SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC6H_RGBFloat);
109 case SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC6H_RGBUfloat);
110 case SDL_GPU_TEXTUREFORMAT_R8_SNORM: return MTLPixelFormatR8Snorm;
111 case SDL_GPU_TEXTUREFORMAT_R8G8_SNORM: return MTLPixelFormatRG8Snorm;
112 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM: return MTLPixelFormatRGBA8Snorm;
113 case SDL_GPU_TEXTUREFORMAT_R16_SNORM: return MTLPixelFormatR16Snorm;
114 case SDL_GPU_TEXTUREFORMAT_R16G16_SNORM: return MTLPixelFormatRG16Snorm;
115 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM: return MTLPixelFormatRGBA16Snorm;
116 case SDL_GPU_TEXTUREFORMAT_R16_FLOAT: return MTLPixelFormatR16Float;
117 case SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT: return MTLPixelFormatRG16Float;
118 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT: return MTLPixelFormatRGBA16Float;
119 case SDL_GPU_TEXTUREFORMAT_R32_FLOAT: return MTLPixelFormatR32Float;
120 case SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT: return MTLPixelFormatRG32Float;
121 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT: return MTLPixelFormatRGBA32Float;
122 case SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT: return MTLPixelFormatRG11B10Float;
123 case SDL_GPU_TEXTUREFORMAT_R8_UINT: return MTLPixelFormatR8Uint;
124 case SDL_GPU_TEXTUREFORMAT_R8G8_UINT: return MTLPixelFormatRG8Uint;
125 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT: return MTLPixelFormatRGBA8Uint;
126 case SDL_GPU_TEXTUREFORMAT_R16_UINT: return MTLPixelFormatR16Uint;
127 case SDL_GPU_TEXTUREFORMAT_R16G16_UINT: return MTLPixelFormatRG16Uint;
128 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT: return MTLPixelFormatRGBA16Uint;
129 case SDL_GPU_TEXTUREFORMAT_R32_UINT: return MTLPixelFormatR32Uint;
130 case SDL_GPU_TEXTUREFORMAT_R32G32_UINT: return MTLPixelFormatRG32Uint;
131 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT: return MTLPixelFormatRGBA32Uint;
132 case SDL_GPU_TEXTUREFORMAT_R8_INT: return MTLPixelFormatR8Sint;
133 case SDL_GPU_TEXTUREFORMAT_R8G8_INT: return MTLPixelFormatRG8Sint;
134 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT: return MTLPixelFormatRGBA8Sint;
135 case SDL_GPU_TEXTUREFORMAT_R16_INT: return MTLPixelFormatR16Sint;
136 case SDL_GPU_TEXTUREFORMAT_R16G16_INT: return MTLPixelFormatRG16Sint;
137 case SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT: return MTLPixelFormatRGBA16Sint;
138 case SDL_GPU_TEXTUREFORMAT_R32_INT: return MTLPixelFormatR32Sint;
139 case SDL_GPU_TEXTUREFORMAT_R32G32_INT: return MTLPixelFormatRG32Sint;
140 case SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT: return MTLPixelFormatRGBA32Sint;
141 case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB: return MTLPixelFormatRGBA8Unorm_sRGB;
142 case SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB: return MTLPixelFormatBGRA8Unorm_sRGB;
143 case SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC1_RGBA_sRGB);
144 case SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC2_RGBA_sRGB);
145 case SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC3_RGBA_sRGB);
146 case SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB: RETURN_FORMAT(@available(iOS 16.4, tvOS 16.4, *), MTLPixelFormatBC7_RGBAUnorm_sRGB);
147 case SDL_GPU_TEXTUREFORMAT_D16_UNORM: RETURN_FORMAT(@available(iOS 13.0, tvOS 13.0, *), MTLPixelFormatDepth16Unorm);
148 case SDL_GPU_TEXTUREFORMAT_D24_UNORM:
149#ifdef SDL_PLATFORM_MACOS
150 return MTLPixelFormatDepth24Unorm_Stencil8;
151#else
152 return MTLPixelFormatInvalid;
153#endif
154 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT: return MTLPixelFormatDepth32Float;
155 case SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT:
156#ifdef SDL_PLATFORM_MACOS
157 return MTLPixelFormatDepth24Unorm_Stencil8;
158#else
159 return MTLPixelFormatInvalid;
160#endif
161 case SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT: return MTLPixelFormatDepth32Float_Stencil8;
162 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_4x4_LDR);
163 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_5x4_LDR);
164 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_5x5_LDR);
165 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_6x5_LDR);
166 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_6x6_LDR);
167 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_8x5_LDR);
168 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_8x6_LDR);
169 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_8x8_LDR);
170 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_10x5_LDR);
171 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_10x6_LDR);
172 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_10x8_LDR);
173 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_10x10_LDR);
174 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_12x10_LDR);
175 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_12x12_LDR);
176 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_4x4_sRGB);
177 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_5x4_sRGB);
178 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_5x5_sRGB);
179 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_6x5_sRGB);
180 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_6x6_sRGB);
181 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_8x5_sRGB);
182 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_8x6_sRGB);
183 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_8x8_sRGB);
184 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_10x5_sRGB);
185 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_10x6_sRGB);
186 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_10x8_sRGB);
187 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_10x10_sRGB);
188 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_12x10_sRGB);
189 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB: RETURN_FORMAT(@available(macOS 11.0, *), MTLPixelFormatASTC_12x12_sRGB);
190 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_4x4_HDR);
191 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_5x4_HDR);
192 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_5x5_HDR);
193 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_6x5_HDR);
194 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_6x6_HDR);
195 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_8x5_HDR);
196 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_8x6_HDR);
197 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_8x8_HDR);
198 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_10x5_HDR);
199 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_10x6_HDR);
200 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_10x8_HDR);
201 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_10x10_HDR);
202 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_12x10_HDR);
203 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT: RETURN_FORMAT(@available(macOS 11.0, iOS 13.0, tvOS 16.0, *), MTLPixelFormatASTC_12x12_HDR);
204 }
205}
206
207#undef RETURN_FORMAT
208
209static MTLVertexFormat SDLToMetal_VertexFormat[] = {
210 MTLVertexFormatInvalid, // INVALID
211 MTLVertexFormatInt, // INT
212 MTLVertexFormatInt2, // INT2
213 MTLVertexFormatInt3, // INT3
214 MTLVertexFormatInt4, // INT4
215 MTLVertexFormatUInt, // UINT
216 MTLVertexFormatUInt2, // UINT2
217 MTLVertexFormatUInt3, // UINT3
218 MTLVertexFormatUInt4, // UINT4
219 MTLVertexFormatFloat, // FLOAT
220 MTLVertexFormatFloat2, // FLOAT2
221 MTLVertexFormatFloat3, // FLOAT3
222 MTLVertexFormatFloat4, // FLOAT4
223 MTLVertexFormatChar2, // BYTE2
224 MTLVertexFormatChar4, // BYTE4
225 MTLVertexFormatUChar2, // UBYTE2
226 MTLVertexFormatUChar4, // UBYTE4
227 MTLVertexFormatChar2Normalized, // BYTE2_NORM
228 MTLVertexFormatChar4Normalized, // BYTE4_NORM
229 MTLVertexFormatUChar2Normalized, // UBYTE2_NORM
230 MTLVertexFormatUChar4Normalized, // UBYTE4_NORM
231 MTLVertexFormatShort2, // SHORT2
232 MTLVertexFormatShort4, // SHORT4
233 MTLVertexFormatUShort2, // USHORT2
234 MTLVertexFormatUShort4, // USHORT4
235 MTLVertexFormatShort2Normalized, // SHORT2_NORM
236 MTLVertexFormatShort4Normalized, // SHORT4_NORM
237 MTLVertexFormatUShort2Normalized, // USHORT2_NORM
238 MTLVertexFormatUShort4Normalized, // USHORT4_NORM
239 MTLVertexFormatHalf2, // HALF2
240 MTLVertexFormatHalf4 // HALF4
241};
242SDL_COMPILE_TIME_ASSERT(SDLToMetal_VertexFormat, SDL_arraysize(SDLToMetal_VertexFormat) == SDL_GPU_VERTEXELEMENTFORMAT_MAX_ENUM_VALUE);
243
244static MTLIndexType SDLToMetal_IndexType[] = {
245 MTLIndexTypeUInt16, // 16BIT
246 MTLIndexTypeUInt32, // 32BIT
247};
248
249static MTLPrimitiveType SDLToMetal_PrimitiveType[] = {
250 MTLPrimitiveTypeTriangle, // TRIANGLELIST
251 MTLPrimitiveTypeTriangleStrip, // TRIANGLESTRIP
252 MTLPrimitiveTypeLine, // LINELIST
253 MTLPrimitiveTypeLineStrip, // LINESTRIP
254 MTLPrimitiveTypePoint // POINTLIST
255};
256
257static MTLTriangleFillMode SDLToMetal_PolygonMode[] = {
258 MTLTriangleFillModeFill, // FILL
259 MTLTriangleFillModeLines, // LINE
260};
261
262static MTLCullMode SDLToMetal_CullMode[] = {
263 MTLCullModeNone, // NONE
264 MTLCullModeFront, // FRONT
265 MTLCullModeBack, // BACK
266};
267
268static MTLWinding SDLToMetal_FrontFace[] = {
269 MTLWindingCounterClockwise, // COUNTER_CLOCKWISE
270 MTLWindingClockwise, // CLOCKWISE
271};
272
273static MTLBlendFactor SDLToMetal_BlendFactor[] = {
274 MTLBlendFactorZero, // INVALID
275 MTLBlendFactorZero, // ZERO
276 MTLBlendFactorOne, // ONE
277 MTLBlendFactorSourceColor, // SRC_COLOR
278 MTLBlendFactorOneMinusSourceColor, // ONE_MINUS_SRC_COLOR
279 MTLBlendFactorDestinationColor, // DST_COLOR
280 MTLBlendFactorOneMinusDestinationColor, // ONE_MINUS_DST_COLOR
281 MTLBlendFactorSourceAlpha, // SRC_ALPHA
282 MTLBlendFactorOneMinusSourceAlpha, // ONE_MINUS_SRC_ALPHA
283 MTLBlendFactorDestinationAlpha, // DST_ALPHA
284 MTLBlendFactorOneMinusDestinationAlpha, // ONE_MINUS_DST_ALPHA
285 MTLBlendFactorBlendColor, // CONSTANT_COLOR
286 MTLBlendFactorOneMinusBlendColor, // ONE_MINUS_CONSTANT_COLOR
287 MTLBlendFactorSourceAlphaSaturated, // SRC_ALPHA_SATURATE
288};
289SDL_COMPILE_TIME_ASSERT(SDLToMetal_BlendFactor, SDL_arraysize(SDLToMetal_BlendFactor) == SDL_GPU_BLENDFACTOR_MAX_ENUM_VALUE);
290
291static MTLBlendOperation SDLToMetal_BlendOp[] = {
292 MTLBlendOperationAdd, // INVALID
293 MTLBlendOperationAdd, // ADD
294 MTLBlendOperationSubtract, // SUBTRACT
295 MTLBlendOperationReverseSubtract, // REVERSE_SUBTRACT
296 MTLBlendOperationMin, // MIN
297 MTLBlendOperationMax, // MAX
298};
299SDL_COMPILE_TIME_ASSERT(SDLToMetal_BlendOp, SDL_arraysize(SDLToMetal_BlendOp) == SDL_GPU_BLENDOP_MAX_ENUM_VALUE);
300
301static MTLCompareFunction SDLToMetal_CompareOp[] = {
302 MTLCompareFunctionNever, // INVALID
303 MTLCompareFunctionNever, // NEVER
304 MTLCompareFunctionLess, // LESS
305 MTLCompareFunctionEqual, // EQUAL
306 MTLCompareFunctionLessEqual, // LESS_OR_EQUAL
307 MTLCompareFunctionGreater, // GREATER
308 MTLCompareFunctionNotEqual, // NOT_EQUAL
309 MTLCompareFunctionGreaterEqual, // GREATER_OR_EQUAL
310 MTLCompareFunctionAlways, // ALWAYS
311};
312SDL_COMPILE_TIME_ASSERT(SDLToMetal_CompareOp, SDL_arraysize(SDLToMetal_CompareOp) == SDL_GPU_COMPAREOP_MAX_ENUM_VALUE);
313
314static MTLStencilOperation SDLToMetal_StencilOp[] = {
315 MTLStencilOperationKeep, // INVALID
316 MTLStencilOperationKeep, // KEEP
317 MTLStencilOperationZero, // ZERO
318 MTLStencilOperationReplace, // REPLACE
319 MTLStencilOperationIncrementClamp, // INCREMENT_AND_CLAMP
320 MTLStencilOperationDecrementClamp, // DECREMENT_AND_CLAMP
321 MTLStencilOperationInvert, // INVERT
322 MTLStencilOperationIncrementWrap, // INCREMENT_AND_WRAP
323 MTLStencilOperationDecrementWrap, // DECREMENT_AND_WRAP
324};
325SDL_COMPILE_TIME_ASSERT(SDLToMetal_StencilOp, SDL_arraysize(SDLToMetal_StencilOp) == SDL_GPU_STENCILOP_MAX_ENUM_VALUE);
326
327static MTLSamplerAddressMode SDLToMetal_SamplerAddressMode[] = {
328 MTLSamplerAddressModeRepeat, // REPEAT
329 MTLSamplerAddressModeMirrorRepeat, // MIRRORED_REPEAT
330 MTLSamplerAddressModeClampToEdge // CLAMP_TO_EDGE
331};
332
333static MTLSamplerMinMagFilter SDLToMetal_MinMagFilter[] = {
334 MTLSamplerMinMagFilterNearest, // NEAREST
335 MTLSamplerMinMagFilterLinear, // LINEAR
336};
337
338static MTLSamplerMipFilter SDLToMetal_MipFilter[] = {
339 MTLSamplerMipFilterNearest, // NEAREST
340 MTLSamplerMipFilterLinear, // LINEAR
341};
342
343static MTLLoadAction SDLToMetal_LoadOp[] = {
344 MTLLoadActionLoad, // LOAD
345 MTLLoadActionClear, // CLEAR
346 MTLLoadActionDontCare, // DONT_CARE
347};
348
349static MTLStoreAction SDLToMetal_StoreOp[] = {
350 MTLStoreActionStore,
351 MTLStoreActionDontCare,
352 MTLStoreActionMultisampleResolve,
353 MTLStoreActionStoreAndMultisampleResolve
354};
355
356static MTLVertexStepFunction SDLToMetal_StepFunction[] = {
357 MTLVertexStepFunctionPerVertex,
358 MTLVertexStepFunctionPerInstance,
359};
360
361static NSUInteger SDLToMetal_SampleCount[] = {
362 1, // SDL_GPU_SAMPLECOUNT_1
363 2, // SDL_GPU_SAMPLECOUNT_2
364 4, // SDL_GPU_SAMPLECOUNT_4
365 8 // SDL_GPU_SAMPLECOUNT_8
366};
367
368static SDL_GPUTextureFormat SwapchainCompositionToFormat[] = {
369 SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM, // SDR
370 SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB, // SDR_LINEAR
371 SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT, // HDR_EXTENDED_LINEAR
372 SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM, // HDR10_ST2084
373};
374
375static CFStringRef SwapchainCompositionToColorSpace[4]; // initialized on device creation
376
377static MTLTextureType SDLToMetal_TextureType(SDL_GPUTextureType textureType, bool isMSAA)
378{
379 switch (textureType) {
380 case SDL_GPU_TEXTURETYPE_2D:
381 return isMSAA ? MTLTextureType2DMultisample : MTLTextureType2D;
382 case SDL_GPU_TEXTURETYPE_2D_ARRAY:
383 return MTLTextureType2DArray;
384 case SDL_GPU_TEXTURETYPE_3D:
385 return MTLTextureType3D;
386 case SDL_GPU_TEXTURETYPE_CUBE:
387 return MTLTextureTypeCube;
388 case SDL_GPU_TEXTURETYPE_CUBE_ARRAY:
389 return MTLTextureTypeCubeArray;
390 default:
391 return MTLTextureType2D;
392 }
393}
394
395static MTLColorWriteMask SDLToMetal_ColorWriteMask(
396 SDL_GPUColorComponentFlags mask)
397{
398 MTLColorWriteMask result = 0;
399 if (mask & SDL_GPU_COLORCOMPONENT_R) {
400 result |= MTLColorWriteMaskRed;
401 }
402 if (mask & SDL_GPU_COLORCOMPONENT_G) {
403 result |= MTLColorWriteMaskGreen;
404 }
405 if (mask & SDL_GPU_COLORCOMPONENT_B) {
406 result |= MTLColorWriteMaskBlue;
407 }
408 if (mask & SDL_GPU_COLORCOMPONENT_A) {
409 result |= MTLColorWriteMaskAlpha;
410 }
411 return result;
412}
413
414static MTLDepthClipMode SDLToMetal_DepthClipMode(
415 bool enableDepthClip
416) {
417 if (enableDepthClip) {
418 return MTLDepthClipModeClip;
419 } else {
420 return MTLDepthClipModeClamp;
421 }
422}
423
424// Structs
425
426typedef struct MetalTexture
427{
428 id<MTLTexture> handle;
429 SDL_AtomicInt referenceCount;
430} MetalTexture;
431
432typedef struct MetalTextureContainer
433{
434 TextureCommonHeader header;
435
436 MetalTexture *activeTexture;
437 Uint8 canBeCycled;
438
439 Uint32 textureCapacity;
440 Uint32 textureCount;
441 MetalTexture **textures;
442
443 char *debugName;
444} MetalTextureContainer;
445
446typedef struct MetalFence
447{
448 SDL_AtomicInt complete;
449 SDL_AtomicInt referenceCount;
450} MetalFence;
451
452typedef struct MetalWindowData
453{
454 SDL_Window *window;
455 SDL_MetalView view;
456 CAMetalLayer *layer;
457 SDL_GPUPresentMode presentMode;
458 id<CAMetalDrawable> drawable;
459 MetalTexture texture;
460 MetalTextureContainer textureContainer;
461 SDL_GPUFence *inFlightFences[MAX_FRAMES_IN_FLIGHT];
462 Uint32 frameCounter;
463} MetalWindowData;
464
465typedef struct MetalShader
466{
467 id<MTLLibrary> library;
468 id<MTLFunction> function;
469
470 SDL_GPUShaderStage stage;
471 Uint32 numSamplers;
472 Uint32 numUniformBuffers;
473 Uint32 numStorageBuffers;
474 Uint32 numStorageTextures;
475} MetalShader;
476
477typedef struct MetalGraphicsPipeline
478{
479 id<MTLRenderPipelineState> handle;
480
481 SDL_GPURasterizerState rasterizerState;
482 SDL_GPUPrimitiveType primitiveType;
483
484 id<MTLDepthStencilState> depth_stencil_state;
485
486 Uint32 vertexSamplerCount;
487 Uint32 vertexUniformBufferCount;
488 Uint32 vertexStorageBufferCount;
489 Uint32 vertexStorageTextureCount;
490
491 Uint32 fragmentSamplerCount;
492 Uint32 fragmentUniformBufferCount;
493 Uint32 fragmentStorageBufferCount;
494 Uint32 fragmentStorageTextureCount;
495} MetalGraphicsPipeline;
496
497typedef struct MetalComputePipeline
498{
499 id<MTLComputePipelineState> handle;
500 Uint32 numSamplers;
501 Uint32 numReadonlyStorageTextures;
502 Uint32 numReadWriteStorageTextures;
503 Uint32 numReadonlyStorageBuffers;
504 Uint32 numReadWriteStorageBuffers;
505 Uint32 numUniformBuffers;
506 Uint32 threadcountX;
507 Uint32 threadcountY;
508 Uint32 threadcountZ;
509} MetalComputePipeline;
510
511typedef struct MetalBuffer
512{
513 id<MTLBuffer> handle;
514 SDL_AtomicInt referenceCount;
515} MetalBuffer;
516
517typedef struct MetalBufferContainer
518{
519 MetalBuffer *activeBuffer;
520 Uint32 size;
521
522 Uint32 bufferCapacity;
523 Uint32 bufferCount;
524 MetalBuffer **buffers;
525
526 bool isPrivate;
527 bool isWriteOnly;
528 char *debugName;
529} MetalBufferContainer;
530
531typedef struct MetalUniformBuffer
532{
533 id<MTLBuffer> handle;
534 Uint32 writeOffset;
535 Uint32 drawOffset;
536} MetalUniformBuffer;
537
538typedef struct MetalRenderer MetalRenderer;
539
540typedef struct MetalCommandBuffer
541{
542 CommandBufferCommonHeader common;
543 MetalRenderer *renderer;
544
545 // Native Handle
546 id<MTLCommandBuffer> handle;
547
548 // Presentation
549 MetalWindowData **windowDatas;
550 Uint32 windowDataCount;
551 Uint32 windowDataCapacity;
552
553 // Render Pass
554 id<MTLRenderCommandEncoder> renderEncoder;
555 MetalGraphicsPipeline *graphics_pipeline;
556 MetalBuffer *indexBuffer;
557 Uint32 indexBufferOffset;
558 SDL_GPUIndexElementSize index_element_size;
559
560 // Copy Pass
561 id<MTLBlitCommandEncoder> blitEncoder;
562
563 // Compute Pass
564 id<MTLComputeCommandEncoder> computeEncoder;
565 MetalComputePipeline *compute_pipeline;
566
567 // Resource slot state
568 bool needVertexBufferBind;
569 bool needVertexSamplerBind;
570 bool needVertexStorageTextureBind;
571 bool needVertexStorageBufferBind;
572 bool needVertexUniformBufferBind[MAX_UNIFORM_BUFFERS_PER_STAGE];
573
574 bool needFragmentSamplerBind;
575 bool needFragmentStorageTextureBind;
576 bool needFragmentStorageBufferBind;
577 bool needFragmentUniformBufferBind[MAX_UNIFORM_BUFFERS_PER_STAGE];
578
579 bool needComputeSamplerBind;
580 bool needComputeReadOnlyStorageTextureBind;
581 bool needComputeReadOnlyStorageBufferBind;
582 bool needComputeUniformBufferBind[MAX_UNIFORM_BUFFERS_PER_STAGE];
583
584 id<MTLBuffer> vertexBuffers[MAX_VERTEX_BUFFERS];
585 Uint32 vertexBufferOffsets[MAX_VERTEX_BUFFERS];
586 Uint32 vertexBufferCount;
587
588 id<MTLSamplerState> vertexSamplers[MAX_TEXTURE_SAMPLERS_PER_STAGE];
589 id<MTLTexture> vertexTextures[MAX_TEXTURE_SAMPLERS_PER_STAGE];
590 id<MTLTexture> vertexStorageTextures[MAX_STORAGE_TEXTURES_PER_STAGE];
591 id<MTLBuffer> vertexStorageBuffers[MAX_STORAGE_BUFFERS_PER_STAGE];
592 MetalUniformBuffer *vertexUniformBuffers[MAX_UNIFORM_BUFFERS_PER_STAGE];
593
594 id<MTLSamplerState> fragmentSamplers[MAX_TEXTURE_SAMPLERS_PER_STAGE];
595 id<MTLTexture> fragmentTextures[MAX_TEXTURE_SAMPLERS_PER_STAGE];
596 id<MTLTexture> fragmentStorageTextures[MAX_STORAGE_TEXTURES_PER_STAGE];
597 id<MTLBuffer> fragmentStorageBuffers[MAX_STORAGE_BUFFERS_PER_STAGE];
598 MetalUniformBuffer *fragmentUniformBuffers[MAX_UNIFORM_BUFFERS_PER_STAGE];
599
600 id<MTLTexture> computeSamplerTextures[MAX_TEXTURE_SAMPLERS_PER_STAGE];
601 id<MTLSamplerState> computeSamplers[MAX_TEXTURE_SAMPLERS_PER_STAGE];
602 id<MTLTexture> computeReadOnlyTextures[MAX_STORAGE_TEXTURES_PER_STAGE];
603 id<MTLBuffer> computeReadOnlyBuffers[MAX_STORAGE_BUFFERS_PER_STAGE];
604 id<MTLTexture> computeReadWriteTextures[MAX_COMPUTE_WRITE_TEXTURES];
605 id<MTLBuffer> computeReadWriteBuffers[MAX_COMPUTE_WRITE_BUFFERS];
606 MetalUniformBuffer *computeUniformBuffers[MAX_UNIFORM_BUFFERS_PER_STAGE];
607
608 MetalUniformBuffer **usedUniformBuffers;
609 Uint32 usedUniformBufferCount;
610 Uint32 usedUniformBufferCapacity;
611
612 // Fences
613 MetalFence *fence;
614 bool autoReleaseFence;
615
616 // Reference Counting
617 MetalBuffer **usedBuffers;
618 Uint32 usedBufferCount;
619 Uint32 usedBufferCapacity;
620
621 MetalTexture **usedTextures;
622 Uint32 usedTextureCount;
623 Uint32 usedTextureCapacity;
624} MetalCommandBuffer;
625
626typedef struct MetalSampler
627{
628 id<MTLSamplerState> handle;
629} MetalSampler;
630
631typedef struct BlitPipeline
632{
633 SDL_GPUGraphicsPipeline *pipeline;
634 SDL_GPUTextureFormat format;
635} BlitPipeline;
636
637struct MetalRenderer
638{
639 // Reference to the parent device
640 SDL_GPUDevice *sdlGPUDevice;
641
642 id<MTLDevice> device;
643 id<MTLCommandQueue> queue;
644
645 bool debugMode;
646 Uint32 allowedFramesInFlight;
647
648 MetalWindowData **claimedWindows;
649 Uint32 claimedWindowCount;
650 Uint32 claimedWindowCapacity;
651
652 MetalCommandBuffer **availableCommandBuffers;
653 Uint32 availableCommandBufferCount;
654 Uint32 availableCommandBufferCapacity;
655
656 MetalCommandBuffer **submittedCommandBuffers;
657 Uint32 submittedCommandBufferCount;
658 Uint32 submittedCommandBufferCapacity;
659
660 MetalFence **availableFences;
661 Uint32 availableFenceCount;
662 Uint32 availableFenceCapacity;
663
664 MetalUniformBuffer **uniformBufferPool;
665 Uint32 uniformBufferPoolCount;
666 Uint32 uniformBufferPoolCapacity;
667
668 MetalBufferContainer **bufferContainersToDestroy;
669 Uint32 bufferContainersToDestroyCount;
670 Uint32 bufferContainersToDestroyCapacity;
671
672 MetalTextureContainer **textureContainersToDestroy;
673 Uint32 textureContainersToDestroyCount;
674 Uint32 textureContainersToDestroyCapacity;
675
676 // Blit
677 SDL_GPUShader *blitVertexShader;
678 SDL_GPUShader *blitFrom2DShader;
679 SDL_GPUShader *blitFrom2DArrayShader;
680 SDL_GPUShader *blitFrom3DShader;
681 SDL_GPUShader *blitFromCubeShader;
682 SDL_GPUShader *blitFromCubeArrayShader;
683
684 SDL_GPUSampler *blitNearestSampler;
685 SDL_GPUSampler *blitLinearSampler;
686
687 BlitPipelineCacheEntry *blitPipelines;
688 Uint32 blitPipelineCount;
689 Uint32 blitPipelineCapacity;
690
691 // Mutexes
692 SDL_Mutex *submitLock;
693 SDL_Mutex *acquireCommandBufferLock;
694 SDL_Mutex *acquireUniformBufferLock;
695 SDL_Mutex *disposeLock;
696 SDL_Mutex *fenceLock;
697 SDL_Mutex *windowLock;
698};
699
700// Helper Functions
701
702// FIXME: This should be moved into SDL_sysgpu.h
703static inline Uint32 METAL_INTERNAL_NextHighestAlignment(
704 Uint32 n,
705 Uint32 align)
706{
707 return align * ((n + align - 1) / align);
708}
709
710// Quit
711
712static void METAL_DestroyDevice(SDL_GPUDevice *device)
713{
714 MetalRenderer *renderer = (MetalRenderer *)device->driverData;
715
716 // Flush any remaining GPU work...
717 METAL_Wait(device->driverData);
718
719 // Release the window data
720 for (Sint32 i = renderer->claimedWindowCount - 1; i >= 0; i -= 1) {
721 METAL_ReleaseWindow(device->driverData, renderer->claimedWindows[i]->window);
722 }
723 SDL_free(renderer->claimedWindows);
724
725 // Release the blit resources
726 METAL_INTERNAL_DestroyBlitResources(device->driverData);
727
728 // Release uniform buffers
729 for (Uint32 i = 0; i < renderer->uniformBufferPoolCount; i += 1) {
730 renderer->uniformBufferPool[i]->handle = nil;
731 SDL_free(renderer->uniformBufferPool[i]);
732 }
733 SDL_free(renderer->uniformBufferPool);
734
735 // Release destroyed resource lists
736 SDL_free(renderer->bufferContainersToDestroy);
737 SDL_free(renderer->textureContainersToDestroy);
738
739 // Release command buffer infrastructure
740 for (Uint32 i = 0; i < renderer->availableCommandBufferCount; i += 1) {
741 MetalCommandBuffer *commandBuffer = renderer->availableCommandBuffers[i];
742 SDL_free(commandBuffer->usedBuffers);
743 SDL_free(commandBuffer->usedTextures);
744 SDL_free(commandBuffer->usedUniformBuffers);
745 SDL_free(commandBuffer->windowDatas);
746 SDL_free(commandBuffer);
747 }
748 SDL_free(renderer->availableCommandBuffers);
749 SDL_free(renderer->submittedCommandBuffers);
750
751 // Release fence infrastructure
752 for (Uint32 i = 0; i < renderer->availableFenceCount; i += 1) {
753 SDL_free(renderer->availableFences[i]);
754 }
755 SDL_free(renderer->availableFences);
756
757 // Release the mutexes
758 SDL_DestroyMutex(renderer->submitLock);
759 SDL_DestroyMutex(renderer->acquireCommandBufferLock);
760 SDL_DestroyMutex(renderer->acquireUniformBufferLock);
761 SDL_DestroyMutex(renderer->disposeLock);
762 SDL_DestroyMutex(renderer->fenceLock);
763 SDL_DestroyMutex(renderer->windowLock);
764
765 // Release the command queue
766 renderer->queue = nil;
767
768 // Free the primary structures
769 SDL_free(renderer);
770 SDL_free(device);
771}
772
773// Resource tracking
774
775static void METAL_INTERNAL_TrackBuffer(
776 MetalCommandBuffer *commandBuffer,
777 MetalBuffer *buffer)
778{
779 TRACK_RESOURCE(
780 buffer,
781 MetalBuffer *,
782 usedBuffers,
783 usedBufferCount,
784 usedBufferCapacity);
785}
786
787static void METAL_INTERNAL_TrackTexture(
788 MetalCommandBuffer *commandBuffer,
789 MetalTexture *texture)
790{
791 TRACK_RESOURCE(
792 texture,
793 MetalTexture *,
794 usedTextures,
795 usedTextureCount,
796 usedTextureCapacity);
797}
798
799static void METAL_INTERNAL_TrackUniformBuffer(
800 MetalCommandBuffer *commandBuffer,
801 MetalUniformBuffer *uniformBuffer)
802{
803 Uint32 i;
804 for (i = 0; i < commandBuffer->usedUniformBufferCount; i += 1) {
805 if (commandBuffer->usedUniformBuffers[i] == uniformBuffer) {
806 return;
807 }
808 }
809
810 if (commandBuffer->usedUniformBufferCount == commandBuffer->usedUniformBufferCapacity) {
811 commandBuffer->usedUniformBufferCapacity += 1;
812 commandBuffer->usedUniformBuffers = SDL_realloc(
813 commandBuffer->usedUniformBuffers,
814 commandBuffer->usedUniformBufferCapacity * sizeof(MetalUniformBuffer *));
815 }
816
817 commandBuffer->usedUniformBuffers[commandBuffer->usedUniformBufferCount] = uniformBuffer;
818 commandBuffer->usedUniformBufferCount += 1;
819}
820
821// Shader Compilation
822
823typedef struct MetalLibraryFunction
824{
825 id<MTLLibrary> library;
826 id<MTLFunction> function;
827} MetalLibraryFunction;
828
829// This function assumes that it's called from within an autorelease pool
830static MetalLibraryFunction METAL_INTERNAL_CompileShader(
831 MetalRenderer *renderer,
832 SDL_GPUShaderFormat format,
833 const Uint8 *code,
834 size_t codeSize,
835 const char *entrypoint)
836{
837 MetalLibraryFunction libraryFunction = { nil, nil };
838 id<MTLLibrary> library;
839 NSError *error;
840 dispatch_data_t data;
841 id<MTLFunction> function;
842
843 if (format == SDL_GPU_SHADERFORMAT_MSL) {
844 NSString *codeString = [[NSString alloc]
845 initWithBytes:code
846 length:codeSize
847 encoding:NSUTF8StringEncoding];
848 library = [renderer->device
849 newLibraryWithSource:codeString
850 options:nil
851 error:&error];
852 } else if (format == SDL_GPU_SHADERFORMAT_METALLIB) {
853 data = dispatch_data_create(
854 code,
855 codeSize,
856 dispatch_get_global_queue(0, 0),
857 ^{ /* do nothing */ });
858 library = [renderer->device newLibraryWithData:data error:&error];
859 } else {
860 SDL_assert(!"SDL_gpu.c should have already validated this!");
861 return libraryFunction;
862 }
863
864 if (library == nil) {
865 SDL_LogError(
866 SDL_LOG_CATEGORY_GPU,
867 "Creating MTLLibrary failed: %s",
868 [[error description] cStringUsingEncoding:[NSString defaultCStringEncoding]]);
869 return libraryFunction;
870 } else if (error != nil) {
871 SDL_LogWarn(
872 SDL_LOG_CATEGORY_GPU,
873 "Creating MTLLibrary failed: %s",
874 [[error description] cStringUsingEncoding:[NSString defaultCStringEncoding]]);
875 }
876
877 function = [library newFunctionWithName:@(entrypoint)];
878 if (function == nil) {
879 SDL_LogError(
880 SDL_LOG_CATEGORY_GPU,
881 "Creating MTLFunction failed");
882 return libraryFunction;
883 }
884
885 libraryFunction.library = library;
886 libraryFunction.function = function;
887 return libraryFunction;
888}
889
890// Disposal
891
892static void METAL_INTERNAL_DestroyTextureContainer(
893 MetalTextureContainer *container)
894{
895 for (Uint32 i = 0; i < container->textureCount; i += 1) {
896 container->textures[i]->handle = nil;
897 SDL_free(container->textures[i]);
898 }
899 if (container->debugName != NULL) {
900 SDL_free(container->debugName);
901 }
902 SDL_free(container->textures);
903 SDL_free(container);
904}
905
906static void METAL_ReleaseTexture(
907 SDL_GPURenderer *driverData,
908 SDL_GPUTexture *texture)
909{
910 MetalRenderer *renderer = (MetalRenderer *)driverData;
911 MetalTextureContainer *container = (MetalTextureContainer *)texture;
912
913 SDL_LockMutex(renderer->disposeLock);
914
915 EXPAND_ARRAY_IF_NEEDED(
916 renderer->textureContainersToDestroy,
917 MetalTextureContainer *,
918 renderer->textureContainersToDestroyCount + 1,
919 renderer->textureContainersToDestroyCapacity,
920 renderer->textureContainersToDestroyCapacity + 1);
921
922 renderer->textureContainersToDestroy[renderer->textureContainersToDestroyCount] = container;
923 renderer->textureContainersToDestroyCount += 1;
924
925 SDL_UnlockMutex(renderer->disposeLock);
926}
927
928static void METAL_ReleaseSampler(
929 SDL_GPURenderer *driverData,
930 SDL_GPUSampler *sampler)
931{
932 @autoreleasepool {
933 MetalSampler *metalSampler = (MetalSampler *)sampler;
934 metalSampler->handle = nil;
935 SDL_free(metalSampler);
936 }
937}
938
939static void METAL_INTERNAL_DestroyBufferContainer(
940 MetalBufferContainer *container)
941{
942 for (Uint32 i = 0; i < container->bufferCount; i += 1) {
943 container->buffers[i]->handle = nil;
944 SDL_free(container->buffers[i]);
945 }
946 if (container->debugName != NULL) {
947 SDL_free(container->debugName);
948 }
949 SDL_free(container->buffers);
950 SDL_free(container);
951}
952
953static void METAL_ReleaseBuffer(
954 SDL_GPURenderer *driverData,
955 SDL_GPUBuffer *buffer)
956{
957 MetalRenderer *renderer = (MetalRenderer *)driverData;
958 MetalBufferContainer *container = (MetalBufferContainer *)buffer;
959
960 SDL_LockMutex(renderer->disposeLock);
961
962 EXPAND_ARRAY_IF_NEEDED(
963 renderer->bufferContainersToDestroy,
964 MetalBufferContainer *,
965 renderer->bufferContainersToDestroyCount + 1,
966 renderer->bufferContainersToDestroyCapacity,
967 renderer->bufferContainersToDestroyCapacity + 1);
968
969 renderer->bufferContainersToDestroy[renderer->bufferContainersToDestroyCount] = container;
970 renderer->bufferContainersToDestroyCount += 1;
971
972 SDL_UnlockMutex(renderer->disposeLock);
973}
974
975static void METAL_ReleaseTransferBuffer(
976 SDL_GPURenderer *driverData,
977 SDL_GPUTransferBuffer *transferBuffer)
978{
979 METAL_ReleaseBuffer(
980 driverData,
981 (SDL_GPUBuffer *)transferBuffer);
982}
983
984static void METAL_ReleaseShader(
985 SDL_GPURenderer *driverData,
986 SDL_GPUShader *shader)
987{
988 @autoreleasepool {
989 MetalShader *metalShader = (MetalShader *)shader;
990 metalShader->function = nil;
991 metalShader->library = nil;
992 SDL_free(metalShader);
993 }
994}
995
996static void METAL_ReleaseComputePipeline(
997 SDL_GPURenderer *driverData,
998 SDL_GPUComputePipeline *computePipeline)
999{
1000 @autoreleasepool {
1001 MetalComputePipeline *metalComputePipeline = (MetalComputePipeline *)computePipeline;
1002 metalComputePipeline->handle = nil;
1003 SDL_free(metalComputePipeline);
1004 }
1005}
1006
1007static void METAL_ReleaseGraphicsPipeline(
1008 SDL_GPURenderer *driverData,
1009 SDL_GPUGraphicsPipeline *graphicsPipeline)
1010{
1011 @autoreleasepool {
1012 MetalGraphicsPipeline *metalGraphicsPipeline = (MetalGraphicsPipeline *)graphicsPipeline;
1013 metalGraphicsPipeline->handle = nil;
1014 metalGraphicsPipeline->depth_stencil_state = nil;
1015 SDL_free(metalGraphicsPipeline);
1016 }
1017}
1018
1019// Pipeline Creation
1020
1021static SDL_GPUComputePipeline *METAL_CreateComputePipeline(
1022 SDL_GPURenderer *driverData,
1023 const SDL_GPUComputePipelineCreateInfo *createinfo)
1024{
1025 @autoreleasepool {
1026 MetalRenderer *renderer = (MetalRenderer *)driverData;
1027 MetalLibraryFunction libraryFunction;
1028 id<MTLComputePipelineState> handle;
1029 MetalComputePipeline *pipeline;
1030 NSError *error;
1031
1032 libraryFunction = METAL_INTERNAL_CompileShader(
1033 renderer,
1034 createinfo->format,
1035 createinfo->code,
1036 createinfo->code_size,
1037 createinfo->entrypoint);
1038
1039 if (libraryFunction.library == nil || libraryFunction.function == nil) {
1040 return NULL;
1041 }
1042
1043 MTLComputePipelineDescriptor *descriptor = [MTLComputePipelineDescriptor new];
1044 descriptor.computeFunction = libraryFunction.function;
1045
1046 if (renderer->debugMode && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING)) {
1047 const char *name = SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING, NULL);
1048 descriptor.label = @(name);
1049 }
1050
1051 handle = [renderer->device newComputePipelineStateWithDescriptor:descriptor options:MTLPipelineOptionNone reflection: nil error:&error];
1052 if (error != NULL) {
1053 SET_ERROR_AND_RETURN("Creating compute pipeline failed: %s", [[error description] UTF8String], NULL);
1054 }
1055
1056 pipeline = SDL_calloc(1, sizeof(MetalComputePipeline));
1057 pipeline->handle = handle;
1058 pipeline->numSamplers = createinfo->num_samplers;
1059 pipeline->numReadonlyStorageTextures = createinfo->num_readonly_storage_textures;
1060 pipeline->numReadWriteStorageTextures = createinfo->num_readwrite_storage_textures;
1061 pipeline->numReadonlyStorageBuffers = createinfo->num_readonly_storage_buffers;
1062 pipeline->numReadWriteStorageBuffers = createinfo->num_readwrite_storage_buffers;
1063 pipeline->numUniformBuffers = createinfo->num_uniform_buffers;
1064 pipeline->threadcountX = createinfo->threadcount_x;
1065 pipeline->threadcountY = createinfo->threadcount_y;
1066 pipeline->threadcountZ = createinfo->threadcount_z;
1067
1068 return (SDL_GPUComputePipeline *)pipeline;
1069 }
1070}
1071
1072static SDL_GPUGraphicsPipeline *METAL_CreateGraphicsPipeline(
1073 SDL_GPURenderer *driverData,
1074 const SDL_GPUGraphicsPipelineCreateInfo *createinfo)
1075{
1076 @autoreleasepool {
1077 MetalRenderer *renderer = (MetalRenderer *)driverData;
1078 MetalShader *vertexShader = (MetalShader *)createinfo->vertex_shader;
1079 MetalShader *fragmentShader = (MetalShader *)createinfo->fragment_shader;
1080 MTLRenderPipelineDescriptor *pipelineDescriptor;
1081 const SDL_GPUColorTargetBlendState *blendState;
1082 MTLVertexDescriptor *vertexDescriptor;
1083 Uint32 binding;
1084 MTLDepthStencilDescriptor *depthStencilDescriptor;
1085 MTLStencilDescriptor *frontStencilDescriptor = NULL;
1086 MTLStencilDescriptor *backStencilDescriptor = NULL;
1087 id<MTLDepthStencilState> depthStencilState = nil;
1088 id<MTLRenderPipelineState> pipelineState = nil;
1089 NSError *error = NULL;
1090 MetalGraphicsPipeline *result = NULL;
1091
1092 if (renderer->debugMode) {
1093 if (vertexShader->stage != SDL_GPU_SHADERSTAGE_VERTEX) {
1094 SDL_assert_release(!"CreateGraphicsPipeline was passed a fragment shader for the vertex stage");
1095 }
1096 if (fragmentShader->stage != SDL_GPU_SHADERSTAGE_FRAGMENT) {
1097 SDL_assert_release(!"CreateGraphicsPipeline was passed a vertex shader for the fragment stage");
1098 }
1099 }
1100 pipelineDescriptor = [MTLRenderPipelineDescriptor new];
1101
1102 // Blend
1103
1104 for (Uint32 i = 0; i < createinfo->target_info.num_color_targets; i += 1) {
1105 blendState = &createinfo->target_info.color_target_descriptions[i].blend_state;
1106 SDL_GPUColorComponentFlags colorWriteMask = blendState->enable_color_write_mask ?
1107 blendState->color_write_mask :
1108 0xF;
1109
1110 pipelineDescriptor.colorAttachments[i].pixelFormat = SDLToMetal_TextureFormat(createinfo->target_info.color_target_descriptions[i].format);
1111 pipelineDescriptor.colorAttachments[i].writeMask = SDLToMetal_ColorWriteMask(colorWriteMask);
1112 pipelineDescriptor.colorAttachments[i].blendingEnabled = blendState->enable_blend;
1113 pipelineDescriptor.colorAttachments[i].rgbBlendOperation = SDLToMetal_BlendOp[blendState->color_blend_op];
1114 pipelineDescriptor.colorAttachments[i].alphaBlendOperation = SDLToMetal_BlendOp[blendState->alpha_blend_op];
1115 pipelineDescriptor.colorAttachments[i].sourceRGBBlendFactor = SDLToMetal_BlendFactor[blendState->src_color_blendfactor];
1116 pipelineDescriptor.colorAttachments[i].sourceAlphaBlendFactor = SDLToMetal_BlendFactor[blendState->src_alpha_blendfactor];
1117 pipelineDescriptor.colorAttachments[i].destinationRGBBlendFactor = SDLToMetal_BlendFactor[blendState->dst_color_blendfactor];
1118 pipelineDescriptor.colorAttachments[i].destinationAlphaBlendFactor = SDLToMetal_BlendFactor[blendState->dst_alpha_blendfactor];
1119 }
1120
1121 // Multisample
1122
1123 pipelineDescriptor.rasterSampleCount = SDLToMetal_SampleCount[createinfo->multisample_state.sample_count];
1124
1125 // Depth Stencil
1126
1127 if (createinfo->target_info.has_depth_stencil_target) {
1128 pipelineDescriptor.depthAttachmentPixelFormat = SDLToMetal_TextureFormat(createinfo->target_info.depth_stencil_format);
1129 if (IsStencilFormat(createinfo->target_info.depth_stencil_format)) {
1130 pipelineDescriptor.stencilAttachmentPixelFormat = SDLToMetal_TextureFormat(createinfo->target_info.depth_stencil_format);
1131 }
1132
1133 if (createinfo->depth_stencil_state.enable_stencil_test) {
1134 frontStencilDescriptor = [MTLStencilDescriptor new];
1135 frontStencilDescriptor.stencilCompareFunction = SDLToMetal_CompareOp[createinfo->depth_stencil_state.front_stencil_state.compare_op];
1136 frontStencilDescriptor.stencilFailureOperation = SDLToMetal_StencilOp[createinfo->depth_stencil_state.front_stencil_state.fail_op];
1137 frontStencilDescriptor.depthStencilPassOperation = SDLToMetal_StencilOp[createinfo->depth_stencil_state.front_stencil_state.pass_op];
1138 frontStencilDescriptor.depthFailureOperation = SDLToMetal_StencilOp[createinfo->depth_stencil_state.front_stencil_state.depth_fail_op];
1139 frontStencilDescriptor.readMask = createinfo->depth_stencil_state.compare_mask;
1140 frontStencilDescriptor.writeMask = createinfo->depth_stencil_state.write_mask;
1141
1142 backStencilDescriptor = [MTLStencilDescriptor new];
1143 backStencilDescriptor.stencilCompareFunction = SDLToMetal_CompareOp[createinfo->depth_stencil_state.back_stencil_state.compare_op];
1144 backStencilDescriptor.stencilFailureOperation = SDLToMetal_StencilOp[createinfo->depth_stencil_state.back_stencil_state.fail_op];
1145 backStencilDescriptor.depthStencilPassOperation = SDLToMetal_StencilOp[createinfo->depth_stencil_state.back_stencil_state.pass_op];
1146 backStencilDescriptor.depthFailureOperation = SDLToMetal_StencilOp[createinfo->depth_stencil_state.back_stencil_state.depth_fail_op];
1147 backStencilDescriptor.readMask = createinfo->depth_stencil_state.compare_mask;
1148 backStencilDescriptor.writeMask = createinfo->depth_stencil_state.write_mask;
1149 }
1150
1151 depthStencilDescriptor = [MTLDepthStencilDescriptor new];
1152 depthStencilDescriptor.depthCompareFunction = createinfo->depth_stencil_state.enable_depth_test ? SDLToMetal_CompareOp[createinfo->depth_stencil_state.compare_op] : MTLCompareFunctionAlways;
1153 // Disable write when test is disabled, to match other APIs' behavior
1154 depthStencilDescriptor.depthWriteEnabled = createinfo->depth_stencil_state.enable_depth_write && createinfo->depth_stencil_state.enable_depth_test;
1155 depthStencilDescriptor.frontFaceStencil = frontStencilDescriptor;
1156 depthStencilDescriptor.backFaceStencil = backStencilDescriptor;
1157
1158 depthStencilState = [renderer->device newDepthStencilStateWithDescriptor:depthStencilDescriptor];
1159 }
1160
1161 // Shaders
1162
1163 pipelineDescriptor.vertexFunction = vertexShader->function;
1164 pipelineDescriptor.fragmentFunction = fragmentShader->function;
1165
1166 // Vertex Descriptor
1167
1168 if (createinfo->vertex_input_state.num_vertex_buffers > 0) {
1169 vertexDescriptor = [MTLVertexDescriptor vertexDescriptor];
1170
1171 for (Uint32 i = 0; i < createinfo->vertex_input_state.num_vertex_attributes; i += 1) {
1172 Uint32 loc = createinfo->vertex_input_state.vertex_attributes[i].location;
1173 vertexDescriptor.attributes[loc].format = SDLToMetal_VertexFormat[createinfo->vertex_input_state.vertex_attributes[i].format];
1174 vertexDescriptor.attributes[loc].offset = createinfo->vertex_input_state.vertex_attributes[i].offset;
1175 vertexDescriptor.attributes[loc].bufferIndex =
1176 METAL_FIRST_VERTEX_BUFFER_SLOT + createinfo->vertex_input_state.vertex_attributes[i].buffer_slot;
1177 }
1178
1179 for (Uint32 i = 0; i < createinfo->vertex_input_state.num_vertex_buffers; i += 1) {
1180 binding = METAL_FIRST_VERTEX_BUFFER_SLOT + createinfo->vertex_input_state.vertex_buffer_descriptions[i].slot;
1181 vertexDescriptor.layouts[binding].stepFunction = SDLToMetal_StepFunction[createinfo->vertex_input_state.vertex_buffer_descriptions[i].input_rate];
1182 vertexDescriptor.layouts[binding].stepRate = 1;
1183 vertexDescriptor.layouts[binding].stride = createinfo->vertex_input_state.vertex_buffer_descriptions[i].pitch;
1184 }
1185
1186 pipelineDescriptor.vertexDescriptor = vertexDescriptor;
1187 }
1188
1189 if (renderer->debugMode && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING)) {
1190 const char *name = SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING, NULL);
1191 pipelineDescriptor.label = @(name);
1192 }
1193
1194 // Create the graphics pipeline
1195
1196 pipelineState = [renderer->device newRenderPipelineStateWithDescriptor:pipelineDescriptor error:&error];
1197 if (error != NULL) {
1198 SET_ERROR_AND_RETURN("Creating render pipeline failed: %s", [[error description] UTF8String], NULL);
1199 }
1200
1201 result = SDL_calloc(1, sizeof(MetalGraphicsPipeline));
1202 result->handle = pipelineState;
1203 result->depth_stencil_state = depthStencilState;
1204 result->rasterizerState = createinfo->rasterizer_state;
1205 result->primitiveType = createinfo->primitive_type;
1206 result->vertexSamplerCount = vertexShader->numSamplers;
1207 result->vertexUniformBufferCount = vertexShader->numUniformBuffers;
1208 result->vertexStorageBufferCount = vertexShader->numStorageBuffers;
1209 result->vertexStorageTextureCount = vertexShader->numStorageTextures;
1210 result->fragmentSamplerCount = fragmentShader->numSamplers;
1211 result->fragmentUniformBufferCount = fragmentShader->numUniformBuffers;
1212 result->fragmentStorageBufferCount = fragmentShader->numStorageBuffers;
1213 result->fragmentStorageTextureCount = fragmentShader->numStorageTextures;
1214 return (SDL_GPUGraphicsPipeline *)result;
1215 }
1216}
1217
1218// Debug Naming
1219
1220static void METAL_SetBufferName(
1221 SDL_GPURenderer *driverData,
1222 SDL_GPUBuffer *buffer,
1223 const char *text)
1224{
1225 @autoreleasepool {
1226 MetalRenderer *renderer = (MetalRenderer *)driverData;
1227 MetalBufferContainer *container = (MetalBufferContainer *)buffer;
1228
1229 if (renderer->debugMode && text != NULL) {
1230 if (container->debugName != NULL) {
1231 SDL_free(container->debugName);
1232 }
1233
1234 container->debugName = SDL_strdup(text);
1235
1236 for (Uint32 i = 0; i < container->bufferCount; i += 1) {
1237 container->buffers[i]->handle.label = @(text);
1238 }
1239 }
1240 }
1241}
1242
1243static void METAL_SetTextureName(
1244 SDL_GPURenderer *driverData,
1245 SDL_GPUTexture *texture,
1246 const char *text)
1247{
1248 @autoreleasepool {
1249 MetalRenderer *renderer = (MetalRenderer *)driverData;
1250 MetalTextureContainer *container = (MetalTextureContainer *)texture;
1251
1252 if (renderer->debugMode && text != NULL) {
1253 if (container->debugName != NULL) {
1254 SDL_free(container->debugName);
1255 }
1256
1257 container->debugName = SDL_strdup(text);
1258
1259 for (Uint32 i = 0; i < container->textureCount; i += 1) {
1260 container->textures[i]->handle.label = @(text);
1261 }
1262 }
1263 }
1264}
1265
1266static void METAL_InsertDebugLabel(
1267 SDL_GPUCommandBuffer *commandBuffer,
1268 const char *text)
1269{
1270 @autoreleasepool {
1271 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1272 NSString *label = @(text);
1273
1274 if (metalCommandBuffer->renderEncoder) {
1275 [metalCommandBuffer->renderEncoder insertDebugSignpost:label];
1276 } else if (metalCommandBuffer->blitEncoder) {
1277 [metalCommandBuffer->blitEncoder insertDebugSignpost:label];
1278 } else if (metalCommandBuffer->computeEncoder) {
1279 [metalCommandBuffer->computeEncoder insertDebugSignpost:label];
1280 } else {
1281 // Metal doesn't have insertDebugSignpost for command buffers...
1282 [metalCommandBuffer->handle pushDebugGroup:label];
1283 [metalCommandBuffer->handle popDebugGroup];
1284 }
1285 }
1286}
1287
1288static void METAL_PushDebugGroup(
1289 SDL_GPUCommandBuffer *commandBuffer,
1290 const char *name)
1291{
1292 @autoreleasepool {
1293 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1294 NSString *label = @(name);
1295
1296 if (metalCommandBuffer->renderEncoder) {
1297 [metalCommandBuffer->renderEncoder pushDebugGroup:label];
1298 } else if (metalCommandBuffer->blitEncoder) {
1299 [metalCommandBuffer->blitEncoder pushDebugGroup:label];
1300 } else if (metalCommandBuffer->computeEncoder) {
1301 [metalCommandBuffer->computeEncoder pushDebugGroup:label];
1302 } else {
1303 [metalCommandBuffer->handle pushDebugGroup:label];
1304 }
1305 }
1306}
1307
1308static void METAL_PopDebugGroup(
1309 SDL_GPUCommandBuffer *commandBuffer)
1310{
1311 @autoreleasepool {
1312 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1313
1314 if (metalCommandBuffer->renderEncoder) {
1315 [metalCommandBuffer->renderEncoder popDebugGroup];
1316 } else if (metalCommandBuffer->blitEncoder) {
1317 [metalCommandBuffer->blitEncoder popDebugGroup];
1318 } else if (metalCommandBuffer->computeEncoder) {
1319 [metalCommandBuffer->computeEncoder popDebugGroup];
1320 } else {
1321 [metalCommandBuffer->handle popDebugGroup];
1322 }
1323 }
1324}
1325
1326// Resource Creation
1327
1328static SDL_GPUSampler *METAL_CreateSampler(
1329 SDL_GPURenderer *driverData,
1330 const SDL_GPUSamplerCreateInfo *createinfo)
1331{
1332 @autoreleasepool {
1333 MetalRenderer *renderer = (MetalRenderer *)driverData;
1334 MTLSamplerDescriptor *samplerDesc = [MTLSamplerDescriptor new];
1335 id<MTLSamplerState> sampler;
1336 MetalSampler *metalSampler;
1337
1338 samplerDesc.sAddressMode = SDLToMetal_SamplerAddressMode[createinfo->address_mode_u];
1339 samplerDesc.tAddressMode = SDLToMetal_SamplerAddressMode[createinfo->address_mode_v];
1340 samplerDesc.rAddressMode = SDLToMetal_SamplerAddressMode[createinfo->address_mode_w];
1341 samplerDesc.minFilter = SDLToMetal_MinMagFilter[createinfo->min_filter];
1342 samplerDesc.magFilter = SDLToMetal_MinMagFilter[createinfo->mag_filter];
1343 samplerDesc.mipFilter = SDLToMetal_MipFilter[createinfo->mipmap_mode]; // FIXME: Is this right with non-mipmapped samplers?
1344 samplerDesc.lodMinClamp = createinfo->min_lod;
1345 samplerDesc.lodMaxClamp = createinfo->max_lod;
1346 samplerDesc.maxAnisotropy = (NSUInteger)((createinfo->enable_anisotropy) ? createinfo->max_anisotropy : 1);
1347 samplerDesc.compareFunction = (createinfo->enable_compare) ? SDLToMetal_CompareOp[createinfo->compare_op] : MTLCompareFunctionAlways;
1348
1349 if (renderer->debugMode && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING)) {
1350 const char *name = SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING, NULL);
1351 samplerDesc.label = @(name);
1352 }
1353
1354 sampler = [renderer->device newSamplerStateWithDescriptor:samplerDesc];
1355 if (sampler == NULL) {
1356 SET_STRING_ERROR_AND_RETURN("Failed to create sampler", NULL);
1357 }
1358
1359 metalSampler = (MetalSampler *)SDL_calloc(1, sizeof(MetalSampler));
1360 metalSampler->handle = sampler;
1361 return (SDL_GPUSampler *)metalSampler;
1362 }
1363}
1364
1365static SDL_GPUShader *METAL_CreateShader(
1366 SDL_GPURenderer *driverData,
1367 const SDL_GPUShaderCreateInfo *createinfo)
1368{
1369 @autoreleasepool {
1370 MetalLibraryFunction libraryFunction;
1371 MetalShader *result;
1372
1373 libraryFunction = METAL_INTERNAL_CompileShader(
1374 (MetalRenderer *)driverData,
1375 createinfo->format,
1376 createinfo->code,
1377 createinfo->code_size,
1378 createinfo->entrypoint);
1379
1380 if (libraryFunction.library == nil || libraryFunction.function == nil) {
1381 return NULL;
1382 }
1383
1384 result = SDL_calloc(1, sizeof(MetalShader));
1385 result->library = libraryFunction.library;
1386 result->function = libraryFunction.function;
1387 result->stage = createinfo->stage;
1388 result->numSamplers = createinfo->num_samplers;
1389 result->numStorageBuffers = createinfo->num_storage_buffers;
1390 result->numStorageTextures = createinfo->num_storage_textures;
1391 result->numUniformBuffers = createinfo->num_uniform_buffers;
1392 return (SDL_GPUShader *)result;
1393 }
1394}
1395
1396// This function assumes that it's called from within an autorelease pool
1397static MetalTexture *METAL_INTERNAL_CreateTexture(
1398 MetalRenderer *renderer,
1399 const SDL_GPUTextureCreateInfo *createinfo)
1400{
1401 MTLTextureDescriptor *textureDescriptor = [MTLTextureDescriptor new];
1402 id<MTLTexture> texture;
1403 MetalTexture *metalTexture;
1404
1405 textureDescriptor.textureType = SDLToMetal_TextureType(createinfo->type, createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1);
1406 textureDescriptor.pixelFormat = SDLToMetal_TextureFormat(createinfo->format);
1407 // This format isn't natively supported so let's swizzle!
1408 if (createinfo->format == SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM) {
1409 if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) {
1410 textureDescriptor.swizzle = MTLTextureSwizzleChannelsMake(MTLTextureSwizzleBlue,
1411 MTLTextureSwizzleGreen,
1412 MTLTextureSwizzleRed,
1413 MTLTextureSwizzleAlpha);
1414 } else {
1415 SET_STRING_ERROR_AND_RETURN("SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM is not supported", NULL);
1416 }
1417 }
1418
1419 textureDescriptor.width = createinfo->width;
1420 textureDescriptor.height = createinfo->height;
1421 textureDescriptor.depth = (createinfo->type == SDL_GPU_TEXTURETYPE_3D) ? createinfo->layer_count_or_depth : 1;
1422 textureDescriptor.mipmapLevelCount = createinfo->num_levels;
1423 textureDescriptor.sampleCount = SDLToMetal_SampleCount[createinfo->sample_count];
1424 textureDescriptor.arrayLength =
1425 (createinfo->type == SDL_GPU_TEXTURETYPE_2D_ARRAY || createinfo->type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY)
1426 ? createinfo->layer_count_or_depth
1427 : 1;
1428 textureDescriptor.storageMode = MTLStorageModePrivate;
1429
1430 textureDescriptor.usage = 0;
1431 if (createinfo->usage & (SDL_GPU_TEXTUREUSAGE_COLOR_TARGET |
1432 SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET)) {
1433 textureDescriptor.usage |= MTLTextureUsageRenderTarget;
1434 }
1435 if (createinfo->usage & (SDL_GPU_TEXTUREUSAGE_SAMPLER |
1436 SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ |
1437 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ)) {
1438 textureDescriptor.usage |= MTLTextureUsageShaderRead;
1439 }
1440 if (createinfo->usage & (SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE |
1441 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE)) {
1442 textureDescriptor.usage |= MTLTextureUsageShaderWrite;
1443 }
1444
1445 texture = [renderer->device newTextureWithDescriptor:textureDescriptor];
1446 if (texture == NULL) {
1447 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to create MTLTexture!");
1448 return NULL;
1449 }
1450
1451 metalTexture = (MetalTexture *)SDL_calloc(1, sizeof(MetalTexture));
1452 metalTexture->handle = texture;
1453 SDL_SetAtomicInt(&metalTexture->referenceCount, 0);
1454
1455 if (renderer->debugMode && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING)) {
1456 metalTexture->handle.label = @(SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING, NULL));
1457 }
1458
1459 return metalTexture;
1460}
1461
1462static bool METAL_SupportsSampleCount(
1463 SDL_GPURenderer *driverData,
1464 SDL_GPUTextureFormat format,
1465 SDL_GPUSampleCount sampleCount)
1466{
1467 @autoreleasepool {
1468 MetalRenderer *renderer = (MetalRenderer *)driverData;
1469 NSUInteger mtlSampleCount = SDLToMetal_SampleCount[sampleCount];
1470 return [renderer->device supportsTextureSampleCount:mtlSampleCount];
1471 }
1472}
1473
1474static SDL_GPUTexture *METAL_CreateTexture(
1475 SDL_GPURenderer *driverData,
1476 const SDL_GPUTextureCreateInfo *createinfo)
1477{
1478 @autoreleasepool {
1479 MetalRenderer *renderer = (MetalRenderer *)driverData;
1480 MetalTextureContainer *container;
1481 MetalTexture *texture;
1482
1483 texture = METAL_INTERNAL_CreateTexture(
1484 renderer,
1485 createinfo);
1486
1487 if (texture == NULL) {
1488 SET_STRING_ERROR_AND_RETURN("Failed to create texture", NULL);
1489 }
1490
1491 container = SDL_calloc(1, sizeof(MetalTextureContainer));
1492 container->canBeCycled = 1;
1493
1494 // Copy properties so we don't lose information when the client destroys them
1495 container->header.info = *createinfo;
1496 container->header.info.props = SDL_CreateProperties();
1497 SDL_CopyProperties(createinfo->props, container->header.info.props);
1498
1499 container->activeTexture = texture;
1500 container->textureCapacity = 1;
1501 container->textureCount = 1;
1502 container->textures = SDL_calloc(
1503 container->textureCapacity, sizeof(MetalTexture *));
1504 container->textures[0] = texture;
1505 container->debugName = NULL;
1506
1507 if (SDL_HasProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING)) {
1508 container->debugName = SDL_strdup(SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING, NULL));
1509 }
1510
1511 return (SDL_GPUTexture *)container;
1512 }
1513}
1514
1515// This function assumes that it's called from within an autorelease pool
1516static MetalTexture *METAL_INTERNAL_PrepareTextureForWrite(
1517 MetalRenderer *renderer,
1518 MetalTextureContainer *container,
1519 bool cycle)
1520{
1521 Uint32 i;
1522
1523 // Cycle the active texture handle if needed
1524 if (cycle && container->canBeCycled) {
1525 for (i = 0; i < container->textureCount; i += 1) {
1526 if (SDL_GetAtomicInt(&container->textures[i]->referenceCount) == 0) {
1527 container->activeTexture = container->textures[i];
1528 return container->activeTexture;
1529 }
1530 }
1531
1532 EXPAND_ARRAY_IF_NEEDED(
1533 container->textures,
1534 MetalTexture *,
1535 container->textureCount + 1,
1536 container->textureCapacity,
1537 container->textureCapacity + 1);
1538
1539 container->textures[container->textureCount] = METAL_INTERNAL_CreateTexture(
1540 renderer,
1541 &container->header.info);
1542 container->textureCount += 1;
1543
1544 container->activeTexture = container->textures[container->textureCount - 1];
1545 }
1546
1547 return container->activeTexture;
1548}
1549
1550// This function assumes that it's called from within an autorelease pool
1551static MetalBuffer *METAL_INTERNAL_CreateBuffer(
1552 MetalRenderer *renderer,
1553 Uint32 size,
1554 MTLResourceOptions resourceOptions,
1555 const char *debugName)
1556{
1557 id<MTLBuffer> bufferHandle;
1558 MetalBuffer *metalBuffer;
1559
1560 // Storage buffers have to be 4-aligned, so might as well align them all
1561 size = METAL_INTERNAL_NextHighestAlignment(size, 4);
1562
1563 bufferHandle = [renderer->device newBufferWithLength:size options:resourceOptions];
1564 if (bufferHandle == NULL) {
1565 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Could not create buffer");
1566 return NULL;
1567 }
1568
1569 metalBuffer = SDL_calloc(1, sizeof(MetalBuffer));
1570 metalBuffer->handle = bufferHandle;
1571 SDL_SetAtomicInt(&metalBuffer->referenceCount, 0);
1572
1573 if (debugName != NULL) {
1574 metalBuffer->handle.label = @(debugName);
1575 }
1576
1577 return metalBuffer;
1578}
1579
1580// This function assumes that it's called from within an autorelease pool
1581static MetalBufferContainer *METAL_INTERNAL_CreateBufferContainer(
1582 MetalRenderer *renderer,
1583 Uint32 size,
1584 bool isPrivate,
1585 bool isWriteOnly,
1586 const char *debugName)
1587{
1588 MetalBufferContainer *container = SDL_calloc(1, sizeof(MetalBufferContainer));
1589 MTLResourceOptions resourceOptions;
1590
1591 container->size = size;
1592 container->bufferCapacity = 1;
1593 container->bufferCount = 1;
1594 container->buffers = SDL_calloc(
1595 container->bufferCapacity, sizeof(MetalBuffer *));
1596 container->isPrivate = isPrivate;
1597 container->isWriteOnly = isWriteOnly;
1598 container->debugName = NULL;
1599 if (container->debugName != NULL) {
1600 container->debugName = SDL_strdup(debugName);
1601 }
1602
1603 if (isPrivate) {
1604 resourceOptions = MTLResourceStorageModePrivate;
1605 } else {
1606 if (isWriteOnly) {
1607 resourceOptions = MTLResourceCPUCacheModeWriteCombined;
1608 } else {
1609 resourceOptions = MTLResourceCPUCacheModeDefaultCache;
1610 }
1611 }
1612
1613 container->buffers[0] = METAL_INTERNAL_CreateBuffer(
1614 renderer,
1615 size,
1616 resourceOptions,
1617 debugName);
1618
1619 container->activeBuffer = container->buffers[0];
1620
1621 return container;
1622}
1623
1624static SDL_GPUBuffer *METAL_CreateBuffer(
1625 SDL_GPURenderer *driverData,
1626 SDL_GPUBufferUsageFlags usage,
1627 Uint32 size,
1628 const char *debugName)
1629{
1630 @autoreleasepool {
1631 return (SDL_GPUBuffer *)METAL_INTERNAL_CreateBufferContainer(
1632 (MetalRenderer *)driverData,
1633 size,
1634 true,
1635 false,
1636 debugName);
1637 }
1638}
1639
1640static SDL_GPUTransferBuffer *METAL_CreateTransferBuffer(
1641 SDL_GPURenderer *driverData,
1642 SDL_GPUTransferBufferUsage usage,
1643 Uint32 size,
1644 const char *debugName)
1645{
1646 @autoreleasepool {
1647 return (SDL_GPUTransferBuffer *)METAL_INTERNAL_CreateBufferContainer(
1648 (MetalRenderer *)driverData,
1649 size,
1650 false,
1651 usage == SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD,
1652 debugName);
1653 }
1654}
1655
1656// This function assumes that it's called from within an autorelease pool
1657static MetalUniformBuffer *METAL_INTERNAL_CreateUniformBuffer(
1658 MetalRenderer *renderer,
1659 Uint32 size)
1660{
1661 MetalUniformBuffer *uniformBuffer;
1662 id<MTLBuffer> bufferHandle;
1663
1664 bufferHandle = [renderer->device newBufferWithLength:size options:MTLResourceCPUCacheModeWriteCombined];
1665 if (bufferHandle == nil) {
1666 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Could not create uniform buffer");
1667 return NULL;
1668 }
1669
1670 uniformBuffer = SDL_calloc(1, sizeof(MetalUniformBuffer));
1671 uniformBuffer->handle = bufferHandle;
1672 uniformBuffer->writeOffset = 0;
1673 uniformBuffer->drawOffset = 0;
1674
1675 return uniformBuffer;
1676}
1677
1678// This function assumes that it's called from within an autorelease pool
1679static MetalBuffer *METAL_INTERNAL_PrepareBufferForWrite(
1680 MetalRenderer *renderer,
1681 MetalBufferContainer *container,
1682 bool cycle)
1683{
1684 MTLResourceOptions resourceOptions;
1685 Uint32 i;
1686
1687 // Cycle if needed
1688 if (cycle && SDL_GetAtomicInt(&container->activeBuffer->referenceCount) > 0) {
1689 for (i = 0; i < container->bufferCount; i += 1) {
1690 if (SDL_GetAtomicInt(&container->buffers[i]->referenceCount) == 0) {
1691 container->activeBuffer = container->buffers[i];
1692 return container->activeBuffer;
1693 }
1694 }
1695
1696 EXPAND_ARRAY_IF_NEEDED(
1697 container->buffers,
1698 MetalBuffer *,
1699 container->bufferCount + 1,
1700 container->bufferCapacity,
1701 container->bufferCapacity + 1);
1702
1703 if (container->isPrivate) {
1704 resourceOptions = MTLResourceStorageModePrivate;
1705 } else {
1706 if (container->isWriteOnly) {
1707 resourceOptions = MTLResourceCPUCacheModeWriteCombined;
1708 } else {
1709 resourceOptions = MTLResourceCPUCacheModeDefaultCache;
1710 }
1711 }
1712
1713 container->buffers[container->bufferCount] = METAL_INTERNAL_CreateBuffer(
1714 renderer,
1715 container->size,
1716 resourceOptions,
1717 container->debugName);
1718 container->bufferCount += 1;
1719
1720 container->activeBuffer = container->buffers[container->bufferCount - 1];
1721 }
1722
1723 return container->activeBuffer;
1724}
1725
1726// TransferBuffer Data
1727
1728static void *METAL_MapTransferBuffer(
1729 SDL_GPURenderer *driverData,
1730 SDL_GPUTransferBuffer *transferBuffer,
1731 bool cycle)
1732{
1733 @autoreleasepool {
1734 MetalRenderer *renderer = (MetalRenderer *)driverData;
1735 MetalBufferContainer *container = (MetalBufferContainer *)transferBuffer;
1736 MetalBuffer *buffer = METAL_INTERNAL_PrepareBufferForWrite(renderer, container, cycle);
1737 return [buffer->handle contents];
1738 }
1739}
1740
1741static void METAL_UnmapTransferBuffer(
1742 SDL_GPURenderer *driverData,
1743 SDL_GPUTransferBuffer *transferBuffer)
1744{
1745#ifdef SDL_PLATFORM_MACOS
1746 @autoreleasepool {
1747 // FIXME: Is this necessary?
1748 MetalBufferContainer *container = (MetalBufferContainer *)transferBuffer;
1749 MetalBuffer *buffer = container->activeBuffer;
1750 if (buffer->handle.storageMode == MTLStorageModeManaged) {
1751 [buffer->handle didModifyRange:NSMakeRange(0, container->size)];
1752 }
1753 }
1754#endif
1755}
1756
1757// Copy Pass
1758
1759static void METAL_BeginCopyPass(
1760 SDL_GPUCommandBuffer *commandBuffer)
1761{
1762 @autoreleasepool {
1763 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1764 metalCommandBuffer->blitEncoder = [metalCommandBuffer->handle blitCommandEncoder];
1765 }
1766}
1767
1768static void METAL_UploadToTexture(
1769 SDL_GPUCommandBuffer *commandBuffer,
1770 const SDL_GPUTextureTransferInfo *source,
1771 const SDL_GPUTextureRegion *destination,
1772 bool cycle)
1773{
1774 @autoreleasepool {
1775 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1776 MetalRenderer *renderer = metalCommandBuffer->renderer;
1777 MetalBufferContainer *bufferContainer = (MetalBufferContainer *)source->transfer_buffer;
1778 MetalTextureContainer *textureContainer = (MetalTextureContainer *)destination->texture;
1779
1780 MetalTexture *metalTexture = METAL_INTERNAL_PrepareTextureForWrite(renderer, textureContainer, cycle);
1781
1782 [metalCommandBuffer->blitEncoder
1783 copyFromBuffer:bufferContainer->activeBuffer->handle
1784 sourceOffset:source->offset
1785 sourceBytesPerRow:BytesPerRow(destination->w, textureContainer->header.info.format)
1786 sourceBytesPerImage:SDL_CalculateGPUTextureFormatSize(textureContainer->header.info.format, destination->w, destination->h, destination->d)
1787 sourceSize:MTLSizeMake(destination->w, destination->h, destination->d)
1788 toTexture:metalTexture->handle
1789 destinationSlice:destination->layer
1790 destinationLevel:destination->mip_level
1791 destinationOrigin:MTLOriginMake(destination->x, destination->y, destination->z)];
1792
1793 METAL_INTERNAL_TrackTexture(metalCommandBuffer, metalTexture);
1794 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, bufferContainer->activeBuffer);
1795 }
1796}
1797
1798static void METAL_UploadToBuffer(
1799 SDL_GPUCommandBuffer *commandBuffer,
1800 const SDL_GPUTransferBufferLocation *source,
1801 const SDL_GPUBufferRegion *destination,
1802 bool cycle)
1803{
1804 @autoreleasepool {
1805 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1806 MetalRenderer *renderer = metalCommandBuffer->renderer;
1807 MetalBufferContainer *transferContainer = (MetalBufferContainer *)source->transfer_buffer;
1808 MetalBufferContainer *bufferContainer = (MetalBufferContainer *)destination->buffer;
1809
1810 MetalBuffer *metalBuffer = METAL_INTERNAL_PrepareBufferForWrite(
1811 renderer,
1812 bufferContainer,
1813 cycle);
1814
1815 [metalCommandBuffer->blitEncoder
1816 copyFromBuffer:transferContainer->activeBuffer->handle
1817 sourceOffset:source->offset
1818 toBuffer:metalBuffer->handle
1819 destinationOffset:destination->offset
1820 size:destination->size];
1821
1822 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, metalBuffer);
1823 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, transferContainer->activeBuffer);
1824 }
1825}
1826
1827static void METAL_CopyTextureToTexture(
1828 SDL_GPUCommandBuffer *commandBuffer,
1829 const SDL_GPUTextureLocation *source,
1830 const SDL_GPUTextureLocation *destination,
1831 Uint32 w,
1832 Uint32 h,
1833 Uint32 d,
1834 bool cycle)
1835{
1836 @autoreleasepool {
1837 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1838 MetalRenderer *renderer = metalCommandBuffer->renderer;
1839 MetalTextureContainer *srcContainer = (MetalTextureContainer *)source->texture;
1840 MetalTextureContainer *dstContainer = (MetalTextureContainer *)destination->texture;
1841
1842 MetalTexture *srcTexture = srcContainer->activeTexture;
1843 MetalTexture *dstTexture = METAL_INTERNAL_PrepareTextureForWrite(
1844 renderer,
1845 dstContainer,
1846 cycle);
1847
1848 [metalCommandBuffer->blitEncoder
1849 copyFromTexture:srcTexture->handle
1850 sourceSlice:source->layer
1851 sourceLevel:source->mip_level
1852 sourceOrigin:MTLOriginMake(source->x, source->y, source->z)
1853 sourceSize:MTLSizeMake(w, h, d)
1854 toTexture:dstTexture->handle
1855 destinationSlice:destination->layer
1856 destinationLevel:destination->mip_level
1857 destinationOrigin:MTLOriginMake(destination->x, destination->y, destination->z)];
1858
1859 METAL_INTERNAL_TrackTexture(metalCommandBuffer, srcTexture);
1860 METAL_INTERNAL_TrackTexture(metalCommandBuffer, dstTexture);
1861 }
1862}
1863
1864static void METAL_CopyBufferToBuffer(
1865 SDL_GPUCommandBuffer *commandBuffer,
1866 const SDL_GPUBufferLocation *source,
1867 const SDL_GPUBufferLocation *destination,
1868 Uint32 size,
1869 bool cycle)
1870{
1871 @autoreleasepool {
1872 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1873 MetalRenderer *renderer = metalCommandBuffer->renderer;
1874 MetalBufferContainer *srcContainer = (MetalBufferContainer *)source->buffer;
1875 MetalBufferContainer *dstContainer = (MetalBufferContainer *)destination->buffer;
1876
1877 MetalBuffer *srcBuffer = srcContainer->activeBuffer;
1878 MetalBuffer *dstBuffer = METAL_INTERNAL_PrepareBufferForWrite(
1879 renderer,
1880 dstContainer,
1881 cycle);
1882
1883 [metalCommandBuffer->blitEncoder
1884 copyFromBuffer:srcBuffer->handle
1885 sourceOffset:source->offset
1886 toBuffer:dstBuffer->handle
1887 destinationOffset:destination->offset
1888 size:size];
1889
1890 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, srcBuffer);
1891 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, dstBuffer);
1892 }
1893}
1894
1895static void METAL_DownloadFromTexture(
1896 SDL_GPUCommandBuffer *commandBuffer,
1897 const SDL_GPUTextureRegion *source,
1898 const SDL_GPUTextureTransferInfo *destination)
1899{
1900 @autoreleasepool {
1901 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1902 MetalRenderer *renderer = metalCommandBuffer->renderer;
1903 MetalTextureContainer *textureContainer = (MetalTextureContainer *)source->texture;
1904 MetalTexture *metalTexture = textureContainer->activeTexture;
1905 MetalBufferContainer *bufferContainer = (MetalBufferContainer *)destination->transfer_buffer;
1906 Uint32 bufferStride = destination->pixels_per_row;
1907 Uint32 bufferImageHeight = destination->rows_per_layer;
1908 Uint32 bytesPerRow, bytesPerDepthSlice;
1909
1910 MetalBuffer *dstBuffer = METAL_INTERNAL_PrepareBufferForWrite(
1911 renderer,
1912 bufferContainer,
1913 false);
1914
1915 MTLOrigin regionOrigin = MTLOriginMake(
1916 source->x,
1917 source->y,
1918 source->z);
1919
1920 MTLSize regionSize = MTLSizeMake(
1921 source->w,
1922 source->h,
1923 source->d);
1924
1925 if (bufferStride == 0 || bufferImageHeight == 0) {
1926 bufferStride = source->w;
1927 bufferImageHeight = source->h;
1928 }
1929
1930 bytesPerRow = BytesPerRow(bufferStride, textureContainer->header.info.format);
1931 bytesPerDepthSlice = bytesPerRow * bufferImageHeight;
1932
1933 [metalCommandBuffer->blitEncoder
1934 copyFromTexture:metalTexture->handle
1935 sourceSlice:source->layer
1936 sourceLevel:source->mip_level
1937 sourceOrigin:regionOrigin
1938 sourceSize:regionSize
1939 toBuffer:dstBuffer->handle
1940 destinationOffset:destination->offset
1941 destinationBytesPerRow:bytesPerRow
1942 destinationBytesPerImage:bytesPerDepthSlice];
1943
1944 METAL_INTERNAL_TrackTexture(metalCommandBuffer, metalTexture);
1945 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, dstBuffer);
1946 }
1947}
1948
1949static void METAL_DownloadFromBuffer(
1950 SDL_GPUCommandBuffer *commandBuffer,
1951 const SDL_GPUBufferRegion *source,
1952 const SDL_GPUTransferBufferLocation *destination)
1953{
1954 SDL_GPUBufferLocation sourceLocation;
1955 sourceLocation.buffer = source->buffer;
1956 sourceLocation.offset = source->offset;
1957
1958 METAL_CopyBufferToBuffer(
1959 commandBuffer,
1960 &sourceLocation,
1961 (SDL_GPUBufferLocation *)destination,
1962 source->size,
1963 false);
1964}
1965
1966static void METAL_EndCopyPass(
1967 SDL_GPUCommandBuffer *commandBuffer)
1968{
1969 @autoreleasepool {
1970 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1971 [metalCommandBuffer->blitEncoder endEncoding];
1972 metalCommandBuffer->blitEncoder = nil;
1973 }
1974}
1975
1976static void METAL_GenerateMipmaps(
1977 SDL_GPUCommandBuffer *commandBuffer,
1978 SDL_GPUTexture *texture)
1979{
1980 @autoreleasepool {
1981 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
1982 MetalTextureContainer *container = (MetalTextureContainer *)texture;
1983 MetalTexture *metalTexture = container->activeTexture;
1984
1985 METAL_BeginCopyPass(commandBuffer);
1986 [metalCommandBuffer->blitEncoder
1987 generateMipmapsForTexture:metalTexture->handle];
1988 METAL_EndCopyPass(commandBuffer);
1989
1990 METAL_INTERNAL_TrackTexture(metalCommandBuffer, metalTexture);
1991 }
1992}
1993
1994// Graphics State
1995
1996static void METAL_INTERNAL_AllocateCommandBuffers(
1997 MetalRenderer *renderer,
1998 Uint32 allocateCount)
1999{
2000 MetalCommandBuffer *commandBuffer;
2001
2002 renderer->availableCommandBufferCapacity += allocateCount;
2003
2004 renderer->availableCommandBuffers = SDL_realloc(
2005 renderer->availableCommandBuffers,
2006 sizeof(MetalCommandBuffer *) * renderer->availableCommandBufferCapacity);
2007
2008 for (Uint32 i = 0; i < allocateCount; i += 1) {
2009 commandBuffer = SDL_calloc(1, sizeof(MetalCommandBuffer));
2010 commandBuffer->renderer = renderer;
2011
2012 // The native Metal command buffer is created in METAL_AcquireCommandBuffer
2013
2014 commandBuffer->windowDataCapacity = 1;
2015 commandBuffer->windowDataCount = 0;
2016 commandBuffer->windowDatas = SDL_calloc(
2017 commandBuffer->windowDataCapacity, sizeof(MetalWindowData *));
2018
2019 // Reference Counting
2020 commandBuffer->usedBufferCapacity = 4;
2021 commandBuffer->usedBufferCount = 0;
2022 commandBuffer->usedBuffers = SDL_calloc(
2023 commandBuffer->usedBufferCapacity, sizeof(MetalBuffer *));
2024
2025 commandBuffer->usedTextureCapacity = 4;
2026 commandBuffer->usedTextureCount = 0;
2027 commandBuffer->usedTextures = SDL_calloc(
2028 commandBuffer->usedTextureCapacity, sizeof(MetalTexture *));
2029
2030 renderer->availableCommandBuffers[renderer->availableCommandBufferCount] = commandBuffer;
2031 renderer->availableCommandBufferCount += 1;
2032 }
2033}
2034
2035static MetalCommandBuffer *METAL_INTERNAL_GetInactiveCommandBufferFromPool(
2036 MetalRenderer *renderer)
2037{
2038 MetalCommandBuffer *commandBuffer;
2039
2040 if (renderer->availableCommandBufferCount == 0) {
2041 METAL_INTERNAL_AllocateCommandBuffers(
2042 renderer,
2043 renderer->availableCommandBufferCapacity);
2044 }
2045
2046 commandBuffer = renderer->availableCommandBuffers[renderer->availableCommandBufferCount - 1];
2047 renderer->availableCommandBufferCount -= 1;
2048
2049 return commandBuffer;
2050}
2051
2052static Uint8 METAL_INTERNAL_CreateFence(
2053 MetalRenderer *renderer)
2054{
2055 MetalFence *fence;
2056
2057 fence = SDL_calloc(1, sizeof(MetalFence));
2058 SDL_SetAtomicInt(&fence->complete, 0);
2059 SDL_SetAtomicInt(&fence->referenceCount, 0);
2060
2061 // Add it to the available pool
2062 // FIXME: Should this be EXPAND_IF_NEEDED?
2063 if (renderer->availableFenceCount >= renderer->availableFenceCapacity) {
2064 renderer->availableFenceCapacity *= 2;
2065
2066 renderer->availableFences = SDL_realloc(
2067 renderer->availableFences,
2068 sizeof(MetalFence *) * renderer->availableFenceCapacity);
2069 }
2070
2071 renderer->availableFences[renderer->availableFenceCount] = fence;
2072 renderer->availableFenceCount += 1;
2073
2074 return 1;
2075}
2076
2077static bool METAL_INTERNAL_AcquireFence(
2078 MetalRenderer *renderer,
2079 MetalCommandBuffer *commandBuffer)
2080{
2081 MetalFence *fence;
2082
2083 // Acquire a fence from the pool
2084 SDL_LockMutex(renderer->fenceLock);
2085
2086 if (renderer->availableFenceCount == 0) {
2087 if (!METAL_INTERNAL_CreateFence(renderer)) {
2088 SDL_UnlockMutex(renderer->fenceLock);
2089 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to create fence!");
2090 return false;
2091 }
2092 }
2093
2094 fence = renderer->availableFences[renderer->availableFenceCount - 1];
2095 renderer->availableFenceCount -= 1;
2096
2097 SDL_UnlockMutex(renderer->fenceLock);
2098
2099 // Associate the fence with the command buffer
2100 commandBuffer->fence = fence;
2101 SDL_SetAtomicInt(&fence->complete, 0); // FIXME: Is this right?
2102 (void)SDL_AtomicIncRef(&commandBuffer->fence->referenceCount);
2103
2104 return true;
2105}
2106
2107static SDL_GPUCommandBuffer *METAL_AcquireCommandBuffer(
2108 SDL_GPURenderer *driverData)
2109{
2110 @autoreleasepool {
2111 MetalRenderer *renderer = (MetalRenderer *)driverData;
2112 MetalCommandBuffer *commandBuffer;
2113
2114 SDL_LockMutex(renderer->acquireCommandBufferLock);
2115
2116 commandBuffer = METAL_INTERNAL_GetInactiveCommandBufferFromPool(renderer);
2117 commandBuffer->handle = [renderer->queue commandBuffer];
2118
2119 commandBuffer->graphics_pipeline = NULL;
2120 commandBuffer->compute_pipeline = NULL;
2121 for (Uint32 i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
2122 commandBuffer->vertexUniformBuffers[i] = NULL;
2123 commandBuffer->fragmentUniformBuffers[i] = NULL;
2124 commandBuffer->computeUniformBuffers[i] = NULL;
2125 }
2126
2127 commandBuffer->autoReleaseFence = true;
2128
2129 SDL_UnlockMutex(renderer->acquireCommandBufferLock);
2130
2131 return (SDL_GPUCommandBuffer *)commandBuffer;
2132 }
2133}
2134
2135// This function assumes that it's called from within an autorelease pool
2136static MetalUniformBuffer *METAL_INTERNAL_AcquireUniformBufferFromPool(
2137 MetalCommandBuffer *commandBuffer)
2138{
2139 MetalRenderer *renderer = commandBuffer->renderer;
2140 MetalUniformBuffer *uniformBuffer;
2141
2142 SDL_LockMutex(renderer->acquireUniformBufferLock);
2143
2144 if (renderer->uniformBufferPoolCount > 0) {
2145 uniformBuffer = renderer->uniformBufferPool[renderer->uniformBufferPoolCount - 1];
2146 renderer->uniformBufferPoolCount -= 1;
2147 } else {
2148 uniformBuffer = METAL_INTERNAL_CreateUniformBuffer(
2149 renderer,
2150 UNIFORM_BUFFER_SIZE);
2151 }
2152
2153 SDL_UnlockMutex(renderer->acquireUniformBufferLock);
2154
2155 METAL_INTERNAL_TrackUniformBuffer(commandBuffer, uniformBuffer);
2156
2157 return uniformBuffer;
2158}
2159
2160static void METAL_INTERNAL_ReturnUniformBufferToPool(
2161 MetalRenderer *renderer,
2162 MetalUniformBuffer *uniformBuffer)
2163{
2164 if (renderer->uniformBufferPoolCount >= renderer->uniformBufferPoolCapacity) {
2165 renderer->uniformBufferPoolCapacity *= 2;
2166 renderer->uniformBufferPool = SDL_realloc(
2167 renderer->uniformBufferPool,
2168 renderer->uniformBufferPoolCapacity * sizeof(MetalUniformBuffer *));
2169 }
2170
2171 renderer->uniformBufferPool[renderer->uniformBufferPoolCount] = uniformBuffer;
2172 renderer->uniformBufferPoolCount += 1;
2173
2174 uniformBuffer->writeOffset = 0;
2175 uniformBuffer->drawOffset = 0;
2176}
2177
2178static void METAL_SetViewport(
2179 SDL_GPUCommandBuffer *commandBuffer,
2180 const SDL_GPUViewport *viewport)
2181{
2182 @autoreleasepool {
2183 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2184 MTLViewport metalViewport;
2185
2186 metalViewport.originX = viewport->x;
2187 metalViewport.originY = viewport->y;
2188 metalViewport.width = viewport->w;
2189 metalViewport.height = viewport->h;
2190 metalViewport.znear = viewport->min_depth;
2191 metalViewport.zfar = viewport->max_depth;
2192
2193 [metalCommandBuffer->renderEncoder setViewport:metalViewport];
2194 }
2195}
2196
2197static void METAL_SetScissor(
2198 SDL_GPUCommandBuffer *commandBuffer,
2199 const SDL_Rect *scissor)
2200{
2201 @autoreleasepool {
2202 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2203 MTLScissorRect metalScissor;
2204
2205 metalScissor.x = scissor->x;
2206 metalScissor.y = scissor->y;
2207 metalScissor.width = scissor->w;
2208 metalScissor.height = scissor->h;
2209
2210 [metalCommandBuffer->renderEncoder setScissorRect:metalScissor];
2211 }
2212}
2213
2214static void METAL_SetBlendConstants(
2215 SDL_GPUCommandBuffer *commandBuffer,
2216 SDL_FColor blendConstants)
2217{
2218 @autoreleasepool {
2219 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2220 [metalCommandBuffer->renderEncoder setBlendColorRed:blendConstants.r
2221 green:blendConstants.g
2222 blue:blendConstants.b
2223 alpha:blendConstants.a];
2224 }
2225}
2226
2227static void METAL_SetStencilReference(
2228 SDL_GPUCommandBuffer *commandBuffer,
2229 Uint8 reference)
2230{
2231 @autoreleasepool {
2232 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2233 [metalCommandBuffer->renderEncoder setStencilReferenceValue:reference];
2234 }
2235}
2236
2237static void METAL_BeginRenderPass(
2238 SDL_GPUCommandBuffer *commandBuffer,
2239 const SDL_GPUColorTargetInfo *colorTargetInfos,
2240 Uint32 numColorTargets,
2241 const SDL_GPUDepthStencilTargetInfo *depthStencilTargetInfo)
2242{
2243 @autoreleasepool {
2244 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2245 MetalRenderer *renderer = metalCommandBuffer->renderer;
2246 MTLRenderPassDescriptor *passDescriptor = [MTLRenderPassDescriptor renderPassDescriptor];
2247 Uint32 vpWidth = UINT_MAX;
2248 Uint32 vpHeight = UINT_MAX;
2249 SDL_GPUViewport viewport;
2250 SDL_Rect scissorRect;
2251 SDL_FColor blendConstants;
2252
2253 for (Uint32 i = 0; i < numColorTargets; i += 1) {
2254 MetalTextureContainer *container = (MetalTextureContainer *)colorTargetInfos[i].texture;
2255 MetalTexture *texture = METAL_INTERNAL_PrepareTextureForWrite(
2256 renderer,
2257 container,
2258 colorTargetInfos[i].cycle);
2259
2260 passDescriptor.colorAttachments[i].texture = texture->handle;
2261 passDescriptor.colorAttachments[i].level = colorTargetInfos[i].mip_level;
2262 if (container->header.info.type == SDL_GPU_TEXTURETYPE_3D) {
2263 passDescriptor.colorAttachments[i].depthPlane = colorTargetInfos[i].layer_or_depth_plane;
2264 } else {
2265 passDescriptor.colorAttachments[i].slice = colorTargetInfos[i].layer_or_depth_plane;
2266 }
2267 passDescriptor.colorAttachments[i].clearColor = MTLClearColorMake(
2268 colorTargetInfos[i].clear_color.r,
2269 colorTargetInfos[i].clear_color.g,
2270 colorTargetInfos[i].clear_color.b,
2271 colorTargetInfos[i].clear_color.a);
2272 passDescriptor.colorAttachments[i].loadAction = SDLToMetal_LoadOp[colorTargetInfos[i].load_op];
2273 passDescriptor.colorAttachments[i].storeAction = SDLToMetal_StoreOp[colorTargetInfos[i].store_op];
2274
2275 METAL_INTERNAL_TrackTexture(metalCommandBuffer, texture);
2276
2277 if (colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE || colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE_AND_STORE) {
2278 MetalTextureContainer *resolveContainer = (MetalTextureContainer *)colorTargetInfos[i].resolve_texture;
2279 MetalTexture *resolveTexture = METAL_INTERNAL_PrepareTextureForWrite(
2280 renderer,
2281 resolveContainer,
2282 colorTargetInfos[i].cycle_resolve_texture);
2283
2284 passDescriptor.colorAttachments[i].resolveTexture = resolveTexture->handle;
2285 passDescriptor.colorAttachments[i].resolveSlice = colorTargetInfos[i].resolve_layer;
2286 passDescriptor.colorAttachments[i].resolveLevel = colorTargetInfos[i].resolve_mip_level;
2287
2288 METAL_INTERNAL_TrackTexture(metalCommandBuffer, resolveTexture);
2289 }
2290 }
2291
2292 if (depthStencilTargetInfo != NULL) {
2293 MetalTextureContainer *container = (MetalTextureContainer *)depthStencilTargetInfo->texture;
2294 MetalTexture *texture = METAL_INTERNAL_PrepareTextureForWrite(
2295 renderer,
2296 container,
2297 depthStencilTargetInfo->cycle);
2298
2299 passDescriptor.depthAttachment.texture = texture->handle;
2300 passDescriptor.depthAttachment.loadAction = SDLToMetal_LoadOp[depthStencilTargetInfo->load_op];
2301 passDescriptor.depthAttachment.storeAction = SDLToMetal_StoreOp[depthStencilTargetInfo->store_op];
2302 passDescriptor.depthAttachment.clearDepth = depthStencilTargetInfo->clear_depth;
2303
2304 if (IsStencilFormat(container->header.info.format)) {
2305 passDescriptor.stencilAttachment.texture = texture->handle;
2306 passDescriptor.stencilAttachment.loadAction = SDLToMetal_LoadOp[depthStencilTargetInfo->stencil_load_op];
2307 passDescriptor.stencilAttachment.storeAction = SDLToMetal_StoreOp[depthStencilTargetInfo->stencil_store_op];
2308 passDescriptor.stencilAttachment.clearStencil = depthStencilTargetInfo->clear_stencil;
2309 }
2310
2311 METAL_INTERNAL_TrackTexture(metalCommandBuffer, texture);
2312 }
2313
2314 metalCommandBuffer->renderEncoder = [metalCommandBuffer->handle renderCommandEncoderWithDescriptor:passDescriptor];
2315
2316 // The viewport cannot be larger than the smallest target.
2317 for (Uint32 i = 0; i < numColorTargets; i += 1) {
2318 MetalTextureContainer *container = (MetalTextureContainer *)colorTargetInfos[i].texture;
2319 Uint32 w = container->header.info.width >> colorTargetInfos[i].mip_level;
2320 Uint32 h = container->header.info.height >> colorTargetInfos[i].mip_level;
2321
2322 if (w < vpWidth) {
2323 vpWidth = w;
2324 }
2325
2326 if (h < vpHeight) {
2327 vpHeight = h;
2328 }
2329 }
2330
2331 if (depthStencilTargetInfo != NULL) {
2332 MetalTextureContainer *container = (MetalTextureContainer *)depthStencilTargetInfo->texture;
2333 Uint32 w = container->header.info.width;
2334 Uint32 h = container->header.info.height;
2335
2336 if (w < vpWidth) {
2337 vpWidth = w;
2338 }
2339
2340 if (h < vpHeight) {
2341 vpHeight = h;
2342 }
2343 }
2344
2345 // Set sensible default states
2346 viewport.x = 0;
2347 viewport.y = 0;
2348 viewport.w = vpWidth;
2349 viewport.h = vpHeight;
2350 viewport.min_depth = 0;
2351 viewport.max_depth = 1;
2352 METAL_SetViewport(commandBuffer, &viewport);
2353
2354 scissorRect.x = 0;
2355 scissorRect.y = 0;
2356 scissorRect.w = vpWidth;
2357 scissorRect.h = vpHeight;
2358 METAL_SetScissor(commandBuffer, &scissorRect);
2359
2360 blendConstants.r = 1.0f;
2361 blendConstants.g = 1.0f;
2362 blendConstants.b = 1.0f;
2363 blendConstants.a = 1.0f;
2364 METAL_SetBlendConstants(
2365 commandBuffer,
2366 blendConstants);
2367
2368 METAL_SetStencilReference(
2369 commandBuffer,
2370 0);
2371 }
2372}
2373
2374static void METAL_BindGraphicsPipeline(
2375 SDL_GPUCommandBuffer *commandBuffer,
2376 SDL_GPUGraphicsPipeline *graphicsPipeline)
2377{
2378 @autoreleasepool {
2379 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2380 MetalGraphicsPipeline *pipeline = (MetalGraphicsPipeline *)graphicsPipeline;
2381 SDL_GPURasterizerState *rast = &pipeline->rasterizerState;
2382 Uint32 i;
2383
2384 metalCommandBuffer->graphics_pipeline = pipeline;
2385
2386 [metalCommandBuffer->renderEncoder setRenderPipelineState:pipeline->handle];
2387
2388 // Apply rasterizer state
2389 [metalCommandBuffer->renderEncoder setTriangleFillMode:SDLToMetal_PolygonMode[pipeline->rasterizerState.fill_mode]];
2390 [metalCommandBuffer->renderEncoder setCullMode:SDLToMetal_CullMode[pipeline->rasterizerState.cull_mode]];
2391 [metalCommandBuffer->renderEncoder setFrontFacingWinding:SDLToMetal_FrontFace[pipeline->rasterizerState.front_face]];
2392 [metalCommandBuffer->renderEncoder setDepthClipMode:SDLToMetal_DepthClipMode(pipeline->rasterizerState.enable_depth_clip)];
2393 [metalCommandBuffer->renderEncoder
2394 setDepthBias:((rast->enable_depth_bias) ? rast->depth_bias_constant_factor : 0)
2395 slopeScale:((rast->enable_depth_bias) ? rast->depth_bias_slope_factor : 0)
2396 clamp:((rast->enable_depth_bias) ? rast->depth_bias_clamp : 0)];
2397
2398 // Apply depth-stencil state
2399 if (pipeline->depth_stencil_state != NULL) {
2400 [metalCommandBuffer->renderEncoder
2401 setDepthStencilState:pipeline->depth_stencil_state];
2402 }
2403
2404 for (i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
2405 metalCommandBuffer->needVertexUniformBufferBind[i] = true;
2406 metalCommandBuffer->needFragmentUniformBufferBind[i] = true;
2407 }
2408
2409 for (i = 0; i < pipeline->vertexUniformBufferCount; i += 1) {
2410 if (metalCommandBuffer->vertexUniformBuffers[i] == NULL) {
2411 metalCommandBuffer->vertexUniformBuffers[i] = METAL_INTERNAL_AcquireUniformBufferFromPool(
2412 metalCommandBuffer);
2413 }
2414 }
2415
2416 for (i = 0; i < pipeline->fragmentUniformBufferCount; i += 1) {
2417 if (metalCommandBuffer->fragmentUniformBuffers[i] == NULL) {
2418 metalCommandBuffer->fragmentUniformBuffers[i] = METAL_INTERNAL_AcquireUniformBufferFromPool(
2419 metalCommandBuffer);
2420 }
2421 }
2422 }
2423}
2424
2425static void METAL_BindVertexBuffers(
2426 SDL_GPUCommandBuffer *commandBuffer,
2427 Uint32 firstSlot,
2428 const SDL_GPUBufferBinding *bindings,
2429 Uint32 numBindings)
2430{
2431 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2432
2433 for (Uint32 i = 0; i < numBindings; i += 1) {
2434 MetalBuffer *currentBuffer = ((MetalBufferContainer *)bindings[i].buffer)->activeBuffer;
2435 if (metalCommandBuffer->vertexBuffers[firstSlot + i] != currentBuffer->handle || metalCommandBuffer->vertexBufferOffsets[firstSlot + i] != bindings[i].offset) {
2436 metalCommandBuffer->vertexBuffers[firstSlot + i] = currentBuffer->handle;
2437 metalCommandBuffer->vertexBufferOffsets[firstSlot + i] = bindings[i].offset;
2438 metalCommandBuffer->needVertexBufferBind = true;
2439 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, currentBuffer);
2440 }
2441 }
2442
2443 metalCommandBuffer->vertexBufferCount =
2444 SDL_max(metalCommandBuffer->vertexBufferCount, firstSlot + numBindings);
2445}
2446
2447static void METAL_BindIndexBuffer(
2448 SDL_GPUCommandBuffer *commandBuffer,
2449 const SDL_GPUBufferBinding *binding,
2450 SDL_GPUIndexElementSize indexElementSize)
2451{
2452 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2453 metalCommandBuffer->indexBuffer = ((MetalBufferContainer *)binding->buffer)->activeBuffer;
2454 metalCommandBuffer->indexBufferOffset = binding->offset;
2455 metalCommandBuffer->index_element_size = indexElementSize;
2456
2457 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, metalCommandBuffer->indexBuffer);
2458}
2459
2460static void METAL_BindVertexSamplers(
2461 SDL_GPUCommandBuffer *commandBuffer,
2462 Uint32 firstSlot,
2463 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
2464 Uint32 numBindings)
2465{
2466 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2467 MetalTextureContainer *textureContainer;
2468 MetalSampler *sampler;
2469
2470 for (Uint32 i = 0; i < numBindings; i += 1) {
2471 textureContainer = (MetalTextureContainer *)textureSamplerBindings[i].texture;
2472 sampler = (MetalSampler *)textureSamplerBindings[i].sampler;
2473
2474 if (metalCommandBuffer->vertexSamplers[firstSlot + i] != sampler->handle) {
2475 metalCommandBuffer->vertexSamplers[firstSlot + i] = sampler->handle;
2476 metalCommandBuffer->needVertexSamplerBind = true;
2477 }
2478
2479 if (metalCommandBuffer->vertexTextures[firstSlot + i] != textureContainer->activeTexture->handle) {
2480 METAL_INTERNAL_TrackTexture(
2481 metalCommandBuffer,
2482 textureContainer->activeTexture);
2483
2484 metalCommandBuffer->vertexTextures[firstSlot + i] =
2485 textureContainer->activeTexture->handle;
2486
2487 metalCommandBuffer->needVertexSamplerBind = true;
2488 }
2489 }
2490}
2491
2492static void METAL_BindVertexStorageTextures(
2493 SDL_GPUCommandBuffer *commandBuffer,
2494 Uint32 firstSlot,
2495 SDL_GPUTexture *const *storageTextures,
2496 Uint32 numBindings)
2497{
2498 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2499 MetalTextureContainer *textureContainer;
2500
2501 for (Uint32 i = 0; i < numBindings; i += 1) {
2502 textureContainer = (MetalTextureContainer *)storageTextures[i];
2503
2504 if (metalCommandBuffer->vertexStorageTextures[firstSlot + i] != textureContainer->activeTexture->handle) {
2505 METAL_INTERNAL_TrackTexture(
2506 metalCommandBuffer,
2507 textureContainer->activeTexture);
2508
2509 metalCommandBuffer->vertexStorageTextures[firstSlot + i] =
2510 textureContainer->activeTexture->handle;
2511
2512 metalCommandBuffer->needVertexStorageTextureBind = true;
2513 }
2514 }
2515}
2516
2517static void METAL_BindVertexStorageBuffers(
2518 SDL_GPUCommandBuffer *commandBuffer,
2519 Uint32 firstSlot,
2520 SDL_GPUBuffer *const *storageBuffers,
2521 Uint32 numBindings)
2522{
2523 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2524 MetalBufferContainer *bufferContainer;
2525
2526 for (Uint32 i = 0; i < numBindings; i += 1) {
2527 bufferContainer = (MetalBufferContainer *)storageBuffers[i];
2528
2529 if (metalCommandBuffer->vertexStorageBuffers[firstSlot + i] != bufferContainer->activeBuffer->handle) {
2530 METAL_INTERNAL_TrackBuffer(
2531 metalCommandBuffer,
2532 bufferContainer->activeBuffer);
2533
2534 metalCommandBuffer->vertexStorageBuffers[firstSlot + i] =
2535 bufferContainer->activeBuffer->handle;
2536
2537 metalCommandBuffer->needVertexStorageBufferBind = true;
2538 }
2539 }
2540}
2541
2542static void METAL_BindFragmentSamplers(
2543 SDL_GPUCommandBuffer *commandBuffer,
2544 Uint32 firstSlot,
2545 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
2546 Uint32 numBindings)
2547{
2548 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2549 MetalTextureContainer *textureContainer;
2550 MetalSampler *sampler;
2551
2552 for (Uint32 i = 0; i < numBindings; i += 1) {
2553 textureContainer = (MetalTextureContainer *)textureSamplerBindings[i].texture;
2554 sampler = (MetalSampler *)textureSamplerBindings[i].sampler;
2555
2556 if (metalCommandBuffer->fragmentSamplers[firstSlot + i] != sampler->handle) {
2557 metalCommandBuffer->fragmentSamplers[firstSlot + i] = sampler->handle;
2558 metalCommandBuffer->needFragmentSamplerBind = true;
2559 }
2560
2561 if (metalCommandBuffer->fragmentTextures[firstSlot + i] != textureContainer->activeTexture->handle) {
2562 METAL_INTERNAL_TrackTexture(
2563 metalCommandBuffer,
2564 textureContainer->activeTexture);
2565
2566 metalCommandBuffer->fragmentTextures[firstSlot + i] =
2567 textureContainer->activeTexture->handle;
2568
2569 metalCommandBuffer->needFragmentSamplerBind = true;
2570 }
2571 }
2572}
2573
2574static void METAL_BindFragmentStorageTextures(
2575 SDL_GPUCommandBuffer *commandBuffer,
2576 Uint32 firstSlot,
2577 SDL_GPUTexture *const *storageTextures,
2578 Uint32 numBindings)
2579{
2580 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2581 MetalTextureContainer *textureContainer;
2582
2583 for (Uint32 i = 0; i < numBindings; i += 1) {
2584 textureContainer = (MetalTextureContainer *)storageTextures[i];
2585
2586 if (metalCommandBuffer->fragmentStorageTextures[firstSlot + i] != textureContainer->activeTexture->handle) {
2587 METAL_INTERNAL_TrackTexture(
2588 metalCommandBuffer,
2589 textureContainer->activeTexture);
2590
2591 metalCommandBuffer->fragmentStorageTextures[firstSlot + i] =
2592 textureContainer->activeTexture->handle;
2593
2594 metalCommandBuffer->needFragmentStorageTextureBind = true;
2595 }
2596 }
2597}
2598
2599static void METAL_BindFragmentStorageBuffers(
2600 SDL_GPUCommandBuffer *commandBuffer,
2601 Uint32 firstSlot,
2602 SDL_GPUBuffer *const *storageBuffers,
2603 Uint32 numBindings)
2604{
2605 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2606 MetalBufferContainer *bufferContainer;
2607
2608 for (Uint32 i = 0; i < numBindings; i += 1) {
2609 bufferContainer = (MetalBufferContainer *)storageBuffers[i];
2610
2611 if (metalCommandBuffer->fragmentStorageBuffers[firstSlot + i] != bufferContainer->activeBuffer->handle) {
2612 METAL_INTERNAL_TrackBuffer(
2613 metalCommandBuffer,
2614 bufferContainer->activeBuffer);
2615
2616 metalCommandBuffer->fragmentStorageBuffers[firstSlot + i] =
2617 bufferContainer->activeBuffer->handle;
2618
2619 metalCommandBuffer->needFragmentStorageBufferBind = true;
2620 }
2621 }
2622}
2623
2624// This function assumes that it's called from within an autorelease pool
2625static void METAL_INTERNAL_BindGraphicsResources(
2626 MetalCommandBuffer *commandBuffer)
2627{
2628 MetalGraphicsPipeline *graphicsPipeline = commandBuffer->graphics_pipeline;
2629 NSUInteger offsets[MAX_STORAGE_BUFFERS_PER_STAGE] = { 0 };
2630
2631 // Vertex Buffers
2632 if (commandBuffer->needVertexBufferBind) {
2633 id<MTLBuffer> metalBuffers[MAX_VERTEX_BUFFERS];
2634 NSUInteger bufferOffsets[MAX_VERTEX_BUFFERS];
2635 NSRange range = NSMakeRange(METAL_FIRST_VERTEX_BUFFER_SLOT, commandBuffer->vertexBufferCount);
2636 for (Uint32 i = 0; i < commandBuffer->vertexBufferCount; i += 1) {
2637 metalBuffers[i] = commandBuffer->vertexBuffers[i];
2638 bufferOffsets[i] = commandBuffer->vertexBufferOffsets[i];
2639 }
2640 [commandBuffer->renderEncoder setVertexBuffers:metalBuffers offsets:bufferOffsets withRange:range];
2641 commandBuffer->needVertexBufferBind = false;
2642 }
2643
2644 // Vertex Samplers+Textures
2645
2646 if (commandBuffer->needVertexSamplerBind) {
2647 if (graphicsPipeline->vertexSamplerCount > 0) {
2648 [commandBuffer->renderEncoder setVertexSamplerStates:commandBuffer->vertexSamplers
2649 withRange:NSMakeRange(0, graphicsPipeline->vertexSamplerCount)];
2650 [commandBuffer->renderEncoder setVertexTextures:commandBuffer->vertexTextures
2651 withRange:NSMakeRange(0, graphicsPipeline->vertexSamplerCount)];
2652 }
2653 commandBuffer->needVertexSamplerBind = false;
2654 }
2655
2656 // Vertex Storage Textures
2657
2658 if (commandBuffer->needVertexStorageTextureBind) {
2659 if (graphicsPipeline->vertexStorageTextureCount > 0) {
2660 [commandBuffer->renderEncoder setVertexTextures:commandBuffer->vertexStorageTextures
2661 withRange:NSMakeRange(graphicsPipeline->vertexSamplerCount,
2662 graphicsPipeline->vertexStorageTextureCount)];
2663 }
2664 commandBuffer->needVertexStorageTextureBind = false;
2665 }
2666
2667 // Vertex Storage Buffers
2668
2669 if (commandBuffer->needVertexStorageBufferBind) {
2670 if (graphicsPipeline->vertexStorageBufferCount > 0) {
2671 [commandBuffer->renderEncoder setVertexBuffers:commandBuffer->vertexStorageBuffers
2672 offsets:offsets
2673 withRange:NSMakeRange(graphicsPipeline->vertexUniformBufferCount,
2674 graphicsPipeline->vertexStorageBufferCount)];
2675 }
2676 commandBuffer->needVertexStorageBufferBind = false;
2677 }
2678
2679 // Vertex Uniform Buffers
2680
2681 for (Uint32 i = 0; i < graphicsPipeline->vertexUniformBufferCount; i += 1) {
2682 if (commandBuffer->needVertexUniformBufferBind[i]) {
2683 if (graphicsPipeline->vertexUniformBufferCount > i) {
2684 [commandBuffer->renderEncoder
2685 setVertexBuffer:commandBuffer->vertexUniformBuffers[i]->handle
2686 offset:commandBuffer->vertexUniformBuffers[i]->drawOffset
2687 atIndex:i];
2688 }
2689 commandBuffer->needVertexUniformBufferBind[i] = false;
2690 }
2691 }
2692
2693 // Fragment Samplers+Textures
2694
2695 if (commandBuffer->needFragmentSamplerBind) {
2696 if (graphicsPipeline->fragmentSamplerCount > 0) {
2697 [commandBuffer->renderEncoder setFragmentSamplerStates:commandBuffer->fragmentSamplers
2698 withRange:NSMakeRange(0, graphicsPipeline->fragmentSamplerCount)];
2699 [commandBuffer->renderEncoder setFragmentTextures:commandBuffer->fragmentTextures
2700 withRange:NSMakeRange(0, graphicsPipeline->fragmentSamplerCount)];
2701 }
2702 commandBuffer->needFragmentSamplerBind = false;
2703 }
2704
2705 // Fragment Storage Textures
2706
2707 if (commandBuffer->needFragmentStorageTextureBind) {
2708 if (graphicsPipeline->fragmentStorageTextureCount > 0) {
2709 [commandBuffer->renderEncoder setFragmentTextures:commandBuffer->fragmentStorageTextures
2710 withRange:NSMakeRange(graphicsPipeline->fragmentSamplerCount,
2711 graphicsPipeline->fragmentStorageTextureCount)];
2712 }
2713 commandBuffer->needFragmentStorageTextureBind = false;
2714 }
2715
2716 // Fragment Storage Buffers
2717
2718 if (commandBuffer->needFragmentStorageBufferBind) {
2719 if (graphicsPipeline->fragmentStorageBufferCount > 0) {
2720 [commandBuffer->renderEncoder setFragmentBuffers:commandBuffer->fragmentStorageBuffers
2721 offsets:offsets
2722 withRange:NSMakeRange(graphicsPipeline->fragmentUniformBufferCount,
2723 graphicsPipeline->fragmentStorageBufferCount)];
2724 }
2725 commandBuffer->needFragmentStorageBufferBind = false;
2726 }
2727
2728 // Fragment Uniform Buffers
2729
2730 for (Uint32 i = 0; i < graphicsPipeline->fragmentUniformBufferCount; i += 1) {
2731 if (commandBuffer->needFragmentUniformBufferBind[i]) {
2732 if (graphicsPipeline->fragmentUniformBufferCount > i) {
2733 [commandBuffer->renderEncoder
2734 setFragmentBuffer:commandBuffer->fragmentUniformBuffers[i]->handle
2735 offset:commandBuffer->fragmentUniformBuffers[i]->drawOffset
2736 atIndex:i];
2737 }
2738 commandBuffer->needFragmentUniformBufferBind[i] = false;
2739 }
2740 }
2741}
2742
2743// This function assumes that it's called from within an autorelease pool
2744static void METAL_INTERNAL_BindComputeResources(
2745 MetalCommandBuffer *commandBuffer)
2746{
2747 MetalComputePipeline *computePipeline = commandBuffer->compute_pipeline;
2748 NSUInteger offsets[MAX_STORAGE_BUFFERS_PER_STAGE] = { 0 };
2749
2750 if (commandBuffer->needComputeSamplerBind) {
2751 if (computePipeline->numSamplers > 0) {
2752 [commandBuffer->computeEncoder setTextures:commandBuffer->computeSamplerTextures
2753 withRange:NSMakeRange(0, computePipeline->numSamplers)];
2754 [commandBuffer->computeEncoder setSamplerStates:commandBuffer->computeSamplers
2755 withRange:NSMakeRange(0, computePipeline->numSamplers)];
2756 }
2757 commandBuffer->needComputeSamplerBind = false;
2758 }
2759
2760 if (commandBuffer->needComputeReadOnlyStorageTextureBind) {
2761 if (computePipeline->numReadonlyStorageTextures > 0) {
2762 [commandBuffer->computeEncoder setTextures:commandBuffer->computeReadOnlyTextures
2763 withRange:NSMakeRange(
2764 computePipeline->numSamplers,
2765 computePipeline->numReadonlyStorageTextures)];
2766 }
2767 commandBuffer->needComputeReadOnlyStorageTextureBind = false;
2768 }
2769
2770 if (commandBuffer->needComputeReadOnlyStorageBufferBind) {
2771 if (computePipeline->numReadonlyStorageBuffers > 0) {
2772 [commandBuffer->computeEncoder setBuffers:commandBuffer->computeReadOnlyBuffers
2773 offsets:offsets
2774 withRange:NSMakeRange(computePipeline->numUniformBuffers,
2775 computePipeline->numReadonlyStorageBuffers)];
2776 }
2777 commandBuffer->needComputeReadOnlyStorageBufferBind = false;
2778 }
2779
2780 for (Uint32 i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
2781 if (commandBuffer->needComputeUniformBufferBind[i]) {
2782 if (computePipeline->numUniformBuffers > i) {
2783 [commandBuffer->computeEncoder
2784 setBuffer:commandBuffer->computeUniformBuffers[i]->handle
2785 offset:commandBuffer->computeUniformBuffers[i]->drawOffset
2786 atIndex:i];
2787 }
2788 }
2789 commandBuffer->needComputeUniformBufferBind[i] = false;
2790 }
2791}
2792
2793static void METAL_DrawIndexedPrimitives(
2794 SDL_GPUCommandBuffer *commandBuffer,
2795 Uint32 numIndices,
2796 Uint32 numInstances,
2797 Uint32 firstIndex,
2798 Sint32 vertexOffset,
2799 Uint32 firstInstance)
2800{
2801 @autoreleasepool {
2802 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2803 SDL_GPUPrimitiveType primitiveType = metalCommandBuffer->graphics_pipeline->primitiveType;
2804 Uint32 indexSize = IndexSize(metalCommandBuffer->index_element_size);
2805
2806 METAL_INTERNAL_BindGraphicsResources(metalCommandBuffer);
2807
2808 [metalCommandBuffer->renderEncoder
2809 drawIndexedPrimitives:SDLToMetal_PrimitiveType[primitiveType]
2810 indexCount:numIndices
2811 indexType:SDLToMetal_IndexType[metalCommandBuffer->index_element_size]
2812 indexBuffer:metalCommandBuffer->indexBuffer->handle
2813 indexBufferOffset:metalCommandBuffer->indexBufferOffset + (firstIndex * indexSize)
2814 instanceCount:numInstances
2815 baseVertex:vertexOffset
2816 baseInstance:firstInstance];
2817 }
2818}
2819
2820static void METAL_DrawPrimitives(
2821 SDL_GPUCommandBuffer *commandBuffer,
2822 Uint32 numVertices,
2823 Uint32 numInstances,
2824 Uint32 firstVertex,
2825 Uint32 firstInstance)
2826{
2827 @autoreleasepool {
2828 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2829 SDL_GPUPrimitiveType primitiveType = metalCommandBuffer->graphics_pipeline->primitiveType;
2830
2831 METAL_INTERNAL_BindGraphicsResources(metalCommandBuffer);
2832
2833 [metalCommandBuffer->renderEncoder
2834 drawPrimitives:SDLToMetal_PrimitiveType[primitiveType]
2835 vertexStart:firstVertex
2836 vertexCount:numVertices
2837 instanceCount:numInstances
2838 baseInstance:firstInstance];
2839 }
2840}
2841
2842static void METAL_DrawPrimitivesIndirect(
2843 SDL_GPUCommandBuffer *commandBuffer,
2844 SDL_GPUBuffer *buffer,
2845 Uint32 offset,
2846 Uint32 drawCount)
2847{
2848 @autoreleasepool {
2849 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2850 MetalBuffer *metalBuffer = ((MetalBufferContainer *)buffer)->activeBuffer;
2851 SDL_GPUPrimitiveType primitiveType = metalCommandBuffer->graphics_pipeline->primitiveType;
2852
2853 METAL_INTERNAL_BindGraphicsResources(metalCommandBuffer);
2854
2855 /* Metal: "We have multi-draw at home!"
2856 * Multi-draw at home:
2857 */
2858 for (Uint32 i = 0; i < drawCount; i += 1) {
2859 [metalCommandBuffer->renderEncoder
2860 drawPrimitives:SDLToMetal_PrimitiveType[primitiveType]
2861 indirectBuffer:metalBuffer->handle
2862 indirectBufferOffset:offset + (sizeof(SDL_GPUIndirectDrawCommand) * i)];
2863 }
2864
2865 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, metalBuffer);
2866 }
2867}
2868
2869static void METAL_DrawIndexedPrimitivesIndirect(
2870 SDL_GPUCommandBuffer *commandBuffer,
2871 SDL_GPUBuffer *buffer,
2872 Uint32 offset,
2873 Uint32 drawCount)
2874{
2875 @autoreleasepool {
2876 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2877 MetalBuffer *metalBuffer = ((MetalBufferContainer *)buffer)->activeBuffer;
2878 SDL_GPUPrimitiveType primitiveType = metalCommandBuffer->graphics_pipeline->primitiveType;
2879
2880 METAL_INTERNAL_BindGraphicsResources(metalCommandBuffer);
2881
2882 for (Uint32 i = 0; i < drawCount; i += 1) {
2883 [metalCommandBuffer->renderEncoder
2884 drawIndexedPrimitives:SDLToMetal_PrimitiveType[primitiveType]
2885 indexType:SDLToMetal_IndexType[metalCommandBuffer->index_element_size]
2886 indexBuffer:metalCommandBuffer->indexBuffer->handle
2887 indexBufferOffset:metalCommandBuffer->indexBufferOffset
2888 indirectBuffer:metalBuffer->handle
2889 indirectBufferOffset:offset + (sizeof(SDL_GPUIndexedIndirectDrawCommand) * i)];
2890 }
2891
2892 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, metalBuffer);
2893 }
2894}
2895
2896static void METAL_EndRenderPass(
2897 SDL_GPUCommandBuffer *commandBuffer)
2898{
2899 @autoreleasepool {
2900 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
2901 [metalCommandBuffer->renderEncoder endEncoding];
2902 metalCommandBuffer->renderEncoder = nil;
2903
2904 for (Uint32 i = 0; i < MAX_VERTEX_BUFFERS; i += 1) {
2905 metalCommandBuffer->vertexBuffers[i] = nil;
2906 metalCommandBuffer->vertexBufferOffsets[i] = 0;
2907 metalCommandBuffer->vertexBufferCount = 0;
2908 }
2909 for (Uint32 i = 0; i < MAX_TEXTURE_SAMPLERS_PER_STAGE; i += 1) {
2910 metalCommandBuffer->vertexSamplers[i] = nil;
2911 metalCommandBuffer->vertexTextures[i] = nil;
2912 metalCommandBuffer->fragmentSamplers[i] = nil;
2913 metalCommandBuffer->fragmentTextures[i] = nil;
2914 }
2915 for (Uint32 i = 0; i < MAX_STORAGE_TEXTURES_PER_STAGE; i += 1) {
2916 metalCommandBuffer->vertexStorageTextures[i] = nil;
2917 metalCommandBuffer->fragmentStorageTextures[i] = nil;
2918 }
2919 for (Uint32 i = 0; i < MAX_STORAGE_BUFFERS_PER_STAGE; i += 1) {
2920 metalCommandBuffer->vertexStorageBuffers[i] = nil;
2921 metalCommandBuffer->fragmentStorageBuffers[i] = nil;
2922 }
2923 }
2924}
2925
2926// This function assumes that it's called from within an autorelease pool
2927static void METAL_INTERNAL_PushUniformData(
2928 MetalCommandBuffer *metalCommandBuffer,
2929 SDL_GPUShaderStage shaderStage,
2930 Uint32 slotIndex,
2931 const void *data,
2932 Uint32 length)
2933{
2934 MetalUniformBuffer *metalUniformBuffer;
2935 Uint32 alignedDataLength;
2936
2937 if (shaderStage == SDL_GPU_SHADERSTAGE_VERTEX) {
2938 if (metalCommandBuffer->vertexUniformBuffers[slotIndex] == NULL) {
2939 metalCommandBuffer->vertexUniformBuffers[slotIndex] = METAL_INTERNAL_AcquireUniformBufferFromPool(
2940 metalCommandBuffer);
2941 }
2942 metalUniformBuffer = metalCommandBuffer->vertexUniformBuffers[slotIndex];
2943 } else if (shaderStage == SDL_GPU_SHADERSTAGE_FRAGMENT) {
2944 if (metalCommandBuffer->fragmentUniformBuffers[slotIndex] == NULL) {
2945 metalCommandBuffer->fragmentUniformBuffers[slotIndex] = METAL_INTERNAL_AcquireUniformBufferFromPool(
2946 metalCommandBuffer);
2947 }
2948 metalUniformBuffer = metalCommandBuffer->fragmentUniformBuffers[slotIndex];
2949 } else if (shaderStage == SDL_GPU_SHADERSTAGE_COMPUTE) {
2950 if (metalCommandBuffer->computeUniformBuffers[slotIndex] == NULL) {
2951 metalCommandBuffer->computeUniformBuffers[slotIndex] = METAL_INTERNAL_AcquireUniformBufferFromPool(
2952 metalCommandBuffer);
2953 }
2954 metalUniformBuffer = metalCommandBuffer->computeUniformBuffers[slotIndex];
2955 } else {
2956 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized shader stage!");
2957 return;
2958 }
2959
2960 alignedDataLength = METAL_INTERNAL_NextHighestAlignment(
2961 length,
2962 256);
2963
2964 if (metalUniformBuffer->writeOffset + alignedDataLength >= UNIFORM_BUFFER_SIZE) {
2965 metalUniformBuffer = METAL_INTERNAL_AcquireUniformBufferFromPool(
2966 metalCommandBuffer);
2967
2968 metalUniformBuffer->writeOffset = 0;
2969 metalUniformBuffer->drawOffset = 0;
2970
2971 if (shaderStage == SDL_GPU_SHADERSTAGE_VERTEX) {
2972 metalCommandBuffer->vertexUniformBuffers[slotIndex] = metalUniformBuffer;
2973 } else if (shaderStage == SDL_GPU_SHADERSTAGE_FRAGMENT) {
2974 metalCommandBuffer->fragmentUniformBuffers[slotIndex] = metalUniformBuffer;
2975 } else if (shaderStage == SDL_GPU_SHADERSTAGE_COMPUTE) {
2976 metalCommandBuffer->computeUniformBuffers[slotIndex] = metalUniformBuffer;
2977 } else {
2978 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized shader stage!");
2979 return;
2980 }
2981 }
2982
2983 metalUniformBuffer->drawOffset = metalUniformBuffer->writeOffset;
2984
2985 SDL_memcpy(
2986 (metalUniformBuffer->handle).contents + metalUniformBuffer->writeOffset,
2987 data,
2988 length);
2989
2990 metalUniformBuffer->writeOffset += alignedDataLength;
2991
2992 if (shaderStage == SDL_GPU_SHADERSTAGE_VERTEX) {
2993 metalCommandBuffer->needVertexUniformBufferBind[slotIndex] = true;
2994 } else if (shaderStage == SDL_GPU_SHADERSTAGE_FRAGMENT) {
2995 metalCommandBuffer->needFragmentUniformBufferBind[slotIndex] = true;
2996 } else if (shaderStage == SDL_GPU_SHADERSTAGE_COMPUTE) {
2997 metalCommandBuffer->needComputeUniformBufferBind[slotIndex] = true;
2998 } else {
2999 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized shader stage!");
3000 }
3001}
3002
3003static void METAL_PushVertexUniformData(
3004 SDL_GPUCommandBuffer *commandBuffer,
3005 Uint32 slotIndex,
3006 const void *data,
3007 Uint32 length)
3008{
3009 @autoreleasepool {
3010 METAL_INTERNAL_PushUniformData(
3011 (MetalCommandBuffer *)commandBuffer,
3012 SDL_GPU_SHADERSTAGE_VERTEX,
3013 slotIndex,
3014 data,
3015 length);
3016 }
3017}
3018
3019static void METAL_PushFragmentUniformData(
3020 SDL_GPUCommandBuffer *commandBuffer,
3021 Uint32 slotIndex,
3022 const void *data,
3023 Uint32 length)
3024{
3025 @autoreleasepool {
3026 METAL_INTERNAL_PushUniformData(
3027 (MetalCommandBuffer *)commandBuffer,
3028 SDL_GPU_SHADERSTAGE_FRAGMENT,
3029 slotIndex,
3030 data,
3031 length);
3032 }
3033}
3034
3035// Blit
3036
3037static void METAL_Blit(
3038 SDL_GPUCommandBuffer *commandBuffer,
3039 const SDL_GPUBlitInfo *info)
3040{
3041 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
3042 MetalRenderer *renderer = (MetalRenderer *)metalCommandBuffer->renderer;
3043
3044 SDL_GPU_BlitCommon(
3045 commandBuffer,
3046 info,
3047 renderer->blitLinearSampler,
3048 renderer->blitNearestSampler,
3049 renderer->blitVertexShader,
3050 renderer->blitFrom2DShader,
3051 renderer->blitFrom2DArrayShader,
3052 renderer->blitFrom3DShader,
3053 renderer->blitFromCubeShader,
3054 renderer->blitFromCubeArrayShader,
3055 &renderer->blitPipelines,
3056 &renderer->blitPipelineCount,
3057 &renderer->blitPipelineCapacity);
3058}
3059
3060// Compute State
3061
3062static void METAL_BeginComputePass(
3063 SDL_GPUCommandBuffer *commandBuffer,
3064 const SDL_GPUStorageTextureReadWriteBinding *storageTextureBindings,
3065 Uint32 numStorageTextureBindings,
3066 const SDL_GPUStorageBufferReadWriteBinding *storageBufferBindings,
3067 Uint32 numStorageBufferBindings)
3068{
3069 @autoreleasepool {
3070 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
3071 MetalTextureContainer *textureContainer;
3072 MetalTexture *texture;
3073 id<MTLTexture> textureView;
3074 MetalBufferContainer *bufferContainer;
3075 MetalBuffer *buffer;
3076
3077 metalCommandBuffer->computeEncoder = [metalCommandBuffer->handle computeCommandEncoder];
3078
3079 for (Uint32 i = 0; i < numStorageTextureBindings; i += 1) {
3080 textureContainer = (MetalTextureContainer *)storageTextureBindings[i].texture;
3081
3082 texture = METAL_INTERNAL_PrepareTextureForWrite(
3083 metalCommandBuffer->renderer,
3084 textureContainer,
3085 storageTextureBindings[i].cycle);
3086
3087 METAL_INTERNAL_TrackTexture(metalCommandBuffer, texture);
3088
3089 textureView = [texture->handle newTextureViewWithPixelFormat:SDLToMetal_TextureFormat(textureContainer->header.info.format)
3090 textureType:SDLToMetal_TextureType(textureContainer->header.info.type, false)
3091 levels:NSMakeRange(storageTextureBindings[i].mip_level, 1)
3092 slices:NSMakeRange(storageTextureBindings[i].layer, 1)];
3093
3094 metalCommandBuffer->computeReadWriteTextures[i] = textureView;
3095 }
3096
3097 for (Uint32 i = 0; i < numStorageBufferBindings; i += 1) {
3098 bufferContainer = (MetalBufferContainer *)storageBufferBindings[i].buffer;
3099
3100 buffer = METAL_INTERNAL_PrepareBufferForWrite(
3101 metalCommandBuffer->renderer,
3102 bufferContainer,
3103 storageBufferBindings[i].cycle);
3104
3105 METAL_INTERNAL_TrackBuffer(
3106 metalCommandBuffer,
3107 buffer);
3108
3109 metalCommandBuffer->computeReadWriteBuffers[i] = buffer->handle;
3110 }
3111 }
3112}
3113
3114static void METAL_BindComputePipeline(
3115 SDL_GPUCommandBuffer *commandBuffer,
3116 SDL_GPUComputePipeline *computePipeline)
3117{
3118 @autoreleasepool {
3119 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
3120 MetalComputePipeline *pipeline = (MetalComputePipeline *)computePipeline;
3121
3122 metalCommandBuffer->compute_pipeline = pipeline;
3123
3124 [metalCommandBuffer->computeEncoder setComputePipelineState:pipeline->handle];
3125
3126 for (Uint32 i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
3127 metalCommandBuffer->needComputeUniformBufferBind[i] = true;
3128 }
3129
3130 for (Uint32 i = 0; i < pipeline->numUniformBuffers; i += 1) {
3131 if (metalCommandBuffer->computeUniformBuffers[i] == NULL) {
3132 metalCommandBuffer->computeUniformBuffers[i] = METAL_INTERNAL_AcquireUniformBufferFromPool(
3133 metalCommandBuffer);
3134 }
3135 }
3136
3137 // Bind write-only resources
3138 if (pipeline->numReadWriteStorageTextures > 0) {
3139 [metalCommandBuffer->computeEncoder setTextures:metalCommandBuffer->computeReadWriteTextures
3140 withRange:NSMakeRange(
3141 pipeline->numSamplers +
3142 pipeline->numReadonlyStorageTextures,
3143 pipeline->numReadWriteStorageTextures)];
3144 }
3145
3146 NSUInteger offsets[MAX_COMPUTE_WRITE_BUFFERS] = { 0 };
3147 if (pipeline->numReadWriteStorageBuffers > 0) {
3148 [metalCommandBuffer->computeEncoder setBuffers:metalCommandBuffer->computeReadWriteBuffers
3149 offsets:offsets
3150 withRange:NSMakeRange(
3151 pipeline->numUniformBuffers +
3152 pipeline->numReadonlyStorageBuffers,
3153 pipeline->numReadWriteStorageBuffers)];
3154 }
3155 }
3156}
3157
3158static void METAL_BindComputeSamplers(
3159 SDL_GPUCommandBuffer *commandBuffer,
3160 Uint32 firstSlot,
3161 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
3162 Uint32 numBindings)
3163{
3164 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
3165 MetalTextureContainer *textureContainer;
3166 MetalSampler *sampler;
3167
3168 for (Uint32 i = 0; i < numBindings; i += 1) {
3169 textureContainer = (MetalTextureContainer *)textureSamplerBindings[i].texture;
3170 sampler = (MetalSampler *)textureSamplerBindings[i].sampler;
3171
3172 if (metalCommandBuffer->computeSamplers[firstSlot + i] != sampler->handle) {
3173 metalCommandBuffer->computeSamplers[firstSlot + i] = sampler->handle;
3174 metalCommandBuffer->needComputeSamplerBind = true;
3175 }
3176
3177 if (metalCommandBuffer->computeSamplerTextures[firstSlot + i] != textureContainer->activeTexture->handle) {
3178 METAL_INTERNAL_TrackTexture(
3179 metalCommandBuffer,
3180 textureContainer->activeTexture);
3181
3182 metalCommandBuffer->computeSamplerTextures[firstSlot + i] =
3183 textureContainer->activeTexture->handle;
3184
3185 metalCommandBuffer->needComputeSamplerBind = true;
3186 }
3187 }
3188}
3189
3190static void METAL_BindComputeStorageTextures(
3191 SDL_GPUCommandBuffer *commandBuffer,
3192 Uint32 firstSlot,
3193 SDL_GPUTexture *const *storageTextures,
3194 Uint32 numBindings)
3195{
3196 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
3197 MetalTextureContainer *textureContainer;
3198
3199 for (Uint32 i = 0; i < numBindings; i += 1) {
3200 textureContainer = (MetalTextureContainer *)storageTextures[i];
3201
3202 if (metalCommandBuffer->computeReadOnlyTextures[firstSlot + i] != textureContainer->activeTexture->handle) {
3203 METAL_INTERNAL_TrackTexture(
3204 metalCommandBuffer,
3205 textureContainer->activeTexture);
3206
3207 metalCommandBuffer->computeReadOnlyTextures[firstSlot + i] =
3208 textureContainer->activeTexture->handle;
3209
3210 metalCommandBuffer->needComputeReadOnlyStorageTextureBind = true;
3211 }
3212 }
3213}
3214
3215static void METAL_BindComputeStorageBuffers(
3216 SDL_GPUCommandBuffer *commandBuffer,
3217 Uint32 firstSlot,
3218 SDL_GPUBuffer *const *storageBuffers,
3219 Uint32 numBindings)
3220{
3221 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
3222 MetalBufferContainer *bufferContainer;
3223
3224 for (Uint32 i = 0; i < numBindings; i += 1) {
3225 bufferContainer = (MetalBufferContainer *)storageBuffers[i];
3226
3227 if (metalCommandBuffer->computeReadOnlyBuffers[firstSlot + i] != bufferContainer->activeBuffer->handle) {
3228 METAL_INTERNAL_TrackBuffer(
3229 metalCommandBuffer,
3230 bufferContainer->activeBuffer);
3231
3232 metalCommandBuffer->computeReadOnlyBuffers[firstSlot + i] =
3233 bufferContainer->activeBuffer->handle;
3234
3235 metalCommandBuffer->needComputeReadOnlyStorageBufferBind = true;
3236 }
3237 }
3238}
3239
3240static void METAL_PushComputeUniformData(
3241 SDL_GPUCommandBuffer *commandBuffer,
3242 Uint32 slotIndex,
3243 const void *data,
3244 Uint32 length)
3245{
3246 @autoreleasepool {
3247 METAL_INTERNAL_PushUniformData(
3248 (MetalCommandBuffer *)commandBuffer,
3249 SDL_GPU_SHADERSTAGE_COMPUTE,
3250 slotIndex,
3251 data,
3252 length);
3253 }
3254}
3255
3256static void METAL_DispatchCompute(
3257 SDL_GPUCommandBuffer *commandBuffer,
3258 Uint32 groupcountX,
3259 Uint32 groupcountY,
3260 Uint32 groupcountZ)
3261{
3262 @autoreleasepool {
3263 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
3264 MTLSize threadgroups = MTLSizeMake(groupcountX, groupcountY, groupcountZ);
3265 MTLSize threadsPerThreadgroup = MTLSizeMake(
3266 metalCommandBuffer->compute_pipeline->threadcountX,
3267 metalCommandBuffer->compute_pipeline->threadcountY,
3268 metalCommandBuffer->compute_pipeline->threadcountZ);
3269
3270 METAL_INTERNAL_BindComputeResources(metalCommandBuffer);
3271
3272 [metalCommandBuffer->computeEncoder
3273 dispatchThreadgroups:threadgroups
3274 threadsPerThreadgroup:threadsPerThreadgroup];
3275 }
3276}
3277
3278static void METAL_DispatchComputeIndirect(
3279 SDL_GPUCommandBuffer *commandBuffer,
3280 SDL_GPUBuffer *buffer,
3281 Uint32 offset)
3282{
3283 @autoreleasepool {
3284 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
3285 MetalBuffer *metalBuffer = ((MetalBufferContainer *)buffer)->activeBuffer;
3286 MTLSize threadsPerThreadgroup = MTLSizeMake(
3287 metalCommandBuffer->compute_pipeline->threadcountX,
3288 metalCommandBuffer->compute_pipeline->threadcountY,
3289 metalCommandBuffer->compute_pipeline->threadcountZ);
3290
3291 METAL_INTERNAL_BindComputeResources(metalCommandBuffer);
3292
3293 [metalCommandBuffer->computeEncoder
3294 dispatchThreadgroupsWithIndirectBuffer:metalBuffer->handle
3295 indirectBufferOffset:offset
3296 threadsPerThreadgroup:threadsPerThreadgroup];
3297
3298 METAL_INTERNAL_TrackBuffer(metalCommandBuffer, metalBuffer);
3299 }
3300}
3301
3302static void METAL_EndComputePass(
3303 SDL_GPUCommandBuffer *commandBuffer)
3304{
3305 @autoreleasepool {
3306 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
3307 [metalCommandBuffer->computeEncoder endEncoding];
3308 metalCommandBuffer->computeEncoder = nil;
3309
3310 for (Uint32 i = 0; i < MAX_TEXTURE_SAMPLERS_PER_STAGE; i += 1) {
3311 metalCommandBuffer->computeSamplers[i] = nil;
3312 metalCommandBuffer->computeSamplerTextures[i] = nil;
3313 }
3314 for (Uint32 i = 0; i < MAX_COMPUTE_WRITE_TEXTURES; i += 1) {
3315 metalCommandBuffer->computeReadWriteTextures[i] = nil;
3316 }
3317 for (Uint32 i = 0; i < MAX_COMPUTE_WRITE_BUFFERS; i += 1) {
3318 metalCommandBuffer->computeReadWriteBuffers[i] = nil;
3319 }
3320 for (Uint32 i = 0; i < MAX_STORAGE_TEXTURES_PER_STAGE; i += 1) {
3321 metalCommandBuffer->computeReadOnlyTextures[i] = nil;
3322 }
3323 for (Uint32 i = 0; i < MAX_STORAGE_BUFFERS_PER_STAGE; i += 1) {
3324 metalCommandBuffer->computeReadOnlyBuffers[i] = nil;
3325 }
3326 }
3327}
3328
3329// Fence Cleanup
3330
3331static void METAL_INTERNAL_ReleaseFenceToPool(
3332 MetalRenderer *renderer,
3333 MetalFence *fence)
3334{
3335 SDL_LockMutex(renderer->fenceLock);
3336
3337 // FIXME: Should this use EXPAND_IF_NEEDED?
3338 if (renderer->availableFenceCount == renderer->availableFenceCapacity) {
3339 renderer->availableFenceCapacity *= 2;
3340 renderer->availableFences = SDL_realloc(
3341 renderer->availableFences,
3342 renderer->availableFenceCapacity * sizeof(MetalFence *));
3343 }
3344 renderer->availableFences[renderer->availableFenceCount] = fence;
3345 renderer->availableFenceCount += 1;
3346
3347 SDL_UnlockMutex(renderer->fenceLock);
3348}
3349
3350static void METAL_ReleaseFence(
3351 SDL_GPURenderer *driverData,
3352 SDL_GPUFence *fence)
3353{
3354 MetalFence *metalFence = (MetalFence *)fence;
3355 if (SDL_AtomicDecRef(&metalFence->referenceCount)) {
3356 METAL_INTERNAL_ReleaseFenceToPool(
3357 (MetalRenderer *)driverData,
3358 (MetalFence *)fence);
3359 }
3360}
3361
3362// Cleanup
3363
3364static void METAL_INTERNAL_CleanCommandBuffer(
3365 MetalRenderer *renderer,
3366 MetalCommandBuffer *commandBuffer,
3367 bool cancel)
3368{
3369 Uint32 i;
3370
3371 // End any active passes
3372 if (commandBuffer->renderEncoder) {
3373 [commandBuffer->renderEncoder endEncoding];
3374 commandBuffer->renderEncoder = nil;
3375 }
3376 if (commandBuffer->computeEncoder) {
3377 [commandBuffer->computeEncoder endEncoding];
3378 commandBuffer->computeEncoder = nil;
3379 }
3380 if (commandBuffer->blitEncoder) {
3381 [commandBuffer->blitEncoder endEncoding];
3382 commandBuffer->blitEncoder = nil;
3383 }
3384
3385 // Uniform buffers are now available
3386
3387 SDL_LockMutex(renderer->acquireUniformBufferLock);
3388
3389 for (i = 0; i < commandBuffer->usedUniformBufferCount; i += 1) {
3390 METAL_INTERNAL_ReturnUniformBufferToPool(
3391 renderer,
3392 commandBuffer->usedUniformBuffers[i]);
3393 }
3394 commandBuffer->usedUniformBufferCount = 0;
3395
3396 SDL_UnlockMutex(renderer->acquireUniformBufferLock);
3397
3398 // Reference Counting
3399
3400 for (i = 0; i < commandBuffer->usedBufferCount; i += 1) {
3401 (void)SDL_AtomicDecRef(&commandBuffer->usedBuffers[i]->referenceCount);
3402 }
3403 commandBuffer->usedBufferCount = 0;
3404
3405 for (i = 0; i < commandBuffer->usedTextureCount; i += 1) {
3406 (void)SDL_AtomicDecRef(&commandBuffer->usedTextures[i]->referenceCount);
3407 }
3408 commandBuffer->usedTextureCount = 0;
3409
3410 // Reset presentation
3411 commandBuffer->windowDataCount = 0;
3412
3413 // Reset bindings
3414 for (i = 0; i < MAX_VERTEX_BUFFERS; i += 1) {
3415 commandBuffer->vertexBuffers[i] = nil;
3416 commandBuffer->vertexBufferOffsets[i] = 0;
3417 }
3418 commandBuffer->vertexBufferCount = 0;
3419 commandBuffer->indexBuffer = NULL;
3420 for (i = 0; i < MAX_TEXTURE_SAMPLERS_PER_STAGE; i += 1) {
3421 commandBuffer->vertexSamplers[i] = nil;
3422 commandBuffer->vertexTextures[i] = nil;
3423 commandBuffer->fragmentSamplers[i] = nil;
3424 commandBuffer->fragmentTextures[i] = nil;
3425 commandBuffer->computeSamplers[i] = nil;
3426 commandBuffer->computeSamplerTextures[i] = nil;
3427 }
3428 for (i = 0; i < MAX_STORAGE_TEXTURES_PER_STAGE; i += 1) {
3429 commandBuffer->vertexStorageTextures[i] = nil;
3430 commandBuffer->fragmentStorageTextures[i] = nil;
3431 commandBuffer->computeReadOnlyTextures[i] = nil;
3432 }
3433 for (i = 0; i < MAX_STORAGE_BUFFERS_PER_STAGE; i += 1) {
3434 commandBuffer->vertexStorageBuffers[i] = nil;
3435 commandBuffer->fragmentStorageBuffers[i] = nil;
3436 commandBuffer->computeReadOnlyBuffers[i] = nil;
3437 }
3438 for (i = 0; i < MAX_COMPUTE_WRITE_TEXTURES; i += 1) {
3439 commandBuffer->computeReadWriteTextures[i] = nil;
3440 }
3441 for (i = 0; i < MAX_COMPUTE_WRITE_BUFFERS; i += 1) {
3442 commandBuffer->computeReadWriteBuffers[i] = nil;
3443 }
3444
3445 commandBuffer->needVertexBufferBind = false;
3446 commandBuffer->needVertexSamplerBind = false;
3447 commandBuffer->needVertexStorageBufferBind = false;
3448 commandBuffer->needVertexStorageTextureBind = false;
3449 SDL_zeroa(commandBuffer->needVertexUniformBufferBind);
3450
3451 commandBuffer->needFragmentSamplerBind = false;
3452 commandBuffer->needFragmentStorageBufferBind = false;
3453 commandBuffer->needFragmentStorageTextureBind = false;
3454 SDL_zeroa(commandBuffer->needFragmentUniformBufferBind);
3455
3456 commandBuffer->needComputeSamplerBind = false;
3457 commandBuffer->needComputeReadOnlyStorageBufferBind = false;
3458 commandBuffer->needComputeReadOnlyStorageTextureBind = false;
3459 SDL_zeroa(commandBuffer->needComputeUniformBufferBind);
3460
3461 // The fence is now available (unless SubmitAndAcquireFence was called)
3462 if (commandBuffer->autoReleaseFence) {
3463 METAL_ReleaseFence(
3464 (SDL_GPURenderer *)renderer,
3465 (SDL_GPUFence *)commandBuffer->fence);
3466 }
3467
3468 // Return command buffer to pool
3469 SDL_LockMutex(renderer->acquireCommandBufferLock);
3470 // FIXME: Should this use EXPAND_IF_NEEDED?
3471 if (renderer->availableCommandBufferCount == renderer->availableCommandBufferCapacity) {
3472 renderer->availableCommandBufferCapacity += 1;
3473 renderer->availableCommandBuffers = SDL_realloc(
3474 renderer->availableCommandBuffers,
3475 renderer->availableCommandBufferCapacity * sizeof(MetalCommandBuffer *));
3476 }
3477 renderer->availableCommandBuffers[renderer->availableCommandBufferCount] = commandBuffer;
3478 renderer->availableCommandBufferCount += 1;
3479 SDL_UnlockMutex(renderer->acquireCommandBufferLock);
3480
3481 // Remove this command buffer from the submitted list
3482 if (!cancel) {
3483 for (i = 0; i < renderer->submittedCommandBufferCount; i += 1) {
3484 if (renderer->submittedCommandBuffers[i] == commandBuffer) {
3485 renderer->submittedCommandBuffers[i] = renderer->submittedCommandBuffers[renderer->submittedCommandBufferCount - 1];
3486 renderer->submittedCommandBufferCount -= 1;
3487 }
3488 }
3489 }
3490}
3491
3492// This function assumes that it's called from within an autorelease pool
3493static void METAL_INTERNAL_PerformPendingDestroys(
3494 MetalRenderer *renderer)
3495{
3496 Sint32 referenceCount = 0;
3497 Sint32 i;
3498 Uint32 j;
3499
3500 for (i = renderer->bufferContainersToDestroyCount - 1; i >= 0; i -= 1) {
3501 referenceCount = 0;
3502 for (j = 0; j < renderer->bufferContainersToDestroy[i]->bufferCount; j += 1) {
3503 referenceCount += SDL_GetAtomicInt(&renderer->bufferContainersToDestroy[i]->buffers[j]->referenceCount);
3504 }
3505
3506 if (referenceCount == 0) {
3507 METAL_INTERNAL_DestroyBufferContainer(
3508 renderer->bufferContainersToDestroy[i]);
3509
3510 renderer->bufferContainersToDestroy[i] = renderer->bufferContainersToDestroy[renderer->bufferContainersToDestroyCount - 1];
3511 renderer->bufferContainersToDestroyCount -= 1;
3512 }
3513 }
3514
3515 for (i = renderer->textureContainersToDestroyCount - 1; i >= 0; i -= 1) {
3516 referenceCount = 0;
3517 for (j = 0; j < renderer->textureContainersToDestroy[i]->textureCount; j += 1) {
3518 referenceCount += SDL_GetAtomicInt(&renderer->textureContainersToDestroy[i]->textures[j]->referenceCount);
3519 }
3520
3521 if (referenceCount == 0) {
3522 METAL_INTERNAL_DestroyTextureContainer(
3523 renderer->textureContainersToDestroy[i]);
3524
3525 renderer->textureContainersToDestroy[i] = renderer->textureContainersToDestroy[renderer->textureContainersToDestroyCount - 1];
3526 renderer->textureContainersToDestroyCount -= 1;
3527 }
3528 }
3529}
3530
3531// Fences
3532
3533static bool METAL_WaitForFences(
3534 SDL_GPURenderer *driverData,
3535 bool waitAll,
3536 SDL_GPUFence *const *fences,
3537 Uint32 numFences)
3538{
3539 @autoreleasepool {
3540 MetalRenderer *renderer = (MetalRenderer *)driverData;
3541 bool waiting;
3542
3543 if (waitAll) {
3544 for (Uint32 i = 0; i < numFences; i += 1) {
3545 while (!SDL_GetAtomicInt(&((MetalFence *)fences[i])->complete)) {
3546 // Spin!
3547 }
3548 }
3549 } else {
3550 waiting = 1;
3551 while (waiting) {
3552 for (Uint32 i = 0; i < numFences; i += 1) {
3553 if (SDL_GetAtomicInt(&((MetalFence *)fences[i])->complete) > 0) {
3554 waiting = 0;
3555 break;
3556 }
3557 }
3558 }
3559 }
3560
3561 METAL_INTERNAL_PerformPendingDestroys(renderer);
3562
3563 return true;
3564 }
3565}
3566
3567static bool METAL_QueryFence(
3568 SDL_GPURenderer *driverData,
3569 SDL_GPUFence *fence)
3570{
3571 MetalFence *metalFence = (MetalFence *)fence;
3572 return SDL_GetAtomicInt(&metalFence->complete) == 1;
3573}
3574
3575// Window and Swapchain Management
3576
3577static MetalWindowData *METAL_INTERNAL_FetchWindowData(SDL_Window *window)
3578{
3579 SDL_PropertiesID properties = SDL_GetWindowProperties(window);
3580 return (MetalWindowData *)SDL_GetPointerProperty(properties, WINDOW_PROPERTY_DATA, NULL);
3581}
3582
3583static bool METAL_SupportsSwapchainComposition(
3584 SDL_GPURenderer *driverData,
3585 SDL_Window *window,
3586 SDL_GPUSwapchainComposition swapchainComposition)
3587{
3588#ifndef SDL_PLATFORM_MACOS
3589 if (swapchainComposition == SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084) {
3590 return false;
3591 }
3592#endif
3593
3594 if (@available(macOS 11.0, *)) {
3595 return true;
3596 } else {
3597 return swapchainComposition != SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084;
3598 }
3599}
3600
3601// This function assumes that it's called from within an autorelease pool
3602static Uint8 METAL_INTERNAL_CreateSwapchain(
3603 MetalRenderer *renderer,
3604 MetalWindowData *windowData,
3605 SDL_GPUSwapchainComposition swapchainComposition,
3606 SDL_GPUPresentMode presentMode)
3607{
3608 CGColorSpaceRef colorspace;
3609 CGSize drawableSize;
3610
3611 windowData->view = SDL_Metal_CreateView(windowData->window);
3612 windowData->drawable = nil;
3613 windowData->presentMode = SDL_GPU_PRESENTMODE_VSYNC;
3614 windowData->frameCounter = 0;
3615
3616 for (int i = 0; i < MAX_FRAMES_IN_FLIGHT; i += 1) {
3617 windowData->inFlightFences[i] = NULL;
3618 }
3619
3620 windowData->layer = (__bridge CAMetalLayer *)(SDL_Metal_GetLayer(windowData->view));
3621 windowData->layer.device = renderer->device;
3622#ifdef SDL_PLATFORM_MACOS
3623 if (@available(macOS 10.13, *)) {
3624 windowData->layer.displaySyncEnabled = (presentMode != SDL_GPU_PRESENTMODE_IMMEDIATE);
3625 windowData->presentMode = presentMode;
3626 }
3627#endif
3628 windowData->layer.pixelFormat = SDLToMetal_TextureFormat(SwapchainCompositionToFormat[swapchainComposition]);
3629#ifndef SDL_PLATFORM_TVOS
3630 if (@available(iOS 16.0, *)) {
3631 windowData->layer.wantsExtendedDynamicRangeContent = (swapchainComposition != SDL_GPU_SWAPCHAINCOMPOSITION_SDR);
3632 }
3633#endif
3634
3635 colorspace = CGColorSpaceCreateWithName(SwapchainCompositionToColorSpace[swapchainComposition]);
3636 windowData->layer.colorspace = colorspace;
3637 CGColorSpaceRelease(colorspace);
3638
3639 windowData->texture.handle = nil; // This will be set in AcquireSwapchainTexture.
3640
3641 // Precache blit pipelines for the swapchain format
3642 for (Uint32 i = 0; i < 4; i += 1) {
3643 SDL_GPU_FetchBlitPipeline(
3644 renderer->sdlGPUDevice,
3645 (SDL_GPUTextureType)i,
3646 SwapchainCompositionToFormat[swapchainComposition],
3647 renderer->blitVertexShader,
3648 renderer->blitFrom2DShader,
3649 renderer->blitFrom2DArrayShader,
3650 renderer->blitFrom3DShader,
3651 renderer->blitFromCubeShader,
3652 renderer->blitFromCubeArrayShader,
3653 &renderer->blitPipelines,
3654 &renderer->blitPipelineCount,
3655 &renderer->blitPipelineCapacity);
3656 }
3657
3658 // Set up the texture container
3659 SDL_zero(windowData->textureContainer);
3660 windowData->textureContainer.canBeCycled = 0;
3661 windowData->textureContainer.activeTexture = &windowData->texture;
3662 windowData->textureContainer.textureCapacity = 1;
3663 windowData->textureContainer.textureCount = 1;
3664 windowData->textureContainer.header.info.format = SwapchainCompositionToFormat[swapchainComposition];
3665 windowData->textureContainer.header.info.num_levels = 1;
3666 windowData->textureContainer.header.info.layer_count_or_depth = 1;
3667 windowData->textureContainer.header.info.type = SDL_GPU_TEXTURETYPE_2D;
3668 windowData->textureContainer.header.info.usage = SDL_GPU_TEXTUREUSAGE_COLOR_TARGET;
3669
3670 drawableSize = windowData->layer.drawableSize;
3671 windowData->textureContainer.header.info.width = (Uint32)drawableSize.width;
3672 windowData->textureContainer.header.info.height = (Uint32)drawableSize.height;
3673
3674 return 1;
3675}
3676
3677static bool METAL_SupportsPresentMode(
3678 SDL_GPURenderer *driverData,
3679 SDL_Window *window,
3680 SDL_GPUPresentMode presentMode)
3681{
3682 switch (presentMode) {
3683#ifdef SDL_PLATFORM_MACOS
3684 case SDL_GPU_PRESENTMODE_IMMEDIATE:
3685#endif
3686 case SDL_GPU_PRESENTMODE_VSYNC:
3687 return true;
3688 default:
3689 return false;
3690 }
3691}
3692
3693static bool METAL_ClaimWindow(
3694 SDL_GPURenderer *driverData,
3695 SDL_Window *window)
3696{
3697 @autoreleasepool {
3698 MetalRenderer *renderer = (MetalRenderer *)driverData;
3699 MetalWindowData *windowData = METAL_INTERNAL_FetchWindowData(window);
3700
3701 if (windowData == NULL) {
3702 windowData = (MetalWindowData *)SDL_calloc(1, sizeof(MetalWindowData));
3703 windowData->window = window;
3704
3705 if (METAL_INTERNAL_CreateSwapchain(renderer, windowData, SDL_GPU_SWAPCHAINCOMPOSITION_SDR, SDL_GPU_PRESENTMODE_VSYNC)) {
3706 SDL_SetPointerProperty(SDL_GetWindowProperties(window), WINDOW_PROPERTY_DATA, windowData);
3707
3708 SDL_LockMutex(renderer->windowLock);
3709
3710 if (renderer->claimedWindowCount >= renderer->claimedWindowCapacity) {
3711 renderer->claimedWindowCapacity *= 2;
3712 renderer->claimedWindows = SDL_realloc(
3713 renderer->claimedWindows,
3714 renderer->claimedWindowCapacity * sizeof(MetalWindowData *));
3715 }
3716 renderer->claimedWindows[renderer->claimedWindowCount] = windowData;
3717 renderer->claimedWindowCount += 1;
3718
3719 SDL_UnlockMutex(renderer->windowLock);
3720
3721 return true;
3722 } else {
3723 SDL_free(windowData);
3724 SET_STRING_ERROR_AND_RETURN("Could not create swapchain, failed to claim window", false);
3725 }
3726 } else {
3727 SET_ERROR_AND_RETURN("%s", "Window already claimed!", false);
3728 }
3729 }
3730}
3731
3732static void METAL_ReleaseWindow(
3733 SDL_GPURenderer *driverData,
3734 SDL_Window *window)
3735{
3736 @autoreleasepool {
3737 MetalRenderer *renderer = (MetalRenderer *)driverData;
3738 MetalWindowData *windowData = METAL_INTERNAL_FetchWindowData(window);
3739
3740 if (windowData == NULL) {
3741 SET_STRING_ERROR_AND_RETURN("Window is not claimed by this SDL_GpuDevice", );
3742 }
3743
3744 METAL_Wait(driverData);
3745 SDL_Metal_DestroyView(windowData->view);
3746 for (int i = 0; i < MAX_FRAMES_IN_FLIGHT; i += 1) {
3747 if (windowData->inFlightFences[i] != NULL) {
3748 METAL_ReleaseFence(
3749 (SDL_GPURenderer *)renderer,
3750 windowData->inFlightFences[i]);
3751 }
3752 }
3753
3754 SDL_LockMutex(renderer->windowLock);
3755 for (Uint32 i = 0; i < renderer->claimedWindowCount; i += 1) {
3756 if (renderer->claimedWindows[i]->window == window) {
3757 renderer->claimedWindows[i] = renderer->claimedWindows[renderer->claimedWindowCount - 1];
3758 renderer->claimedWindowCount -= 1;
3759 break;
3760 }
3761 }
3762 SDL_UnlockMutex(renderer->windowLock);
3763
3764 SDL_free(windowData);
3765
3766 SDL_ClearProperty(SDL_GetWindowProperties(window), WINDOW_PROPERTY_DATA);
3767 }
3768}
3769
3770static bool METAL_WaitForSwapchain(
3771 SDL_GPURenderer *driverData,
3772 SDL_Window *window)
3773{
3774 @autoreleasepool {
3775 MetalRenderer *renderer = (MetalRenderer *)driverData;
3776 MetalWindowData *windowData = METAL_INTERNAL_FetchWindowData(window);
3777
3778 if (windowData == NULL) {
3779 SET_STRING_ERROR_AND_RETURN("Cannot wait for a swapchain from an unclaimed window!", false);
3780 }
3781
3782 if (windowData->inFlightFences[windowData->frameCounter] != NULL) {
3783 if (!METAL_WaitForFences(
3784 driverData,
3785 true,
3786 &windowData->inFlightFences[windowData->frameCounter],
3787 1)) {
3788 return false;
3789 }
3790 }
3791
3792 return true;
3793 }
3794}
3795
3796static bool METAL_INTERNAL_AcquireSwapchainTexture(
3797 bool block,
3798 SDL_GPUCommandBuffer *commandBuffer,
3799 SDL_Window *window,
3800 SDL_GPUTexture **texture,
3801 Uint32 *swapchainTextureWidth,
3802 Uint32 *swapchainTextureHeight)
3803{
3804 @autoreleasepool {
3805 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
3806 MetalRenderer *renderer = metalCommandBuffer->renderer;
3807 MetalWindowData *windowData;
3808 CGSize drawableSize;
3809
3810 *texture = NULL;
3811 if (swapchainTextureWidth) {
3812 *swapchainTextureWidth = 0;
3813 }
3814 if (swapchainTextureHeight) {
3815 *swapchainTextureHeight = 0;
3816 }
3817
3818 windowData = METAL_INTERNAL_FetchWindowData(window);
3819 if (windowData == NULL) {
3820 SET_STRING_ERROR_AND_RETURN("Window is not claimed by this SDL_GpuDevice", false);
3821 }
3822
3823 // Update the window size
3824 drawableSize = windowData->layer.drawableSize;
3825 windowData->textureContainer.header.info.width = (Uint32)drawableSize.width;
3826 windowData->textureContainer.header.info.height = (Uint32)drawableSize.height;
3827 if (swapchainTextureWidth) {
3828 *swapchainTextureWidth = (Uint32)drawableSize.width;
3829 }
3830 if (swapchainTextureHeight) {
3831 *swapchainTextureHeight = (Uint32)drawableSize.height;
3832 }
3833
3834 if (windowData->inFlightFences[windowData->frameCounter] != NULL) {
3835 if (block) {
3836 // If we are blocking, just wait for the fence!
3837 if (!METAL_WaitForFences(
3838 (SDL_GPURenderer *)renderer,
3839 true,
3840 &windowData->inFlightFences[windowData->frameCounter],
3841 1)) {
3842 return false;
3843 }
3844 } else {
3845 // If we are not blocking and the least recent fence is not signaled,
3846 // return true to indicate that there is no error but rendering should be skipped.
3847 if (!METAL_QueryFence(
3848 (SDL_GPURenderer *)metalCommandBuffer->renderer,
3849 windowData->inFlightFences[windowData->frameCounter])) {
3850 return true;
3851 }
3852 }
3853
3854 METAL_ReleaseFence(
3855 (SDL_GPURenderer *)metalCommandBuffer->renderer,
3856 windowData->inFlightFences[windowData->frameCounter]);
3857
3858 windowData->inFlightFences[windowData->frameCounter] = NULL;
3859 }
3860
3861 // Get the drawable and its underlying texture
3862 windowData->drawable = [windowData->layer nextDrawable];
3863 windowData->texture.handle = [windowData->drawable texture];
3864
3865 // Set up presentation
3866 if (metalCommandBuffer->windowDataCount == metalCommandBuffer->windowDataCapacity) {
3867 metalCommandBuffer->windowDataCapacity += 1;
3868 metalCommandBuffer->windowDatas = SDL_realloc(
3869 metalCommandBuffer->windowDatas,
3870 metalCommandBuffer->windowDataCapacity * sizeof(MetalWindowData *));
3871 }
3872 metalCommandBuffer->windowDatas[metalCommandBuffer->windowDataCount] = windowData;
3873 metalCommandBuffer->windowDataCount += 1;
3874
3875 // Return the swapchain texture
3876 *texture = (SDL_GPUTexture *)&windowData->textureContainer;
3877 return true;
3878 }
3879}
3880
3881static bool METAL_AcquireSwapchainTexture(
3882 SDL_GPUCommandBuffer *command_buffer,
3883 SDL_Window *window,
3884 SDL_GPUTexture **swapchain_texture,
3885 Uint32 *swapchain_texture_width,
3886 Uint32 *swapchain_texture_height
3887) {
3888 return METAL_INTERNAL_AcquireSwapchainTexture(
3889 false,
3890 command_buffer,
3891 window,
3892 swapchain_texture,
3893 swapchain_texture_width,
3894 swapchain_texture_height);
3895}
3896
3897static bool METAL_WaitAndAcquireSwapchainTexture(
3898 SDL_GPUCommandBuffer *command_buffer,
3899 SDL_Window *window,
3900 SDL_GPUTexture **swapchain_texture,
3901 Uint32 *swapchain_texture_width,
3902 Uint32 *swapchain_texture_height
3903) {
3904 return METAL_INTERNAL_AcquireSwapchainTexture(
3905 true,
3906 command_buffer,
3907 window,
3908 swapchain_texture,
3909 swapchain_texture_width,
3910 swapchain_texture_height);
3911}
3912
3913static SDL_GPUTextureFormat METAL_GetSwapchainTextureFormat(
3914 SDL_GPURenderer *driverData,
3915 SDL_Window *window)
3916{
3917 MetalRenderer *renderer = (MetalRenderer *)driverData;
3918 MetalWindowData *windowData = METAL_INTERNAL_FetchWindowData(window);
3919
3920 if (windowData == NULL) {
3921 SET_STRING_ERROR_AND_RETURN("Cannot get swapchain format, window has not been claimed", SDL_GPU_TEXTUREFORMAT_INVALID);
3922 }
3923
3924 return windowData->textureContainer.header.info.format;
3925}
3926
3927static bool METAL_SetSwapchainParameters(
3928 SDL_GPURenderer *driverData,
3929 SDL_Window *window,
3930 SDL_GPUSwapchainComposition swapchainComposition,
3931 SDL_GPUPresentMode presentMode)
3932{
3933 @autoreleasepool {
3934 MetalRenderer *renderer = (MetalRenderer *)driverData;
3935 MetalWindowData *windowData = METAL_INTERNAL_FetchWindowData(window);
3936 CGColorSpaceRef colorspace;
3937
3938 if (windowData == NULL) {
3939 SET_STRING_ERROR_AND_RETURN("Cannot set swapchain parameters, window has not been claimed!", false);
3940 }
3941
3942 if (!METAL_SupportsSwapchainComposition(driverData, window, swapchainComposition)) {
3943 SET_STRING_ERROR_AND_RETURN("Swapchain composition not supported", false);
3944 }
3945
3946 if (!METAL_SupportsPresentMode(driverData, window, presentMode)) {
3947 SET_STRING_ERROR_AND_RETURN("Present mode not supported", false);
3948 }
3949
3950 METAL_Wait(driverData);
3951
3952 windowData->presentMode = SDL_GPU_PRESENTMODE_VSYNC;
3953
3954#ifdef SDL_PLATFORM_MACOS
3955 if (@available(macOS 10.13, *)) {
3956 windowData->layer.displaySyncEnabled = (presentMode != SDL_GPU_PRESENTMODE_IMMEDIATE);
3957 windowData->presentMode = presentMode;
3958 }
3959#endif
3960 windowData->layer.pixelFormat = SDLToMetal_TextureFormat(SwapchainCompositionToFormat[swapchainComposition]);
3961#ifndef SDL_PLATFORM_TVOS
3962 if (@available(iOS 16.0, *)) {
3963 windowData->layer.wantsExtendedDynamicRangeContent = (swapchainComposition != SDL_GPU_SWAPCHAINCOMPOSITION_SDR);
3964 }
3965#endif
3966
3967 colorspace = CGColorSpaceCreateWithName(SwapchainCompositionToColorSpace[swapchainComposition]);
3968 windowData->layer.colorspace = colorspace;
3969 CGColorSpaceRelease(colorspace);
3970
3971 windowData->textureContainer.header.info.format = SwapchainCompositionToFormat[swapchainComposition];
3972
3973 return true;
3974 }
3975}
3976
3977static bool METAL_SetAllowedFramesInFlight(
3978 SDL_GPURenderer *driverData,
3979 Uint32 allowedFramesInFlight)
3980{
3981 @autoreleasepool {
3982 MetalRenderer *renderer = (MetalRenderer *)driverData;
3983
3984 if (!METAL_Wait(driverData)) {
3985 return false;
3986 }
3987
3988 renderer->allowedFramesInFlight = allowedFramesInFlight;
3989 return true;
3990 }
3991}
3992
3993// Submission
3994
3995static bool METAL_Submit(
3996 SDL_GPUCommandBuffer *commandBuffer)
3997{
3998 @autoreleasepool {
3999 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
4000 MetalRenderer *renderer = metalCommandBuffer->renderer;
4001
4002 SDL_LockMutex(renderer->submitLock);
4003
4004 if (!METAL_INTERNAL_AcquireFence(renderer, metalCommandBuffer)) {
4005 SDL_UnlockMutex(renderer->submitLock);
4006 return false;
4007 }
4008
4009 // Enqueue present requests, if applicable
4010 for (Uint32 i = 0; i < metalCommandBuffer->windowDataCount; i += 1) {
4011 MetalWindowData *windowData = metalCommandBuffer->windowDatas[i];
4012 [metalCommandBuffer->handle presentDrawable:windowData->drawable];
4013 windowData->drawable = nil;
4014
4015 windowData->inFlightFences[windowData->frameCounter] = (SDL_GPUFence *)metalCommandBuffer->fence;
4016
4017 (void)SDL_AtomicIncRef(&metalCommandBuffer->fence->referenceCount);
4018
4019 windowData->frameCounter = (windowData->frameCounter + 1) % renderer->allowedFramesInFlight;
4020 }
4021
4022 // Notify the fence when the command buffer has completed
4023 [metalCommandBuffer->handle addCompletedHandler:^(id<MTLCommandBuffer> buffer) {
4024 SDL_AtomicIncRef(&metalCommandBuffer->fence->complete);
4025 }];
4026
4027 // Submit the command buffer
4028 [metalCommandBuffer->handle commit];
4029 metalCommandBuffer->handle = nil;
4030
4031 // Mark the command buffer as submitted
4032 if (renderer->submittedCommandBufferCount >= renderer->submittedCommandBufferCapacity) {
4033 renderer->submittedCommandBufferCapacity = renderer->submittedCommandBufferCount + 1;
4034
4035 renderer->submittedCommandBuffers = SDL_realloc(
4036 renderer->submittedCommandBuffers,
4037 sizeof(MetalCommandBuffer *) * renderer->submittedCommandBufferCapacity);
4038 }
4039 renderer->submittedCommandBuffers[renderer->submittedCommandBufferCount] = metalCommandBuffer;
4040 renderer->submittedCommandBufferCount += 1;
4041
4042 // Check if we can perform any cleanups
4043 for (Sint32 i = renderer->submittedCommandBufferCount - 1; i >= 0; i -= 1) {
4044 if (SDL_GetAtomicInt(&renderer->submittedCommandBuffers[i]->fence->complete)) {
4045 METAL_INTERNAL_CleanCommandBuffer(
4046 renderer,
4047 renderer->submittedCommandBuffers[i],
4048 false);
4049 }
4050 }
4051
4052 METAL_INTERNAL_PerformPendingDestroys(renderer);
4053
4054 SDL_UnlockMutex(renderer->submitLock);
4055
4056 return true;
4057 }
4058}
4059
4060static SDL_GPUFence *METAL_SubmitAndAcquireFence(
4061 SDL_GPUCommandBuffer *commandBuffer)
4062{
4063 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
4064 metalCommandBuffer->autoReleaseFence = false;
4065 if (!METAL_Submit(commandBuffer)) {
4066 return NULL;
4067 }
4068 return (SDL_GPUFence *)metalCommandBuffer->fence;
4069}
4070
4071static bool METAL_Cancel(
4072 SDL_GPUCommandBuffer *commandBuffer)
4073{
4074 MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
4075 MetalRenderer *renderer = metalCommandBuffer->renderer;
4076
4077 metalCommandBuffer->autoReleaseFence = false;
4078 SDL_LockMutex(renderer->submitLock);
4079 METAL_INTERNAL_CleanCommandBuffer(renderer, metalCommandBuffer, true);
4080 SDL_UnlockMutex(renderer->submitLock);
4081
4082 return true;
4083}
4084
4085static bool METAL_Wait(
4086 SDL_GPURenderer *driverData)
4087{
4088 @autoreleasepool {
4089 MetalRenderer *renderer = (MetalRenderer *)driverData;
4090 MetalCommandBuffer *commandBuffer;
4091
4092 /*
4093 * Wait for all submitted command buffers to complete.
4094 * Sort of equivalent to vkDeviceWaitIdle.
4095 */
4096 for (Uint32 i = 0; i < renderer->submittedCommandBufferCount; i += 1) {
4097 while (!SDL_GetAtomicInt(&renderer->submittedCommandBuffers[i]->fence->complete)) {
4098 // Spin!
4099 }
4100 }
4101
4102 SDL_LockMutex(renderer->submitLock);
4103
4104 for (Sint32 i = renderer->submittedCommandBufferCount - 1; i >= 0; i -= 1) {
4105 commandBuffer = renderer->submittedCommandBuffers[i];
4106 METAL_INTERNAL_CleanCommandBuffer(renderer, commandBuffer, false);
4107 }
4108
4109 METAL_INTERNAL_PerformPendingDestroys(renderer);
4110
4111 SDL_UnlockMutex(renderer->submitLock);
4112
4113 return true;
4114 }
4115}
4116
4117// Format Info
4118
4119// FIXME: Check simultaneous read-write support
4120static bool METAL_SupportsTextureFormat(
4121 SDL_GPURenderer *driverData,
4122 SDL_GPUTextureFormat format,
4123 SDL_GPUTextureType type,
4124 SDL_GPUTextureUsageFlags usage)
4125{
4126 @autoreleasepool {
4127 MetalRenderer *renderer = (MetalRenderer *)driverData;
4128
4129 // Only depth textures can be used as... depth textures
4130 if ((usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET)) {
4131 if (!IsDepthFormat(format)) {
4132 return false;
4133 }
4134 }
4135
4136 // Cube arrays are not supported on older iOS devices
4137 if (type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY) {
4138#ifdef SDL_PLATFORM_MACOS
4139 return true;
4140#else
4141 if (@available(iOS 13.0, tvOS 13.0, *)) {
4142 if (!([renderer->device supportsFamily:MTLGPUFamilyCommon2] ||
4143 [renderer->device supportsFamily:MTLGPUFamilyApple4])) {
4144 return false;
4145 }
4146 } else {
4147 return false;
4148 }
4149#endif
4150 }
4151
4152 switch (format) {
4153 // Apple GPU exclusive
4154 case SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM:
4155 case SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM:
4156 case SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM:
4157 if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) {
4158 return [renderer->device supportsFamily:MTLGPUFamilyApple1];
4159 } else {
4160 return false;
4161 }
4162
4163 // Requires BC compression support
4164 case SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM:
4165 case SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM:
4166 case SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM:
4167 case SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM:
4168 case SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM:
4169 case SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM:
4170 case SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT:
4171 case SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT:
4172 case SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB:
4173 case SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB:
4174 case SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB:
4175 case SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB:
4176 if (@available(iOS 16.4, tvOS 16.4, *)) {
4177 if (usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET) {
4178 return false;
4179 }
4180 if (@available(macOS 11.0, *)) {
4181 return [renderer->device supportsBCTextureCompression];
4182 } else {
4183 return true;
4184 }
4185 } else {
4186 return false;
4187 }
4188
4189 // Requires D24S8 support
4190 case SDL_GPU_TEXTUREFORMAT_D24_UNORM:
4191 case SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT:
4192#ifdef SDL_PLATFORM_MACOS
4193 return [renderer->device isDepth24Stencil8PixelFormatSupported];
4194#else
4195 return false;
4196#endif
4197
4198 case SDL_GPU_TEXTUREFORMAT_D16_UNORM:
4199 if (@available(macOS 10.12, iOS 13.0, tvOS 13.0, *)) {
4200 return true;
4201 } else {
4202 return false;
4203 }
4204
4205 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM:
4206 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM:
4207 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM:
4208 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM:
4209 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM:
4210 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM:
4211 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM:
4212 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM:
4213 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM:
4214 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM:
4215 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM:
4216 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM:
4217 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM:
4218 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM:
4219 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB:
4220 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB:
4221 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB:
4222 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB:
4223 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB:
4224 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB:
4225 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB:
4226 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB:
4227 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB:
4228 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB:
4229 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB:
4230 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB:
4231 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB:
4232 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB:
4233#ifdef SDL_PLATFORM_MACOS
4234 if (@available(macOS 11.0, *)) {
4235 return [renderer->device supportsFamily:MTLGPUFamilyApple7];
4236 } else {
4237 return false;
4238 }
4239#else
4240 return true;
4241#endif
4242 case SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT:
4243 case SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT:
4244 case SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT:
4245 case SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT:
4246 case SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT:
4247 case SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT:
4248 case SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT:
4249 case SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT:
4250 case SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT:
4251 case SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT:
4252 case SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT:
4253 case SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT:
4254 case SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT:
4255 case SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT:
4256#ifdef SDL_PLATFORM_MACOS
4257 if (@available(macOS 11.0, *)) {
4258 return [renderer->device supportsFamily:MTLGPUFamilyApple7];
4259 } else {
4260 return false;
4261 }
4262#else
4263 if (@available(iOS 13.0, tvOS 13.0, *)) {
4264 return [renderer->device supportsFamily:MTLGPUFamilyApple6];
4265 } else {
4266 return false;
4267 }
4268#endif
4269 default:
4270 return true;
4271 }
4272 }
4273}
4274
4275// Device Creation
4276
4277static bool METAL_PrepareDriver(SDL_VideoDevice *this)
4278{
4279 if (@available(macOS 10.14, iOS 13.0, tvOS 13.0, *)) {
4280 return (this->Metal_CreateView != NULL);
4281 }
4282 return false;
4283}
4284
4285static void METAL_INTERNAL_InitBlitResources(
4286 MetalRenderer *renderer)
4287{
4288 SDL_GPUShaderCreateInfo shaderModuleCreateInfo;
4289 SDL_GPUSamplerCreateInfo createinfo;
4290
4291 // Allocate the dynamic blit pipeline list
4292 renderer->blitPipelineCapacity = 2;
4293 renderer->blitPipelineCount = 0;
4294 renderer->blitPipelines = SDL_calloc(
4295 renderer->blitPipelineCapacity, sizeof(BlitPipelineCacheEntry));
4296
4297 // Fullscreen vertex shader
4298 SDL_zero(shaderModuleCreateInfo);
4299 shaderModuleCreateInfo.code = FullscreenVert_metallib;
4300 shaderModuleCreateInfo.code_size = FullscreenVert_metallib_len;
4301 shaderModuleCreateInfo.stage = SDL_GPU_SHADERSTAGE_VERTEX;
4302 shaderModuleCreateInfo.format = SDL_GPU_SHADERFORMAT_METALLIB;
4303 shaderModuleCreateInfo.entrypoint = "FullscreenVert";
4304
4305 renderer->blitVertexShader = METAL_CreateShader(
4306 (SDL_GPURenderer *)renderer,
4307 &shaderModuleCreateInfo);
4308
4309 if (renderer->blitVertexShader == NULL) {
4310 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile vertex shader for blit!");
4311 }
4312
4313 // BlitFrom2D fragment shader
4314 shaderModuleCreateInfo.code = BlitFrom2D_metallib;
4315 shaderModuleCreateInfo.code_size = BlitFrom2D_metallib_len;
4316 shaderModuleCreateInfo.stage = SDL_GPU_SHADERSTAGE_FRAGMENT;
4317 shaderModuleCreateInfo.entrypoint = "BlitFrom2D";
4318 shaderModuleCreateInfo.num_samplers = 1;
4319 shaderModuleCreateInfo.num_uniform_buffers = 1;
4320
4321 renderer->blitFrom2DShader = METAL_CreateShader(
4322 (SDL_GPURenderer *)renderer,
4323 &shaderModuleCreateInfo);
4324
4325 if (renderer->blitFrom2DShader == NULL) {
4326 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile BlitFrom2D fragment shader!");
4327 }
4328
4329 // BlitFrom2DArray fragment shader
4330 shaderModuleCreateInfo.code = BlitFrom2DArray_metallib;
4331 shaderModuleCreateInfo.code_size = BlitFrom2DArray_metallib_len;
4332 shaderModuleCreateInfo.entrypoint = "BlitFrom2DArray";
4333
4334 renderer->blitFrom2DArrayShader = METAL_CreateShader(
4335 (SDL_GPURenderer *)renderer,
4336 &shaderModuleCreateInfo);
4337
4338 if (renderer->blitFrom2DArrayShader == NULL) {
4339 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile BlitFrom2DArray fragment shader!");
4340 }
4341
4342 // BlitFrom3D fragment shader
4343 shaderModuleCreateInfo.code = BlitFrom3D_metallib;
4344 shaderModuleCreateInfo.code_size = BlitFrom3D_metallib_len;
4345 shaderModuleCreateInfo.entrypoint = "BlitFrom3D";
4346
4347 renderer->blitFrom3DShader = METAL_CreateShader(
4348 (SDL_GPURenderer *)renderer,
4349 &shaderModuleCreateInfo);
4350
4351 if (renderer->blitFrom3DShader == NULL) {
4352 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile BlitFrom3D fragment shader!");
4353 }
4354
4355 // BlitFromCube fragment shader
4356 shaderModuleCreateInfo.code = BlitFromCube_metallib;
4357 shaderModuleCreateInfo.code_size = BlitFromCube_metallib_len;
4358 shaderModuleCreateInfo.entrypoint = "BlitFromCube";
4359
4360 renderer->blitFromCubeShader = METAL_CreateShader(
4361 (SDL_GPURenderer *)renderer,
4362 &shaderModuleCreateInfo);
4363
4364 if (renderer->blitFromCubeShader == NULL) {
4365 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile BlitFromCube fragment shader!");
4366 }
4367
4368 // BlitFromCubeArray fragment shader
4369 shaderModuleCreateInfo.code = BlitFromCubeArray_metallib;
4370 shaderModuleCreateInfo.code_size = BlitFromCubeArray_metallib_len;
4371 shaderModuleCreateInfo.entrypoint = "BlitFromCubeArray";
4372
4373 renderer->blitFromCubeArrayShader = METAL_CreateShader(
4374 (SDL_GPURenderer *)renderer,
4375 &shaderModuleCreateInfo);
4376
4377 if (renderer->blitFromCubeArrayShader == NULL) {
4378 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to compile BlitFromCubeArray fragment shader!");
4379 }
4380
4381 // Create samplers
4382 createinfo.address_mode_u = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
4383 createinfo.address_mode_v = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
4384 createinfo.address_mode_w = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE;
4385 createinfo.enable_anisotropy = 0;
4386 createinfo.enable_compare = 0;
4387 createinfo.mag_filter = SDL_GPU_FILTER_NEAREST;
4388 createinfo.min_filter = SDL_GPU_FILTER_NEAREST;
4389 createinfo.mipmap_mode = SDL_GPU_SAMPLERMIPMAPMODE_NEAREST;
4390 createinfo.mip_lod_bias = 0.0f;
4391 createinfo.min_lod = 0;
4392 createinfo.max_lod = 1000;
4393 createinfo.max_anisotropy = 1.0f;
4394 createinfo.compare_op = SDL_GPU_COMPAREOP_ALWAYS;
4395
4396 renderer->blitNearestSampler = METAL_CreateSampler(
4397 (SDL_GPURenderer *)renderer,
4398 &createinfo);
4399
4400 if (renderer->blitNearestSampler == NULL) {
4401 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to create blit nearest sampler!");
4402 }
4403
4404 createinfo.mag_filter = SDL_GPU_FILTER_LINEAR;
4405 createinfo.min_filter = SDL_GPU_FILTER_LINEAR;
4406 createinfo.mipmap_mode = SDL_GPU_SAMPLERMIPMAPMODE_LINEAR;
4407
4408 renderer->blitLinearSampler = METAL_CreateSampler(
4409 (SDL_GPURenderer *)renderer,
4410 &createinfo);
4411
4412 if (renderer->blitLinearSampler == NULL) {
4413 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to create blit linear sampler!");
4414 }
4415}
4416
4417static void METAL_INTERNAL_DestroyBlitResources(
4418 SDL_GPURenderer *driverData)
4419{
4420 MetalRenderer *renderer = (MetalRenderer *)driverData;
4421 METAL_ReleaseSampler(driverData, renderer->blitLinearSampler);
4422 METAL_ReleaseSampler(driverData, renderer->blitNearestSampler);
4423 METAL_ReleaseShader(driverData, renderer->blitVertexShader);
4424 METAL_ReleaseShader(driverData, renderer->blitFrom2DShader);
4425 METAL_ReleaseShader(driverData, renderer->blitFrom2DArrayShader);
4426 METAL_ReleaseShader(driverData, renderer->blitFrom3DShader);
4427 METAL_ReleaseShader(driverData, renderer->blitFromCubeShader);
4428 METAL_ReleaseShader(driverData, renderer->blitFromCubeArrayShader);
4429
4430 for (Uint32 i = 0; i < renderer->blitPipelineCount; i += 1) {
4431 METAL_ReleaseGraphicsPipeline(driverData, renderer->blitPipelines[i].pipeline);
4432 }
4433 SDL_free(renderer->blitPipelines);
4434}
4435
4436static SDL_GPUDevice *METAL_CreateDevice(bool debugMode, bool preferLowPower, SDL_PropertiesID props)
4437{
4438 @autoreleasepool {
4439 MetalRenderer *renderer;
4440 id<MTLDevice> device = NULL;
4441 bool hasHardwareSupport = false;
4442
4443 if (debugMode) {
4444 /* Due to a Metal driver quirk, once a MTLDevice has been created
4445 * with this environment variable set, the Metal validation layers
4446 * will remain enabled for the rest of the application's lifespan,
4447 * even if the device is destroyed and recreated.
4448 */
4449 SDL_setenv_unsafe("MTL_DEBUG_LAYER", "1", 0);
4450 }
4451
4452 // Create the Metal device and command queue
4453#ifdef SDL_PLATFORM_MACOS
4454 if (preferLowPower) {
4455 NSArray<id<MTLDevice>> *devices = MTLCopyAllDevices();
4456 for (id<MTLDevice> candidate in devices) {
4457 if (candidate.isLowPower) {
4458 device = candidate;
4459 break;
4460 }
4461 }
4462 }
4463#endif
4464 if (device == NULL) {
4465 device = MTLCreateSystemDefaultDevice();
4466 if (device == NULL) {
4467 SDL_SetError("Failed to create Metal device");
4468 return NULL;
4469 }
4470 }
4471
4472#ifdef SDL_PLATFORM_MACOS
4473 hasHardwareSupport = true;
4474 if (@available(macOS 10.15, *)) {
4475 hasHardwareSupport = [device supportsFamily:MTLGPUFamilyMac2];
4476 } else if (@available(macOS 10.14, *)) {
4477 hasHardwareSupport = [device supportsFeatureSet:MTLFeatureSet_macOS_GPUFamily2_v1];
4478 }
4479#else
4480 if (@available(iOS 13.0, tvOS 13.0, *)) {
4481 hasHardwareSupport = [device supportsFamily:MTLGPUFamilyApple3];
4482 }
4483#endif
4484
4485 if (!hasHardwareSupport) {
4486 SDL_SetError("Device does not meet the hardware requirements for SDL_GPU Metal");
4487 return NULL;
4488 }
4489
4490 // Allocate and zero out the renderer
4491 renderer = (MetalRenderer *)SDL_calloc(1, sizeof(MetalRenderer));
4492
4493 renderer->device = device;
4494 renderer->queue = [device newCommandQueue];
4495
4496 // Print driver info
4497 SDL_LogInfo(SDL_LOG_CATEGORY_GPU, "SDL_GPU Driver: Metal");
4498 SDL_LogInfo(
4499 SDL_LOG_CATEGORY_GPU,
4500 "Metal Device: %s",
4501 [device.name UTF8String]);
4502
4503 // Remember debug mode
4504 renderer->debugMode = debugMode;
4505 renderer->allowedFramesInFlight = 2;
4506
4507 // Set up colorspace array
4508 SwapchainCompositionToColorSpace[0] = kCGColorSpaceSRGB;
4509 SwapchainCompositionToColorSpace[1] = kCGColorSpaceSRGB;
4510 SwapchainCompositionToColorSpace[2] = kCGColorSpaceExtendedLinearSRGB;
4511 if (@available(macOS 11.0, iOS 14.0, tvOS 14.0, *)) {
4512 SwapchainCompositionToColorSpace[3] = kCGColorSpaceITUR_2100_PQ;
4513 } else {
4514 SwapchainCompositionToColorSpace[3] = NULL;
4515 }
4516
4517 // Create mutexes
4518 renderer->submitLock = SDL_CreateMutex();
4519 renderer->acquireCommandBufferLock = SDL_CreateMutex();
4520 renderer->acquireUniformBufferLock = SDL_CreateMutex();
4521 renderer->disposeLock = SDL_CreateMutex();
4522 renderer->fenceLock = SDL_CreateMutex();
4523 renderer->windowLock = SDL_CreateMutex();
4524
4525 // Create command buffer pool
4526 METAL_INTERNAL_AllocateCommandBuffers(renderer, 2);
4527
4528 // Create fence pool
4529 renderer->availableFenceCapacity = 2;
4530 renderer->availableFences = SDL_calloc(
4531 renderer->availableFenceCapacity, sizeof(MetalFence *));
4532
4533 // Create uniform buffer pool
4534 renderer->uniformBufferPoolCapacity = 32;
4535 renderer->uniformBufferPoolCount = 32;
4536 renderer->uniformBufferPool = SDL_calloc(
4537 renderer->uniformBufferPoolCapacity, sizeof(MetalUniformBuffer *));
4538
4539 for (Uint32 i = 0; i < renderer->uniformBufferPoolCount; i += 1) {
4540 renderer->uniformBufferPool[i] = METAL_INTERNAL_CreateUniformBuffer(
4541 renderer,
4542 UNIFORM_BUFFER_SIZE);
4543 }
4544
4545 // Create deferred destroy arrays
4546 renderer->bufferContainersToDestroyCapacity = 2;
4547 renderer->bufferContainersToDestroyCount = 0;
4548 renderer->bufferContainersToDestroy = SDL_calloc(
4549 renderer->bufferContainersToDestroyCapacity, sizeof(MetalBufferContainer *));
4550
4551 renderer->textureContainersToDestroyCapacity = 2;
4552 renderer->textureContainersToDestroyCount = 0;
4553 renderer->textureContainersToDestroy = SDL_calloc(
4554 renderer->textureContainersToDestroyCapacity, sizeof(MetalTextureContainer *));
4555
4556 // Create claimed window list
4557 renderer->claimedWindowCapacity = 1;
4558 renderer->claimedWindows = SDL_calloc(
4559 renderer->claimedWindowCapacity, sizeof(MetalWindowData *));
4560
4561 // Initialize blit resources
4562 METAL_INTERNAL_InitBlitResources(renderer);
4563
4564 SDL_GPUDevice *result = SDL_calloc(1, sizeof(SDL_GPUDevice));
4565 ASSIGN_DRIVER(METAL)
4566 result->driverData = (SDL_GPURenderer *)renderer;
4567 renderer->sdlGPUDevice = result;
4568
4569 return result;
4570 }
4571}
4572
4573SDL_GPUBootstrap MetalDriver = {
4574 "metal",
4575 SDL_GPU_SHADERFORMAT_MSL | SDL_GPU_SHADERFORMAT_METALLIB,
4576 METAL_PrepareDriver,
4577 METAL_CreateDevice
4578};
4579
4580#endif // SDL_GPU_METAL
diff --git a/contrib/SDL-3.2.8/src/gpu/metal/compile_shaders.sh b/contrib/SDL-3.2.8/src/gpu/metal/compile_shaders.sh
new file mode 100755
index 0000000..0b8c33c
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/metal/compile_shaders.sh
@@ -0,0 +1,68 @@
1#!/bin/bash
2
3set -x
4set -e
5cd `dirname "$0"`
6
7shadernames=(FullscreenVert BlitFrom2D BlitFrom2DArray BlitFrom3D BlitFromCube BlitFromCubeArray)
8
9generate_shaders()
10{
11 fileplatform=$1
12 compileplatform=$2
13 sdkplatform=$3
14 minversion=$4
15
16 for shadername in "${shadernames[@]}"; do
17 xcrun -sdk $sdkplatform metal -c -std=$compileplatform-metal2.0 -m$sdkplatform-version-min=$minversion -Wall -O3 -D COMPILE_$shadername -o ./$shadername.air ./Metal_Blit.metal || exit $?
18 xcrun -sdk $sdkplatform metallib -o $shadername.metallib $shadername.air || exit $?
19 xxd -i $shadername.metallib | perl -w -p -e 's/\Aunsigned /const unsigned /;' >./${shadername}_$fileplatform.h
20 rm -f $shadername.air $shadername.metallib
21 done
22}
23
24generate_shaders macos macos macosx 10.11
25generate_shaders ios ios iphoneos 11.0
26generate_shaders iphonesimulator ios iphonesimulator 11.0
27generate_shaders tvos ios appletvos 11.0
28generate_shaders tvsimulator ios appletvsimulator 11.0
29
30# Bundle together one mega-header
31catShaders()
32{
33 target=$1
34 for shadername in "${shadernames[@]}"; do
35 cat ${shadername}_$target.h >> Metal_Blit.h
36 done
37}
38
39rm -f Metal_Blit.h
40echo "#if defined(SDL_PLATFORM_IOS)" >> Metal_Blit.h
41 echo "#if TARGET_OS_SIMULATOR" >> Metal_Blit.h
42 catShaders iphonesimulator
43 echo "#else" >> Metal_Blit.h
44 catShaders ios
45 echo "#endif" >> Metal_Blit.h
46echo "#elif defined(SDL_PLATFORM_TVOS)" >> Metal_Blit.h
47 echo "#if TARGET_OS_SIMULATOR" >> Metal_Blit.h
48 catShaders tvsimulator
49 echo "#else" >> Metal_Blit.h
50 catShaders tvos
51 echo "#endif" >> Metal_Blit.h
52echo "#else" >> Metal_Blit.h
53 catShaders macos
54echo "#endif" >> Metal_Blit.h
55
56# Clean up
57cleanupShaders()
58{
59 target=$1
60 for shadername in "${shadernames[@]}"; do
61 rm -f ${shadername}_$target.h
62 done
63}
64cleanupShaders iphonesimulator
65cleanupShaders ios
66cleanupShaders tvsimulator
67cleanupShaders tvos
68cleanupShaders macos \ No newline at end of file
diff --git a/contrib/SDL-3.2.8/src/gpu/vulkan/SDL_gpu_vulkan.c b/contrib/SDL-3.2.8/src/gpu/vulkan/SDL_gpu_vulkan.c
new file mode 100644
index 0000000..ad08cf3
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/vulkan/SDL_gpu_vulkan.c
@@ -0,0 +1,11841 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#include "SDL_internal.h"
23
24#ifdef SDL_GPU_VULKAN
25
26// Needed for VK_KHR_portability_subset
27#define VK_ENABLE_BETA_EXTENSIONS
28
29#define VK_NO_PROTOTYPES
30#include "../../video/khronos/vulkan/vulkan.h"
31
32#include <SDL3/SDL_vulkan.h>
33
34#include "../SDL_sysgpu.h"
35
36#define VULKAN_INTERNAL_clamp(val, min, max) SDL_max(min, SDL_min(val, max))
37
38// Global Vulkan Loader Entry Points
39
40static PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL;
41
42#define VULKAN_GLOBAL_FUNCTION(name) \
43 static PFN_##name name = NULL;
44#include "SDL_gpu_vulkan_vkfuncs.h"
45
46typedef struct VulkanExtensions
47{
48 // These extensions are required!
49
50 // Globally supported
51 Uint8 KHR_swapchain;
52 // Core since 1.1, needed for negative VkViewport::height
53 Uint8 KHR_maintenance1;
54
55 // These extensions are optional!
56
57 // Core since 1.2, but requires annoying paperwork to implement
58 Uint8 KHR_driver_properties;
59 // Only required for special implementations (i.e. MoltenVK)
60 Uint8 KHR_portability_subset;
61 // Only required for decoding HDR ASTC textures
62 Uint8 EXT_texture_compression_astc_hdr;
63} VulkanExtensions;
64
65// Defines
66
67#define SMALL_ALLOCATION_THRESHOLD 2097152 // 2 MiB
68#define SMALL_ALLOCATION_SIZE 16777216 // 16 MiB
69#define LARGE_ALLOCATION_INCREMENT 67108864 // 64 MiB
70#define MAX_UBO_SECTION_SIZE 4096 // 4 KiB
71#define DESCRIPTOR_POOL_SIZE 128
72#define WINDOW_PROPERTY_DATA "SDL_GPUVulkanWindowPropertyData"
73
74#define IDENTITY_SWIZZLE \
75 { \
76 VK_COMPONENT_SWIZZLE_IDENTITY, \
77 VK_COMPONENT_SWIZZLE_IDENTITY, \
78 VK_COMPONENT_SWIZZLE_IDENTITY, \
79 VK_COMPONENT_SWIZZLE_IDENTITY \
80 }
81
82#define NULL_DESC_LAYOUT (VkDescriptorSetLayout)0
83#define NULL_PIPELINE_LAYOUT (VkPipelineLayout)0
84#define NULL_RENDER_PASS (SDL_GPURenderPass *)0
85
86#define EXPAND_ELEMENTS_IF_NEEDED(arr, initialValue, type) \
87 do { \
88 if (arr->count == arr->capacity) { \
89 if (arr->capacity == 0) { \
90 arr->capacity = initialValue; \
91 } else { \
92 arr->capacity *= 2; \
93 } \
94 arr->elements = (type *)SDL_realloc( \
95 arr->elements, \
96 arr->capacity * sizeof(type)); \
97 } \
98 } while (0)
99
100#define MOVE_ARRAY_CONTENTS_AND_RESET(i, dstArr, dstCount, srcArr, srcCount) \
101 do { \
102 for ((i) = 0; (i) < (srcCount); (i) += 1) { \
103 (dstArr)[i] = (srcArr)[i]; \
104 } \
105 (dstCount) = (srcCount); \
106 (srcCount) = 0; \
107 while (0)
108
109// Conversions
110
111static const Uint8 DEVICE_PRIORITY_HIGHPERFORMANCE[] = {
112 0, // VK_PHYSICAL_DEVICE_TYPE_OTHER
113 3, // VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
114 4, // VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
115 2, // VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU
116 1 // VK_PHYSICAL_DEVICE_TYPE_CPU
117};
118
119static const Uint8 DEVICE_PRIORITY_LOWPOWER[] = {
120 0, // VK_PHYSICAL_DEVICE_TYPE_OTHER
121 4, // VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
122 3, // VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
123 2, // VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU
124 1 // VK_PHYSICAL_DEVICE_TYPE_CPU
125};
126
127static VkPresentModeKHR SDLToVK_PresentMode[] = {
128 VK_PRESENT_MODE_FIFO_KHR,
129 VK_PRESENT_MODE_IMMEDIATE_KHR,
130 VK_PRESENT_MODE_MAILBOX_KHR
131};
132
133static VkFormat SDLToVK_TextureFormat[] = {
134 VK_FORMAT_UNDEFINED, // INVALID
135 VK_FORMAT_R8_UNORM, // A8_UNORM
136 VK_FORMAT_R8_UNORM, // R8_UNORM
137 VK_FORMAT_R8G8_UNORM, // R8G8_UNORM
138 VK_FORMAT_R8G8B8A8_UNORM, // R8G8B8A8_UNORM
139 VK_FORMAT_R16_UNORM, // R16_UNORM
140 VK_FORMAT_R16G16_UNORM, // R16G16_UNORM
141 VK_FORMAT_R16G16B16A16_UNORM, // R16G16B16A16_UNORM
142 VK_FORMAT_A2B10G10R10_UNORM_PACK32, // R10G10B10A2_UNORM
143 VK_FORMAT_R5G6B5_UNORM_PACK16, // B5G6R5_UNORM
144 VK_FORMAT_A1R5G5B5_UNORM_PACK16, // B5G5R5A1_UNORM
145 VK_FORMAT_B4G4R4A4_UNORM_PACK16, // B4G4R4A4_UNORM
146 VK_FORMAT_B8G8R8A8_UNORM, // B8G8R8A8_UNORM
147 VK_FORMAT_BC1_RGBA_UNORM_BLOCK, // BC1_UNORM
148 VK_FORMAT_BC2_UNORM_BLOCK, // BC2_UNORM
149 VK_FORMAT_BC3_UNORM_BLOCK, // BC3_UNORM
150 VK_FORMAT_BC4_UNORM_BLOCK, // BC4_UNORM
151 VK_FORMAT_BC5_UNORM_BLOCK, // BC5_UNORM
152 VK_FORMAT_BC7_UNORM_BLOCK, // BC7_UNORM
153 VK_FORMAT_BC6H_SFLOAT_BLOCK, // BC6H_FLOAT
154 VK_FORMAT_BC6H_UFLOAT_BLOCK, // BC6H_UFLOAT
155 VK_FORMAT_R8_SNORM, // R8_SNORM
156 VK_FORMAT_R8G8_SNORM, // R8G8_SNORM
157 VK_FORMAT_R8G8B8A8_SNORM, // R8G8B8A8_SNORM
158 VK_FORMAT_R16_SNORM, // R16_SNORM
159 VK_FORMAT_R16G16_SNORM, // R16G16_SNORM
160 VK_FORMAT_R16G16B16A16_SNORM, // R16G16B16A16_SNORM
161 VK_FORMAT_R16_SFLOAT, // R16_FLOAT
162 VK_FORMAT_R16G16_SFLOAT, // R16G16_FLOAT
163 VK_FORMAT_R16G16B16A16_SFLOAT, // R16G16B16A16_FLOAT
164 VK_FORMAT_R32_SFLOAT, // R32_FLOAT
165 VK_FORMAT_R32G32_SFLOAT, // R32G32_FLOAT
166 VK_FORMAT_R32G32B32A32_SFLOAT, // R32G32B32A32_FLOAT
167 VK_FORMAT_B10G11R11_UFLOAT_PACK32, // R11G11B10_UFLOAT
168 VK_FORMAT_R8_UINT, // R8_UINT
169 VK_FORMAT_R8G8_UINT, // R8G8_UINT
170 VK_FORMAT_R8G8B8A8_UINT, // R8G8B8A8_UINT
171 VK_FORMAT_R16_UINT, // R16_UINT
172 VK_FORMAT_R16G16_UINT, // R16G16_UINT
173 VK_FORMAT_R16G16B16A16_UINT, // R16G16B16A16_UINT
174 VK_FORMAT_R32_UINT, // R32_UINT
175 VK_FORMAT_R32G32_UINT, // R32G32_UINT
176 VK_FORMAT_R32G32B32A32_UINT, // R32G32B32A32_UINT
177 VK_FORMAT_R8_SINT, // R8_INT
178 VK_FORMAT_R8G8_SINT, // R8G8_INT
179 VK_FORMAT_R8G8B8A8_SINT, // R8G8B8A8_INT
180 VK_FORMAT_R16_SINT, // R16_INT
181 VK_FORMAT_R16G16_SINT, // R16G16_INT
182 VK_FORMAT_R16G16B16A16_SINT, // R16G16B16A16_INT
183 VK_FORMAT_R32_SINT, // R32_INT
184 VK_FORMAT_R32G32_SINT, // R32G32_INT
185 VK_FORMAT_R32G32B32A32_SINT, // R32G32B32A32_INT
186 VK_FORMAT_R8G8B8A8_SRGB, // R8G8B8A8_UNORM_SRGB
187 VK_FORMAT_B8G8R8A8_SRGB, // B8G8R8A8_UNORM_SRGB
188 VK_FORMAT_BC1_RGBA_SRGB_BLOCK, // BC1_UNORM_SRGB
189 VK_FORMAT_BC2_SRGB_BLOCK, // BC3_UNORM_SRGB
190 VK_FORMAT_BC3_SRGB_BLOCK, // BC3_UNORM_SRGB
191 VK_FORMAT_BC7_SRGB_BLOCK, // BC7_UNORM_SRGB
192 VK_FORMAT_D16_UNORM, // D16_UNORM
193 VK_FORMAT_X8_D24_UNORM_PACK32, // D24_UNORM
194 VK_FORMAT_D32_SFLOAT, // D32_FLOAT
195 VK_FORMAT_D24_UNORM_S8_UINT, // D24_UNORM_S8_UINT
196 VK_FORMAT_D32_SFLOAT_S8_UINT, // D32_FLOAT_S8_UINT
197 VK_FORMAT_ASTC_4x4_UNORM_BLOCK, // ASTC_4x4_UNORM
198 VK_FORMAT_ASTC_5x4_UNORM_BLOCK, // ASTC_5x4_UNORM
199 VK_FORMAT_ASTC_5x5_UNORM_BLOCK, // ASTC_5x5_UNORM
200 VK_FORMAT_ASTC_6x5_UNORM_BLOCK, // ASTC_6x5_UNORM
201 VK_FORMAT_ASTC_6x6_UNORM_BLOCK, // ASTC_6x6_UNORM
202 VK_FORMAT_ASTC_8x5_UNORM_BLOCK, // ASTC_8x5_UNORM
203 VK_FORMAT_ASTC_8x6_UNORM_BLOCK, // ASTC_8x6_UNORM
204 VK_FORMAT_ASTC_8x8_UNORM_BLOCK, // ASTC_8x8_UNORM
205 VK_FORMAT_ASTC_10x5_UNORM_BLOCK, // ASTC_10x5_UNORM
206 VK_FORMAT_ASTC_10x6_UNORM_BLOCK, // ASTC_10x6_UNORM
207 VK_FORMAT_ASTC_10x8_UNORM_BLOCK, // ASTC_10x8_UNORM
208 VK_FORMAT_ASTC_10x10_UNORM_BLOCK, // ASTC_10x10_UNORM
209 VK_FORMAT_ASTC_12x10_UNORM_BLOCK, // ASTC_12x10_UNORM
210 VK_FORMAT_ASTC_12x12_UNORM_BLOCK, // ASTC_12x12_UNORM
211 VK_FORMAT_ASTC_4x4_SRGB_BLOCK, // ASTC_4x4_UNORM_SRGB
212 VK_FORMAT_ASTC_5x4_SRGB_BLOCK, // ASTC_5x4_UNORM_SRGB
213 VK_FORMAT_ASTC_5x5_SRGB_BLOCK, // ASTC_5x5_UNORM_SRGB
214 VK_FORMAT_ASTC_6x5_SRGB_BLOCK, // ASTC_6x5_UNORM_SRGB
215 VK_FORMAT_ASTC_6x6_SRGB_BLOCK, // ASTC_6x6_UNORM_SRGB
216 VK_FORMAT_ASTC_8x5_SRGB_BLOCK, // ASTC_8x5_UNORM_SRGB
217 VK_FORMAT_ASTC_8x6_SRGB_BLOCK, // ASTC_8x6_UNORM_SRGB
218 VK_FORMAT_ASTC_8x8_SRGB_BLOCK, // ASTC_8x8_UNORM_SRGB
219 VK_FORMAT_ASTC_10x5_SRGB_BLOCK, // ASTC_10x5_UNORM_SRGB
220 VK_FORMAT_ASTC_10x6_SRGB_BLOCK, // ASTC_10x6_UNORM_SRGB
221 VK_FORMAT_ASTC_10x8_SRGB_BLOCK, // ASTC_10x8_UNORM_SRGB
222 VK_FORMAT_ASTC_10x10_SRGB_BLOCK, // ASTC_10x10_UNORM_SRGB
223 VK_FORMAT_ASTC_12x10_SRGB_BLOCK, // ASTC_12x10_UNORM_SRGB
224 VK_FORMAT_ASTC_12x12_SRGB_BLOCK, // ASTC_12x12_UNORM_SRGB
225 VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT, // ASTC_4x4_FLOAT
226 VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT, // ASTC_5x4_FLOAT
227 VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT, // ASTC_5x5_FLOAT
228 VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT, // ASTC_6x5_FLOAT
229 VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT, // ASTC_6x6_FLOAT
230 VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT, // ASTC_8x5_FLOAT
231 VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT, // ASTC_8x6_FLOAT
232 VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT, // ASTC_8x8_FLOAT
233 VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT, // ASTC_10x5_FLOAT
234 VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT, // ASTC_10x6_FLOAT
235 VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT, // ASTC_10x8_FLOAT
236 VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT, // ASTC_10x10_FLOAT
237 VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT, // ASTC_12x10_FLOAT
238 VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK // ASTC_12x12_FLOAT
239};
240SDL_COMPILE_TIME_ASSERT(SDLToVK_TextureFormat, SDL_arraysize(SDLToVK_TextureFormat) == SDL_GPU_TEXTUREFORMAT_MAX_ENUM_VALUE);
241
242static VkComponentMapping SwizzleForSDLFormat(SDL_GPUTextureFormat format)
243{
244 if (format == SDL_GPU_TEXTUREFORMAT_A8_UNORM) {
245 // TODO: use VK_FORMAT_A8_UNORM_KHR from VK_KHR_maintenance5 when available
246 return (VkComponentMapping){
247 VK_COMPONENT_SWIZZLE_ZERO,
248 VK_COMPONENT_SWIZZLE_ZERO,
249 VK_COMPONENT_SWIZZLE_ZERO,
250 VK_COMPONENT_SWIZZLE_R,
251 };
252 }
253
254 if (format == SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM) {
255 // ARGB -> BGRA
256 // TODO: use VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT from VK_EXT_4444_formats when available
257 return (VkComponentMapping){
258 VK_COMPONENT_SWIZZLE_G,
259 VK_COMPONENT_SWIZZLE_R,
260 VK_COMPONENT_SWIZZLE_A,
261 VK_COMPONENT_SWIZZLE_B,
262 };
263 }
264
265 return (VkComponentMapping)IDENTITY_SWIZZLE;
266}
267
268static VkFormat SwapchainCompositionToFormat[] = {
269 VK_FORMAT_B8G8R8A8_UNORM, // SDR
270 VK_FORMAT_B8G8R8A8_SRGB, // SDR_LINEAR
271 VK_FORMAT_R16G16B16A16_SFLOAT, // HDR_EXTENDED_LINEAR
272 VK_FORMAT_A2B10G10R10_UNORM_PACK32 // HDR10_ST2084
273};
274
275static VkFormat SwapchainCompositionToFallbackFormat[] = {
276 VK_FORMAT_R8G8B8A8_UNORM, // SDR
277 VK_FORMAT_R8G8B8A8_SRGB, // SDR_LINEAR
278 VK_FORMAT_UNDEFINED, // HDR_EXTENDED_LINEAR (no fallback)
279 VK_FORMAT_UNDEFINED // HDR10_ST2084 (no fallback)
280};
281
282static SDL_GPUTextureFormat SwapchainCompositionToSDLFormat(
283 SDL_GPUSwapchainComposition composition,
284 bool usingFallback)
285{
286 switch (composition) {
287 case SDL_GPU_SWAPCHAINCOMPOSITION_SDR:
288 return usingFallback ? SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM : SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM;
289 case SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR:
290 return usingFallback ? SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB : SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB;
291 case SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR:
292 return SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT;
293 case SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084:
294 return SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM;
295 default:
296 return SDL_GPU_TEXTUREFORMAT_INVALID;
297 }
298}
299
300static VkColorSpaceKHR SwapchainCompositionToColorSpace[] = {
301 VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, // SDR
302 VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, // SDR_LINEAR
303 VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT, // HDR_EXTENDED_LINEAR
304 VK_COLOR_SPACE_HDR10_ST2084_EXT // HDR10_ST2084
305};
306
307static VkComponentMapping SwapchainCompositionSwizzle[] = {
308 IDENTITY_SWIZZLE, // SDR
309 IDENTITY_SWIZZLE, // SDR_LINEAR
310 IDENTITY_SWIZZLE, // HDR_EXTENDED_LINEAR
311 {
312 // HDR10_ST2084
313 VK_COMPONENT_SWIZZLE_R,
314 VK_COMPONENT_SWIZZLE_G,
315 VK_COMPONENT_SWIZZLE_B,
316 VK_COMPONENT_SWIZZLE_A,
317 }
318};
319
320static VkFormat SDLToVK_VertexFormat[] = {
321 VK_FORMAT_UNDEFINED, // INVALID
322 VK_FORMAT_R32_SINT, // INT
323 VK_FORMAT_R32G32_SINT, // INT2
324 VK_FORMAT_R32G32B32_SINT, // INT3
325 VK_FORMAT_R32G32B32A32_SINT, // INT4
326 VK_FORMAT_R32_UINT, // UINT
327 VK_FORMAT_R32G32_UINT, // UINT2
328 VK_FORMAT_R32G32B32_UINT, // UINT3
329 VK_FORMAT_R32G32B32A32_UINT, // UINT4
330 VK_FORMAT_R32_SFLOAT, // FLOAT
331 VK_FORMAT_R32G32_SFLOAT, // FLOAT2
332 VK_FORMAT_R32G32B32_SFLOAT, // FLOAT3
333 VK_FORMAT_R32G32B32A32_SFLOAT, // FLOAT4
334 VK_FORMAT_R8G8_SINT, // BYTE2
335 VK_FORMAT_R8G8B8A8_SINT, // BYTE4
336 VK_FORMAT_R8G8_UINT, // UBYTE2
337 VK_FORMAT_R8G8B8A8_UINT, // UBYTE4
338 VK_FORMAT_R8G8_SNORM, // BYTE2_NORM
339 VK_FORMAT_R8G8B8A8_SNORM, // BYTE4_NORM
340 VK_FORMAT_R8G8_UNORM, // UBYTE2_NORM
341 VK_FORMAT_R8G8B8A8_UNORM, // UBYTE4_NORM
342 VK_FORMAT_R16G16_SINT, // SHORT2
343 VK_FORMAT_R16G16B16A16_SINT, // SHORT4
344 VK_FORMAT_R16G16_UINT, // USHORT2
345 VK_FORMAT_R16G16B16A16_UINT, // USHORT4
346 VK_FORMAT_R16G16_SNORM, // SHORT2_NORM
347 VK_FORMAT_R16G16B16A16_SNORM, // SHORT4_NORM
348 VK_FORMAT_R16G16_UNORM, // USHORT2_NORM
349 VK_FORMAT_R16G16B16A16_UNORM, // USHORT4_NORM
350 VK_FORMAT_R16G16_SFLOAT, // HALF2
351 VK_FORMAT_R16G16B16A16_SFLOAT // HALF4
352};
353SDL_COMPILE_TIME_ASSERT(SDLToVK_VertexFormat, SDL_arraysize(SDLToVK_VertexFormat) == SDL_GPU_VERTEXELEMENTFORMAT_MAX_ENUM_VALUE);
354
355static VkIndexType SDLToVK_IndexType[] = {
356 VK_INDEX_TYPE_UINT16,
357 VK_INDEX_TYPE_UINT32
358};
359
360static VkPrimitiveTopology SDLToVK_PrimitiveType[] = {
361 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,
362 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP,
363 VK_PRIMITIVE_TOPOLOGY_LINE_LIST,
364 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP,
365 VK_PRIMITIVE_TOPOLOGY_POINT_LIST
366};
367
368static VkCullModeFlags SDLToVK_CullMode[] = {
369 VK_CULL_MODE_NONE,
370 VK_CULL_MODE_FRONT_BIT,
371 VK_CULL_MODE_BACK_BIT,
372 VK_CULL_MODE_FRONT_AND_BACK
373};
374
375static VkFrontFace SDLToVK_FrontFace[] = {
376 VK_FRONT_FACE_COUNTER_CLOCKWISE,
377 VK_FRONT_FACE_CLOCKWISE
378};
379
380static VkBlendFactor SDLToVK_BlendFactor[] = {
381 VK_BLEND_FACTOR_ZERO, // INVALID
382 VK_BLEND_FACTOR_ZERO,
383 VK_BLEND_FACTOR_ONE,
384 VK_BLEND_FACTOR_SRC_COLOR,
385 VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR,
386 VK_BLEND_FACTOR_DST_COLOR,
387 VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR,
388 VK_BLEND_FACTOR_SRC_ALPHA,
389 VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA,
390 VK_BLEND_FACTOR_DST_ALPHA,
391 VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA,
392 VK_BLEND_FACTOR_CONSTANT_COLOR,
393 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR,
394 VK_BLEND_FACTOR_SRC_ALPHA_SATURATE
395};
396SDL_COMPILE_TIME_ASSERT(SDLToVK_BlendFactor, SDL_arraysize(SDLToVK_BlendFactor) == SDL_GPU_BLENDFACTOR_MAX_ENUM_VALUE);
397
398static VkBlendOp SDLToVK_BlendOp[] = {
399 VK_BLEND_OP_ADD, // INVALID
400 VK_BLEND_OP_ADD,
401 VK_BLEND_OP_SUBTRACT,
402 VK_BLEND_OP_REVERSE_SUBTRACT,
403 VK_BLEND_OP_MIN,
404 VK_BLEND_OP_MAX
405};
406SDL_COMPILE_TIME_ASSERT(SDLToVK_BlendOp, SDL_arraysize(SDLToVK_BlendOp) == SDL_GPU_BLENDOP_MAX_ENUM_VALUE);
407
408static VkCompareOp SDLToVK_CompareOp[] = {
409 VK_COMPARE_OP_NEVER, // INVALID
410 VK_COMPARE_OP_NEVER,
411 VK_COMPARE_OP_LESS,
412 VK_COMPARE_OP_EQUAL,
413 VK_COMPARE_OP_LESS_OR_EQUAL,
414 VK_COMPARE_OP_GREATER,
415 VK_COMPARE_OP_NOT_EQUAL,
416 VK_COMPARE_OP_GREATER_OR_EQUAL,
417 VK_COMPARE_OP_ALWAYS
418};
419SDL_COMPILE_TIME_ASSERT(SDLToVK_CompareOp, SDL_arraysize(SDLToVK_CompareOp) == SDL_GPU_COMPAREOP_MAX_ENUM_VALUE);
420
421static VkStencilOp SDLToVK_StencilOp[] = {
422 VK_STENCIL_OP_KEEP, // INVALID
423 VK_STENCIL_OP_KEEP,
424 VK_STENCIL_OP_ZERO,
425 VK_STENCIL_OP_REPLACE,
426 VK_STENCIL_OP_INCREMENT_AND_CLAMP,
427 VK_STENCIL_OP_DECREMENT_AND_CLAMP,
428 VK_STENCIL_OP_INVERT,
429 VK_STENCIL_OP_INCREMENT_AND_WRAP,
430 VK_STENCIL_OP_DECREMENT_AND_WRAP
431};
432SDL_COMPILE_TIME_ASSERT(SDLToVK_StencilOp, SDL_arraysize(SDLToVK_StencilOp) == SDL_GPU_STENCILOP_MAX_ENUM_VALUE);
433
434static VkAttachmentLoadOp SDLToVK_LoadOp[] = {
435 VK_ATTACHMENT_LOAD_OP_LOAD,
436 VK_ATTACHMENT_LOAD_OP_CLEAR,
437 VK_ATTACHMENT_LOAD_OP_DONT_CARE
438};
439
440static VkAttachmentStoreOp SDLToVK_StoreOp[] = {
441 VK_ATTACHMENT_STORE_OP_STORE,
442 VK_ATTACHMENT_STORE_OP_DONT_CARE,
443 VK_ATTACHMENT_STORE_OP_DONT_CARE,
444 VK_ATTACHMENT_STORE_OP_STORE
445};
446
447static VkSampleCountFlagBits SDLToVK_SampleCount[] = {
448 VK_SAMPLE_COUNT_1_BIT,
449 VK_SAMPLE_COUNT_2_BIT,
450 VK_SAMPLE_COUNT_4_BIT,
451 VK_SAMPLE_COUNT_8_BIT
452};
453
454static VkVertexInputRate SDLToVK_VertexInputRate[] = {
455 VK_VERTEX_INPUT_RATE_VERTEX,
456 VK_VERTEX_INPUT_RATE_INSTANCE
457};
458
459static VkFilter SDLToVK_Filter[] = {
460 VK_FILTER_NEAREST,
461 VK_FILTER_LINEAR
462};
463
464static VkSamplerMipmapMode SDLToVK_SamplerMipmapMode[] = {
465 VK_SAMPLER_MIPMAP_MODE_NEAREST,
466 VK_SAMPLER_MIPMAP_MODE_LINEAR
467};
468
469static VkSamplerAddressMode SDLToVK_SamplerAddressMode[] = {
470 VK_SAMPLER_ADDRESS_MODE_REPEAT,
471 VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT,
472 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
473};
474
475// Structures
476
477typedef struct VulkanMemoryAllocation VulkanMemoryAllocation;
478typedef struct VulkanBuffer VulkanBuffer;
479typedef struct VulkanBufferContainer VulkanBufferContainer;
480typedef struct VulkanUniformBuffer VulkanUniformBuffer;
481typedef struct VulkanTexture VulkanTexture;
482typedef struct VulkanTextureContainer VulkanTextureContainer;
483
484typedef struct VulkanFenceHandle
485{
486 VkFence fence;
487 SDL_AtomicInt referenceCount;
488} VulkanFenceHandle;
489
490// Memory Allocation
491
492typedef struct VulkanMemoryFreeRegion
493{
494 VulkanMemoryAllocation *allocation;
495 VkDeviceSize offset;
496 VkDeviceSize size;
497 Uint32 allocationIndex;
498 Uint32 sortedIndex;
499} VulkanMemoryFreeRegion;
500
501typedef struct VulkanMemoryUsedRegion
502{
503 VulkanMemoryAllocation *allocation;
504 VkDeviceSize offset;
505 VkDeviceSize size;
506 VkDeviceSize resourceOffset; // differs from offset based on alignment
507 VkDeviceSize resourceSize; // differs from size based on alignment
508 VkDeviceSize alignment;
509 Uint8 isBuffer;
510 union
511 {
512 VulkanBuffer *vulkanBuffer;
513 VulkanTexture *vulkanTexture;
514 };
515} VulkanMemoryUsedRegion;
516
517typedef struct VulkanMemorySubAllocator
518{
519 Uint32 memoryTypeIndex;
520 VulkanMemoryAllocation **allocations;
521 Uint32 allocationCount;
522 VulkanMemoryFreeRegion **sortedFreeRegions;
523 Uint32 sortedFreeRegionCount;
524 Uint32 sortedFreeRegionCapacity;
525} VulkanMemorySubAllocator;
526
527struct VulkanMemoryAllocation
528{
529 VulkanMemorySubAllocator *allocator;
530 VkDeviceMemory memory;
531 VkDeviceSize size;
532 VulkanMemoryUsedRegion **usedRegions;
533 Uint32 usedRegionCount;
534 Uint32 usedRegionCapacity;
535 VulkanMemoryFreeRegion **freeRegions;
536 Uint32 freeRegionCount;
537 Uint32 freeRegionCapacity;
538 Uint8 availableForAllocation;
539 VkDeviceSize freeSpace;
540 VkDeviceSize usedSpace;
541 Uint8 *mapPointer;
542 SDL_Mutex *memoryLock;
543};
544
545typedef struct VulkanMemoryAllocator
546{
547 VulkanMemorySubAllocator subAllocators[VK_MAX_MEMORY_TYPES];
548} VulkanMemoryAllocator;
549
550// Memory structures
551
552typedef enum VulkanBufferType
553{
554 VULKAN_BUFFER_TYPE_GPU,
555 VULKAN_BUFFER_TYPE_UNIFORM,
556 VULKAN_BUFFER_TYPE_TRANSFER
557} VulkanBufferType;
558
559struct VulkanBuffer
560{
561 VulkanBufferContainer *container;
562 Uint32 containerIndex;
563
564 VkBuffer buffer;
565 VulkanMemoryUsedRegion *usedRegion;
566
567 // Needed for uniforms and defrag
568 VulkanBufferType type;
569 SDL_GPUBufferUsageFlags usage;
570 VkDeviceSize size;
571
572 SDL_AtomicInt referenceCount;
573 bool transitioned;
574 bool markedForDestroy; // so that defrag doesn't double-free
575 VulkanUniformBuffer *uniformBufferForDefrag;
576};
577
578struct VulkanBufferContainer
579{
580 VulkanBuffer *activeBuffer;
581
582 VulkanBuffer **buffers;
583 Uint32 bufferCapacity;
584 Uint32 bufferCount;
585
586 bool dedicated;
587 char *debugName;
588};
589
590// Renderer Structure
591
592typedef struct QueueFamilyIndices
593{
594 Uint32 graphicsFamily;
595 Uint32 presentFamily;
596 Uint32 computeFamily;
597 Uint32 transferFamily;
598} QueueFamilyIndices;
599
600typedef struct VulkanSampler
601{
602 VkSampler sampler;
603 SDL_AtomicInt referenceCount;
604} VulkanSampler;
605
606typedef struct VulkanShader
607{
608 VkShaderModule shaderModule;
609 const char *entrypointName;
610 SDL_GPUShaderStage stage;
611 Uint32 numSamplers;
612 Uint32 numStorageTextures;
613 Uint32 numStorageBuffers;
614 Uint32 numUniformBuffers;
615 SDL_AtomicInt referenceCount;
616} VulkanShader;
617
618/* Textures are made up of individual subresources.
619 * This helps us barrier the resource efficiently.
620 */
621typedef struct VulkanTextureSubresource
622{
623 VulkanTexture *parent;
624 Uint32 layer;
625 Uint32 level;
626
627 VkImageView *renderTargetViews; // One render target view per depth slice
628 VkImageView computeWriteView;
629 VkImageView depthStencilView;
630} VulkanTextureSubresource;
631
632struct VulkanTexture
633{
634 VulkanTextureContainer *container;
635 Uint32 containerIndex;
636
637 VulkanMemoryUsedRegion *usedRegion;
638
639 VkImage image;
640 VkImageView fullView; // used for samplers and storage reads
641 VkComponentMapping swizzle;
642 VkImageAspectFlags aspectFlags;
643 Uint32 depth; // used for cleanup only
644
645 // FIXME: It'd be nice if we didn't have to have this on the texture...
646 SDL_GPUTextureUsageFlags usage; // used for defrag transitions only.
647
648 Uint32 subresourceCount;
649 VulkanTextureSubresource *subresources;
650
651 bool markedForDestroy; // so that defrag doesn't double-free
652 SDL_AtomicInt referenceCount;
653};
654
655struct VulkanTextureContainer
656{
657 TextureCommonHeader header;
658
659 VulkanTexture *activeTexture;
660
661 Uint32 textureCapacity;
662 Uint32 textureCount;
663 VulkanTexture **textures;
664
665 char *debugName;
666 bool canBeCycled;
667};
668
669typedef enum VulkanBufferUsageMode
670{
671 VULKAN_BUFFER_USAGE_MODE_COPY_SOURCE,
672 VULKAN_BUFFER_USAGE_MODE_COPY_DESTINATION,
673 VULKAN_BUFFER_USAGE_MODE_VERTEX_READ,
674 VULKAN_BUFFER_USAGE_MODE_INDEX_READ,
675 VULKAN_BUFFER_USAGE_MODE_INDIRECT,
676 VULKAN_BUFFER_USAGE_MODE_GRAPHICS_STORAGE_READ,
677 VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ,
678 VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE,
679} VulkanBufferUsageMode;
680
681typedef enum VulkanTextureUsageMode
682{
683 VULKAN_TEXTURE_USAGE_MODE_UNINITIALIZED,
684 VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE,
685 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION,
686 VULKAN_TEXTURE_USAGE_MODE_SAMPLER,
687 VULKAN_TEXTURE_USAGE_MODE_GRAPHICS_STORAGE_READ,
688 VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ,
689 VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE,
690 VULKAN_TEXTURE_USAGE_MODE_COLOR_ATTACHMENT,
691 VULKAN_TEXTURE_USAGE_MODE_DEPTH_STENCIL_ATTACHMENT,
692 VULKAN_TEXTURE_USAGE_MODE_PRESENT
693} VulkanTextureUsageMode;
694
695typedef enum VulkanUniformBufferStage
696{
697 VULKAN_UNIFORM_BUFFER_STAGE_VERTEX,
698 VULKAN_UNIFORM_BUFFER_STAGE_FRAGMENT,
699 VULKAN_UNIFORM_BUFFER_STAGE_COMPUTE
700} VulkanUniformBufferStage;
701
702typedef struct VulkanFramebuffer
703{
704 VkFramebuffer framebuffer;
705 SDL_AtomicInt referenceCount;
706} VulkanFramebuffer;
707
708typedef struct WindowData
709{
710 SDL_Window *window;
711 SDL_GPUSwapchainComposition swapchainComposition;
712 SDL_GPUPresentMode presentMode;
713 bool needsSwapchainRecreate;
714 Uint32 swapchainCreateWidth;
715 Uint32 swapchainCreateHeight;
716
717 // Window surface
718 VkSurfaceKHR surface;
719
720 // Swapchain for window surface
721 VkSwapchainKHR swapchain;
722 VkFormat format;
723 VkColorSpaceKHR colorSpace;
724 VkComponentMapping swapchainSwizzle;
725 bool usingFallbackFormat;
726
727 // Swapchain images
728 VulkanTextureContainer *textureContainers; // use containers so that swapchain textures can use the same API as other textures
729 Uint32 imageCount;
730 Uint32 width;
731 Uint32 height;
732
733 // Synchronization primitives
734 VkSemaphore imageAvailableSemaphore[MAX_FRAMES_IN_FLIGHT];
735 VkSemaphore renderFinishedSemaphore[MAX_FRAMES_IN_FLIGHT];
736 SDL_GPUFence *inFlightFences[MAX_FRAMES_IN_FLIGHT];
737
738 Uint32 frameCounter;
739} WindowData;
740
741typedef struct SwapchainSupportDetails
742{
743 VkSurfaceCapabilitiesKHR capabilities;
744 VkSurfaceFormatKHR *formats;
745 Uint32 formatsLength;
746 VkPresentModeKHR *presentModes;
747 Uint32 presentModesLength;
748} SwapchainSupportDetails;
749
750typedef struct VulkanPresentData
751{
752 WindowData *windowData;
753 Uint32 swapchainImageIndex;
754} VulkanPresentData;
755
756struct VulkanUniformBuffer
757{
758 VulkanBuffer *buffer;
759 Uint32 drawOffset;
760 Uint32 writeOffset;
761};
762
763typedef struct VulkanDescriptorInfo
764{
765 VkDescriptorType descriptorType;
766 VkShaderStageFlagBits stageFlag;
767} VulkanDescriptorInfo;
768
769typedef struct DescriptorSetPool
770{
771 // It's a pool... of pools!!!
772 Uint32 poolCount;
773 VkDescriptorPool *descriptorPools;
774
775 // We'll just manage the descriptor sets ourselves instead of freeing the sets
776 VkDescriptorSet *descriptorSets;
777 Uint32 descriptorSetCount;
778 Uint32 descriptorSetIndex;
779} DescriptorSetPool;
780
781// A command buffer acquires a cache at command buffer acquisition time
782typedef struct DescriptorSetCache
783{
784 // Pools are indexed by DescriptorSetLayoutID which increases monotonically
785 // There's only a certain number of maximum layouts possible since we de-duplicate them.
786 DescriptorSetPool *pools;
787 Uint32 poolCount;
788} DescriptorSetCache;
789
790typedef struct DescriptorSetLayoutHashTableKey
791{
792 VkShaderStageFlagBits shaderStage;
793 // Category 1: read resources
794 Uint32 samplerCount;
795 Uint32 storageBufferCount;
796 Uint32 storageTextureCount;
797 // Category 2: write resources
798 Uint32 writeStorageBufferCount;
799 Uint32 writeStorageTextureCount;
800 // Category 3: uniform buffers
801 Uint32 uniformBufferCount;
802} DescriptorSetLayoutHashTableKey;
803
804typedef uint32_t DescriptorSetLayoutID;
805
806typedef struct DescriptorSetLayout
807{
808 DescriptorSetLayoutID ID;
809 VkDescriptorSetLayout descriptorSetLayout;
810
811 // Category 1: read resources
812 Uint32 samplerCount;
813 Uint32 storageBufferCount;
814 Uint32 storageTextureCount;
815 // Category 2: write resources
816 Uint32 writeStorageBufferCount;
817 Uint32 writeStorageTextureCount;
818 // Category 3: uniform buffers
819 Uint32 uniformBufferCount;
820} DescriptorSetLayout;
821
822typedef struct GraphicsPipelineResourceLayoutHashTableKey
823{
824 Uint32 vertexSamplerCount;
825 Uint32 vertexStorageBufferCount;
826 Uint32 vertexStorageTextureCount;
827 Uint32 vertexUniformBufferCount;
828
829 Uint32 fragmentSamplerCount;
830 Uint32 fragmentStorageBufferCount;
831 Uint32 fragmentStorageTextureCount;
832 Uint32 fragmentUniformBufferCount;
833} GraphicsPipelineResourceLayoutHashTableKey;
834
835typedef struct VulkanGraphicsPipelineResourceLayout
836{
837 VkPipelineLayout pipelineLayout;
838
839 /*
840 * Descriptor set layout is as follows:
841 * 0: vertex resources
842 * 1: vertex uniform buffers
843 * 2: fragment resources
844 * 3: fragment uniform buffers
845 */
846 DescriptorSetLayout *descriptorSetLayouts[4];
847
848 Uint32 vertexSamplerCount;
849 Uint32 vertexStorageBufferCount;
850 Uint32 vertexStorageTextureCount;
851 Uint32 vertexUniformBufferCount;
852
853 Uint32 fragmentSamplerCount;
854 Uint32 fragmentStorageBufferCount;
855 Uint32 fragmentStorageTextureCount;
856 Uint32 fragmentUniformBufferCount;
857} VulkanGraphicsPipelineResourceLayout;
858
859typedef struct VulkanGraphicsPipeline
860{
861 VkPipeline pipeline;
862 SDL_GPUPrimitiveType primitiveType;
863
864 VulkanGraphicsPipelineResourceLayout *resourceLayout;
865
866 VulkanShader *vertexShader;
867 VulkanShader *fragmentShader;
868
869 SDL_AtomicInt referenceCount;
870} VulkanGraphicsPipeline;
871
872typedef struct ComputePipelineResourceLayoutHashTableKey
873{
874 Uint32 samplerCount;
875 Uint32 readonlyStorageTextureCount;
876 Uint32 readonlyStorageBufferCount;
877 Uint32 readWriteStorageTextureCount;
878 Uint32 readWriteStorageBufferCount;
879 Uint32 uniformBufferCount;
880} ComputePipelineResourceLayoutHashTableKey;
881
882typedef struct VulkanComputePipelineResourceLayout
883{
884 VkPipelineLayout pipelineLayout;
885
886 /*
887 * Descriptor set layout is as follows:
888 * 0: samplers, then read-only textures, then read-only buffers
889 * 1: write-only textures, then write-only buffers
890 * 2: uniform buffers
891 */
892 DescriptorSetLayout *descriptorSetLayouts[3];
893
894 Uint32 numSamplers;
895 Uint32 numReadonlyStorageTextures;
896 Uint32 numReadonlyStorageBuffers;
897 Uint32 numReadWriteStorageTextures;
898 Uint32 numReadWriteStorageBuffers;
899 Uint32 numUniformBuffers;
900} VulkanComputePipelineResourceLayout;
901
902typedef struct VulkanComputePipeline
903{
904 VkShaderModule shaderModule;
905 VkPipeline pipeline;
906 VulkanComputePipelineResourceLayout *resourceLayout;
907 SDL_AtomicInt referenceCount;
908} VulkanComputePipeline;
909
910typedef struct RenderPassColorTargetDescription
911{
912 VkFormat format;
913 SDL_GPULoadOp loadOp;
914 SDL_GPUStoreOp storeOp;
915} RenderPassColorTargetDescription;
916
917typedef struct RenderPassDepthStencilTargetDescription
918{
919 VkFormat format;
920 SDL_GPULoadOp loadOp;
921 SDL_GPUStoreOp storeOp;
922 SDL_GPULoadOp stencilLoadOp;
923 SDL_GPUStoreOp stencilStoreOp;
924} RenderPassDepthStencilTargetDescription;
925
926typedef struct CommandPoolHashTableKey
927{
928 SDL_ThreadID threadID;
929} CommandPoolHashTableKey;
930
931typedef struct RenderPassHashTableKey
932{
933 RenderPassColorTargetDescription colorTargetDescriptions[MAX_COLOR_TARGET_BINDINGS];
934 Uint32 numColorTargets;
935 VkFormat resolveTargetFormats[MAX_COLOR_TARGET_BINDINGS];
936 Uint32 numResolveTargets;
937 RenderPassDepthStencilTargetDescription depthStencilTargetDescription;
938 VkSampleCountFlagBits sampleCount;
939} RenderPassHashTableKey;
940
941typedef struct VulkanRenderPassHashTableValue
942{
943 VkRenderPass handle;
944} VulkanRenderPassHashTableValue;
945
946typedef struct FramebufferHashTableKey
947{
948 VkImageView colorAttachmentViews[MAX_COLOR_TARGET_BINDINGS];
949 Uint32 numColorTargets;
950 VkImageView resolveAttachmentViews[MAX_COLOR_TARGET_BINDINGS];
951 Uint32 numResolveAttachments;
952 VkImageView depthStencilAttachmentView;
953 Uint32 width;
954 Uint32 height;
955} FramebufferHashTableKey;
956
957// Command structures
958
959typedef struct VulkanFencePool
960{
961 SDL_Mutex *lock;
962
963 VulkanFenceHandle **availableFences;
964 Uint32 availableFenceCount;
965 Uint32 availableFenceCapacity;
966} VulkanFencePool;
967
968typedef struct VulkanCommandPool VulkanCommandPool;
969
970typedef struct VulkanRenderer VulkanRenderer;
971
972typedef struct VulkanCommandBuffer
973{
974 CommandBufferCommonHeader common;
975 VulkanRenderer *renderer;
976
977 VkCommandBuffer commandBuffer;
978 VulkanCommandPool *commandPool;
979
980 VulkanPresentData *presentDatas;
981 Uint32 presentDataCount;
982 Uint32 presentDataCapacity;
983
984 VkSemaphore *waitSemaphores;
985 Uint32 waitSemaphoreCount;
986 Uint32 waitSemaphoreCapacity;
987
988 VkSemaphore *signalSemaphores;
989 Uint32 signalSemaphoreCount;
990 Uint32 signalSemaphoreCapacity;
991
992 VulkanComputePipeline *currentComputePipeline;
993 VulkanGraphicsPipeline *currentGraphicsPipeline;
994
995 // Keep track of resources transitioned away from their default state to barrier them on pass end
996
997 VulkanTextureSubresource *colorAttachmentSubresources[MAX_COLOR_TARGET_BINDINGS];
998 Uint32 colorAttachmentSubresourceCount;
999 VulkanTextureSubresource *resolveAttachmentSubresources[MAX_COLOR_TARGET_BINDINGS];
1000 Uint32 resolveAttachmentSubresourceCount;
1001
1002 VulkanTextureSubresource *depthStencilAttachmentSubresource; // may be NULL
1003
1004 // Dynamic state
1005
1006 VkViewport currentViewport;
1007 VkRect2D currentScissor;
1008 float blendConstants[4];
1009 Uint8 stencilRef;
1010
1011 // Resource bind state
1012
1013 DescriptorSetCache *descriptorSetCache; // acquired when command buffer is acquired
1014
1015 bool needNewVertexResourceDescriptorSet;
1016 bool needNewVertexUniformDescriptorSet;
1017 bool needNewVertexUniformOffsets;
1018 bool needNewFragmentResourceDescriptorSet;
1019 bool needNewFragmentUniformDescriptorSet;
1020 bool needNewFragmentUniformOffsets;
1021
1022 bool needNewComputeReadOnlyDescriptorSet;
1023 bool needNewComputeReadWriteDescriptorSet;
1024 bool needNewComputeUniformDescriptorSet;
1025 bool needNewComputeUniformOffsets;
1026
1027 VkDescriptorSet vertexResourceDescriptorSet;
1028 VkDescriptorSet vertexUniformDescriptorSet;
1029 VkDescriptorSet fragmentResourceDescriptorSet;
1030 VkDescriptorSet fragmentUniformDescriptorSet;
1031
1032 VkDescriptorSet computeReadOnlyDescriptorSet;
1033 VkDescriptorSet computeReadWriteDescriptorSet;
1034 VkDescriptorSet computeUniformDescriptorSet;
1035
1036 VkBuffer vertexBuffers[MAX_VERTEX_BUFFERS];
1037 VkDeviceSize vertexBufferOffsets[MAX_VERTEX_BUFFERS];
1038 Uint32 vertexBufferCount;
1039 bool needVertexBufferBind;
1040
1041 VulkanTexture *vertexSamplerTextures[MAX_TEXTURE_SAMPLERS_PER_STAGE];
1042 VulkanSampler *vertexSamplers[MAX_TEXTURE_SAMPLERS_PER_STAGE];
1043 VulkanTexture *vertexStorageTextures[MAX_STORAGE_TEXTURES_PER_STAGE];
1044 VulkanBuffer *vertexStorageBuffers[MAX_STORAGE_BUFFERS_PER_STAGE];
1045
1046 VulkanTexture *fragmentSamplerTextures[MAX_TEXTURE_SAMPLERS_PER_STAGE];
1047 VulkanSampler *fragmentSamplers[MAX_TEXTURE_SAMPLERS_PER_STAGE];
1048 VulkanTexture *fragmentStorageTextures[MAX_STORAGE_TEXTURES_PER_STAGE];
1049 VulkanBuffer *fragmentStorageBuffers[MAX_STORAGE_BUFFERS_PER_STAGE];
1050
1051 VulkanTextureSubresource *readWriteComputeStorageTextureSubresources[MAX_COMPUTE_WRITE_TEXTURES];
1052 Uint32 readWriteComputeStorageTextureSubresourceCount;
1053 VulkanBuffer *readWriteComputeStorageBuffers[MAX_COMPUTE_WRITE_BUFFERS];
1054
1055 VulkanTexture *computeSamplerTextures[MAX_TEXTURE_SAMPLERS_PER_STAGE];
1056 VulkanSampler *computeSamplers[MAX_TEXTURE_SAMPLERS_PER_STAGE];
1057 VulkanTexture *readOnlyComputeStorageTextures[MAX_STORAGE_TEXTURES_PER_STAGE];
1058 VulkanBuffer *readOnlyComputeStorageBuffers[MAX_STORAGE_BUFFERS_PER_STAGE];
1059
1060 // Uniform buffers
1061
1062 VulkanUniformBuffer *vertexUniformBuffers[MAX_UNIFORM_BUFFERS_PER_STAGE];
1063 VulkanUniformBuffer *fragmentUniformBuffers[MAX_UNIFORM_BUFFERS_PER_STAGE];
1064 VulkanUniformBuffer *computeUniformBuffers[MAX_UNIFORM_BUFFERS_PER_STAGE];
1065
1066 // Track used resources
1067
1068 VulkanBuffer **usedBuffers;
1069 Sint32 usedBufferCount;
1070 Sint32 usedBufferCapacity;
1071
1072 VulkanTexture **usedTextures;
1073 Sint32 usedTextureCount;
1074 Sint32 usedTextureCapacity;
1075
1076 VulkanSampler **usedSamplers;
1077 Sint32 usedSamplerCount;
1078 Sint32 usedSamplerCapacity;
1079
1080 VulkanGraphicsPipeline **usedGraphicsPipelines;
1081 Sint32 usedGraphicsPipelineCount;
1082 Sint32 usedGraphicsPipelineCapacity;
1083
1084 VulkanComputePipeline **usedComputePipelines;
1085 Sint32 usedComputePipelineCount;
1086 Sint32 usedComputePipelineCapacity;
1087
1088 VulkanFramebuffer **usedFramebuffers;
1089 Sint32 usedFramebufferCount;
1090 Sint32 usedFramebufferCapacity;
1091
1092 VulkanUniformBuffer **usedUniformBuffers;
1093 Sint32 usedUniformBufferCount;
1094 Sint32 usedUniformBufferCapacity;
1095
1096 VulkanFenceHandle *inFlightFence;
1097 bool autoReleaseFence;
1098
1099 bool isDefrag; // Whether this CB was created for defragging
1100} VulkanCommandBuffer;
1101
1102struct VulkanCommandPool
1103{
1104 SDL_ThreadID threadID;
1105 VkCommandPool commandPool;
1106
1107 VulkanCommandBuffer **inactiveCommandBuffers;
1108 Uint32 inactiveCommandBufferCapacity;
1109 Uint32 inactiveCommandBufferCount;
1110};
1111
1112// Context
1113
1114struct VulkanRenderer
1115{
1116 VkInstance instance;
1117 VkPhysicalDevice physicalDevice;
1118 VkPhysicalDeviceProperties2KHR physicalDeviceProperties;
1119 VkPhysicalDeviceDriverPropertiesKHR physicalDeviceDriverProperties;
1120 VkDevice logicalDevice;
1121 Uint8 integratedMemoryNotification;
1122 Uint8 outOfDeviceLocalMemoryWarning;
1123 Uint8 outofBARMemoryWarning;
1124 Uint8 fillModeOnlyWarning;
1125
1126 bool debugMode;
1127 bool preferLowPower;
1128 Uint32 allowedFramesInFlight;
1129
1130 VulkanExtensions supports;
1131 bool supportsDebugUtils;
1132 bool supportsColorspace;
1133 bool supportsFillModeNonSolid;
1134 bool supportsMultiDrawIndirect;
1135
1136 VulkanMemoryAllocator *memoryAllocator;
1137 VkPhysicalDeviceMemoryProperties memoryProperties;
1138
1139 WindowData **claimedWindows;
1140 Uint32 claimedWindowCount;
1141 Uint32 claimedWindowCapacity;
1142
1143 Uint32 queueFamilyIndex;
1144 VkQueue unifiedQueue;
1145
1146 VulkanCommandBuffer **submittedCommandBuffers;
1147 Uint32 submittedCommandBufferCount;
1148 Uint32 submittedCommandBufferCapacity;
1149
1150 VulkanFencePool fencePool;
1151
1152 SDL_HashTable *commandPoolHashTable;
1153 SDL_HashTable *renderPassHashTable;
1154 SDL_HashTable *framebufferHashTable;
1155 SDL_HashTable *graphicsPipelineResourceLayoutHashTable;
1156 SDL_HashTable *computePipelineResourceLayoutHashTable;
1157 SDL_HashTable *descriptorSetLayoutHashTable;
1158
1159 VulkanUniformBuffer **uniformBufferPool;
1160 Uint32 uniformBufferPoolCount;
1161 Uint32 uniformBufferPoolCapacity;
1162
1163 DescriptorSetCache **descriptorSetCachePool;
1164 Uint32 descriptorSetCachePoolCount;
1165 Uint32 descriptorSetCachePoolCapacity;
1166
1167 SDL_AtomicInt layoutResourceID;
1168
1169 Uint32 minUBOAlignment;
1170
1171 // Deferred resource destruction
1172
1173 VulkanTexture **texturesToDestroy;
1174 Uint32 texturesToDestroyCount;
1175 Uint32 texturesToDestroyCapacity;
1176
1177 VulkanBuffer **buffersToDestroy;
1178 Uint32 buffersToDestroyCount;
1179 Uint32 buffersToDestroyCapacity;
1180
1181 VulkanSampler **samplersToDestroy;
1182 Uint32 samplersToDestroyCount;
1183 Uint32 samplersToDestroyCapacity;
1184
1185 VulkanGraphicsPipeline **graphicsPipelinesToDestroy;
1186 Uint32 graphicsPipelinesToDestroyCount;
1187 Uint32 graphicsPipelinesToDestroyCapacity;
1188
1189 VulkanComputePipeline **computePipelinesToDestroy;
1190 Uint32 computePipelinesToDestroyCount;
1191 Uint32 computePipelinesToDestroyCapacity;
1192
1193 VulkanShader **shadersToDestroy;
1194 Uint32 shadersToDestroyCount;
1195 Uint32 shadersToDestroyCapacity;
1196
1197 VulkanFramebuffer **framebuffersToDestroy;
1198 Uint32 framebuffersToDestroyCount;
1199 Uint32 framebuffersToDestroyCapacity;
1200
1201 SDL_Mutex *allocatorLock;
1202 SDL_Mutex *disposeLock;
1203 SDL_Mutex *submitLock;
1204 SDL_Mutex *acquireCommandBufferLock;
1205 SDL_Mutex *acquireUniformBufferLock;
1206 SDL_Mutex *framebufferFetchLock;
1207 SDL_Mutex *windowLock;
1208
1209 Uint8 defragInProgress;
1210
1211 VulkanMemoryAllocation **allocationsToDefrag;
1212 Uint32 allocationsToDefragCount;
1213 Uint32 allocationsToDefragCapacity;
1214
1215#define VULKAN_INSTANCE_FUNCTION(func) \
1216 PFN_##func func;
1217#define VULKAN_DEVICE_FUNCTION(func) \
1218 PFN_##func func;
1219#include "SDL_gpu_vulkan_vkfuncs.h"
1220};
1221
1222// Forward declarations
1223
1224static bool VULKAN_INTERNAL_DefragmentMemory(VulkanRenderer *renderer);
1225static bool VULKAN_INTERNAL_BeginCommandBuffer(VulkanRenderer *renderer, VulkanCommandBuffer *commandBuffer);
1226static void VULKAN_ReleaseWindow(SDL_GPURenderer *driverData, SDL_Window *window);
1227static bool VULKAN_Wait(SDL_GPURenderer *driverData);
1228static bool VULKAN_WaitForFences(SDL_GPURenderer *driverData, bool waitAll, SDL_GPUFence *const *fences, Uint32 numFences);
1229static bool VULKAN_Submit(SDL_GPUCommandBuffer *commandBuffer);
1230static SDL_GPUCommandBuffer *VULKAN_AcquireCommandBuffer(SDL_GPURenderer *driverData);
1231
1232// Error Handling
1233
1234static inline const char *VkErrorMessages(VkResult code)
1235{
1236#define ERR_TO_STR(e) \
1237 case e: \
1238 return #e;
1239 switch (code) {
1240 ERR_TO_STR(VK_ERROR_OUT_OF_HOST_MEMORY)
1241 ERR_TO_STR(VK_ERROR_OUT_OF_DEVICE_MEMORY)
1242 ERR_TO_STR(VK_ERROR_FRAGMENTED_POOL)
1243 ERR_TO_STR(VK_ERROR_OUT_OF_POOL_MEMORY)
1244 ERR_TO_STR(VK_ERROR_INITIALIZATION_FAILED)
1245 ERR_TO_STR(VK_ERROR_LAYER_NOT_PRESENT)
1246 ERR_TO_STR(VK_ERROR_EXTENSION_NOT_PRESENT)
1247 ERR_TO_STR(VK_ERROR_FEATURE_NOT_PRESENT)
1248 ERR_TO_STR(VK_ERROR_TOO_MANY_OBJECTS)
1249 ERR_TO_STR(VK_ERROR_DEVICE_LOST)
1250 ERR_TO_STR(VK_ERROR_INCOMPATIBLE_DRIVER)
1251 ERR_TO_STR(VK_ERROR_OUT_OF_DATE_KHR)
1252 ERR_TO_STR(VK_ERROR_SURFACE_LOST_KHR)
1253 ERR_TO_STR(VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT)
1254 ERR_TO_STR(VK_SUBOPTIMAL_KHR)
1255 ERR_TO_STR(VK_ERROR_NATIVE_WINDOW_IN_USE_KHR)
1256 default:
1257 return "Unhandled VkResult!";
1258 }
1259#undef ERR_TO_STR
1260}
1261
1262#define SET_ERROR_AND_RETURN(fmt, msg, ret) \
1263 do { \
1264 if (renderer->debugMode) { \
1265 SDL_LogError(SDL_LOG_CATEGORY_GPU, fmt, msg); \
1266 } \
1267 SDL_SetError((fmt), (msg)); \
1268 return ret; \
1269 } while (0)
1270
1271#define SET_STRING_ERROR_AND_RETURN(msg, ret) SET_ERROR_AND_RETURN("%s", msg, ret)
1272
1273#define CHECK_VULKAN_ERROR_AND_RETURN(res, fn, ret) \
1274 do { \
1275 if ((res) != VK_SUCCESS) { \
1276 if (renderer->debugMode) { \
1277 SDL_LogError(SDL_LOG_CATEGORY_GPU, "%s %s", #fn, VkErrorMessages(res)); \
1278 } \
1279 SDL_SetError("%s %s", #fn, VkErrorMessages(res)); \
1280 return (ret); \
1281 } \
1282 } while (0)
1283
1284// Utility
1285
1286static inline VkPolygonMode SDLToVK_PolygonMode(
1287 VulkanRenderer *renderer,
1288 SDL_GPUFillMode mode)
1289{
1290 if (mode == SDL_GPU_FILLMODE_FILL) {
1291 return VK_POLYGON_MODE_FILL; // always available!
1292 }
1293
1294 if (renderer->supportsFillModeNonSolid && mode == SDL_GPU_FILLMODE_LINE) {
1295 return VK_POLYGON_MODE_LINE;
1296 }
1297
1298 if (!renderer->fillModeOnlyWarning) {
1299 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Unsupported fill mode requested, using FILL!");
1300 renderer->fillModeOnlyWarning = 1;
1301 }
1302 return VK_POLYGON_MODE_FILL;
1303}
1304
1305// Memory Management
1306
1307// Vulkan: Memory Allocation
1308
1309static inline VkDeviceSize VULKAN_INTERNAL_NextHighestAlignment(
1310 VkDeviceSize n,
1311 VkDeviceSize align)
1312{
1313 return align * ((n + align - 1) / align);
1314}
1315
1316static inline Uint32 VULKAN_INTERNAL_NextHighestAlignment32(
1317 Uint32 n,
1318 Uint32 align)
1319{
1320 return align * ((n + align - 1) / align);
1321}
1322
1323static void VULKAN_INTERNAL_MakeMemoryUnavailable(
1324 VulkanRenderer *renderer,
1325 VulkanMemoryAllocation *allocation)
1326{
1327 Uint32 i, j;
1328 VulkanMemoryFreeRegion *freeRegion;
1329
1330 allocation->availableForAllocation = 0;
1331
1332 for (i = 0; i < allocation->freeRegionCount; i += 1) {
1333 freeRegion = allocation->freeRegions[i];
1334
1335 // close the gap in the sorted list
1336 if (allocation->allocator->sortedFreeRegionCount > 1) {
1337 for (j = freeRegion->sortedIndex; j < allocation->allocator->sortedFreeRegionCount - 1; j += 1) {
1338 allocation->allocator->sortedFreeRegions[j] =
1339 allocation->allocator->sortedFreeRegions[j + 1];
1340
1341 allocation->allocator->sortedFreeRegions[j]->sortedIndex = j;
1342 }
1343 }
1344
1345 allocation->allocator->sortedFreeRegionCount -= 1;
1346 }
1347}
1348
1349static void VULKAN_INTERNAL_MarkAllocationsForDefrag(
1350 VulkanRenderer *renderer)
1351{
1352 Uint32 memoryType, allocationIndex;
1353 VulkanMemorySubAllocator *currentAllocator;
1354
1355 for (memoryType = 0; memoryType < VK_MAX_MEMORY_TYPES; memoryType += 1) {
1356 currentAllocator = &renderer->memoryAllocator->subAllocators[memoryType];
1357
1358 for (allocationIndex = 0; allocationIndex < currentAllocator->allocationCount; allocationIndex += 1) {
1359 if (currentAllocator->allocations[allocationIndex]->availableForAllocation == 1) {
1360 if (currentAllocator->allocations[allocationIndex]->freeRegionCount > 1) {
1361 EXPAND_ARRAY_IF_NEEDED(
1362 renderer->allocationsToDefrag,
1363 VulkanMemoryAllocation *,
1364 renderer->allocationsToDefragCount + 1,
1365 renderer->allocationsToDefragCapacity,
1366 renderer->allocationsToDefragCapacity * 2);
1367
1368 renderer->allocationsToDefrag[renderer->allocationsToDefragCount] =
1369 currentAllocator->allocations[allocationIndex];
1370
1371 renderer->allocationsToDefragCount += 1;
1372
1373 VULKAN_INTERNAL_MakeMemoryUnavailable(
1374 renderer,
1375 currentAllocator->allocations[allocationIndex]);
1376 }
1377 }
1378 }
1379 }
1380}
1381
1382static void VULKAN_INTERNAL_RemoveMemoryFreeRegion(
1383 VulkanRenderer *renderer,
1384 VulkanMemoryFreeRegion *freeRegion)
1385{
1386 Uint32 i;
1387
1388 SDL_LockMutex(renderer->allocatorLock);
1389
1390 if (freeRegion->allocation->availableForAllocation) {
1391 // close the gap in the sorted list
1392 if (freeRegion->allocation->allocator->sortedFreeRegionCount > 1) {
1393 for (i = freeRegion->sortedIndex; i < freeRegion->allocation->allocator->sortedFreeRegionCount - 1; i += 1) {
1394 freeRegion->allocation->allocator->sortedFreeRegions[i] =
1395 freeRegion->allocation->allocator->sortedFreeRegions[i + 1];
1396
1397 freeRegion->allocation->allocator->sortedFreeRegions[i]->sortedIndex = i;
1398 }
1399 }
1400
1401 freeRegion->allocation->allocator->sortedFreeRegionCount -= 1;
1402 }
1403
1404 // close the gap in the buffer list
1405 if (freeRegion->allocation->freeRegionCount > 1 && freeRegion->allocationIndex != freeRegion->allocation->freeRegionCount - 1) {
1406 freeRegion->allocation->freeRegions[freeRegion->allocationIndex] =
1407 freeRegion->allocation->freeRegions[freeRegion->allocation->freeRegionCount - 1];
1408
1409 freeRegion->allocation->freeRegions[freeRegion->allocationIndex]->allocationIndex =
1410 freeRegion->allocationIndex;
1411 }
1412
1413 freeRegion->allocation->freeRegionCount -= 1;
1414
1415 freeRegion->allocation->freeSpace -= freeRegion->size;
1416
1417 SDL_free(freeRegion);
1418
1419 SDL_UnlockMutex(renderer->allocatorLock);
1420}
1421
1422static void VULKAN_INTERNAL_NewMemoryFreeRegion(
1423 VulkanRenderer *renderer,
1424 VulkanMemoryAllocation *allocation,
1425 VkDeviceSize offset,
1426 VkDeviceSize size)
1427{
1428 VulkanMemoryFreeRegion *newFreeRegion;
1429 VkDeviceSize newOffset, newSize;
1430 Sint32 insertionIndex = 0;
1431
1432 SDL_LockMutex(renderer->allocatorLock);
1433
1434 // look for an adjacent region to merge
1435 for (Sint32 i = allocation->freeRegionCount - 1; i >= 0; i -= 1) {
1436 // check left side
1437 if (allocation->freeRegions[i]->offset + allocation->freeRegions[i]->size == offset) {
1438 newOffset = allocation->freeRegions[i]->offset;
1439 newSize = allocation->freeRegions[i]->size + size;
1440
1441 VULKAN_INTERNAL_RemoveMemoryFreeRegion(renderer, allocation->freeRegions[i]);
1442 VULKAN_INTERNAL_NewMemoryFreeRegion(renderer, allocation, newOffset, newSize);
1443
1444 SDL_UnlockMutex(renderer->allocatorLock);
1445 return;
1446 }
1447
1448 // check right side
1449 if (allocation->freeRegions[i]->offset == offset + size) {
1450 newOffset = offset;
1451 newSize = allocation->freeRegions[i]->size + size;
1452
1453 VULKAN_INTERNAL_RemoveMemoryFreeRegion(renderer, allocation->freeRegions[i]);
1454 VULKAN_INTERNAL_NewMemoryFreeRegion(renderer, allocation, newOffset, newSize);
1455
1456 SDL_UnlockMutex(renderer->allocatorLock);
1457 return;
1458 }
1459 }
1460
1461 // region is not contiguous with another free region, make a new one
1462 allocation->freeRegionCount += 1;
1463 if (allocation->freeRegionCount > allocation->freeRegionCapacity) {
1464 allocation->freeRegionCapacity *= 2;
1465 allocation->freeRegions = SDL_realloc(
1466 allocation->freeRegions,
1467 sizeof(VulkanMemoryFreeRegion *) * allocation->freeRegionCapacity);
1468 }
1469
1470 newFreeRegion = SDL_malloc(sizeof(VulkanMemoryFreeRegion));
1471 newFreeRegion->offset = offset;
1472 newFreeRegion->size = size;
1473 newFreeRegion->allocation = allocation;
1474
1475 allocation->freeSpace += size;
1476
1477 allocation->freeRegions[allocation->freeRegionCount - 1] = newFreeRegion;
1478 newFreeRegion->allocationIndex = allocation->freeRegionCount - 1;
1479
1480 if (allocation->availableForAllocation) {
1481 for (Uint32 i = 0; i < allocation->allocator->sortedFreeRegionCount; i += 1) {
1482 if (allocation->allocator->sortedFreeRegions[i]->size < size) {
1483 // this is where the new region should go
1484 break;
1485 }
1486
1487 insertionIndex += 1;
1488 }
1489
1490 if (allocation->allocator->sortedFreeRegionCount + 1 > allocation->allocator->sortedFreeRegionCapacity) {
1491 allocation->allocator->sortedFreeRegionCapacity *= 2;
1492 allocation->allocator->sortedFreeRegions = SDL_realloc(
1493 allocation->allocator->sortedFreeRegions,
1494 sizeof(VulkanMemoryFreeRegion *) * allocation->allocator->sortedFreeRegionCapacity);
1495 }
1496
1497 // perform insertion sort
1498 if (allocation->allocator->sortedFreeRegionCount > 0 && (Uint32)insertionIndex != allocation->allocator->sortedFreeRegionCount) {
1499 for (Sint32 i = allocation->allocator->sortedFreeRegionCount; i > insertionIndex && i > 0; i -= 1) {
1500 allocation->allocator->sortedFreeRegions[i] = allocation->allocator->sortedFreeRegions[i - 1];
1501 allocation->allocator->sortedFreeRegions[i]->sortedIndex = i;
1502 }
1503 }
1504
1505 allocation->allocator->sortedFreeRegionCount += 1;
1506 allocation->allocator->sortedFreeRegions[insertionIndex] = newFreeRegion;
1507 newFreeRegion->sortedIndex = insertionIndex;
1508 }
1509
1510 SDL_UnlockMutex(renderer->allocatorLock);
1511}
1512
1513static VulkanMemoryUsedRegion *VULKAN_INTERNAL_NewMemoryUsedRegion(
1514 VulkanRenderer *renderer,
1515 VulkanMemoryAllocation *allocation,
1516 VkDeviceSize offset,
1517 VkDeviceSize size,
1518 VkDeviceSize resourceOffset,
1519 VkDeviceSize resourceSize,
1520 VkDeviceSize alignment)
1521{
1522 VulkanMemoryUsedRegion *memoryUsedRegion;
1523
1524 SDL_LockMutex(renderer->allocatorLock);
1525
1526 if (allocation->usedRegionCount == allocation->usedRegionCapacity) {
1527 allocation->usedRegionCapacity *= 2;
1528 allocation->usedRegions = SDL_realloc(
1529 allocation->usedRegions,
1530 allocation->usedRegionCapacity * sizeof(VulkanMemoryUsedRegion *));
1531 }
1532
1533 memoryUsedRegion = SDL_malloc(sizeof(VulkanMemoryUsedRegion));
1534 memoryUsedRegion->allocation = allocation;
1535 memoryUsedRegion->offset = offset;
1536 memoryUsedRegion->size = size;
1537 memoryUsedRegion->resourceOffset = resourceOffset;
1538 memoryUsedRegion->resourceSize = resourceSize;
1539 memoryUsedRegion->alignment = alignment;
1540
1541 allocation->usedSpace += size;
1542
1543 allocation->usedRegions[allocation->usedRegionCount] = memoryUsedRegion;
1544 allocation->usedRegionCount += 1;
1545
1546 SDL_UnlockMutex(renderer->allocatorLock);
1547
1548 return memoryUsedRegion;
1549}
1550
1551static void VULKAN_INTERNAL_RemoveMemoryUsedRegion(
1552 VulkanRenderer *renderer,
1553 VulkanMemoryUsedRegion *usedRegion)
1554{
1555 Uint32 i;
1556
1557 SDL_LockMutex(renderer->allocatorLock);
1558
1559 for (i = 0; i < usedRegion->allocation->usedRegionCount; i += 1) {
1560 if (usedRegion->allocation->usedRegions[i] == usedRegion) {
1561 // plug the hole
1562 if (i != usedRegion->allocation->usedRegionCount - 1) {
1563 usedRegion->allocation->usedRegions[i] = usedRegion->allocation->usedRegions[usedRegion->allocation->usedRegionCount - 1];
1564 }
1565
1566 break;
1567 }
1568 }
1569
1570 usedRegion->allocation->usedSpace -= usedRegion->size;
1571
1572 usedRegion->allocation->usedRegionCount -= 1;
1573
1574 VULKAN_INTERNAL_NewMemoryFreeRegion(
1575 renderer,
1576 usedRegion->allocation,
1577 usedRegion->offset,
1578 usedRegion->size);
1579
1580 SDL_free(usedRegion);
1581
1582 SDL_UnlockMutex(renderer->allocatorLock);
1583}
1584
1585static bool VULKAN_INTERNAL_CheckMemoryTypeArrayUnique(
1586 Uint32 memoryTypeIndex,
1587 const Uint32 *memoryTypeIndexArray,
1588 Uint32 count)
1589{
1590 Uint32 i = 0;
1591
1592 for (i = 0; i < count; i += 1) {
1593 if (memoryTypeIndexArray[i] == memoryTypeIndex) {
1594 return false;
1595 }
1596 }
1597
1598 return true;
1599}
1600
1601/* Returns an array of memory type indices in order of preference.
1602 * Memory types are requested with the following three guidelines:
1603 *
1604 * Required: Absolutely necessary
1605 * Preferred: Nice to have, but not necessary
1606 * Tolerable: Can be allowed if there are no other options
1607 *
1608 * We return memory types in this order:
1609 * 1. Required and preferred. This is the best category.
1610 * 2. Required only.
1611 * 3. Required, preferred, and tolerable.
1612 * 4. Required and tolerable. This is the worst category.
1613 */
1614static Uint32 *VULKAN_INTERNAL_FindBestMemoryTypes(
1615 VulkanRenderer *renderer,
1616 Uint32 typeFilter,
1617 VkMemoryPropertyFlags requiredProperties,
1618 VkMemoryPropertyFlags preferredProperties,
1619 VkMemoryPropertyFlags tolerableProperties,
1620 Uint32 *pCount)
1621{
1622 Uint32 i;
1623 Uint32 index = 0;
1624 Uint32 *result = SDL_malloc(sizeof(Uint32) * renderer->memoryProperties.memoryTypeCount);
1625
1626 // required + preferred + !tolerable
1627 for (i = 0; i < renderer->memoryProperties.memoryTypeCount; i += 1) {
1628 if ((typeFilter & (1 << i)) &&
1629 (renderer->memoryProperties.memoryTypes[i].propertyFlags & requiredProperties) == requiredProperties &&
1630 (renderer->memoryProperties.memoryTypes[i].propertyFlags & preferredProperties) == preferredProperties &&
1631 (renderer->memoryProperties.memoryTypes[i].propertyFlags & tolerableProperties) == 0) {
1632 if (VULKAN_INTERNAL_CheckMemoryTypeArrayUnique(
1633 i,
1634 result,
1635 index)) {
1636 result[index] = i;
1637 index += 1;
1638 }
1639 }
1640 }
1641
1642 // required + !preferred + !tolerable
1643 for (i = 0; i < renderer->memoryProperties.memoryTypeCount; i += 1) {
1644 if ((typeFilter & (1 << i)) &&
1645 (renderer->memoryProperties.memoryTypes[i].propertyFlags & requiredProperties) == requiredProperties &&
1646 (renderer->memoryProperties.memoryTypes[i].propertyFlags & preferredProperties) == 0 &&
1647 (renderer->memoryProperties.memoryTypes[i].propertyFlags & tolerableProperties) == 0) {
1648 if (VULKAN_INTERNAL_CheckMemoryTypeArrayUnique(
1649 i,
1650 result,
1651 index)) {
1652 result[index] = i;
1653 index += 1;
1654 }
1655 }
1656 }
1657
1658 // required + preferred + tolerable
1659 for (i = 0; i < renderer->memoryProperties.memoryTypeCount; i += 1) {
1660 if ((typeFilter & (1 << i)) &&
1661 (renderer->memoryProperties.memoryTypes[i].propertyFlags & requiredProperties) == requiredProperties &&
1662 (renderer->memoryProperties.memoryTypes[i].propertyFlags & preferredProperties) == preferredProperties &&
1663 (renderer->memoryProperties.memoryTypes[i].propertyFlags & tolerableProperties) == tolerableProperties) {
1664 if (VULKAN_INTERNAL_CheckMemoryTypeArrayUnique(
1665 i,
1666 result,
1667 index)) {
1668 result[index] = i;
1669 index += 1;
1670 }
1671 }
1672 }
1673
1674 // required + !preferred + tolerable
1675 for (i = 0; i < renderer->memoryProperties.memoryTypeCount; i += 1) {
1676 if ((typeFilter & (1 << i)) &&
1677 (renderer->memoryProperties.memoryTypes[i].propertyFlags & requiredProperties) == requiredProperties &&
1678 (renderer->memoryProperties.memoryTypes[i].propertyFlags & preferredProperties) == 0 &&
1679 (renderer->memoryProperties.memoryTypes[i].propertyFlags & tolerableProperties) == tolerableProperties) {
1680 if (VULKAN_INTERNAL_CheckMemoryTypeArrayUnique(
1681 i,
1682 result,
1683 index)) {
1684 result[index] = i;
1685 index += 1;
1686 }
1687 }
1688 }
1689
1690 *pCount = index;
1691 return result;
1692}
1693
1694static Uint32 *VULKAN_INTERNAL_FindBestBufferMemoryTypes(
1695 VulkanRenderer *renderer,
1696 VkBuffer buffer,
1697 VkMemoryPropertyFlags requiredMemoryProperties,
1698 VkMemoryPropertyFlags preferredMemoryProperties,
1699 VkMemoryPropertyFlags tolerableMemoryProperties,
1700 VkMemoryRequirements *pMemoryRequirements,
1701 Uint32 *pCount)
1702{
1703 renderer->vkGetBufferMemoryRequirements(
1704 renderer->logicalDevice,
1705 buffer,
1706 pMemoryRequirements);
1707
1708 return VULKAN_INTERNAL_FindBestMemoryTypes(
1709 renderer,
1710 pMemoryRequirements->memoryTypeBits,
1711 requiredMemoryProperties,
1712 preferredMemoryProperties,
1713 tolerableMemoryProperties,
1714 pCount);
1715}
1716
1717static Uint32 *VULKAN_INTERNAL_FindBestImageMemoryTypes(
1718 VulkanRenderer *renderer,
1719 VkImage image,
1720 VkMemoryPropertyFlags preferredMemoryPropertyFlags,
1721 VkMemoryRequirements *pMemoryRequirements,
1722 Uint32 *pCount)
1723{
1724 renderer->vkGetImageMemoryRequirements(
1725 renderer->logicalDevice,
1726 image,
1727 pMemoryRequirements);
1728
1729 return VULKAN_INTERNAL_FindBestMemoryTypes(
1730 renderer,
1731 pMemoryRequirements->memoryTypeBits,
1732 0,
1733 preferredMemoryPropertyFlags,
1734 0,
1735 pCount);
1736}
1737
1738static void VULKAN_INTERNAL_DeallocateMemory(
1739 VulkanRenderer *renderer,
1740 VulkanMemorySubAllocator *allocator,
1741 Uint32 allocationIndex)
1742{
1743 Uint32 i;
1744
1745 VulkanMemoryAllocation *allocation = allocator->allocations[allocationIndex];
1746
1747 SDL_LockMutex(renderer->allocatorLock);
1748
1749 // If this allocation was marked for defrag, cancel that
1750 for (i = 0; i < renderer->allocationsToDefragCount; i += 1) {
1751 if (allocation == renderer->allocationsToDefrag[i]) {
1752 renderer->allocationsToDefrag[i] = renderer->allocationsToDefrag[renderer->allocationsToDefragCount - 1];
1753 renderer->allocationsToDefragCount -= 1;
1754
1755 break;
1756 }
1757 }
1758
1759 for (i = 0; i < allocation->freeRegionCount; i += 1) {
1760 VULKAN_INTERNAL_RemoveMemoryFreeRegion(
1761 renderer,
1762 allocation->freeRegions[i]);
1763 }
1764 SDL_free(allocation->freeRegions);
1765
1766 /* no need to iterate used regions because deallocate
1767 * only happens when there are 0 used regions
1768 */
1769 SDL_free(allocation->usedRegions);
1770
1771 renderer->vkFreeMemory(
1772 renderer->logicalDevice,
1773 allocation->memory,
1774 NULL);
1775
1776 SDL_DestroyMutex(allocation->memoryLock);
1777 SDL_free(allocation);
1778
1779 if (allocationIndex != allocator->allocationCount - 1) {
1780 allocator->allocations[allocationIndex] = allocator->allocations[allocator->allocationCount - 1];
1781 }
1782
1783 allocator->allocationCount -= 1;
1784
1785 SDL_UnlockMutex(renderer->allocatorLock);
1786}
1787
1788static Uint8 VULKAN_INTERNAL_AllocateMemory(
1789 VulkanRenderer *renderer,
1790 VkBuffer buffer,
1791 VkImage image,
1792 Uint32 memoryTypeIndex,
1793 VkDeviceSize allocationSize,
1794 Uint8 isHostVisible,
1795 VulkanMemoryAllocation **pMemoryAllocation)
1796{
1797 VulkanMemoryAllocation *allocation;
1798 VulkanMemorySubAllocator *allocator = &renderer->memoryAllocator->subAllocators[memoryTypeIndex];
1799 VkMemoryAllocateInfo allocInfo;
1800 VkResult result;
1801
1802 allocInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
1803 allocInfo.pNext = NULL;
1804 allocInfo.memoryTypeIndex = memoryTypeIndex;
1805 allocInfo.allocationSize = allocationSize;
1806
1807 allocation = SDL_malloc(sizeof(VulkanMemoryAllocation));
1808 allocation->size = allocationSize;
1809 allocation->freeSpace = 0; // added by FreeRegions
1810 allocation->usedSpace = 0; // added by UsedRegions
1811 allocation->memoryLock = SDL_CreateMutex();
1812
1813 allocator->allocationCount += 1;
1814 allocator->allocations = SDL_realloc(
1815 allocator->allocations,
1816 sizeof(VulkanMemoryAllocation *) * allocator->allocationCount);
1817
1818 allocator->allocations[allocator->allocationCount - 1] = allocation;
1819
1820 allocInfo.pNext = NULL;
1821 allocation->availableForAllocation = 1;
1822
1823 allocation->usedRegions = SDL_malloc(sizeof(VulkanMemoryUsedRegion *));
1824 allocation->usedRegionCount = 0;
1825 allocation->usedRegionCapacity = 1;
1826
1827 allocation->freeRegions = SDL_malloc(sizeof(VulkanMemoryFreeRegion *));
1828 allocation->freeRegionCount = 0;
1829 allocation->freeRegionCapacity = 1;
1830
1831 allocation->allocator = allocator;
1832
1833 result = renderer->vkAllocateMemory(
1834 renderer->logicalDevice,
1835 &allocInfo,
1836 NULL,
1837 &allocation->memory);
1838
1839 if (result != VK_SUCCESS) {
1840 // Uh oh, we couldn't allocate, time to clean up
1841 SDL_free(allocation->freeRegions);
1842
1843 allocator->allocationCount -= 1;
1844 allocator->allocations = SDL_realloc(
1845 allocator->allocations,
1846 sizeof(VulkanMemoryAllocation *) * allocator->allocationCount);
1847
1848 SDL_free(allocation);
1849
1850 return 0;
1851 }
1852
1853 // Persistent mapping for host-visible memory
1854 if (isHostVisible) {
1855 result = renderer->vkMapMemory(
1856 renderer->logicalDevice,
1857 allocation->memory,
1858 0,
1859 VK_WHOLE_SIZE,
1860 0,
1861 (void **)&allocation->mapPointer);
1862 CHECK_VULKAN_ERROR_AND_RETURN(result, vkMapMemory, 0);
1863 } else {
1864 allocation->mapPointer = NULL;
1865 }
1866
1867 VULKAN_INTERNAL_NewMemoryFreeRegion(
1868 renderer,
1869 allocation,
1870 0,
1871 allocation->size);
1872
1873 *pMemoryAllocation = allocation;
1874 return 1;
1875}
1876
1877static Uint8 VULKAN_INTERNAL_BindBufferMemory(
1878 VulkanRenderer *renderer,
1879 VulkanMemoryUsedRegion *usedRegion,
1880 VkDeviceSize alignedOffset,
1881 VkBuffer buffer)
1882{
1883 VkResult vulkanResult;
1884
1885 SDL_LockMutex(usedRegion->allocation->memoryLock);
1886
1887 vulkanResult = renderer->vkBindBufferMemory(
1888 renderer->logicalDevice,
1889 buffer,
1890 usedRegion->allocation->memory,
1891 alignedOffset);
1892
1893 SDL_UnlockMutex(usedRegion->allocation->memoryLock);
1894
1895 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkBindBufferMemory, 0);
1896
1897 return 1;
1898}
1899
1900static Uint8 VULKAN_INTERNAL_BindImageMemory(
1901 VulkanRenderer *renderer,
1902 VulkanMemoryUsedRegion *usedRegion,
1903 VkDeviceSize alignedOffset,
1904 VkImage image)
1905{
1906 VkResult vulkanResult;
1907
1908 SDL_LockMutex(usedRegion->allocation->memoryLock);
1909
1910 vulkanResult = renderer->vkBindImageMemory(
1911 renderer->logicalDevice,
1912 image,
1913 usedRegion->allocation->memory,
1914 alignedOffset);
1915
1916 SDL_UnlockMutex(usedRegion->allocation->memoryLock);
1917
1918 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkBindImageMemory, 0);
1919
1920 return 1;
1921}
1922
1923static Uint8 VULKAN_INTERNAL_BindResourceMemory(
1924 VulkanRenderer *renderer,
1925 Uint32 memoryTypeIndex,
1926 VkMemoryRequirements *memoryRequirements,
1927 VkDeviceSize resourceSize, // may be different from requirements size!
1928 bool dedicated, // the entire memory allocation should be used for this resource
1929 VkBuffer buffer, // may be VK_NULL_HANDLE
1930 VkImage image, // may be VK_NULL_HANDLE
1931 VulkanMemoryUsedRegion **pMemoryUsedRegion)
1932{
1933 VulkanMemoryAllocation *allocation;
1934 VulkanMemorySubAllocator *allocator;
1935 VulkanMemoryFreeRegion *region;
1936 VulkanMemoryFreeRegion *selectedRegion;
1937 VulkanMemoryUsedRegion *usedRegion;
1938
1939 VkDeviceSize requiredSize, allocationSize;
1940 VkDeviceSize alignedOffset = 0;
1941 VkDeviceSize newRegionSize, newRegionOffset;
1942 Uint8 isHostVisible, smallAllocation, allocationResult;
1943 Sint32 i;
1944
1945 isHostVisible =
1946 (renderer->memoryProperties.memoryTypes[memoryTypeIndex].propertyFlags &
1947 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0;
1948
1949 allocator = &renderer->memoryAllocator->subAllocators[memoryTypeIndex];
1950 requiredSize = memoryRequirements->size;
1951 smallAllocation = requiredSize <= SMALL_ALLOCATION_THRESHOLD;
1952
1953 if ((buffer == VK_NULL_HANDLE && image == VK_NULL_HANDLE) ||
1954 (buffer != VK_NULL_HANDLE && image != VK_NULL_HANDLE)) {
1955 SDL_LogError(SDL_LOG_CATEGORY_GPU, "BindResourceMemory must be given either a VulkanBuffer or a VulkanTexture");
1956 return 0;
1957 }
1958
1959 SDL_LockMutex(renderer->allocatorLock);
1960
1961 selectedRegion = NULL;
1962
1963 if (dedicated) {
1964 // Force an allocation
1965 allocationSize = requiredSize;
1966 } else {
1967 // Search for a suitable existing free region
1968 for (i = allocator->sortedFreeRegionCount - 1; i >= 0; i -= 1) {
1969 region = allocator->sortedFreeRegions[i];
1970
1971 if (smallAllocation && region->allocation->size != SMALL_ALLOCATION_SIZE) {
1972 // region is not in a small allocation
1973 continue;
1974 }
1975
1976 if (!smallAllocation && region->allocation->size == SMALL_ALLOCATION_SIZE) {
1977 // allocation is not small and current region is in a small allocation
1978 continue;
1979 }
1980
1981 alignedOffset = VULKAN_INTERNAL_NextHighestAlignment(
1982 region->offset,
1983 memoryRequirements->alignment);
1984
1985 if (alignedOffset + requiredSize <= region->offset + region->size) {
1986 selectedRegion = region;
1987 break;
1988 }
1989 }
1990
1991 if (selectedRegion != NULL) {
1992 region = selectedRegion;
1993 allocation = region->allocation;
1994
1995 usedRegion = VULKAN_INTERNAL_NewMemoryUsedRegion(
1996 renderer,
1997 allocation,
1998 region->offset,
1999 requiredSize + (alignedOffset - region->offset),
2000 alignedOffset,
2001 resourceSize,
2002 memoryRequirements->alignment);
2003
2004 usedRegion->isBuffer = buffer != VK_NULL_HANDLE;
2005
2006 newRegionSize = region->size - ((alignedOffset - region->offset) + requiredSize);
2007 newRegionOffset = alignedOffset + requiredSize;
2008
2009 // remove and add modified region to re-sort
2010 VULKAN_INTERNAL_RemoveMemoryFreeRegion(renderer, region);
2011
2012 // if size is 0, no need to re-insert
2013 if (newRegionSize != 0) {
2014 VULKAN_INTERNAL_NewMemoryFreeRegion(
2015 renderer,
2016 allocation,
2017 newRegionOffset,
2018 newRegionSize);
2019 }
2020
2021 SDL_UnlockMutex(renderer->allocatorLock);
2022
2023 if (buffer != VK_NULL_HANDLE) {
2024 if (!VULKAN_INTERNAL_BindBufferMemory(
2025 renderer,
2026 usedRegion,
2027 alignedOffset,
2028 buffer)) {
2029 VULKAN_INTERNAL_RemoveMemoryUsedRegion(
2030 renderer,
2031 usedRegion);
2032
2033 return 0;
2034 }
2035 } else if (image != VK_NULL_HANDLE) {
2036 if (!VULKAN_INTERNAL_BindImageMemory(
2037 renderer,
2038 usedRegion,
2039 alignedOffset,
2040 image)) {
2041 VULKAN_INTERNAL_RemoveMemoryUsedRegion(
2042 renderer,
2043 usedRegion);
2044
2045 return 0;
2046 }
2047 }
2048
2049 *pMemoryUsedRegion = usedRegion;
2050 return 1;
2051 }
2052
2053 // No suitable free regions exist, allocate a new memory region
2054 if (
2055 renderer->allocationsToDefragCount == 0 &&
2056 !renderer->defragInProgress) {
2057 // Mark currently fragmented allocations for defrag
2058 VULKAN_INTERNAL_MarkAllocationsForDefrag(renderer);
2059 }
2060
2061 if (requiredSize > SMALL_ALLOCATION_THRESHOLD) {
2062 // allocate a page of required size aligned to LARGE_ALLOCATION_INCREMENT increments
2063 allocationSize =
2064 VULKAN_INTERNAL_NextHighestAlignment(requiredSize, LARGE_ALLOCATION_INCREMENT);
2065 } else {
2066 allocationSize = SMALL_ALLOCATION_SIZE;
2067 }
2068 }
2069
2070 allocationResult = VULKAN_INTERNAL_AllocateMemory(
2071 renderer,
2072 buffer,
2073 image,
2074 memoryTypeIndex,
2075 allocationSize,
2076 isHostVisible,
2077 &allocation);
2078
2079 // Uh oh, we're out of memory
2080 if (allocationResult == 0) {
2081 SDL_UnlockMutex(renderer->allocatorLock);
2082
2083 // Responsibility of the caller to handle being out of memory
2084 return 2;
2085 }
2086
2087 usedRegion = VULKAN_INTERNAL_NewMemoryUsedRegion(
2088 renderer,
2089 allocation,
2090 0,
2091 requiredSize,
2092 0,
2093 resourceSize,
2094 memoryRequirements->alignment);
2095
2096 usedRegion->isBuffer = buffer != VK_NULL_HANDLE;
2097
2098 region = allocation->freeRegions[0];
2099
2100 newRegionOffset = region->offset + requiredSize;
2101 newRegionSize = region->size - requiredSize;
2102
2103 VULKAN_INTERNAL_RemoveMemoryFreeRegion(renderer, region);
2104
2105 if (newRegionSize != 0) {
2106 VULKAN_INTERNAL_NewMemoryFreeRegion(
2107 renderer,
2108 allocation,
2109 newRegionOffset,
2110 newRegionSize);
2111 }
2112
2113 SDL_UnlockMutex(renderer->allocatorLock);
2114
2115 if (buffer != VK_NULL_HANDLE) {
2116 if (!VULKAN_INTERNAL_BindBufferMemory(
2117 renderer,
2118 usedRegion,
2119 0,
2120 buffer)) {
2121 VULKAN_INTERNAL_RemoveMemoryUsedRegion(
2122 renderer,
2123 usedRegion);
2124
2125 return 0;
2126 }
2127 } else if (image != VK_NULL_HANDLE) {
2128 if (!VULKAN_INTERNAL_BindImageMemory(
2129 renderer,
2130 usedRegion,
2131 0,
2132 image)) {
2133 VULKAN_INTERNAL_RemoveMemoryUsedRegion(
2134 renderer,
2135 usedRegion);
2136
2137 return 0;
2138 }
2139 }
2140
2141 *pMemoryUsedRegion = usedRegion;
2142 return 1;
2143}
2144
2145static Uint8 VULKAN_INTERNAL_BindMemoryForImage(
2146 VulkanRenderer *renderer,
2147 VkImage image,
2148 VulkanMemoryUsedRegion **usedRegion)
2149{
2150 Uint8 bindResult = 0;
2151 Uint32 memoryTypeCount = 0;
2152 Uint32 *memoryTypesToTry = NULL;
2153 Uint32 selectedMemoryTypeIndex = 0;
2154 Uint32 i;
2155 VkMemoryPropertyFlags preferredMemoryPropertyFlags;
2156 VkMemoryRequirements memoryRequirements;
2157
2158 /* Vulkan memory types have several memory properties.
2159 *
2160 * Unlike buffers, images are always optimally stored device-local,
2161 * so that is the only property we prefer here.
2162 *
2163 * If memory is constrained, it is fine for the texture to not
2164 * be device-local.
2165 */
2166 preferredMemoryPropertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
2167
2168 memoryTypesToTry = VULKAN_INTERNAL_FindBestImageMemoryTypes(
2169 renderer,
2170 image,
2171 preferredMemoryPropertyFlags,
2172 &memoryRequirements,
2173 &memoryTypeCount);
2174
2175 for (i = 0; i < memoryTypeCount; i += 1) {
2176 bindResult = VULKAN_INTERNAL_BindResourceMemory(
2177 renderer,
2178 memoryTypesToTry[i],
2179 &memoryRequirements,
2180 memoryRequirements.size,
2181 false,
2182 VK_NULL_HANDLE,
2183 image,
2184 usedRegion);
2185
2186 if (bindResult == 1) {
2187 selectedMemoryTypeIndex = memoryTypesToTry[i];
2188 break;
2189 }
2190 }
2191
2192 SDL_free(memoryTypesToTry);
2193
2194 // Check for warnings on success
2195 if (bindResult == 1) {
2196 if (!renderer->outOfDeviceLocalMemoryWarning) {
2197 if ((renderer->memoryProperties.memoryTypes[selectedMemoryTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) == 0) {
2198 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Out of device-local memory, allocating textures on host-local memory!");
2199 renderer->outOfDeviceLocalMemoryWarning = 1;
2200 }
2201 }
2202 }
2203
2204 return bindResult;
2205}
2206
2207static Uint8 VULKAN_INTERNAL_BindMemoryForBuffer(
2208 VulkanRenderer *renderer,
2209 VkBuffer buffer,
2210 VkDeviceSize size,
2211 VulkanBufferType type,
2212 bool dedicated,
2213 VulkanMemoryUsedRegion **usedRegion)
2214{
2215 Uint8 bindResult = 0;
2216 Uint32 memoryTypeCount = 0;
2217 Uint32 *memoryTypesToTry = NULL;
2218 Uint32 selectedMemoryTypeIndex = 0;
2219 Uint32 i;
2220 VkMemoryPropertyFlags requiredMemoryPropertyFlags = 0;
2221 VkMemoryPropertyFlags preferredMemoryPropertyFlags = 0;
2222 VkMemoryPropertyFlags tolerableMemoryPropertyFlags = 0;
2223 VkMemoryRequirements memoryRequirements;
2224
2225 /* Buffers need to be optimally bound to a memory type
2226 * based on their use case and the architecture of the system.
2227 *
2228 * It is important to understand the distinction between device and host.
2229 *
2230 * On a traditional high-performance desktop computer,
2231 * the "device" would be the GPU, and the "host" would be the CPU.
2232 * Memory being copied between these two must cross the PCI bus.
2233 * On these systems we have to be concerned about bandwidth limitations
2234 * and causing memory stalls, so we have taken a great deal of care
2235 * to structure this API to guide the client towards optimal usage.
2236 *
2237 * Other kinds of devices do not necessarily have this distinction.
2238 * On an iPhone or Nintendo Switch, all memory is accessible both to the
2239 * GPU and the CPU at all times. These kinds of systems are known as
2240 * UMA, or Unified Memory Architecture. A desktop computer using the
2241 * CPU's integrated graphics can also be thought of as UMA.
2242 *
2243 * Vulkan memory types have several memory properties.
2244 * The relevant memory properties are as follows:
2245 *
2246 * DEVICE_LOCAL:
2247 * This memory is on-device and most efficient for device access.
2248 * On UMA systems all memory is device-local.
2249 * If memory is not device-local, then it is host-local.
2250 *
2251 * HOST_VISIBLE:
2252 * This memory can be mapped for host access, meaning we can obtain
2253 * a pointer to directly access the memory.
2254 *
2255 * HOST_COHERENT:
2256 * Host-coherent memory does not require cache management operations
2257 * when mapped, so we always set this alongside HOST_VISIBLE
2258 * to avoid extra record keeping.
2259 *
2260 * HOST_CACHED:
2261 * Host-cached memory is faster to access than uncached memory
2262 * but memory of this type might not always be available.
2263 *
2264 * GPU buffers, like vertex buffers, indirect buffers, etc
2265 * are optimally stored in device-local memory.
2266 * However, if device-local memory is low, these buffers
2267 * can be accessed from host-local memory with a performance penalty.
2268 *
2269 * Uniform buffers must be host-visible and coherent because
2270 * the client uses them to quickly push small amounts of data.
2271 * We prefer uniform buffers to also be device-local because
2272 * they are accessed by shaders, but the amount of memory
2273 * that is both device-local and host-visible
2274 * is often constrained, particularly on low-end devices.
2275 *
2276 * Transfer buffers must be host-visible and coherent because
2277 * the client uses them to stage data to be transferred
2278 * to device-local memory, or to read back data transferred
2279 * from the device. We prefer the cache bit for performance
2280 * but it isn't strictly necessary. We tolerate device-local
2281 * memory in this situation because, as mentioned above,
2282 * on certain devices all memory is device-local, and even
2283 * though the transfer isn't strictly necessary it is still
2284 * useful for correctly timelining data.
2285 */
2286 if (type == VULKAN_BUFFER_TYPE_GPU) {
2287 preferredMemoryPropertyFlags |=
2288 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
2289 } else if (type == VULKAN_BUFFER_TYPE_UNIFORM) {
2290 requiredMemoryPropertyFlags |=
2291 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
2292 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
2293
2294 preferredMemoryPropertyFlags |=
2295 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
2296 } else if (type == VULKAN_BUFFER_TYPE_TRANSFER) {
2297 requiredMemoryPropertyFlags |=
2298 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
2299 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
2300
2301 preferredMemoryPropertyFlags |=
2302 VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
2303
2304 tolerableMemoryPropertyFlags |=
2305 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
2306 } else {
2307 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized buffer type!");
2308 return 0;
2309 }
2310
2311 memoryTypesToTry = VULKAN_INTERNAL_FindBestBufferMemoryTypes(
2312 renderer,
2313 buffer,
2314 requiredMemoryPropertyFlags,
2315 preferredMemoryPropertyFlags,
2316 tolerableMemoryPropertyFlags,
2317 &memoryRequirements,
2318 &memoryTypeCount);
2319
2320 for (i = 0; i < memoryTypeCount; i += 1) {
2321 bindResult = VULKAN_INTERNAL_BindResourceMemory(
2322 renderer,
2323 memoryTypesToTry[i],
2324 &memoryRequirements,
2325 size,
2326 dedicated,
2327 buffer,
2328 VK_NULL_HANDLE,
2329 usedRegion);
2330
2331 if (bindResult == 1) {
2332 selectedMemoryTypeIndex = memoryTypesToTry[i];
2333 break;
2334 }
2335 }
2336
2337 SDL_free(memoryTypesToTry);
2338
2339 // Check for warnings on success
2340 if (bindResult == 1) {
2341 if (type == VULKAN_BUFFER_TYPE_GPU) {
2342 if (!renderer->outOfDeviceLocalMemoryWarning) {
2343 if ((renderer->memoryProperties.memoryTypes[selectedMemoryTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) == 0) {
2344 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Out of device-local memory, allocating buffers on host-local memory, expect degraded performance!");
2345 renderer->outOfDeviceLocalMemoryWarning = 1;
2346 }
2347 }
2348 } else if (type == VULKAN_BUFFER_TYPE_UNIFORM) {
2349 if (!renderer->outofBARMemoryWarning) {
2350 if ((renderer->memoryProperties.memoryTypes[selectedMemoryTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) == 0) {
2351 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Out of BAR memory, allocating uniform buffers on host-local memory, expect degraded performance!");
2352 renderer->outofBARMemoryWarning = 1;
2353 }
2354 }
2355 } else if (type == VULKAN_BUFFER_TYPE_TRANSFER) {
2356 if (!renderer->integratedMemoryNotification) {
2357 if ((renderer->memoryProperties.memoryTypes[selectedMemoryTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) == VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) {
2358 SDL_LogInfo(SDL_LOG_CATEGORY_GPU, "Integrated memory detected, allocating TransferBuffers on device-local memory!");
2359 renderer->integratedMemoryNotification = 1;
2360 }
2361 }
2362 }
2363 }
2364
2365 return bindResult;
2366}
2367
2368// Resource tracking
2369
2370#define ADD_TO_ARRAY_UNIQUE(resource, type, array, count, capacity) \
2371 Uint32 i; \
2372 \
2373 for (i = 0; i < commandBuffer->count; i += 1) { \
2374 if (commandBuffer->array[i] == resource) { \
2375 return; \
2376 } \
2377 } \
2378 \
2379 if (commandBuffer->count == commandBuffer->capacity) { \
2380 commandBuffer->capacity += 1; \
2381 commandBuffer->array = SDL_realloc( \
2382 commandBuffer->array, \
2383 commandBuffer->capacity * sizeof(type)); \
2384 } \
2385 commandBuffer->array[commandBuffer->count] = resource; \
2386 commandBuffer->count += 1;
2387
2388#define TRACK_RESOURCE(resource, type, array, count, capacity) \
2389 for (Sint32 i = commandBuffer->count - 1; i >= 0; i -= 1) { \
2390 if (commandBuffer->array[i] == resource) { \
2391 return; \
2392 } \
2393 } \
2394 \
2395 if (commandBuffer->count == commandBuffer->capacity) { \
2396 commandBuffer->capacity += 1; \
2397 commandBuffer->array = SDL_realloc( \
2398 commandBuffer->array, \
2399 commandBuffer->capacity * sizeof(type)); \
2400 } \
2401 commandBuffer->array[commandBuffer->count] = resource; \
2402 commandBuffer->count += 1; \
2403 SDL_AtomicIncRef(&resource->referenceCount);
2404
2405static void VULKAN_INTERNAL_TrackBuffer(
2406 VulkanCommandBuffer *commandBuffer,
2407 VulkanBuffer *buffer)
2408{
2409 TRACK_RESOURCE(
2410 buffer,
2411 VulkanBuffer *,
2412 usedBuffers,
2413 usedBufferCount,
2414 usedBufferCapacity)
2415}
2416
2417static void VULKAN_INTERNAL_TrackTexture(
2418 VulkanCommandBuffer *commandBuffer,
2419 VulkanTexture *texture)
2420{
2421 TRACK_RESOURCE(
2422 texture,
2423 VulkanTexture *,
2424 usedTextures,
2425 usedTextureCount,
2426 usedTextureCapacity)
2427}
2428
2429static void VULKAN_INTERNAL_TrackSampler(
2430 VulkanCommandBuffer *commandBuffer,
2431 VulkanSampler *sampler)
2432{
2433 TRACK_RESOURCE(
2434 sampler,
2435 VulkanSampler *,
2436 usedSamplers,
2437 usedSamplerCount,
2438 usedSamplerCapacity)
2439}
2440
2441static void VULKAN_INTERNAL_TrackGraphicsPipeline(
2442 VulkanCommandBuffer *commandBuffer,
2443 VulkanGraphicsPipeline *graphicsPipeline)
2444{
2445 TRACK_RESOURCE(
2446 graphicsPipeline,
2447 VulkanGraphicsPipeline *,
2448 usedGraphicsPipelines,
2449 usedGraphicsPipelineCount,
2450 usedGraphicsPipelineCapacity)
2451}
2452
2453static void VULKAN_INTERNAL_TrackComputePipeline(
2454 VulkanCommandBuffer *commandBuffer,
2455 VulkanComputePipeline *computePipeline)
2456{
2457 TRACK_RESOURCE(
2458 computePipeline,
2459 VulkanComputePipeline *,
2460 usedComputePipelines,
2461 usedComputePipelineCount,
2462 usedComputePipelineCapacity)
2463}
2464
2465static void VULKAN_INTERNAL_TrackFramebuffer(
2466 VulkanRenderer *renderer,
2467 VulkanCommandBuffer *commandBuffer,
2468 VulkanFramebuffer *framebuffer)
2469{
2470 TRACK_RESOURCE(
2471 framebuffer,
2472 VulkanFramebuffer *,
2473 usedFramebuffers,
2474 usedFramebufferCount,
2475 usedFramebufferCapacity);
2476}
2477
2478static void VULKAN_INTERNAL_TrackUniformBuffer(
2479 VulkanCommandBuffer *commandBuffer,
2480 VulkanUniformBuffer *uniformBuffer)
2481{
2482 for (Sint32 i = commandBuffer->usedUniformBufferCount - 1; i >= 0; i -= 1) {
2483 if (commandBuffer->usedUniformBuffers[i] == uniformBuffer) {
2484 return;
2485 }
2486 }
2487
2488 if (commandBuffer->usedUniformBufferCount == commandBuffer->usedUniformBufferCapacity) {
2489 commandBuffer->usedUniformBufferCapacity += 1;
2490 commandBuffer->usedUniformBuffers = SDL_realloc(
2491 commandBuffer->usedUniformBuffers,
2492 commandBuffer->usedUniformBufferCapacity * sizeof(VulkanUniformBuffer *));
2493 }
2494 commandBuffer->usedUniformBuffers[commandBuffer->usedUniformBufferCount] = uniformBuffer;
2495 commandBuffer->usedUniformBufferCount += 1;
2496
2497 VULKAN_INTERNAL_TrackBuffer(
2498 commandBuffer,
2499 uniformBuffer->buffer);
2500}
2501
2502#undef TRACK_RESOURCE
2503
2504// Memory Barriers
2505
2506/*
2507 * In Vulkan, we must manually synchronize operations that write to resources on the GPU
2508 * so that read-after-write, write-after-read, and write-after-write hazards do not occur.
2509 * Additionally, textures are required to be in specific layouts for specific use cases.
2510 * Both of these tasks are accomplished with vkCmdPipelineBarrier.
2511 *
2512 * To insert the correct barriers, we keep track of "usage modes" for buffers and textures.
2513 * These indicate the current usage of that resource on the command buffer.
2514 * The transition from one usage mode to another indicates how the barrier should be constructed.
2515 *
2516 * Pipeline barriers cannot be inserted during a render pass, but they can be inserted
2517 * during a compute or copy pass.
2518 *
2519 * This means that the "default" usage mode of any given resource should be that it should be
2520 * ready for a graphics-read operation, because we cannot barrier during a render pass.
2521 * In the case where a resource is only used in compute, its default usage mode can be compute-read.
2522 * This strategy allows us to avoid expensive record keeping of command buffer/resource usage mode pairs,
2523 * and it fully covers synchronization between all combinations of stages.
2524 *
2525 * In Upload and Copy functions, we transition the resource immediately before and after the copy command.
2526 *
2527 * When binding a resource for compute, we transition when the Bind functions are called.
2528 * If a bind slot containing a resource is overwritten, we transition the resource in that slot back to its default.
2529 * When EndComputePass is called we transition all bound resources back to their default state.
2530 *
2531 * When binding a texture as a render pass attachment, we transition the resource on BeginRenderPass
2532 * and transition it back to its default on EndRenderPass.
2533 *
2534 * This strategy imposes certain limitations on resource usage flags.
2535 * For example, a texture cannot have both the SAMPLER and GRAPHICS_STORAGE usage flags,
2536 * because then it is impossible for the backend to infer which default usage mode the texture should use.
2537 *
2538 * Sync hazards can be detected by setting VK_KHRONOS_VALIDATION_VALIDATE_SYNC=1 when using validation layers.
2539 */
2540
2541static void VULKAN_INTERNAL_BufferMemoryBarrier(
2542 VulkanRenderer *renderer,
2543 VulkanCommandBuffer *commandBuffer,
2544 VulkanBufferUsageMode sourceUsageMode,
2545 VulkanBufferUsageMode destinationUsageMode,
2546 VulkanBuffer *buffer)
2547{
2548 VkPipelineStageFlags srcStages = 0;
2549 VkPipelineStageFlags dstStages = 0;
2550 VkBufferMemoryBarrier memoryBarrier;
2551
2552 memoryBarrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER;
2553 memoryBarrier.pNext = NULL;
2554 memoryBarrier.srcAccessMask = 0;
2555 memoryBarrier.dstAccessMask = 0;
2556 memoryBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
2557 memoryBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
2558 memoryBarrier.buffer = buffer->buffer;
2559 memoryBarrier.offset = 0;
2560 memoryBarrier.size = buffer->size;
2561
2562 if (sourceUsageMode == VULKAN_BUFFER_USAGE_MODE_COPY_SOURCE) {
2563 srcStages = VK_PIPELINE_STAGE_TRANSFER_BIT;
2564 memoryBarrier.srcAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
2565 } else if (sourceUsageMode == VULKAN_BUFFER_USAGE_MODE_COPY_DESTINATION) {
2566 srcStages = VK_PIPELINE_STAGE_TRANSFER_BIT;
2567 memoryBarrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
2568 } else if (sourceUsageMode == VULKAN_BUFFER_USAGE_MODE_VERTEX_READ) {
2569 srcStages = VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
2570 memoryBarrier.srcAccessMask = VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT;
2571 } else if (sourceUsageMode == VULKAN_BUFFER_USAGE_MODE_INDEX_READ) {
2572 srcStages = VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
2573 memoryBarrier.srcAccessMask = VK_ACCESS_INDEX_READ_BIT;
2574 } else if (sourceUsageMode == VULKAN_BUFFER_USAGE_MODE_INDIRECT) {
2575 srcStages = VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT;
2576 memoryBarrier.srcAccessMask = VK_ACCESS_INDIRECT_COMMAND_READ_BIT;
2577 } else if (sourceUsageMode == VULKAN_BUFFER_USAGE_MODE_GRAPHICS_STORAGE_READ) {
2578 srcStages = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
2579 memoryBarrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT;
2580 } else if (sourceUsageMode == VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ) {
2581 srcStages = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
2582 memoryBarrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT;
2583 } else if (sourceUsageMode == VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE) {
2584 srcStages = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
2585 memoryBarrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
2586 } else {
2587 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized buffer source barrier type!");
2588 return;
2589 }
2590
2591 if (destinationUsageMode == VULKAN_BUFFER_USAGE_MODE_COPY_SOURCE) {
2592 dstStages = VK_PIPELINE_STAGE_TRANSFER_BIT;
2593 memoryBarrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
2594 } else if (destinationUsageMode == VULKAN_BUFFER_USAGE_MODE_COPY_DESTINATION) {
2595 dstStages = VK_PIPELINE_STAGE_TRANSFER_BIT;
2596 memoryBarrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
2597 } else if (destinationUsageMode == VULKAN_BUFFER_USAGE_MODE_VERTEX_READ) {
2598 dstStages = VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
2599 memoryBarrier.dstAccessMask = VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT;
2600 } else if (destinationUsageMode == VULKAN_BUFFER_USAGE_MODE_INDEX_READ) {
2601 dstStages = VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
2602 memoryBarrier.dstAccessMask = VK_ACCESS_INDEX_READ_BIT;
2603 } else if (destinationUsageMode == VULKAN_BUFFER_USAGE_MODE_INDIRECT) {
2604 dstStages = VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT;
2605 memoryBarrier.dstAccessMask = VK_ACCESS_INDIRECT_COMMAND_READ_BIT;
2606 } else if (destinationUsageMode == VULKAN_BUFFER_USAGE_MODE_GRAPHICS_STORAGE_READ) {
2607 dstStages = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
2608 memoryBarrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
2609 } else if (destinationUsageMode == VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ) {
2610 dstStages = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
2611 memoryBarrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
2612 } else if (destinationUsageMode == VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE) {
2613 dstStages = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
2614 memoryBarrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
2615 } else {
2616 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized buffer destination barrier type!");
2617 return;
2618 }
2619
2620 renderer->vkCmdPipelineBarrier(
2621 commandBuffer->commandBuffer,
2622 srcStages,
2623 dstStages,
2624 0,
2625 0,
2626 NULL,
2627 1,
2628 &memoryBarrier,
2629 0,
2630 NULL);
2631
2632 buffer->transitioned = true;
2633}
2634
2635static void VULKAN_INTERNAL_TextureSubresourceMemoryBarrier(
2636 VulkanRenderer *renderer,
2637 VulkanCommandBuffer *commandBuffer,
2638 VulkanTextureUsageMode sourceUsageMode,
2639 VulkanTextureUsageMode destinationUsageMode,
2640 VulkanTextureSubresource *textureSubresource)
2641{
2642 VkPipelineStageFlags srcStages = 0;
2643 VkPipelineStageFlags dstStages = 0;
2644 VkImageMemoryBarrier memoryBarrier;
2645
2646 memoryBarrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
2647 memoryBarrier.pNext = NULL;
2648 memoryBarrier.srcAccessMask = 0;
2649 memoryBarrier.dstAccessMask = 0;
2650 memoryBarrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
2651 memoryBarrier.newLayout = VK_IMAGE_LAYOUT_UNDEFINED;
2652 memoryBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
2653 memoryBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
2654 memoryBarrier.image = textureSubresource->parent->image;
2655 memoryBarrier.subresourceRange.aspectMask = textureSubresource->parent->aspectFlags;
2656 memoryBarrier.subresourceRange.baseArrayLayer = textureSubresource->layer;
2657 memoryBarrier.subresourceRange.layerCount = 1;
2658 memoryBarrier.subresourceRange.baseMipLevel = textureSubresource->level;
2659 memoryBarrier.subresourceRange.levelCount = 1;
2660
2661 if (sourceUsageMode == VULKAN_TEXTURE_USAGE_MODE_UNINITIALIZED) {
2662 srcStages = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
2663 memoryBarrier.srcAccessMask = 0;
2664 memoryBarrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
2665 } else if (sourceUsageMode == VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE) {
2666 srcStages = VK_PIPELINE_STAGE_TRANSFER_BIT;
2667 memoryBarrier.srcAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
2668 memoryBarrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
2669 } else if (sourceUsageMode == VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION) {
2670 srcStages = VK_PIPELINE_STAGE_TRANSFER_BIT;
2671 memoryBarrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
2672 memoryBarrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
2673 } else if (sourceUsageMode == VULKAN_TEXTURE_USAGE_MODE_SAMPLER) {
2674 srcStages = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
2675 memoryBarrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT;
2676 memoryBarrier.oldLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
2677 } else if (sourceUsageMode == VULKAN_TEXTURE_USAGE_MODE_GRAPHICS_STORAGE_READ) {
2678 srcStages = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
2679 memoryBarrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT;
2680 memoryBarrier.oldLayout = VK_IMAGE_LAYOUT_GENERAL;
2681 } else if (sourceUsageMode == VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ) {
2682 srcStages = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
2683 memoryBarrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT;
2684 memoryBarrier.oldLayout = VK_IMAGE_LAYOUT_GENERAL;
2685 } else if (sourceUsageMode == VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE) {
2686 srcStages = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
2687 memoryBarrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
2688 memoryBarrier.oldLayout = VK_IMAGE_LAYOUT_GENERAL;
2689 } else if (sourceUsageMode == VULKAN_TEXTURE_USAGE_MODE_COLOR_ATTACHMENT) {
2690 srcStages = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
2691 memoryBarrier.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
2692 memoryBarrier.oldLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
2693 } else if (sourceUsageMode == VULKAN_TEXTURE_USAGE_MODE_DEPTH_STENCIL_ATTACHMENT) {
2694 srcStages = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
2695 memoryBarrier.srcAccessMask = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
2696 memoryBarrier.oldLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
2697 } else {
2698 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized texture source barrier type!");
2699 return;
2700 }
2701
2702 if (destinationUsageMode == VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE) {
2703 dstStages = VK_PIPELINE_STAGE_TRANSFER_BIT;
2704 memoryBarrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
2705 memoryBarrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
2706 } else if (destinationUsageMode == VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION) {
2707 dstStages = VK_PIPELINE_STAGE_TRANSFER_BIT;
2708 memoryBarrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
2709 memoryBarrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
2710 } else if (destinationUsageMode == VULKAN_TEXTURE_USAGE_MODE_SAMPLER) {
2711 dstStages = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
2712 memoryBarrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
2713 memoryBarrier.newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
2714 } else if (destinationUsageMode == VULKAN_TEXTURE_USAGE_MODE_GRAPHICS_STORAGE_READ) {
2715 dstStages = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
2716 memoryBarrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
2717 memoryBarrier.newLayout = VK_IMAGE_LAYOUT_GENERAL;
2718 } else if (destinationUsageMode == VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ) {
2719 dstStages = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
2720 memoryBarrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
2721 memoryBarrier.newLayout = VK_IMAGE_LAYOUT_GENERAL;
2722 } else if (destinationUsageMode == VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE) {
2723 dstStages = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
2724 memoryBarrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
2725 memoryBarrier.newLayout = VK_IMAGE_LAYOUT_GENERAL;
2726 } else if (destinationUsageMode == VULKAN_TEXTURE_USAGE_MODE_COLOR_ATTACHMENT) {
2727 dstStages = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
2728 memoryBarrier.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
2729 memoryBarrier.newLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
2730 } else if (destinationUsageMode == VULKAN_TEXTURE_USAGE_MODE_DEPTH_STENCIL_ATTACHMENT) {
2731 dstStages = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
2732 memoryBarrier.dstAccessMask = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
2733 memoryBarrier.newLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
2734 } else if (destinationUsageMode == VULKAN_TEXTURE_USAGE_MODE_PRESENT) {
2735 dstStages = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
2736 memoryBarrier.dstAccessMask = 0;
2737 memoryBarrier.newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
2738 } else {
2739 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized texture destination barrier type!");
2740 return;
2741 }
2742
2743 renderer->vkCmdPipelineBarrier(
2744 commandBuffer->commandBuffer,
2745 srcStages,
2746 dstStages,
2747 0,
2748 0,
2749 NULL,
2750 0,
2751 NULL,
2752 1,
2753 &memoryBarrier);
2754}
2755
2756static VulkanBufferUsageMode VULKAN_INTERNAL_DefaultBufferUsageMode(
2757 VulkanBuffer *buffer)
2758{
2759 // NOTE: order matters here!
2760
2761 if (buffer->usage & SDL_GPU_BUFFERUSAGE_VERTEX) {
2762 return VULKAN_BUFFER_USAGE_MODE_VERTEX_READ;
2763 } else if (buffer->usage & SDL_GPU_BUFFERUSAGE_INDEX) {
2764 return VULKAN_BUFFER_USAGE_MODE_INDEX_READ;
2765 } else if (buffer->usage & SDL_GPU_BUFFERUSAGE_INDIRECT) {
2766 return VULKAN_BUFFER_USAGE_MODE_INDIRECT;
2767 } else if (buffer->usage & SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ) {
2768 return VULKAN_BUFFER_USAGE_MODE_GRAPHICS_STORAGE_READ;
2769 } else if (buffer->usage & SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ) {
2770 return VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ;
2771 } else if (buffer->usage & SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE) {
2772 return VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE;
2773 } else {
2774 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Buffer has no default usage mode!");
2775 return VULKAN_BUFFER_USAGE_MODE_VERTEX_READ;
2776 }
2777}
2778
2779static VulkanTextureUsageMode VULKAN_INTERNAL_DefaultTextureUsageMode(
2780 VulkanTexture *texture)
2781{
2782 // NOTE: order matters here!
2783 // NOTE: graphics storage bits and sampler bit are mutually exclusive!
2784
2785 if (texture->usage & SDL_GPU_TEXTUREUSAGE_SAMPLER) {
2786 return VULKAN_TEXTURE_USAGE_MODE_SAMPLER;
2787 } else if (texture->usage & SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ) {
2788 return VULKAN_TEXTURE_USAGE_MODE_GRAPHICS_STORAGE_READ;
2789 } else if (texture->usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET) {
2790 return VULKAN_TEXTURE_USAGE_MODE_COLOR_ATTACHMENT;
2791 } else if (texture->usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET) {
2792 return VULKAN_TEXTURE_USAGE_MODE_DEPTH_STENCIL_ATTACHMENT;
2793 } else if (texture->usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ) {
2794 return VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ;
2795 } else if (texture->usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE) {
2796 return VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE;
2797 } else if (texture->usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE) {
2798 return VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE;
2799 } else {
2800 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Texture has no default usage mode!");
2801 return VULKAN_TEXTURE_USAGE_MODE_SAMPLER;
2802 }
2803}
2804
2805static void VULKAN_INTERNAL_BufferTransitionFromDefaultUsage(
2806 VulkanRenderer *renderer,
2807 VulkanCommandBuffer *commandBuffer,
2808 VulkanBufferUsageMode destinationUsageMode,
2809 VulkanBuffer *buffer)
2810{
2811 VULKAN_INTERNAL_BufferMemoryBarrier(
2812 renderer,
2813 commandBuffer,
2814 VULKAN_INTERNAL_DefaultBufferUsageMode(buffer),
2815 destinationUsageMode,
2816 buffer);
2817}
2818
2819static void VULKAN_INTERNAL_BufferTransitionToDefaultUsage(
2820 VulkanRenderer *renderer,
2821 VulkanCommandBuffer *commandBuffer,
2822 VulkanBufferUsageMode sourceUsageMode,
2823 VulkanBuffer *buffer)
2824{
2825 VULKAN_INTERNAL_BufferMemoryBarrier(
2826 renderer,
2827 commandBuffer,
2828 sourceUsageMode,
2829 VULKAN_INTERNAL_DefaultBufferUsageMode(buffer),
2830 buffer);
2831}
2832
2833static void VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
2834 VulkanRenderer *renderer,
2835 VulkanCommandBuffer *commandBuffer,
2836 VulkanTextureUsageMode destinationUsageMode,
2837 VulkanTextureSubresource *textureSubresource)
2838{
2839 VULKAN_INTERNAL_TextureSubresourceMemoryBarrier(
2840 renderer,
2841 commandBuffer,
2842 VULKAN_INTERNAL_DefaultTextureUsageMode(textureSubresource->parent),
2843 destinationUsageMode,
2844 textureSubresource);
2845}
2846
2847static void VULKAN_INTERNAL_TextureTransitionFromDefaultUsage(
2848 VulkanRenderer *renderer,
2849 VulkanCommandBuffer *commandBuffer,
2850 VulkanTextureUsageMode destinationUsageMode,
2851 VulkanTexture *texture)
2852{
2853 for (Uint32 i = 0; i < texture->subresourceCount; i += 1) {
2854 VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
2855 renderer,
2856 commandBuffer,
2857 destinationUsageMode,
2858 &texture->subresources[i]);
2859 }
2860}
2861
2862static void VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
2863 VulkanRenderer *renderer,
2864 VulkanCommandBuffer *commandBuffer,
2865 VulkanTextureUsageMode sourceUsageMode,
2866 VulkanTextureSubresource *textureSubresource)
2867{
2868 VULKAN_INTERNAL_TextureSubresourceMemoryBarrier(
2869 renderer,
2870 commandBuffer,
2871 sourceUsageMode,
2872 VULKAN_INTERNAL_DefaultTextureUsageMode(textureSubresource->parent),
2873 textureSubresource);
2874}
2875
2876static void VULKAN_INTERNAL_TextureTransitionToDefaultUsage(
2877 VulkanRenderer *renderer,
2878 VulkanCommandBuffer *commandBuffer,
2879 VulkanTextureUsageMode sourceUsageMode,
2880 VulkanTexture *texture)
2881{
2882 // FIXME: could optimize this barrier
2883 for (Uint32 i = 0; i < texture->subresourceCount; i += 1) {
2884 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
2885 renderer,
2886 commandBuffer,
2887 sourceUsageMode,
2888 &texture->subresources[i]);
2889 }
2890}
2891
2892// Resource Disposal
2893
2894static void VULKAN_INTERNAL_ReleaseFramebuffer(
2895 VulkanRenderer *renderer,
2896 VulkanFramebuffer *framebuffer)
2897{
2898 SDL_LockMutex(renderer->disposeLock);
2899
2900 EXPAND_ARRAY_IF_NEEDED(
2901 renderer->framebuffersToDestroy,
2902 VulkanFramebuffer *,
2903 renderer->framebuffersToDestroyCount + 1,
2904 renderer->framebuffersToDestroyCapacity,
2905 renderer->framebuffersToDestroyCapacity * 2);
2906
2907 renderer->framebuffersToDestroy[renderer->framebuffersToDestroyCount] = framebuffer;
2908 renderer->framebuffersToDestroyCount += 1;
2909
2910 SDL_UnlockMutex(renderer->disposeLock);
2911}
2912
2913static void VULKAN_INTERNAL_DestroyFramebuffer(
2914 VulkanRenderer *renderer,
2915 VulkanFramebuffer *framebuffer)
2916{
2917 renderer->vkDestroyFramebuffer(
2918 renderer->logicalDevice,
2919 framebuffer->framebuffer,
2920 NULL);
2921
2922 SDL_free(framebuffer);
2923}
2924
2925typedef struct CheckOneFramebufferForRemovalData
2926{
2927 Uint32 keysToRemoveCapacity;
2928 Uint32 keysToRemoveCount;
2929 FramebufferHashTableKey **keysToRemove;
2930 VkImageView view;
2931} CheckOneFramebufferForRemovalData;
2932
2933static bool SDLCALL CheckOneFramebufferForRemoval(void *userdata, const SDL_HashTable *table, const void *vkey, const void *vvalue)
2934{
2935 CheckOneFramebufferForRemovalData *data = (CheckOneFramebufferForRemovalData *) userdata;
2936 FramebufferHashTableKey *key = (FramebufferHashTableKey *) vkey;
2937 VkImageView view = data->view;
2938 bool remove = false;
2939
2940 for (Uint32 i = 0; i < key->numColorTargets; i += 1) {
2941 if (key->colorAttachmentViews[i] == view) {
2942 remove = true;
2943 }
2944 }
2945 for (Uint32 i = 0; i < key->numResolveAttachments; i += 1) {
2946 if (key->resolveAttachmentViews[i] == view) {
2947 remove = true;
2948 }
2949 }
2950 if (key->depthStencilAttachmentView == view) {
2951 remove = true;
2952 }
2953
2954 if (remove) {
2955 if (data->keysToRemoveCount == data->keysToRemoveCapacity) {
2956 data->keysToRemoveCapacity *= 2;
2957 void *ptr = SDL_realloc(data->keysToRemove, data->keysToRemoveCapacity * sizeof(FramebufferHashTableKey *));
2958 if (!ptr) {
2959 return false; // ugh, stop iterating. We're in trouble.
2960 }
2961 data->keysToRemove = (FramebufferHashTableKey **) ptr;
2962 }
2963 data->keysToRemove[data->keysToRemoveCount] = key;
2964 data->keysToRemoveCount++;
2965 }
2966
2967 return true; // keep iterating.
2968}
2969
2970static void VULKAN_INTERNAL_RemoveFramebuffersContainingView(
2971 VulkanRenderer *renderer,
2972 VkImageView view)
2973{
2974 // Can't remove while iterating!
2975
2976 CheckOneFramebufferForRemovalData data = { 8, 0, NULL, view };
2977 data.keysToRemove = (FramebufferHashTableKey **) SDL_malloc(data.keysToRemoveCapacity * sizeof(FramebufferHashTableKey *));
2978 if (!data.keysToRemove) {
2979 return; // uhoh.
2980 }
2981
2982 SDL_LockMutex(renderer->framebufferFetchLock);
2983
2984 SDL_IterateHashTable(renderer->framebufferHashTable, CheckOneFramebufferForRemoval, &data);
2985
2986 for (Uint32 i = 0; i < data.keysToRemoveCount; i += 1) {
2987 SDL_RemoveFromHashTable(renderer->framebufferHashTable, (void *)data.keysToRemove[i]);
2988 }
2989
2990 SDL_UnlockMutex(renderer->framebufferFetchLock);
2991
2992 SDL_free(data.keysToRemove);
2993}
2994
2995static void VULKAN_INTERNAL_DestroyTexture(
2996 VulkanRenderer *renderer,
2997 VulkanTexture *texture)
2998{
2999 // Clean up subresources
3000 for (Uint32 subresourceIndex = 0; subresourceIndex < texture->subresourceCount; subresourceIndex += 1) {
3001 if (texture->subresources[subresourceIndex].renderTargetViews != NULL) {
3002 for (Uint32 depthIndex = 0; depthIndex < texture->depth; depthIndex += 1) {
3003 VULKAN_INTERNAL_RemoveFramebuffersContainingView(
3004 renderer,
3005 texture->subresources[subresourceIndex].renderTargetViews[depthIndex]);
3006 }
3007
3008 for (Uint32 depthIndex = 0; depthIndex < texture->depth; depthIndex += 1) {
3009 renderer->vkDestroyImageView(
3010 renderer->logicalDevice,
3011 texture->subresources[subresourceIndex].renderTargetViews[depthIndex],
3012 NULL);
3013 }
3014 SDL_free(texture->subresources[subresourceIndex].renderTargetViews);
3015 }
3016
3017 if (texture->subresources[subresourceIndex].computeWriteView != VK_NULL_HANDLE) {
3018 renderer->vkDestroyImageView(
3019 renderer->logicalDevice,
3020 texture->subresources[subresourceIndex].computeWriteView,
3021 NULL);
3022 }
3023
3024 if (texture->subresources[subresourceIndex].depthStencilView != VK_NULL_HANDLE) {
3025 VULKAN_INTERNAL_RemoveFramebuffersContainingView(
3026 renderer,
3027 texture->subresources[subresourceIndex].depthStencilView);
3028 renderer->vkDestroyImageView(
3029 renderer->logicalDevice,
3030 texture->subresources[subresourceIndex].depthStencilView,
3031 NULL);
3032 }
3033 }
3034
3035 SDL_free(texture->subresources);
3036
3037 if (texture->fullView) {
3038 renderer->vkDestroyImageView(
3039 renderer->logicalDevice,
3040 texture->fullView,
3041 NULL);
3042 }
3043
3044 if (texture->image) {
3045 renderer->vkDestroyImage(
3046 renderer->logicalDevice,
3047 texture->image,
3048 NULL);
3049 }
3050
3051 if (texture->usedRegion) {
3052 VULKAN_INTERNAL_RemoveMemoryUsedRegion(
3053 renderer,
3054 texture->usedRegion);
3055 }
3056
3057 SDL_free(texture);
3058}
3059
3060static void VULKAN_INTERNAL_DestroyBuffer(
3061 VulkanRenderer *renderer,
3062 VulkanBuffer *buffer)
3063{
3064 renderer->vkDestroyBuffer(
3065 renderer->logicalDevice,
3066 buffer->buffer,
3067 NULL);
3068
3069 VULKAN_INTERNAL_RemoveMemoryUsedRegion(
3070 renderer,
3071 buffer->usedRegion);
3072
3073 SDL_free(buffer);
3074}
3075
3076static void VULKAN_INTERNAL_DestroyCommandPool(
3077 VulkanRenderer *renderer,
3078 VulkanCommandPool *commandPool)
3079{
3080 Uint32 i;
3081 VulkanCommandBuffer *commandBuffer;
3082
3083 renderer->vkDestroyCommandPool(
3084 renderer->logicalDevice,
3085 commandPool->commandPool,
3086 NULL);
3087
3088 for (i = 0; i < commandPool->inactiveCommandBufferCount; i += 1) {
3089 commandBuffer = commandPool->inactiveCommandBuffers[i];
3090
3091 SDL_free(commandBuffer->presentDatas);
3092 SDL_free(commandBuffer->waitSemaphores);
3093 SDL_free(commandBuffer->signalSemaphores);
3094 SDL_free(commandBuffer->usedBuffers);
3095 SDL_free(commandBuffer->usedTextures);
3096 SDL_free(commandBuffer->usedSamplers);
3097 SDL_free(commandBuffer->usedGraphicsPipelines);
3098 SDL_free(commandBuffer->usedComputePipelines);
3099 SDL_free(commandBuffer->usedFramebuffers);
3100 SDL_free(commandBuffer->usedUniformBuffers);
3101
3102 SDL_free(commandBuffer);
3103 }
3104
3105 SDL_free(commandPool->inactiveCommandBuffers);
3106 SDL_free(commandPool);
3107}
3108
3109static void VULKAN_INTERNAL_DestroyDescriptorSetLayout(
3110 VulkanRenderer *renderer,
3111 DescriptorSetLayout *layout)
3112{
3113 if (layout == NULL) {
3114 return;
3115 }
3116
3117 if (layout->descriptorSetLayout != VK_NULL_HANDLE) {
3118 renderer->vkDestroyDescriptorSetLayout(
3119 renderer->logicalDevice,
3120 layout->descriptorSetLayout,
3121 NULL);
3122 }
3123
3124 SDL_free(layout);
3125}
3126
3127static void VULKAN_INTERNAL_DestroyGraphicsPipeline(
3128 VulkanRenderer *renderer,
3129 VulkanGraphicsPipeline *graphicsPipeline)
3130{
3131 renderer->vkDestroyPipeline(
3132 renderer->logicalDevice,
3133 graphicsPipeline->pipeline,
3134 NULL);
3135
3136 (void)SDL_AtomicDecRef(&graphicsPipeline->vertexShader->referenceCount);
3137 (void)SDL_AtomicDecRef(&graphicsPipeline->fragmentShader->referenceCount);
3138
3139 SDL_free(graphicsPipeline);
3140}
3141
3142static void VULKAN_INTERNAL_DestroyComputePipeline(
3143 VulkanRenderer *renderer,
3144 VulkanComputePipeline *computePipeline)
3145{
3146 if (computePipeline->pipeline != VK_NULL_HANDLE) {
3147 renderer->vkDestroyPipeline(
3148 renderer->logicalDevice,
3149 computePipeline->pipeline,
3150 NULL);
3151 }
3152
3153 if (computePipeline->shaderModule != VK_NULL_HANDLE) {
3154 renderer->vkDestroyShaderModule(
3155 renderer->logicalDevice,
3156 computePipeline->shaderModule,
3157 NULL);
3158 }
3159
3160 SDL_free(computePipeline);
3161}
3162
3163static void VULKAN_INTERNAL_DestroyShader(
3164 VulkanRenderer *renderer,
3165 VulkanShader *vulkanShader)
3166{
3167 renderer->vkDestroyShaderModule(
3168 renderer->logicalDevice,
3169 vulkanShader->shaderModule,
3170 NULL);
3171
3172 SDL_free((void *)vulkanShader->entrypointName);
3173 SDL_free(vulkanShader);
3174}
3175
3176static void VULKAN_INTERNAL_DestroySampler(
3177 VulkanRenderer *renderer,
3178 VulkanSampler *vulkanSampler)
3179{
3180 renderer->vkDestroySampler(
3181 renderer->logicalDevice,
3182 vulkanSampler->sampler,
3183 NULL);
3184
3185 SDL_free(vulkanSampler);
3186}
3187
3188static void VULKAN_INTERNAL_DestroySwapchain(
3189 VulkanRenderer *renderer,
3190 WindowData *windowData)
3191{
3192 Uint32 i;
3193
3194 if (windowData == NULL) {
3195 return;
3196 }
3197
3198 for (i = 0; i < windowData->imageCount; i += 1) {
3199 VULKAN_INTERNAL_RemoveFramebuffersContainingView(
3200 renderer,
3201 windowData->textureContainers[i].activeTexture->subresources[0].renderTargetViews[0]);
3202 renderer->vkDestroyImageView(
3203 renderer->logicalDevice,
3204 windowData->textureContainers[i].activeTexture->subresources[0].renderTargetViews[0],
3205 NULL);
3206 SDL_free(windowData->textureContainers[i].activeTexture->subresources[0].renderTargetViews);
3207 SDL_free(windowData->textureContainers[i].activeTexture->subresources);
3208 SDL_free(windowData->textureContainers[i].activeTexture);
3209 }
3210 windowData->imageCount = 0;
3211
3212 SDL_free(windowData->textureContainers);
3213 windowData->textureContainers = NULL;
3214
3215 if (windowData->swapchain) {
3216 renderer->vkDestroySwapchainKHR(
3217 renderer->logicalDevice,
3218 windowData->swapchain,
3219 NULL);
3220 windowData->swapchain = VK_NULL_HANDLE;
3221 }
3222
3223 if (windowData->surface) {
3224 renderer->vkDestroySurfaceKHR(
3225 renderer->instance,
3226 windowData->surface,
3227 NULL);
3228 windowData->surface = VK_NULL_HANDLE;
3229 }
3230
3231 for (i = 0; i < MAX_FRAMES_IN_FLIGHT; i += 1) {
3232 if (windowData->imageAvailableSemaphore[i]) {
3233 renderer->vkDestroySemaphore(
3234 renderer->logicalDevice,
3235 windowData->imageAvailableSemaphore[i],
3236 NULL);
3237 windowData->imageAvailableSemaphore[i] = VK_NULL_HANDLE;
3238 }
3239
3240 if (windowData->renderFinishedSemaphore[i]) {
3241 renderer->vkDestroySemaphore(
3242 renderer->logicalDevice,
3243 windowData->renderFinishedSemaphore[i],
3244 NULL);
3245 windowData->renderFinishedSemaphore[i] = VK_NULL_HANDLE;
3246 }
3247 }
3248}
3249
3250static void VULKAN_INTERNAL_DestroyGraphicsPipelineResourceLayout(
3251 VulkanRenderer *renderer,
3252 VulkanGraphicsPipelineResourceLayout *resourceLayout)
3253{
3254 if (resourceLayout->pipelineLayout != VK_NULL_HANDLE) {
3255 renderer->vkDestroyPipelineLayout(
3256 renderer->logicalDevice,
3257 resourceLayout->pipelineLayout,
3258 NULL);
3259 }
3260
3261 SDL_free(resourceLayout);
3262}
3263
3264static void VULKAN_INTERNAL_DestroyComputePipelineResourceLayout(
3265 VulkanRenderer *renderer,
3266 VulkanComputePipelineResourceLayout *resourceLayout)
3267{
3268 if (resourceLayout->pipelineLayout != VK_NULL_HANDLE) {
3269 renderer->vkDestroyPipelineLayout(
3270 renderer->logicalDevice,
3271 resourceLayout->pipelineLayout,
3272 NULL);
3273 }
3274
3275 SDL_free(resourceLayout);
3276}
3277
3278static void VULKAN_INTERNAL_DestroyDescriptorSetCache(
3279 VulkanRenderer *renderer,
3280 DescriptorSetCache *descriptorSetCache)
3281{
3282 for (Uint32 i = 0; i < descriptorSetCache->poolCount; i += 1) {
3283 for (Uint32 j = 0; j < descriptorSetCache->pools[i].poolCount; j += 1) {
3284 renderer->vkDestroyDescriptorPool(
3285 renderer->logicalDevice,
3286 descriptorSetCache->pools[i].descriptorPools[j],
3287 NULL);
3288 }
3289 SDL_free(descriptorSetCache->pools[i].descriptorSets);
3290 SDL_free(descriptorSetCache->pools[i].descriptorPools);
3291 }
3292 SDL_free(descriptorSetCache->pools);
3293 SDL_free(descriptorSetCache);
3294}
3295
3296// Hashtable functions
3297
3298static Uint32 SDLCALL VULKAN_INTERNAL_GraphicsPipelineResourceLayoutHashFunction(void *userdata, const void *key)
3299{
3300 GraphicsPipelineResourceLayoutHashTableKey *hashTableKey = (GraphicsPipelineResourceLayoutHashTableKey *)key;
3301 /* The algorithm for this hashing function
3302 * is taken from Josh Bloch's "Effective Java".
3303 * (https://stackoverflow.com/a/113600/12492383)
3304 */
3305 const Uint32 hashFactor = 31;
3306 Uint32 result = 1;
3307 result = result * hashFactor + hashTableKey->vertexSamplerCount;
3308 result = result * hashFactor + hashTableKey->vertexStorageBufferCount;
3309 result = result * hashFactor + hashTableKey->vertexStorageTextureCount;
3310 result = result * hashFactor + hashTableKey->vertexUniformBufferCount;
3311 result = result * hashFactor + hashTableKey->fragmentSamplerCount;
3312 result = result * hashFactor + hashTableKey->fragmentStorageBufferCount;
3313 result = result * hashFactor + hashTableKey->fragmentStorageTextureCount;
3314 result = result * hashFactor + hashTableKey->fragmentUniformBufferCount;
3315 return result;
3316}
3317static bool SDLCALL VULKAN_INTERNAL_GraphicsPipelineResourceLayoutHashKeyMatch(void *userdata, const void *aKey, const void *bKey)
3318{
3319 return SDL_memcmp(aKey, bKey, sizeof(GraphicsPipelineResourceLayoutHashTableKey)) == 0;
3320}
3321static void SDLCALL VULKAN_INTERNAL_GraphicsPipelineResourceLayoutHashDestroy(void *userdata, const void *key, const void *value)
3322{
3323 VulkanRenderer *renderer = (VulkanRenderer *)userdata;
3324 VulkanGraphicsPipelineResourceLayout *resourceLayout = (VulkanGraphicsPipelineResourceLayout *)value;
3325 VULKAN_INTERNAL_DestroyGraphicsPipelineResourceLayout(renderer, resourceLayout);
3326 SDL_free((void*)key);
3327}
3328
3329static Uint32 SDLCALL VULKAN_INTERNAL_ComputePipelineResourceLayoutHashFunction(void *userdata, const void *key)
3330{
3331 ComputePipelineResourceLayoutHashTableKey *hashTableKey = (ComputePipelineResourceLayoutHashTableKey *)key;
3332 /* The algorithm for this hashing function
3333 * is taken from Josh Bloch's "Effective Java".
3334 * (https://stackoverflow.com/a/113600/12492383)
3335 */
3336 const Uint32 hashFactor = 31;
3337 Uint32 result = 1;
3338 result = result * hashFactor + hashTableKey->samplerCount;
3339 result = result * hashFactor + hashTableKey->readonlyStorageTextureCount;
3340 result = result * hashFactor + hashTableKey->readonlyStorageBufferCount;
3341 result = result * hashFactor + hashTableKey->readWriteStorageTextureCount;
3342 result = result * hashFactor + hashTableKey->readWriteStorageBufferCount;
3343 result = result * hashFactor + hashTableKey->uniformBufferCount;
3344 return result;
3345}
3346
3347static bool SDLCALL VULKAN_INTERNAL_ComputePipelineResourceLayoutHashKeyMatch(void *userdata, const void *aKey, const void *bKey)
3348{
3349 return SDL_memcmp(aKey, bKey, sizeof(ComputePipelineResourceLayoutHashTableKey)) == 0;
3350}
3351
3352static void SDLCALL VULKAN_INTERNAL_ComputePipelineResourceLayoutHashDestroy(void *userdata, const void *key, const void *value)
3353{
3354 VulkanRenderer *renderer = (VulkanRenderer *)userdata;
3355 VulkanComputePipelineResourceLayout *resourceLayout = (VulkanComputePipelineResourceLayout *)value;
3356 VULKAN_INTERNAL_DestroyComputePipelineResourceLayout(renderer, resourceLayout);
3357 SDL_free((void*)key);
3358}
3359
3360static Uint32 SDLCALL VULKAN_INTERNAL_DescriptorSetLayoutHashFunction(void *userdata, const void *key)
3361{
3362 DescriptorSetLayoutHashTableKey *hashTableKey = (DescriptorSetLayoutHashTableKey *)key;
3363
3364 /* The algorithm for this hashing function
3365 * is taken from Josh Bloch's "Effective Java".
3366 * (https://stackoverflow.com/a/113600/12492383)
3367 */
3368 const Uint32 hashFactor = 31;
3369 Uint32 result = 1;
3370 result = result * hashFactor + hashTableKey->shaderStage;
3371 result = result * hashFactor + hashTableKey->samplerCount;
3372 result = result * hashFactor + hashTableKey->storageTextureCount;
3373 result = result * hashFactor + hashTableKey->storageBufferCount;
3374 result = result * hashFactor + hashTableKey->writeStorageTextureCount;
3375 result = result * hashFactor + hashTableKey->writeStorageBufferCount;
3376 result = result * hashFactor + hashTableKey->uniformBufferCount;
3377 return result;
3378}
3379
3380static bool SDLCALL VULKAN_INTERNAL_DescriptorSetLayoutHashKeyMatch(void *userdata, const void *aKey, const void *bKey)
3381{
3382 return SDL_memcmp(aKey, bKey, sizeof(DescriptorSetLayoutHashTableKey)) == 0;
3383}
3384
3385static void SDLCALL VULKAN_INTERNAL_DescriptorSetLayoutHashDestroy(void *userdata, const void *key, const void *value)
3386{
3387 VulkanRenderer *renderer = (VulkanRenderer *)userdata;
3388 DescriptorSetLayout *layout = (DescriptorSetLayout *)value;
3389 VULKAN_INTERNAL_DestroyDescriptorSetLayout(renderer, layout);
3390 SDL_free((void*)key);
3391}
3392
3393static Uint32 SDLCALL VULKAN_INTERNAL_CommandPoolHashFunction(void *userdata, const void *key)
3394{
3395 return (Uint32)((CommandPoolHashTableKey *)key)->threadID;
3396}
3397
3398static bool SDLCALL VULKAN_INTERNAL_CommandPoolHashKeyMatch(void *userdata, const void *aKey, const void *bKey)
3399{
3400 CommandPoolHashTableKey *a = (CommandPoolHashTableKey *)aKey;
3401 CommandPoolHashTableKey *b = (CommandPoolHashTableKey *)bKey;
3402 return a->threadID == b->threadID;
3403}
3404
3405static void SDLCALL VULKAN_INTERNAL_CommandPoolHashDestroy(void *userdata, const void *key, const void *value)
3406{
3407 VulkanRenderer *renderer = (VulkanRenderer *)userdata;
3408 VulkanCommandPool *pool = (VulkanCommandPool *)value;
3409 VULKAN_INTERNAL_DestroyCommandPool(renderer, pool);
3410 SDL_free((void *)key);
3411}
3412
3413static Uint32 SDLCALL VULKAN_INTERNAL_RenderPassHashFunction(void *userdata, const void *key)
3414{
3415 RenderPassHashTableKey *hashTableKey = (RenderPassHashTableKey *)key;
3416
3417 /* The algorithm for this hashing function
3418 * is taken from Josh Bloch's "Effective Java".
3419 * (https://stackoverflow.com/a/113600/12492383)
3420 */
3421 const Uint32 hashFactor = 31;
3422 Uint32 result = 1;
3423
3424 for (Uint32 i = 0; i < hashTableKey->numColorTargets; i += 1) {
3425 result = result * hashFactor + hashTableKey->colorTargetDescriptions[i].loadOp;
3426 result = result * hashFactor + hashTableKey->colorTargetDescriptions[i].storeOp;
3427 result = result * hashFactor + hashTableKey->colorTargetDescriptions[i].format;
3428 }
3429
3430 for (Uint32 i = 0; i < hashTableKey->numResolveTargets; i += 1) {
3431 result = result * hashFactor + hashTableKey->resolveTargetFormats[i];
3432 }
3433
3434 result = result * hashFactor + hashTableKey->depthStencilTargetDescription.loadOp;
3435 result = result * hashFactor + hashTableKey->depthStencilTargetDescription.storeOp;
3436 result = result * hashFactor + hashTableKey->depthStencilTargetDescription.stencilLoadOp;
3437 result = result * hashFactor + hashTableKey->depthStencilTargetDescription.stencilStoreOp;
3438 result = result * hashFactor + hashTableKey->depthStencilTargetDescription.format;
3439
3440 result = result * hashFactor + hashTableKey->sampleCount;
3441
3442 return result;
3443}
3444
3445static bool SDLCALL VULKAN_INTERNAL_RenderPassHashKeyMatch(void *userdata, const void *aKey, const void *bKey)
3446{
3447 RenderPassHashTableKey *a = (RenderPassHashTableKey *)aKey;
3448 RenderPassHashTableKey *b = (RenderPassHashTableKey *)bKey;
3449
3450 if (a->numColorTargets != b->numColorTargets) {
3451 return 0;
3452 }
3453
3454 if (a->numResolveTargets != b->numResolveTargets) {
3455 return 0;
3456 }
3457
3458 if (a->sampleCount != b->sampleCount) {
3459 return 0;
3460 }
3461
3462 for (Uint32 i = 0; i < a->numColorTargets; i += 1) {
3463 if (a->colorTargetDescriptions[i].format != b->colorTargetDescriptions[i].format) {
3464 return 0;
3465 }
3466
3467 if (a->colorTargetDescriptions[i].loadOp != b->colorTargetDescriptions[i].loadOp) {
3468 return 0;
3469 }
3470
3471 if (a->colorTargetDescriptions[i].storeOp != b->colorTargetDescriptions[i].storeOp) {
3472 return 0;
3473 }
3474 }
3475
3476 for (Uint32 i = 0; i < a->numResolveTargets; i += 1) {
3477 if (a->resolveTargetFormats[i] != b->resolveTargetFormats[i]) {
3478 return 0;
3479 }
3480 }
3481
3482 if (a->depthStencilTargetDescription.format != b->depthStencilTargetDescription.format) {
3483 return 0;
3484 }
3485
3486 if (a->depthStencilTargetDescription.loadOp != b->depthStencilTargetDescription.loadOp) {
3487 return 0;
3488 }
3489
3490 if (a->depthStencilTargetDescription.storeOp != b->depthStencilTargetDescription.storeOp) {
3491 return 0;
3492 }
3493
3494 if (a->depthStencilTargetDescription.stencilLoadOp != b->depthStencilTargetDescription.stencilLoadOp) {
3495 return 0;
3496 }
3497
3498 if (a->depthStencilTargetDescription.stencilStoreOp != b->depthStencilTargetDescription.stencilStoreOp) {
3499 return 0;
3500 }
3501
3502 return 1;
3503}
3504
3505static void SDLCALL VULKAN_INTERNAL_RenderPassHashDestroy(void *userdata, const void *key, const void *value)
3506{
3507 VulkanRenderer *renderer = (VulkanRenderer *)userdata;
3508 VulkanRenderPassHashTableValue *renderPassWrapper = (VulkanRenderPassHashTableValue *)value;
3509 renderer->vkDestroyRenderPass(
3510 renderer->logicalDevice,
3511 renderPassWrapper->handle,
3512 NULL);
3513 SDL_free(renderPassWrapper);
3514 SDL_free((void *)key);
3515}
3516
3517static Uint32 SDLCALL VULKAN_INTERNAL_FramebufferHashFunction(void *userdata, const void *key)
3518{
3519 FramebufferHashTableKey *hashTableKey = (FramebufferHashTableKey *)key;
3520
3521 /* The algorithm for this hashing function
3522 * is taken from Josh Bloch's "Effective Java".
3523 * (https://stackoverflow.com/a/113600/12492383)
3524 */
3525 const Uint32 hashFactor = 31;
3526 Uint32 result = 1;
3527
3528 for (Uint32 i = 0; i < hashTableKey->numColorTargets; i += 1) {
3529 result = result * hashFactor + (Uint32)(uintptr_t)hashTableKey->colorAttachmentViews[i];
3530 }
3531 for (Uint32 i = 0; i < hashTableKey->numResolveAttachments; i += 1) {
3532 result = result * hashFactor + (Uint32)(uintptr_t)hashTableKey->resolveAttachmentViews[i];
3533 }
3534
3535 result = result * hashFactor + (Uint32)(uintptr_t)hashTableKey->depthStencilAttachmentView;
3536 result = result * hashFactor + hashTableKey->width;
3537 result = result * hashFactor + hashTableKey->height;
3538
3539 return result;
3540}
3541
3542static bool SDLCALL VULKAN_INTERNAL_FramebufferHashKeyMatch(void *userdata, const void *aKey, const void *bKey)
3543{
3544 FramebufferHashTableKey *a = (FramebufferHashTableKey *)aKey;
3545 FramebufferHashTableKey *b = (FramebufferHashTableKey *)bKey;
3546
3547 if (a->numColorTargets != b->numColorTargets) {
3548 return 0;
3549 }
3550
3551 if (a->numResolveAttachments != b->numResolveAttachments) {
3552 return 0;
3553 }
3554
3555 for (Uint32 i = 0; i < a->numColorTargets; i += 1) {
3556 if (a->colorAttachmentViews[i] != b->colorAttachmentViews[i]) {
3557 return 0;
3558 }
3559 }
3560
3561 for (Uint32 i = 0; i < a->numResolveAttachments; i += 1) {
3562 if (a->resolveAttachmentViews[i] != b->resolveAttachmentViews[i]) {
3563 return 0;
3564 }
3565 }
3566
3567 if (a->depthStencilAttachmentView != b->depthStencilAttachmentView) {
3568 return 0;
3569 }
3570
3571 if (a->width != b->width) {
3572 return 0;
3573 }
3574
3575 if (a->height != b->height) {
3576 return 0;
3577 }
3578
3579 return 1;
3580}
3581
3582static void SDLCALL VULKAN_INTERNAL_FramebufferHashDestroy(void *userdata, const void *key, const void *value)
3583{
3584 VulkanRenderer *renderer = (VulkanRenderer *)userdata;
3585 VulkanFramebuffer *framebuffer = (VulkanFramebuffer *)value;
3586 VULKAN_INTERNAL_ReleaseFramebuffer(renderer, framebuffer);
3587 SDL_free((void *)key);
3588}
3589
3590// Descriptor pools
3591
3592static bool VULKAN_INTERNAL_AllocateDescriptorSets(
3593 VulkanRenderer *renderer,
3594 VkDescriptorPool descriptorPool,
3595 VkDescriptorSetLayout descriptorSetLayout,
3596 Uint32 descriptorSetCount,
3597 VkDescriptorSet *descriptorSetArray)
3598{
3599 VkDescriptorSetAllocateInfo descriptorSetAllocateInfo;
3600 VkDescriptorSetLayout *descriptorSetLayouts = SDL_stack_alloc(VkDescriptorSetLayout, descriptorSetCount);
3601 VkResult vulkanResult;
3602 Uint32 i;
3603
3604 for (i = 0; i < descriptorSetCount; i += 1) {
3605 descriptorSetLayouts[i] = descriptorSetLayout;
3606 }
3607
3608 descriptorSetAllocateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
3609 descriptorSetAllocateInfo.pNext = NULL;
3610 descriptorSetAllocateInfo.descriptorPool = descriptorPool;
3611 descriptorSetAllocateInfo.descriptorSetCount = descriptorSetCount;
3612 descriptorSetAllocateInfo.pSetLayouts = descriptorSetLayouts;
3613
3614 vulkanResult = renderer->vkAllocateDescriptorSets(
3615 renderer->logicalDevice,
3616 &descriptorSetAllocateInfo,
3617 descriptorSetArray);
3618
3619 SDL_stack_free(descriptorSetLayouts);
3620
3621 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkAllocateDescriptorSets, false);
3622
3623 return true;
3624}
3625
3626static bool VULKAN_INTERNAL_AllocateDescriptorsFromPool(
3627 VulkanRenderer *renderer,
3628 DescriptorSetLayout *descriptorSetLayout,
3629 DescriptorSetPool *descriptorSetPool)
3630{
3631 VkDescriptorPoolSize descriptorPoolSizes[
3632 MAX_TEXTURE_SAMPLERS_PER_STAGE +
3633 MAX_STORAGE_TEXTURES_PER_STAGE +
3634 MAX_STORAGE_BUFFERS_PER_STAGE +
3635 MAX_COMPUTE_WRITE_TEXTURES +
3636 MAX_COMPUTE_WRITE_BUFFERS +
3637 MAX_UNIFORM_BUFFERS_PER_STAGE];
3638 VkDescriptorPoolCreateInfo descriptorPoolInfo;
3639 VkDescriptorPool pool;
3640 VkResult vulkanResult;
3641
3642 // Category 1
3643 for (Uint32 i = 0; i < descriptorSetLayout->samplerCount; i += 1) {
3644 descriptorPoolSizes[i].type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
3645 descriptorPoolSizes[i].descriptorCount = DESCRIPTOR_POOL_SIZE;
3646 }
3647
3648 for (Uint32 i = descriptorSetLayout->samplerCount; i < descriptorSetLayout->samplerCount + descriptorSetLayout->storageTextureCount; i += 1) {
3649 descriptorPoolSizes[i].type = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; // Yes, we are declaring the storage image as a sampled image, because shaders are stupid.
3650 descriptorPoolSizes[i].descriptorCount = DESCRIPTOR_POOL_SIZE;
3651 }
3652
3653 for (Uint32 i = descriptorSetLayout->samplerCount + descriptorSetLayout->storageTextureCount; i < descriptorSetLayout->samplerCount + descriptorSetLayout->storageTextureCount + descriptorSetLayout->storageBufferCount; i += 1) {
3654 descriptorPoolSizes[i].type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
3655 descriptorPoolSizes[i].descriptorCount = DESCRIPTOR_POOL_SIZE;
3656 }
3657
3658 // Category 2
3659 for (Uint32 i = 0; i < descriptorSetLayout->writeStorageTextureCount; i += 1) {
3660 descriptorPoolSizes[i].type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
3661 descriptorPoolSizes[i].descriptorCount = DESCRIPTOR_POOL_SIZE;
3662 }
3663
3664 for (Uint32 i = descriptorSetLayout->writeStorageTextureCount; i < descriptorSetLayout->writeStorageTextureCount + descriptorSetLayout->writeStorageBufferCount; i += 1) {
3665 descriptorPoolSizes[i].type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
3666 descriptorPoolSizes[i].descriptorCount = DESCRIPTOR_POOL_SIZE;
3667 }
3668
3669 // Category 3
3670 for (Uint32 i = 0; i < descriptorSetLayout->uniformBufferCount; i += 1) {
3671 descriptorPoolSizes[i].type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC;
3672 descriptorPoolSizes[i].descriptorCount = DESCRIPTOR_POOL_SIZE;
3673 }
3674
3675 descriptorPoolInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
3676 descriptorPoolInfo.pNext = NULL;
3677 descriptorPoolInfo.flags = 0;
3678 descriptorPoolInfo.maxSets = DESCRIPTOR_POOL_SIZE;
3679 descriptorPoolInfo.poolSizeCount =
3680 descriptorSetLayout->samplerCount +
3681 descriptorSetLayout->storageTextureCount +
3682 descriptorSetLayout->storageBufferCount +
3683 descriptorSetLayout->writeStorageTextureCount +
3684 descriptorSetLayout->writeStorageBufferCount +
3685 descriptorSetLayout->uniformBufferCount;
3686 descriptorPoolInfo.pPoolSizes = descriptorPoolSizes;
3687
3688 vulkanResult = renderer->vkCreateDescriptorPool(
3689 renderer->logicalDevice,
3690 &descriptorPoolInfo,
3691 NULL,
3692 &pool);
3693
3694 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateDescriptorPool, false);
3695
3696 descriptorSetPool->poolCount += 1;
3697 descriptorSetPool->descriptorPools = SDL_realloc(
3698 descriptorSetPool->descriptorPools,
3699 sizeof(VkDescriptorPool) * descriptorSetPool->poolCount);
3700
3701 descriptorSetPool->descriptorPools[descriptorSetPool->poolCount - 1] = pool;
3702
3703 descriptorSetPool->descriptorSets = SDL_realloc(
3704 descriptorSetPool->descriptorSets,
3705 sizeof(VkDescriptorSet) * descriptorSetPool->poolCount * DESCRIPTOR_POOL_SIZE);
3706
3707 if (!VULKAN_INTERNAL_AllocateDescriptorSets(
3708 renderer,
3709 pool,
3710 descriptorSetLayout->descriptorSetLayout,
3711 DESCRIPTOR_POOL_SIZE,
3712 &descriptorSetPool->descriptorSets[descriptorSetPool->descriptorSetCount])) {
3713 return false;
3714 }
3715
3716 descriptorSetPool->descriptorSetCount += DESCRIPTOR_POOL_SIZE;
3717
3718 return true;
3719}
3720
3721// NOTE: these categories should be mutually exclusive
3722static DescriptorSetLayout *VULKAN_INTERNAL_FetchDescriptorSetLayout(
3723 VulkanRenderer *renderer,
3724 VkShaderStageFlagBits shaderStage,
3725 // Category 1: read resources
3726 Uint32 samplerCount,
3727 Uint32 storageTextureCount,
3728 Uint32 storageBufferCount,
3729 // Category 2: write resources
3730 Uint32 writeStorageTextureCount,
3731 Uint32 writeStorageBufferCount,
3732 // Category 3: uniform buffers
3733 Uint32 uniformBufferCount)
3734{
3735 DescriptorSetLayoutHashTableKey key;
3736 SDL_zero(key);
3737 DescriptorSetLayout *layout = NULL;
3738
3739 key.shaderStage = shaderStage;
3740 key.samplerCount = samplerCount;
3741 key.storageTextureCount = storageTextureCount;
3742 key.storageBufferCount = storageBufferCount;
3743 key.writeStorageTextureCount = writeStorageTextureCount;
3744 key.writeStorageBufferCount = writeStorageBufferCount;
3745 key.uniformBufferCount = uniformBufferCount;
3746
3747 if (SDL_FindInHashTable(
3748 renderer->descriptorSetLayoutHashTable,
3749 (const void *)&key,
3750 (const void **)&layout)) {
3751 return layout;
3752 }
3753
3754 VkDescriptorSetLayout descriptorSetLayout;
3755 VkDescriptorSetLayoutBinding descriptorSetLayoutBindings[
3756 MAX_TEXTURE_SAMPLERS_PER_STAGE +
3757 MAX_STORAGE_TEXTURES_PER_STAGE +
3758 MAX_STORAGE_BUFFERS_PER_STAGE +
3759 MAX_COMPUTE_WRITE_TEXTURES +
3760 MAX_COMPUTE_WRITE_BUFFERS];
3761
3762 VkDescriptorSetLayoutCreateInfo descriptorSetLayoutCreateInfo;
3763 descriptorSetLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
3764 descriptorSetLayoutCreateInfo.pNext = NULL;
3765 descriptorSetLayoutCreateInfo.flags = 0;
3766
3767 // Category 1
3768 for (Uint32 i = 0; i < samplerCount; i += 1) {
3769 descriptorSetLayoutBindings[i].binding = i;
3770 descriptorSetLayoutBindings[i].descriptorCount = 1;
3771 descriptorSetLayoutBindings[i].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
3772 descriptorSetLayoutBindings[i].stageFlags = shaderStage;
3773 descriptorSetLayoutBindings[i].pImmutableSamplers = NULL;
3774 }
3775
3776 for (Uint32 i = samplerCount; i < samplerCount + storageTextureCount; i += 1) {
3777 descriptorSetLayoutBindings[i].binding = i;
3778 descriptorSetLayoutBindings[i].descriptorCount = 1;
3779 descriptorSetLayoutBindings[i].descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; // Yes, we are declaring the storage image as a sampled image, because shaders are stupid.
3780 descriptorSetLayoutBindings[i].stageFlags = shaderStage;
3781 descriptorSetLayoutBindings[i].pImmutableSamplers = NULL;
3782 }
3783
3784 for (Uint32 i = samplerCount + storageTextureCount; i < samplerCount + storageTextureCount + storageBufferCount; i += 1) {
3785 descriptorSetLayoutBindings[i].binding = i;
3786 descriptorSetLayoutBindings[i].descriptorCount = 1;
3787 descriptorSetLayoutBindings[i].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
3788 descriptorSetLayoutBindings[i].stageFlags = shaderStage;
3789 descriptorSetLayoutBindings[i].pImmutableSamplers = NULL;
3790 }
3791
3792 // Category 2
3793 for (Uint32 i = 0; i < writeStorageTextureCount; i += 1) {
3794 descriptorSetLayoutBindings[i].binding = i;
3795 descriptorSetLayoutBindings[i].descriptorCount = 1;
3796 descriptorSetLayoutBindings[i].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
3797 descriptorSetLayoutBindings[i].stageFlags = shaderStage;
3798 descriptorSetLayoutBindings[i].pImmutableSamplers = NULL;
3799 }
3800
3801 for (Uint32 i = writeStorageTextureCount; i < writeStorageTextureCount + writeStorageBufferCount; i += 1) {
3802 descriptorSetLayoutBindings[i].binding = i;
3803 descriptorSetLayoutBindings[i].descriptorCount = 1;
3804 descriptorSetLayoutBindings[i].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
3805 descriptorSetLayoutBindings[i].stageFlags = shaderStage;
3806 descriptorSetLayoutBindings[i].pImmutableSamplers = NULL;
3807 }
3808
3809 // Category 3
3810 for (Uint32 i = 0; i < uniformBufferCount; i += 1) {
3811 descriptorSetLayoutBindings[i].binding = i;
3812 descriptorSetLayoutBindings[i].descriptorCount = 1;
3813 descriptorSetLayoutBindings[i].descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC;
3814 descriptorSetLayoutBindings[i].stageFlags = shaderStage;
3815 descriptorSetLayoutBindings[i].pImmutableSamplers = NULL;
3816 }
3817
3818 descriptorSetLayoutCreateInfo.pBindings = descriptorSetLayoutBindings;
3819 descriptorSetLayoutCreateInfo.bindingCount =
3820 samplerCount +
3821 storageTextureCount +
3822 storageBufferCount +
3823 writeStorageTextureCount +
3824 writeStorageBufferCount +
3825 uniformBufferCount;
3826
3827 VkResult vulkanResult = renderer->vkCreateDescriptorSetLayout(
3828 renderer->logicalDevice,
3829 &descriptorSetLayoutCreateInfo,
3830 NULL,
3831 &descriptorSetLayout);
3832
3833 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateDescriptorSetLayout, NULL);
3834
3835 layout = SDL_malloc(sizeof(DescriptorSetLayout));
3836 layout->descriptorSetLayout = descriptorSetLayout;
3837
3838 layout->samplerCount = samplerCount;
3839 layout->storageBufferCount = storageBufferCount;
3840 layout->storageTextureCount = storageTextureCount;
3841 layout->writeStorageBufferCount = writeStorageBufferCount;
3842 layout->writeStorageTextureCount = writeStorageTextureCount;
3843 layout->uniformBufferCount = uniformBufferCount;
3844
3845 layout->ID = SDL_AtomicIncRef(&renderer->layoutResourceID);
3846
3847 DescriptorSetLayoutHashTableKey *allocedKey = SDL_malloc(sizeof(DescriptorSetLayoutHashTableKey));
3848 SDL_memcpy(allocedKey, &key, sizeof(DescriptorSetLayoutHashTableKey));
3849
3850 SDL_InsertIntoHashTable(
3851 renderer->descriptorSetLayoutHashTable,
3852 (const void *)allocedKey,
3853 (const void *)layout, true);
3854
3855 return layout;
3856}
3857
3858static VulkanGraphicsPipelineResourceLayout *VULKAN_INTERNAL_FetchGraphicsPipelineResourceLayout(
3859 VulkanRenderer *renderer,
3860 VulkanShader *vertexShader,
3861 VulkanShader *fragmentShader)
3862{
3863 GraphicsPipelineResourceLayoutHashTableKey key;
3864 SDL_zero(key);
3865 VulkanGraphicsPipelineResourceLayout *pipelineResourceLayout = NULL;
3866
3867 key.vertexSamplerCount = vertexShader->numSamplers;
3868 key.vertexStorageTextureCount = vertexShader->numStorageTextures;
3869 key.vertexStorageBufferCount = vertexShader->numStorageBuffers;
3870 key.vertexUniformBufferCount = vertexShader->numUniformBuffers;
3871 key.fragmentSamplerCount = fragmentShader->numSamplers;
3872 key.fragmentStorageTextureCount = fragmentShader->numStorageTextures;
3873 key.fragmentStorageBufferCount = fragmentShader->numStorageBuffers;
3874 key.fragmentUniformBufferCount = fragmentShader->numUniformBuffers;
3875 if (SDL_FindInHashTable(
3876 renderer->graphicsPipelineResourceLayoutHashTable,
3877 (const void *)&key,
3878 (const void **)&pipelineResourceLayout)) {
3879 return pipelineResourceLayout;
3880 }
3881
3882 VkPipelineLayoutCreateInfo pipelineLayoutCreateInfo;
3883 VkDescriptorSetLayout descriptorSetLayouts[4];
3884 VkResult vulkanResult;
3885
3886 pipelineResourceLayout = SDL_calloc(1, sizeof(VulkanGraphicsPipelineResourceLayout));
3887
3888 pipelineResourceLayout->descriptorSetLayouts[0] = VULKAN_INTERNAL_FetchDescriptorSetLayout(
3889 renderer,
3890 VK_SHADER_STAGE_VERTEX_BIT,
3891 vertexShader->numSamplers,
3892 vertexShader->numStorageTextures,
3893 vertexShader->numStorageBuffers,
3894 0,
3895 0,
3896 0);
3897
3898 pipelineResourceLayout->descriptorSetLayouts[1] = VULKAN_INTERNAL_FetchDescriptorSetLayout(
3899 renderer,
3900 VK_SHADER_STAGE_VERTEX_BIT,
3901 0,
3902 0,
3903 0,
3904 0,
3905 0,
3906 vertexShader->numUniformBuffers);
3907
3908 pipelineResourceLayout->descriptorSetLayouts[2] = VULKAN_INTERNAL_FetchDescriptorSetLayout(
3909 renderer,
3910 VK_SHADER_STAGE_FRAGMENT_BIT,
3911 fragmentShader->numSamplers,
3912 fragmentShader->numStorageTextures,
3913 fragmentShader->numStorageBuffers,
3914 0,
3915 0,
3916 0);
3917
3918 pipelineResourceLayout->descriptorSetLayouts[3] = VULKAN_INTERNAL_FetchDescriptorSetLayout(
3919 renderer,
3920 VK_SHADER_STAGE_FRAGMENT_BIT,
3921 0,
3922 0,
3923 0,
3924 0,
3925 0,
3926 fragmentShader->numUniformBuffers);
3927
3928 descriptorSetLayouts[0] = pipelineResourceLayout->descriptorSetLayouts[0]->descriptorSetLayout;
3929 descriptorSetLayouts[1] = pipelineResourceLayout->descriptorSetLayouts[1]->descriptorSetLayout;
3930 descriptorSetLayouts[2] = pipelineResourceLayout->descriptorSetLayouts[2]->descriptorSetLayout;
3931 descriptorSetLayouts[3] = pipelineResourceLayout->descriptorSetLayouts[3]->descriptorSetLayout;
3932
3933 pipelineResourceLayout->vertexSamplerCount = vertexShader->numSamplers;
3934 pipelineResourceLayout->vertexStorageTextureCount = vertexShader->numStorageTextures;
3935 pipelineResourceLayout->vertexStorageBufferCount = vertexShader->numStorageBuffers;
3936 pipelineResourceLayout->vertexUniformBufferCount = vertexShader->numUniformBuffers;
3937
3938 pipelineResourceLayout->fragmentSamplerCount = fragmentShader->numSamplers;
3939 pipelineResourceLayout->fragmentStorageTextureCount = fragmentShader->numStorageTextures;
3940 pipelineResourceLayout->fragmentStorageBufferCount = fragmentShader->numStorageBuffers;
3941 pipelineResourceLayout->fragmentUniformBufferCount = fragmentShader->numUniformBuffers;
3942
3943 // Create the pipeline layout
3944
3945 pipelineLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
3946 pipelineLayoutCreateInfo.pNext = NULL;
3947 pipelineLayoutCreateInfo.flags = 0;
3948 pipelineLayoutCreateInfo.setLayoutCount = 4;
3949 pipelineLayoutCreateInfo.pSetLayouts = descriptorSetLayouts;
3950 pipelineLayoutCreateInfo.pushConstantRangeCount = 0;
3951 pipelineLayoutCreateInfo.pPushConstantRanges = NULL;
3952
3953 vulkanResult = renderer->vkCreatePipelineLayout(
3954 renderer->logicalDevice,
3955 &pipelineLayoutCreateInfo,
3956 NULL,
3957 &pipelineResourceLayout->pipelineLayout);
3958
3959 if (vulkanResult != VK_SUCCESS) {
3960 VULKAN_INTERNAL_DestroyGraphicsPipelineResourceLayout(renderer, pipelineResourceLayout);
3961 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreatePipelineLayout, NULL);
3962 }
3963
3964 GraphicsPipelineResourceLayoutHashTableKey *allocedKey = SDL_malloc(sizeof(GraphicsPipelineResourceLayoutHashTableKey));
3965 SDL_memcpy(allocedKey, &key, sizeof(GraphicsPipelineResourceLayoutHashTableKey));
3966
3967 SDL_InsertIntoHashTable(
3968 renderer->graphicsPipelineResourceLayoutHashTable,
3969 (const void *)allocedKey,
3970 (const void *)pipelineResourceLayout, true);
3971
3972 return pipelineResourceLayout;
3973}
3974
3975static VulkanComputePipelineResourceLayout *VULKAN_INTERNAL_FetchComputePipelineResourceLayout(
3976 VulkanRenderer *renderer,
3977 const SDL_GPUComputePipelineCreateInfo *createinfo)
3978{
3979 ComputePipelineResourceLayoutHashTableKey key;
3980 SDL_zero(key);
3981 VulkanComputePipelineResourceLayout *pipelineResourceLayout = NULL;
3982
3983 key.samplerCount = createinfo->num_samplers;
3984 key.readonlyStorageTextureCount = createinfo->num_readonly_storage_textures;
3985 key.readonlyStorageBufferCount = createinfo->num_readonly_storage_buffers;
3986 key.readWriteStorageTextureCount = createinfo->num_readwrite_storage_textures;
3987 key.readWriteStorageBufferCount = createinfo->num_readwrite_storage_buffers;
3988 key.uniformBufferCount = createinfo->num_uniform_buffers;
3989
3990 if (SDL_FindInHashTable(
3991 renderer->computePipelineResourceLayoutHashTable,
3992 (const void *)&key,
3993 (const void **)&pipelineResourceLayout)) {
3994 return pipelineResourceLayout;
3995 }
3996
3997 VkDescriptorSetLayout descriptorSetLayouts[3];
3998 VkPipelineLayoutCreateInfo pipelineLayoutCreateInfo;
3999 VkResult vulkanResult;
4000
4001 pipelineResourceLayout = SDL_calloc(1, sizeof(VulkanComputePipelineResourceLayout));
4002
4003 pipelineResourceLayout->descriptorSetLayouts[0] = VULKAN_INTERNAL_FetchDescriptorSetLayout(
4004 renderer,
4005 VK_SHADER_STAGE_COMPUTE_BIT,
4006 createinfo->num_samplers,
4007 createinfo->num_readonly_storage_textures,
4008 createinfo->num_readonly_storage_buffers,
4009 0,
4010 0,
4011 0);
4012
4013 pipelineResourceLayout->descriptorSetLayouts[1] = VULKAN_INTERNAL_FetchDescriptorSetLayout(
4014 renderer,
4015 VK_SHADER_STAGE_COMPUTE_BIT,
4016 0,
4017 0,
4018 0,
4019 createinfo->num_readwrite_storage_textures,
4020 createinfo->num_readwrite_storage_buffers,
4021 0);
4022
4023 pipelineResourceLayout->descriptorSetLayouts[2] = VULKAN_INTERNAL_FetchDescriptorSetLayout(
4024 renderer,
4025 VK_SHADER_STAGE_COMPUTE_BIT,
4026 0,
4027 0,
4028 0,
4029 0,
4030 0,
4031 createinfo->num_uniform_buffers);
4032
4033 descriptorSetLayouts[0] = pipelineResourceLayout->descriptorSetLayouts[0]->descriptorSetLayout;
4034 descriptorSetLayouts[1] = pipelineResourceLayout->descriptorSetLayouts[1]->descriptorSetLayout;
4035 descriptorSetLayouts[2] = pipelineResourceLayout->descriptorSetLayouts[2]->descriptorSetLayout;
4036
4037 pipelineResourceLayout->numSamplers = createinfo->num_samplers;
4038 pipelineResourceLayout->numReadonlyStorageTextures = createinfo->num_readonly_storage_textures;
4039 pipelineResourceLayout->numReadonlyStorageBuffers = createinfo->num_readonly_storage_buffers;
4040 pipelineResourceLayout->numReadWriteStorageTextures = createinfo->num_readwrite_storage_textures;
4041 pipelineResourceLayout->numReadWriteStorageBuffers = createinfo->num_readwrite_storage_buffers;
4042 pipelineResourceLayout->numUniformBuffers = createinfo->num_uniform_buffers;
4043
4044 // Create the pipeline layout
4045
4046 pipelineLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
4047 pipelineLayoutCreateInfo.pNext = NULL;
4048 pipelineLayoutCreateInfo.flags = 0;
4049 pipelineLayoutCreateInfo.setLayoutCount = 3;
4050 pipelineLayoutCreateInfo.pSetLayouts = descriptorSetLayouts;
4051 pipelineLayoutCreateInfo.pushConstantRangeCount = 0;
4052 pipelineLayoutCreateInfo.pPushConstantRanges = NULL;
4053
4054 vulkanResult = renderer->vkCreatePipelineLayout(
4055 renderer->logicalDevice,
4056 &pipelineLayoutCreateInfo,
4057 NULL,
4058 &pipelineResourceLayout->pipelineLayout);
4059
4060 if (vulkanResult != VK_SUCCESS) {
4061 VULKAN_INTERNAL_DestroyComputePipelineResourceLayout(renderer, pipelineResourceLayout);
4062 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreatePipelineLayout, NULL);
4063 }
4064
4065 ComputePipelineResourceLayoutHashTableKey *allocedKey = SDL_malloc(sizeof(ComputePipelineResourceLayoutHashTableKey));
4066 SDL_memcpy(allocedKey, &key, sizeof(ComputePipelineResourceLayoutHashTableKey));
4067
4068 SDL_InsertIntoHashTable(
4069 renderer->computePipelineResourceLayoutHashTable,
4070 (const void *)allocedKey,
4071 (const void *)pipelineResourceLayout, true);
4072
4073 return pipelineResourceLayout;
4074}
4075
4076// Data Buffer
4077
4078static VulkanBuffer *VULKAN_INTERNAL_CreateBuffer(
4079 VulkanRenderer *renderer,
4080 VkDeviceSize size,
4081 SDL_GPUBufferUsageFlags usageFlags,
4082 VulkanBufferType type,
4083 bool dedicated,
4084 const char *debugName)
4085{
4086 VulkanBuffer *buffer;
4087 VkResult vulkanResult;
4088 VkBufferCreateInfo createinfo;
4089 VkBufferUsageFlags vulkanUsageFlags = 0;
4090 Uint8 bindResult;
4091
4092 if (usageFlags & SDL_GPU_BUFFERUSAGE_VERTEX) {
4093 vulkanUsageFlags |= VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
4094 }
4095
4096 if (usageFlags & SDL_GPU_BUFFERUSAGE_INDEX) {
4097 vulkanUsageFlags |= VK_BUFFER_USAGE_INDEX_BUFFER_BIT;
4098 }
4099
4100 if (usageFlags & (SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ |
4101 SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ |
4102 SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE)) {
4103 vulkanUsageFlags |= VK_BUFFER_USAGE_STORAGE_BUFFER_BIT;
4104 }
4105
4106 if (usageFlags & SDL_GPU_BUFFERUSAGE_INDIRECT) {
4107 vulkanUsageFlags |= VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT;
4108 }
4109
4110 if (type == VULKAN_BUFFER_TYPE_UNIFORM) {
4111 vulkanUsageFlags |= VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT;
4112 } else {
4113 // GPU buffers need transfer bits for defrag, transfer buffers need them for transfers
4114 vulkanUsageFlags |= VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;
4115 }
4116
4117 buffer = SDL_calloc(1, sizeof(VulkanBuffer));
4118
4119 buffer->size = size;
4120 buffer->usage = usageFlags;
4121 buffer->type = type;
4122 buffer->markedForDestroy = false;
4123 buffer->transitioned = false;
4124
4125 createinfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
4126 createinfo.pNext = NULL;
4127 createinfo.flags = 0;
4128 createinfo.size = size;
4129 createinfo.usage = vulkanUsageFlags;
4130 createinfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
4131 createinfo.queueFamilyIndexCount = 1;
4132 createinfo.pQueueFamilyIndices = &renderer->queueFamilyIndex;
4133
4134 // Set transfer bits so we can defrag
4135 createinfo.usage |= VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;
4136
4137 vulkanResult = renderer->vkCreateBuffer(
4138 renderer->logicalDevice,
4139 &createinfo,
4140 NULL,
4141 &buffer->buffer);
4142
4143 if (vulkanResult != VK_SUCCESS) {
4144 SDL_free(buffer);
4145 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateBuffer, NULL);
4146 }
4147
4148 bindResult = VULKAN_INTERNAL_BindMemoryForBuffer(
4149 renderer,
4150 buffer->buffer,
4151 buffer->size,
4152 buffer->type,
4153 dedicated,
4154 &buffer->usedRegion);
4155
4156 if (bindResult != 1) {
4157 renderer->vkDestroyBuffer(
4158 renderer->logicalDevice,
4159 buffer->buffer,
4160 NULL);
4161
4162 SDL_free(buffer);
4163 return NULL;
4164 }
4165
4166 buffer->usedRegion->vulkanBuffer = buffer; // lol
4167
4168 SDL_SetAtomicInt(&buffer->referenceCount, 0);
4169
4170 if (renderer->debugMode && renderer->supportsDebugUtils && debugName != NULL) {
4171 VkDebugUtilsObjectNameInfoEXT nameInfo;
4172 nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
4173 nameInfo.pNext = NULL;
4174 nameInfo.pObjectName = debugName;
4175 nameInfo.objectType = VK_OBJECT_TYPE_BUFFER;
4176 nameInfo.objectHandle = (uint64_t)buffer->buffer;
4177
4178 renderer->vkSetDebugUtilsObjectNameEXT(
4179 renderer->logicalDevice,
4180 &nameInfo);
4181 }
4182
4183 return buffer;
4184}
4185
4186static VulkanBufferContainer *VULKAN_INTERNAL_CreateBufferContainer(
4187 VulkanRenderer *renderer,
4188 VkDeviceSize size,
4189 SDL_GPUBufferUsageFlags usageFlags,
4190 VulkanBufferType type,
4191 bool dedicated,
4192 const char *debugName)
4193{
4194 VulkanBufferContainer *bufferContainer;
4195 VulkanBuffer *buffer;
4196
4197 buffer = VULKAN_INTERNAL_CreateBuffer(
4198 renderer,
4199 size,
4200 usageFlags,
4201 type,
4202 dedicated,
4203 debugName);
4204
4205 if (buffer == NULL) {
4206 return NULL;
4207 }
4208
4209 bufferContainer = SDL_calloc(1, sizeof(VulkanBufferContainer));
4210
4211 bufferContainer->activeBuffer = buffer;
4212 buffer->container = bufferContainer;
4213 buffer->containerIndex = 0;
4214
4215 bufferContainer->bufferCapacity = 1;
4216 bufferContainer->bufferCount = 1;
4217 bufferContainer->buffers = SDL_calloc(bufferContainer->bufferCapacity, sizeof(VulkanBuffer *));
4218 bufferContainer->buffers[0] = bufferContainer->activeBuffer;
4219 bufferContainer->dedicated = dedicated;
4220 bufferContainer->debugName = NULL;
4221
4222 if (debugName != NULL) {
4223 bufferContainer->debugName = SDL_strdup(debugName);
4224 }
4225
4226 return bufferContainer;
4227}
4228
4229// Texture Subresource Utilities
4230
4231static Uint32 VULKAN_INTERNAL_GetTextureSubresourceIndex(
4232 Uint32 mipLevel,
4233 Uint32 layer,
4234 Uint32 numLevels)
4235{
4236 return mipLevel + (layer * numLevels);
4237}
4238
4239static VulkanTextureSubresource *VULKAN_INTERNAL_FetchTextureSubresource(
4240 VulkanTextureContainer *textureContainer,
4241 Uint32 layer,
4242 Uint32 level)
4243{
4244 Uint32 index = VULKAN_INTERNAL_GetTextureSubresourceIndex(
4245 level,
4246 layer,
4247 textureContainer->header.info.num_levels);
4248
4249 return &textureContainer->activeTexture->subresources[index];
4250}
4251
4252static bool VULKAN_INTERNAL_CreateRenderTargetView(
4253 VulkanRenderer *renderer,
4254 VulkanTexture *texture,
4255 Uint32 layerOrDepth,
4256 Uint32 level,
4257 VkFormat format,
4258 VkComponentMapping swizzle,
4259 VkImageView *pView)
4260{
4261 VkResult vulkanResult;
4262 VkImageViewCreateInfo imageViewCreateInfo;
4263
4264 // create framebuffer compatible views for RenderTarget
4265 imageViewCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
4266 imageViewCreateInfo.pNext = NULL;
4267 imageViewCreateInfo.flags = 0;
4268 imageViewCreateInfo.image = texture->image;
4269 imageViewCreateInfo.format = format;
4270 imageViewCreateInfo.components = swizzle;
4271 imageViewCreateInfo.subresourceRange.aspectMask = texture->aspectFlags;
4272 imageViewCreateInfo.subresourceRange.baseMipLevel = level;
4273 imageViewCreateInfo.subresourceRange.levelCount = 1;
4274 imageViewCreateInfo.subresourceRange.baseArrayLayer = layerOrDepth;
4275 imageViewCreateInfo.subresourceRange.layerCount = 1;
4276 imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_2D;
4277
4278 vulkanResult = renderer->vkCreateImageView(
4279 renderer->logicalDevice,
4280 &imageViewCreateInfo,
4281 NULL,
4282 pView);
4283
4284 if (vulkanResult != VK_SUCCESS) {
4285 *pView = (VkImageView)VK_NULL_HANDLE;
4286 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateImageView, false);
4287 }
4288
4289 return true;
4290}
4291
4292static bool VULKAN_INTERNAL_CreateSubresourceView(
4293 VulkanRenderer *renderer,
4294 const SDL_GPUTextureCreateInfo *createinfo,
4295 VulkanTexture *texture,
4296 Uint32 layer,
4297 Uint32 level,
4298 VkComponentMapping swizzle,
4299 VkImageView *pView)
4300{
4301 VkResult vulkanResult;
4302 VkImageViewCreateInfo imageViewCreateInfo;
4303
4304 // create framebuffer compatible views for RenderTarget
4305 imageViewCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
4306 imageViewCreateInfo.pNext = NULL;
4307 imageViewCreateInfo.flags = 0;
4308 imageViewCreateInfo.image = texture->image;
4309 imageViewCreateInfo.format = SDLToVK_TextureFormat[createinfo->format];
4310 imageViewCreateInfo.components = swizzle;
4311 imageViewCreateInfo.subresourceRange.aspectMask = texture->aspectFlags;
4312 imageViewCreateInfo.subresourceRange.baseMipLevel = level;
4313 imageViewCreateInfo.subresourceRange.levelCount = 1;
4314 imageViewCreateInfo.subresourceRange.baseArrayLayer = layer;
4315 imageViewCreateInfo.subresourceRange.layerCount = 1;
4316 imageViewCreateInfo.viewType = (createinfo->type == SDL_GPU_TEXTURETYPE_3D) ? VK_IMAGE_VIEW_TYPE_3D : VK_IMAGE_VIEW_TYPE_2D;
4317
4318 vulkanResult = renderer->vkCreateImageView(
4319 renderer->logicalDevice,
4320 &imageViewCreateInfo,
4321 NULL,
4322 pView);
4323
4324 if (vulkanResult != VK_SUCCESS) {
4325 *pView = (VkImageView)VK_NULL_HANDLE;
4326 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateImageView, false);
4327 }
4328
4329 return true;
4330}
4331
4332// Swapchain
4333
4334static bool VULKAN_INTERNAL_QuerySwapchainSupport(
4335 VulkanRenderer *renderer,
4336 VkPhysicalDevice physicalDevice,
4337 VkSurfaceKHR surface,
4338 SwapchainSupportDetails *outputDetails)
4339{
4340 VkResult result;
4341 VkBool32 supportsPresent;
4342
4343 renderer->vkGetPhysicalDeviceSurfaceSupportKHR(
4344 physicalDevice,
4345 renderer->queueFamilyIndex,
4346 surface,
4347 &supportsPresent);
4348
4349 // Initialize these in case anything fails
4350 outputDetails->formatsLength = 0;
4351 outputDetails->presentModesLength = 0;
4352
4353 if (!supportsPresent) {
4354 SET_STRING_ERROR_AND_RETURN("This surface does not support presenting!", false);
4355 }
4356
4357 // Run the device surface queries
4358 result = renderer->vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
4359 physicalDevice,
4360 surface,
4361 &outputDetails->capabilities);
4362 CHECK_VULKAN_ERROR_AND_RETURN(result, vkGetPhysicalDeviceSurfaceCapabilitiesKHR, false);
4363
4364 if (!(outputDetails->capabilities.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR)) {
4365 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Opaque presentation unsupported! Expect weird transparency bugs!");
4366 }
4367
4368 result = renderer->vkGetPhysicalDeviceSurfaceFormatsKHR(
4369 physicalDevice,
4370 surface,
4371 &outputDetails->formatsLength,
4372 NULL);
4373 CHECK_VULKAN_ERROR_AND_RETURN(result, vkGetPhysicalDeviceSurfaceFormatsKHR, false);
4374 result = renderer->vkGetPhysicalDeviceSurfacePresentModesKHR(
4375 physicalDevice,
4376 surface,
4377 &outputDetails->presentModesLength,
4378 NULL);
4379 CHECK_VULKAN_ERROR_AND_RETURN(result, vkGetPhysicalDeviceSurfacePresentModesKHR, false);
4380
4381 // Generate the arrays, if applicable
4382
4383 outputDetails->formats = NULL;
4384 if (outputDetails->formatsLength != 0) {
4385 outputDetails->formats = (VkSurfaceFormatKHR *)SDL_malloc(
4386 sizeof(VkSurfaceFormatKHR) * outputDetails->formatsLength);
4387
4388 if (!outputDetails->formats) { // OOM
4389 return false;
4390 }
4391
4392 result = renderer->vkGetPhysicalDeviceSurfaceFormatsKHR(
4393 physicalDevice,
4394 surface,
4395 &outputDetails->formatsLength,
4396 outputDetails->formats);
4397 if (result != VK_SUCCESS) {
4398 SDL_free(outputDetails->formats);
4399 CHECK_VULKAN_ERROR_AND_RETURN(result, vkGetPhysicalDeviceSurfaceFormatsKHR, false);
4400 }
4401 }
4402
4403 outputDetails->presentModes = NULL;
4404 if (outputDetails->presentModesLength != 0) {
4405 outputDetails->presentModes = (VkPresentModeKHR *)SDL_malloc(
4406 sizeof(VkPresentModeKHR) * outputDetails->presentModesLength);
4407
4408 if (!outputDetails->presentModes) { // OOM
4409 SDL_free(outputDetails->formats);
4410 return false;
4411 }
4412
4413 result = renderer->vkGetPhysicalDeviceSurfacePresentModesKHR(
4414 physicalDevice,
4415 surface,
4416 &outputDetails->presentModesLength,
4417 outputDetails->presentModes);
4418 if (result != VK_SUCCESS) {
4419 SDL_free(outputDetails->formats);
4420 SDL_free(outputDetails->presentModes);
4421 CHECK_VULKAN_ERROR_AND_RETURN(result, vkGetPhysicalDeviceSurfacePresentModesKHR, false);
4422 }
4423 }
4424
4425 /* If we made it here, all the queries were successful. This does NOT
4426 * necessarily mean there are any supported formats or present modes!
4427 */
4428 return true;
4429}
4430
4431static bool VULKAN_INTERNAL_VerifySwapSurfaceFormat(
4432 VkFormat desiredFormat,
4433 VkColorSpaceKHR desiredColorSpace,
4434 VkSurfaceFormatKHR *availableFormats,
4435 Uint32 availableFormatsLength)
4436{
4437 Uint32 i;
4438 for (i = 0; i < availableFormatsLength; i += 1) {
4439 if (availableFormats[i].format == desiredFormat &&
4440 availableFormats[i].colorSpace == desiredColorSpace) {
4441 return true;
4442 }
4443 }
4444 return false;
4445}
4446
4447static bool VULKAN_INTERNAL_VerifySwapPresentMode(
4448 VkPresentModeKHR presentMode,
4449 const VkPresentModeKHR *availablePresentModes,
4450 Uint32 availablePresentModesLength)
4451{
4452 Uint32 i;
4453 for (i = 0; i < availablePresentModesLength; i += 1) {
4454 if (availablePresentModes[i] == presentMode) {
4455 return true;
4456 }
4457 }
4458 return false;
4459}
4460
4461/* It would be nice if VULKAN_INTERNAL_CreateSwapchain could return a bool.
4462 * Unfortunately, some Win32 NVIDIA drivers are stupid
4463 * and will return surface extents of (0, 0)
4464 * in certain edge cases, and the swapchain extents are not allowed to be 0.
4465 * In this case, the client probably still wants to claim the window
4466 * or recreate the swapchain, so we should return 2 to indicate retry.
4467 * -cosmonaut
4468 */
4469#define VULKAN_INTERNAL_TRY_AGAIN 2
4470
4471static Uint32 VULKAN_INTERNAL_CreateSwapchain(
4472 VulkanRenderer *renderer,
4473 WindowData *windowData)
4474{
4475 VkResult vulkanResult;
4476 VkSwapchainCreateInfoKHR swapchainCreateInfo;
4477 VkImage *swapchainImages;
4478 VkSemaphoreCreateInfo semaphoreCreateInfo;
4479 SwapchainSupportDetails swapchainSupportDetails;
4480 bool hasValidSwapchainComposition, hasValidPresentMode;
4481 Uint32 i;
4482
4483 windowData->frameCounter = 0;
4484
4485 SDL_VideoDevice *_this = SDL_GetVideoDevice();
4486 SDL_assert(_this && _this->Vulkan_CreateSurface);
4487
4488 // Each swapchain must have its own surface.
4489 if (!_this->Vulkan_CreateSurface(
4490 _this,
4491 windowData->window,
4492 renderer->instance,
4493 NULL, // FIXME: VAllocationCallbacks
4494 &windowData->surface)) {
4495 return false;
4496 }
4497 SDL_assert(windowData->surface);
4498
4499 if (!VULKAN_INTERNAL_QuerySwapchainSupport(
4500 renderer,
4501 renderer->physicalDevice,
4502 windowData->surface,
4503 &swapchainSupportDetails)) {
4504 renderer->vkDestroySurfaceKHR(
4505 renderer->instance,
4506 windowData->surface,
4507 NULL);
4508 windowData->surface = VK_NULL_HANDLE;
4509 if (swapchainSupportDetails.formatsLength > 0) {
4510 SDL_free(swapchainSupportDetails.formats);
4511 }
4512 if (swapchainSupportDetails.presentModesLength > 0) {
4513 SDL_free(swapchainSupportDetails.presentModes);
4514 }
4515 return false;
4516 }
4517
4518 // Verify that we can use the requested composition and present mode
4519 windowData->format = SwapchainCompositionToFormat[windowData->swapchainComposition];
4520 windowData->colorSpace = SwapchainCompositionToColorSpace[windowData->swapchainComposition];
4521 windowData->swapchainSwizzle = SwapchainCompositionSwizzle[windowData->swapchainComposition];
4522 windowData->usingFallbackFormat = false;
4523
4524 hasValidSwapchainComposition = VULKAN_INTERNAL_VerifySwapSurfaceFormat(
4525 windowData->format,
4526 windowData->colorSpace,
4527 swapchainSupportDetails.formats,
4528 swapchainSupportDetails.formatsLength);
4529
4530 if (!hasValidSwapchainComposition) {
4531 // Let's try again with the fallback format...
4532 windowData->format = SwapchainCompositionToFallbackFormat[windowData->swapchainComposition];
4533 windowData->usingFallbackFormat = true;
4534 hasValidSwapchainComposition = VULKAN_INTERNAL_VerifySwapSurfaceFormat(
4535 windowData->format,
4536 windowData->colorSpace,
4537 swapchainSupportDetails.formats,
4538 swapchainSupportDetails.formatsLength);
4539 }
4540
4541 hasValidPresentMode = VULKAN_INTERNAL_VerifySwapPresentMode(
4542 SDLToVK_PresentMode[windowData->presentMode],
4543 swapchainSupportDetails.presentModes,
4544 swapchainSupportDetails.presentModesLength);
4545
4546 if (!hasValidSwapchainComposition || !hasValidPresentMode) {
4547 renderer->vkDestroySurfaceKHR(
4548 renderer->instance,
4549 windowData->surface,
4550 NULL);
4551 windowData->surface = VK_NULL_HANDLE;
4552
4553 if (swapchainSupportDetails.formatsLength > 0) {
4554 SDL_free(swapchainSupportDetails.formats);
4555 }
4556
4557 if (swapchainSupportDetails.presentModesLength > 0) {
4558 SDL_free(swapchainSupportDetails.presentModes);
4559 }
4560
4561 if (!hasValidSwapchainComposition) {
4562 SET_STRING_ERROR_AND_RETURN("Device does not support requested swapchain composition!", false);
4563 }
4564 if (!hasValidPresentMode) {
4565 SET_STRING_ERROR_AND_RETURN("Device does not support requested present_mode!", false);
4566 }
4567 return false;
4568 }
4569
4570 // NVIDIA + Win32 can return 0 extent when the window is minimized. Try again!
4571 if (swapchainSupportDetails.capabilities.currentExtent.width == 0 ||
4572 swapchainSupportDetails.capabilities.currentExtent.height == 0) {
4573 renderer->vkDestroySurfaceKHR(
4574 renderer->instance,
4575 windowData->surface,
4576 NULL);
4577 windowData->surface = VK_NULL_HANDLE;
4578 if (swapchainSupportDetails.formatsLength > 0) {
4579 SDL_free(swapchainSupportDetails.formats);
4580 }
4581 if (swapchainSupportDetails.presentModesLength > 0) {
4582 SDL_free(swapchainSupportDetails.presentModes);
4583 }
4584 return VULKAN_INTERNAL_TRY_AGAIN;
4585 }
4586
4587 Uint32 requestedImageCount = renderer->allowedFramesInFlight;
4588
4589#ifdef SDL_PLATFORM_APPLE
4590 windowData->width = swapchainSupportDetails.capabilities.currentExtent.width;
4591 windowData->height = swapchainSupportDetails.capabilities.currentExtent.height;
4592#else
4593 windowData->width = SDL_clamp(
4594 windowData->swapchainCreateWidth,
4595 swapchainSupportDetails.capabilities.minImageExtent.width,
4596 swapchainSupportDetails.capabilities.maxImageExtent.width);
4597 windowData->height = SDL_clamp(windowData->swapchainCreateHeight,
4598 swapchainSupportDetails.capabilities.minImageExtent.height,
4599 swapchainSupportDetails.capabilities.maxImageExtent.height);
4600#endif
4601
4602 if (swapchainSupportDetails.capabilities.maxImageCount > 0 &&
4603 requestedImageCount > swapchainSupportDetails.capabilities.maxImageCount) {
4604 requestedImageCount = swapchainSupportDetails.capabilities.maxImageCount;
4605 }
4606
4607 if (requestedImageCount < swapchainSupportDetails.capabilities.minImageCount) {
4608 requestedImageCount = swapchainSupportDetails.capabilities.minImageCount;
4609 }
4610
4611 if (windowData->presentMode == SDL_GPU_PRESENTMODE_MAILBOX) {
4612 /* Required for proper triple-buffering.
4613 * Note that this is below the above maxImageCount check!
4614 * If the driver advertises MAILBOX but does not support 3 swap
4615 * images, it's not real mailbox support, so let it fail hard.
4616 * -flibit
4617 */
4618 requestedImageCount = SDL_max(requestedImageCount, 3);
4619 }
4620
4621 swapchainCreateInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
4622 swapchainCreateInfo.pNext = NULL;
4623 swapchainCreateInfo.flags = 0;
4624 swapchainCreateInfo.surface = windowData->surface;
4625 swapchainCreateInfo.minImageCount = requestedImageCount;
4626 swapchainCreateInfo.imageFormat = windowData->format;
4627 swapchainCreateInfo.imageColorSpace = windowData->colorSpace;
4628 swapchainCreateInfo.imageExtent.width = windowData->width;
4629 swapchainCreateInfo.imageExtent.height = windowData->height;
4630 swapchainCreateInfo.imageArrayLayers = 1;
4631 swapchainCreateInfo.imageUsage =
4632 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
4633 VK_IMAGE_USAGE_TRANSFER_DST_BIT;
4634 swapchainCreateInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE;
4635 swapchainCreateInfo.queueFamilyIndexCount = 0;
4636 swapchainCreateInfo.pQueueFamilyIndices = NULL;
4637#ifdef SDL_PLATFORM_ANDROID
4638 swapchainCreateInfo.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
4639#else
4640 swapchainCreateInfo.preTransform = swapchainSupportDetails.capabilities.currentTransform;
4641#endif
4642 swapchainCreateInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
4643 swapchainCreateInfo.presentMode = SDLToVK_PresentMode[windowData->presentMode];
4644 swapchainCreateInfo.clipped = VK_TRUE;
4645 swapchainCreateInfo.oldSwapchain = VK_NULL_HANDLE;
4646
4647 vulkanResult = renderer->vkCreateSwapchainKHR(
4648 renderer->logicalDevice,
4649 &swapchainCreateInfo,
4650 NULL,
4651 &windowData->swapchain);
4652
4653 if (swapchainSupportDetails.formatsLength > 0) {
4654 SDL_free(swapchainSupportDetails.formats);
4655 }
4656 if (swapchainSupportDetails.presentModesLength > 0) {
4657 SDL_free(swapchainSupportDetails.presentModes);
4658 }
4659
4660 if (vulkanResult != VK_SUCCESS) {
4661 renderer->vkDestroySurfaceKHR(
4662 renderer->instance,
4663 windowData->surface,
4664 NULL);
4665 windowData->surface = VK_NULL_HANDLE;
4666 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateSwapchainKHR, false);
4667 }
4668
4669 vulkanResult = renderer->vkGetSwapchainImagesKHR(
4670 renderer->logicalDevice,
4671 windowData->swapchain,
4672 &windowData->imageCount,
4673 NULL);
4674 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkGetSwapchainImagesKHR, false);
4675
4676 windowData->textureContainers = SDL_malloc(
4677 sizeof(VulkanTextureContainer) * windowData->imageCount);
4678
4679 if (!windowData->textureContainers) { // OOM
4680 renderer->vkDestroySurfaceKHR(
4681 renderer->instance,
4682 windowData->surface,
4683 NULL);
4684 renderer->vkDestroySwapchainKHR(
4685 renderer->logicalDevice,
4686 windowData->swapchain,
4687 NULL);
4688 windowData->surface = VK_NULL_HANDLE;
4689 windowData->swapchain = VK_NULL_HANDLE;
4690 return false;
4691 }
4692
4693 swapchainImages = SDL_stack_alloc(VkImage, windowData->imageCount);
4694
4695 vulkanResult = renderer->vkGetSwapchainImagesKHR(
4696 renderer->logicalDevice,
4697 windowData->swapchain,
4698 &windowData->imageCount,
4699 swapchainImages);
4700 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkGetSwapchainImagesKHR, false);
4701
4702 for (i = 0; i < windowData->imageCount; i += 1) {
4703
4704 // Initialize dummy container
4705 SDL_zero(windowData->textureContainers[i]);
4706 windowData->textureContainers[i].canBeCycled = false;
4707 windowData->textureContainers[i].header.info.width = windowData->width;
4708 windowData->textureContainers[i].header.info.height = windowData->height;
4709 windowData->textureContainers[i].header.info.layer_count_or_depth = 1;
4710 windowData->textureContainers[i].header.info.format = SwapchainCompositionToSDLFormat(
4711 windowData->swapchainComposition,
4712 windowData->usingFallbackFormat);
4713 windowData->textureContainers[i].header.info.type = SDL_GPU_TEXTURETYPE_2D;
4714 windowData->textureContainers[i].header.info.num_levels = 1;
4715 windowData->textureContainers[i].header.info.sample_count = SDL_GPU_SAMPLECOUNT_1;
4716 windowData->textureContainers[i].header.info.usage = SDL_GPU_TEXTUREUSAGE_COLOR_TARGET;
4717
4718 windowData->textureContainers[i].activeTexture = SDL_malloc(sizeof(VulkanTexture));
4719 windowData->textureContainers[i].activeTexture->image = swapchainImages[i];
4720
4721 // Swapchain memory is managed by the driver
4722 windowData->textureContainers[i].activeTexture->usedRegion = NULL;
4723
4724 windowData->textureContainers[i].activeTexture->swizzle = windowData->swapchainSwizzle;
4725 windowData->textureContainers[i].activeTexture->aspectFlags = VK_IMAGE_ASPECT_COLOR_BIT;
4726 windowData->textureContainers[i].activeTexture->depth = 1;
4727 windowData->textureContainers[i].activeTexture->usage = SDL_GPU_TEXTUREUSAGE_COLOR_TARGET;
4728 windowData->textureContainers[i].activeTexture->container = &windowData->textureContainers[i];
4729 SDL_SetAtomicInt(&windowData->textureContainers[i].activeTexture->referenceCount, 0);
4730
4731 // Create slice
4732 windowData->textureContainers[i].activeTexture->subresourceCount = 1;
4733 windowData->textureContainers[i].activeTexture->subresources = SDL_malloc(sizeof(VulkanTextureSubresource));
4734 windowData->textureContainers[i].activeTexture->subresources[0].parent = windowData->textureContainers[i].activeTexture;
4735 windowData->textureContainers[i].activeTexture->subresources[0].layer = 0;
4736 windowData->textureContainers[i].activeTexture->subresources[0].level = 0;
4737 windowData->textureContainers[i].activeTexture->subresources[0].renderTargetViews = SDL_malloc(sizeof(VkImageView));
4738 if (!VULKAN_INTERNAL_CreateRenderTargetView(
4739 renderer,
4740 windowData->textureContainers[i].activeTexture,
4741 0,
4742 0,
4743 windowData->format,
4744 windowData->swapchainSwizzle,
4745 &windowData->textureContainers[i].activeTexture->subresources[0].renderTargetViews[0])) {
4746 renderer->vkDestroySurfaceKHR(
4747 renderer->instance,
4748 windowData->surface,
4749 NULL);
4750 renderer->vkDestroySwapchainKHR(
4751 renderer->logicalDevice,
4752 windowData->swapchain,
4753 NULL);
4754 windowData->surface = VK_NULL_HANDLE;
4755 windowData->swapchain = VK_NULL_HANDLE;
4756 return false;
4757 }
4758 }
4759
4760 SDL_stack_free(swapchainImages);
4761
4762 semaphoreCreateInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;
4763 semaphoreCreateInfo.pNext = NULL;
4764 semaphoreCreateInfo.flags = 0;
4765
4766 for (i = 0; i < MAX_FRAMES_IN_FLIGHT; i += 1) {
4767 vulkanResult = renderer->vkCreateSemaphore(
4768 renderer->logicalDevice,
4769 &semaphoreCreateInfo,
4770 NULL,
4771 &windowData->imageAvailableSemaphore[i]);
4772
4773 if (vulkanResult != VK_SUCCESS) {
4774 renderer->vkDestroySurfaceKHR(
4775 renderer->instance,
4776 windowData->surface,
4777 NULL);
4778 renderer->vkDestroySwapchainKHR(
4779 renderer->logicalDevice,
4780 windowData->swapchain,
4781 NULL);
4782 windowData->surface = VK_NULL_HANDLE;
4783 windowData->swapchain = VK_NULL_HANDLE;
4784 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateSemaphore, false);
4785 }
4786
4787 renderer->vkCreateSemaphore(
4788 renderer->logicalDevice,
4789 &semaphoreCreateInfo,
4790 NULL,
4791 &windowData->renderFinishedSemaphore[i]);
4792
4793 if (vulkanResult != VK_SUCCESS) {
4794 renderer->vkDestroySurfaceKHR(
4795 renderer->instance,
4796 windowData->surface,
4797 NULL);
4798 renderer->vkDestroySwapchainKHR(
4799 renderer->logicalDevice,
4800 windowData->swapchain,
4801 NULL);
4802 windowData->surface = VK_NULL_HANDLE;
4803 windowData->swapchain = VK_NULL_HANDLE;
4804 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateSemaphore, false);
4805 }
4806
4807 windowData->inFlightFences[i] = NULL;
4808 }
4809
4810 windowData->needsSwapchainRecreate = false;
4811 return true;
4812}
4813
4814// Command Buffers
4815
4816static bool VULKAN_INTERNAL_BeginCommandBuffer(
4817 VulkanRenderer *renderer,
4818 VulkanCommandBuffer *commandBuffer)
4819{
4820 VkCommandBufferBeginInfo beginInfo;
4821 VkResult result;
4822
4823 beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
4824 beginInfo.pNext = NULL;
4825 beginInfo.flags = 0;
4826 beginInfo.pInheritanceInfo = NULL;
4827 beginInfo.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
4828
4829 result = renderer->vkBeginCommandBuffer(
4830 commandBuffer->commandBuffer,
4831 &beginInfo);
4832
4833 CHECK_VULKAN_ERROR_AND_RETURN(result, vkBeginCommandBuffer, false);
4834
4835 return true;
4836}
4837
4838static bool VULKAN_INTERNAL_EndCommandBuffer(
4839 VulkanRenderer *renderer,
4840 VulkanCommandBuffer *commandBuffer)
4841{
4842 VkResult result = renderer->vkEndCommandBuffer(
4843 commandBuffer->commandBuffer);
4844
4845 CHECK_VULKAN_ERROR_AND_RETURN(result, vkEndCommandBuffer, false);
4846
4847 return true;
4848}
4849
4850static void VULKAN_DestroyDevice(
4851 SDL_GPUDevice *device)
4852{
4853 VulkanRenderer *renderer = (VulkanRenderer *)device->driverData;
4854 VulkanMemorySubAllocator *allocator;
4855
4856 VULKAN_Wait(device->driverData);
4857
4858 for (Sint32 i = renderer->claimedWindowCount - 1; i >= 0; i -= 1) {
4859 VULKAN_ReleaseWindow(device->driverData, renderer->claimedWindows[i]->window);
4860 }
4861
4862 SDL_free(renderer->claimedWindows);
4863
4864 VULKAN_Wait(device->driverData);
4865
4866 SDL_free(renderer->submittedCommandBuffers);
4867
4868 for (Uint32 i = 0; i < renderer->uniformBufferPoolCount; i += 1) {
4869 VULKAN_INTERNAL_DestroyBuffer(
4870 renderer,
4871 renderer->uniformBufferPool[i]->buffer);
4872 SDL_free(renderer->uniformBufferPool[i]);
4873 }
4874 SDL_free(renderer->uniformBufferPool);
4875
4876 for (Uint32 i = 0; i < renderer->descriptorSetCachePoolCount; i += 1) {
4877 VULKAN_INTERNAL_DestroyDescriptorSetCache(
4878 renderer,
4879 renderer->descriptorSetCachePool[i]);
4880 }
4881 SDL_free(renderer->descriptorSetCachePool);
4882
4883 for (Uint32 i = 0; i < renderer->fencePool.availableFenceCount; i += 1) {
4884 renderer->vkDestroyFence(
4885 renderer->logicalDevice,
4886 renderer->fencePool.availableFences[i]->fence,
4887 NULL);
4888
4889 SDL_free(renderer->fencePool.availableFences[i]);
4890 }
4891
4892 SDL_free(renderer->fencePool.availableFences);
4893 SDL_DestroyMutex(renderer->fencePool.lock);
4894
4895 SDL_DestroyHashTable(renderer->commandPoolHashTable);
4896 SDL_DestroyHashTable(renderer->renderPassHashTable);
4897 SDL_DestroyHashTable(renderer->framebufferHashTable);
4898 SDL_DestroyHashTable(renderer->graphicsPipelineResourceLayoutHashTable);
4899 SDL_DestroyHashTable(renderer->computePipelineResourceLayoutHashTable);
4900 SDL_DestroyHashTable(renderer->descriptorSetLayoutHashTable);
4901
4902 for (Uint32 i = 0; i < VK_MAX_MEMORY_TYPES; i += 1) {
4903 allocator = &renderer->memoryAllocator->subAllocators[i];
4904
4905 for (Sint32 j = allocator->allocationCount - 1; j >= 0; j -= 1) {
4906 for (Sint32 k = allocator->allocations[j]->usedRegionCount - 1; k >= 0; k -= 1) {
4907 VULKAN_INTERNAL_RemoveMemoryUsedRegion(
4908 renderer,
4909 allocator->allocations[j]->usedRegions[k]);
4910 }
4911
4912 VULKAN_INTERNAL_DeallocateMemory(
4913 renderer,
4914 allocator,
4915 j);
4916 }
4917
4918 if (renderer->memoryAllocator->subAllocators[i].allocations != NULL) {
4919 SDL_free(renderer->memoryAllocator->subAllocators[i].allocations);
4920 }
4921
4922 SDL_free(renderer->memoryAllocator->subAllocators[i].sortedFreeRegions);
4923 }
4924
4925 SDL_free(renderer->memoryAllocator);
4926
4927 SDL_free(renderer->texturesToDestroy);
4928 SDL_free(renderer->buffersToDestroy);
4929 SDL_free(renderer->graphicsPipelinesToDestroy);
4930 SDL_free(renderer->computePipelinesToDestroy);
4931 SDL_free(renderer->shadersToDestroy);
4932 SDL_free(renderer->samplersToDestroy);
4933 SDL_free(renderer->framebuffersToDestroy);
4934 SDL_free(renderer->allocationsToDefrag);
4935
4936 SDL_DestroyMutex(renderer->allocatorLock);
4937 SDL_DestroyMutex(renderer->disposeLock);
4938 SDL_DestroyMutex(renderer->submitLock);
4939 SDL_DestroyMutex(renderer->acquireCommandBufferLock);
4940 SDL_DestroyMutex(renderer->acquireUniformBufferLock);
4941 SDL_DestroyMutex(renderer->framebufferFetchLock);
4942 SDL_DestroyMutex(renderer->windowLock);
4943
4944 renderer->vkDestroyDevice(renderer->logicalDevice, NULL);
4945 renderer->vkDestroyInstance(renderer->instance, NULL);
4946
4947 SDL_free(renderer);
4948 SDL_free(device);
4949 SDL_Vulkan_UnloadLibrary();
4950}
4951
4952static DescriptorSetCache *VULKAN_INTERNAL_AcquireDescriptorSetCache(
4953 VulkanRenderer *renderer)
4954{
4955 DescriptorSetCache *cache;
4956
4957 if (renderer->descriptorSetCachePoolCount == 0) {
4958 cache = SDL_malloc(sizeof(DescriptorSetCache));
4959 cache->poolCount = 0;
4960 cache->pools = NULL;
4961 } else {
4962 cache = renderer->descriptorSetCachePool[renderer->descriptorSetCachePoolCount - 1];
4963 renderer->descriptorSetCachePoolCount -= 1;
4964 }
4965
4966 return cache;
4967}
4968
4969static void VULKAN_INTERNAL_ReturnDescriptorSetCacheToPool(
4970 VulkanRenderer *renderer,
4971 DescriptorSetCache *descriptorSetCache)
4972{
4973 EXPAND_ARRAY_IF_NEEDED(
4974 renderer->descriptorSetCachePool,
4975 DescriptorSetCache *,
4976 renderer->descriptorSetCachePoolCount + 1,
4977 renderer->descriptorSetCachePoolCapacity,
4978 renderer->descriptorSetCachePoolCapacity * 2);
4979
4980 renderer->descriptorSetCachePool[renderer->descriptorSetCachePoolCount] = descriptorSetCache;
4981 renderer->descriptorSetCachePoolCount += 1;
4982
4983 for (Uint32 i = 0; i < descriptorSetCache->poolCount; i += 1) {
4984 descriptorSetCache->pools[i].descriptorSetIndex = 0;
4985 }
4986}
4987
4988static VkDescriptorSet VULKAN_INTERNAL_FetchDescriptorSet(
4989 VulkanRenderer *renderer,
4990 VulkanCommandBuffer *vulkanCommandBuffer,
4991 DescriptorSetLayout *descriptorSetLayout)
4992{
4993 // Grow the pool to meet the descriptor set layout ID
4994 if (descriptorSetLayout->ID >= vulkanCommandBuffer->descriptorSetCache->poolCount) {
4995 vulkanCommandBuffer->descriptorSetCache->pools = SDL_realloc(
4996 vulkanCommandBuffer->descriptorSetCache->pools,
4997 sizeof(DescriptorSetPool) * (descriptorSetLayout->ID + 1));
4998
4999 for (Uint32 i = vulkanCommandBuffer->descriptorSetCache->poolCount; i < descriptorSetLayout->ID + 1; i += 1) {
5000 SDL_zero(vulkanCommandBuffer->descriptorSetCache->pools[i]);
5001 }
5002
5003 vulkanCommandBuffer->descriptorSetCache->poolCount = descriptorSetLayout->ID + 1;
5004 }
5005
5006 DescriptorSetPool *pool =
5007 &vulkanCommandBuffer->descriptorSetCache->pools[descriptorSetLayout->ID];
5008
5009 if (pool->descriptorSetIndex == pool->descriptorSetCount) {
5010 if (!VULKAN_INTERNAL_AllocateDescriptorsFromPool(
5011 renderer,
5012 descriptorSetLayout,
5013 pool)) {
5014 return VK_NULL_HANDLE;
5015 }
5016 }
5017
5018 VkDescriptorSet descriptorSet = pool->descriptorSets[pool->descriptorSetIndex];
5019 pool->descriptorSetIndex += 1;
5020
5021 return descriptorSet;
5022}
5023
5024static void VULKAN_INTERNAL_BindGraphicsDescriptorSets(
5025 VulkanRenderer *renderer,
5026 VulkanCommandBuffer *commandBuffer)
5027{
5028 VulkanGraphicsPipelineResourceLayout *resourceLayout;
5029 DescriptorSetLayout *descriptorSetLayout;
5030 VkWriteDescriptorSet writeDescriptorSets[
5031 (MAX_TEXTURE_SAMPLERS_PER_STAGE +
5032 MAX_STORAGE_TEXTURES_PER_STAGE +
5033 MAX_STORAGE_BUFFERS_PER_STAGE +
5034 MAX_UNIFORM_BUFFERS_PER_STAGE) * 2];
5035 VkDescriptorBufferInfo bufferInfos[MAX_STORAGE_BUFFERS_PER_STAGE * 2];
5036 VkDescriptorImageInfo imageInfos[(MAX_TEXTURE_SAMPLERS_PER_STAGE + MAX_STORAGE_TEXTURES_PER_STAGE) * 2];
5037 Uint32 dynamicOffsets[MAX_UNIFORM_BUFFERS_PER_STAGE * 2];
5038 Uint32 writeCount = 0;
5039 Uint32 bufferInfoCount = 0;
5040 Uint32 imageInfoCount = 0;
5041 Uint32 dynamicOffsetCount = 0;
5042
5043 if (
5044 !commandBuffer->needVertexBufferBind &&
5045 !commandBuffer->needNewVertexResourceDescriptorSet &&
5046 !commandBuffer->needNewVertexUniformDescriptorSet &&
5047 !commandBuffer->needNewVertexUniformOffsets &&
5048 !commandBuffer->needNewFragmentResourceDescriptorSet &&
5049 !commandBuffer->needNewFragmentUniformDescriptorSet &&
5050 !commandBuffer->needNewFragmentUniformOffsets
5051 ) {
5052 return;
5053 }
5054
5055 if (commandBuffer->needVertexBufferBind && commandBuffer->vertexBufferCount > 0) {
5056 renderer->vkCmdBindVertexBuffers(
5057 commandBuffer->commandBuffer,
5058 0,
5059 commandBuffer->vertexBufferCount,
5060 commandBuffer->vertexBuffers,
5061 commandBuffer->vertexBufferOffsets);
5062
5063 commandBuffer->needVertexBufferBind = false;
5064 }
5065
5066 resourceLayout = commandBuffer->currentGraphicsPipeline->resourceLayout;
5067
5068 if (commandBuffer->needNewVertexResourceDescriptorSet) {
5069 descriptorSetLayout = resourceLayout->descriptorSetLayouts[0];
5070
5071 commandBuffer->vertexResourceDescriptorSet = VULKAN_INTERNAL_FetchDescriptorSet(
5072 renderer,
5073 commandBuffer,
5074 descriptorSetLayout);
5075
5076 for (Uint32 i = 0; i < resourceLayout->vertexSamplerCount; i += 1) {
5077 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
5078
5079 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
5080 currentWriteDescriptorSet->pNext = NULL;
5081 currentWriteDescriptorSet->descriptorCount = 1;
5082 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
5083 currentWriteDescriptorSet->dstArrayElement = 0;
5084 currentWriteDescriptorSet->dstBinding = i;
5085 currentWriteDescriptorSet->dstSet = commandBuffer->vertexResourceDescriptorSet;
5086 currentWriteDescriptorSet->pTexelBufferView = NULL;
5087 currentWriteDescriptorSet->pBufferInfo = NULL;
5088
5089 imageInfos[imageInfoCount].sampler = commandBuffer->vertexSamplers[i]->sampler;
5090 imageInfos[imageInfoCount].imageView = commandBuffer->vertexSamplerTextures[i]->fullView;
5091 imageInfos[imageInfoCount].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
5092
5093 currentWriteDescriptorSet->pImageInfo = &imageInfos[imageInfoCount];
5094
5095 writeCount += 1;
5096 imageInfoCount += 1;
5097 }
5098
5099 for (Uint32 i = 0; i < resourceLayout->vertexStorageTextureCount; i += 1) {
5100 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
5101
5102 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
5103 currentWriteDescriptorSet->pNext = NULL;
5104 currentWriteDescriptorSet->descriptorCount = 1;
5105 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; // Yes, we are declaring a storage image as a sampled image, because shaders are stupid.
5106 currentWriteDescriptorSet->dstArrayElement = 0;
5107 currentWriteDescriptorSet->dstBinding = resourceLayout->vertexSamplerCount + i;
5108 currentWriteDescriptorSet->dstSet = commandBuffer->vertexResourceDescriptorSet;
5109 currentWriteDescriptorSet->pTexelBufferView = NULL;
5110 currentWriteDescriptorSet->pBufferInfo = NULL;
5111
5112 imageInfos[imageInfoCount].sampler = VK_NULL_HANDLE;
5113 imageInfos[imageInfoCount].imageView = commandBuffer->vertexStorageTextures[i]->fullView;
5114 imageInfos[imageInfoCount].imageLayout = VK_IMAGE_LAYOUT_GENERAL;
5115
5116 currentWriteDescriptorSet->pImageInfo = &imageInfos[imageInfoCount];
5117
5118 writeCount += 1;
5119 imageInfoCount += 1;
5120 }
5121
5122 for (Uint32 i = 0; i < resourceLayout->vertexStorageBufferCount; i += 1) {
5123 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
5124
5125 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
5126 currentWriteDescriptorSet->pNext = NULL;
5127 currentWriteDescriptorSet->descriptorCount = 1;
5128 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
5129 currentWriteDescriptorSet->dstArrayElement = 0;
5130 currentWriteDescriptorSet->dstBinding = resourceLayout->vertexSamplerCount + resourceLayout->vertexStorageTextureCount + i;
5131 currentWriteDescriptorSet->dstSet = commandBuffer->vertexResourceDescriptorSet;
5132 currentWriteDescriptorSet->pTexelBufferView = NULL;
5133 currentWriteDescriptorSet->pImageInfo = NULL;
5134
5135 bufferInfos[bufferInfoCount].buffer = commandBuffer->vertexStorageBuffers[i]->buffer;
5136 bufferInfos[bufferInfoCount].offset = 0;
5137 bufferInfos[bufferInfoCount].range = VK_WHOLE_SIZE;
5138
5139 currentWriteDescriptorSet->pBufferInfo = &bufferInfos[bufferInfoCount];
5140
5141 writeCount += 1;
5142 bufferInfoCount += 1;
5143 }
5144
5145 commandBuffer->needNewVertexResourceDescriptorSet = false;
5146 }
5147
5148 if (commandBuffer->needNewVertexUniformDescriptorSet) {
5149 descriptorSetLayout = resourceLayout->descriptorSetLayouts[1];
5150
5151 commandBuffer->vertexUniformDescriptorSet = VULKAN_INTERNAL_FetchDescriptorSet(
5152 renderer,
5153 commandBuffer,
5154 descriptorSetLayout);
5155
5156 for (Uint32 i = 0; i < resourceLayout->vertexUniformBufferCount; i += 1) {
5157 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
5158
5159 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
5160 currentWriteDescriptorSet->pNext = NULL;
5161 currentWriteDescriptorSet->descriptorCount = 1;
5162 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC;
5163 currentWriteDescriptorSet->dstArrayElement = 0;
5164 currentWriteDescriptorSet->dstBinding = i;
5165 currentWriteDescriptorSet->dstSet = commandBuffer->vertexUniformDescriptorSet;
5166 currentWriteDescriptorSet->pTexelBufferView = NULL;
5167 currentWriteDescriptorSet->pImageInfo = NULL;
5168
5169 bufferInfos[bufferInfoCount].buffer = commandBuffer->vertexUniformBuffers[i]->buffer->buffer;
5170 bufferInfos[bufferInfoCount].offset = 0;
5171 bufferInfos[bufferInfoCount].range = MAX_UBO_SECTION_SIZE;
5172
5173 currentWriteDescriptorSet->pBufferInfo = &bufferInfos[bufferInfoCount];
5174
5175 writeCount += 1;
5176 bufferInfoCount += 1;
5177 }
5178
5179 commandBuffer->needNewVertexUniformDescriptorSet = false;
5180 }
5181
5182 for (Uint32 i = 0; i < resourceLayout->vertexUniformBufferCount; i += 1) {
5183 dynamicOffsets[dynamicOffsetCount] = commandBuffer->vertexUniformBuffers[i]->drawOffset;
5184 dynamicOffsetCount += 1;
5185 }
5186
5187 if (commandBuffer->needNewFragmentResourceDescriptorSet) {
5188 descriptorSetLayout = resourceLayout->descriptorSetLayouts[2];
5189
5190 commandBuffer->fragmentResourceDescriptorSet = VULKAN_INTERNAL_FetchDescriptorSet(
5191 renderer,
5192 commandBuffer,
5193 descriptorSetLayout);
5194
5195 for (Uint32 i = 0; i < resourceLayout->fragmentSamplerCount; i += 1) {
5196 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
5197
5198 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
5199 currentWriteDescriptorSet->pNext = NULL;
5200 currentWriteDescriptorSet->descriptorCount = 1;
5201 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
5202 currentWriteDescriptorSet->dstArrayElement = 0;
5203 currentWriteDescriptorSet->dstBinding = i;
5204 currentWriteDescriptorSet->dstSet = commandBuffer->fragmentResourceDescriptorSet;
5205 currentWriteDescriptorSet->pTexelBufferView = NULL;
5206 currentWriteDescriptorSet->pBufferInfo = NULL;
5207
5208 imageInfos[imageInfoCount].sampler = commandBuffer->fragmentSamplers[i]->sampler;
5209 imageInfos[imageInfoCount].imageView = commandBuffer->fragmentSamplerTextures[i]->fullView;
5210 imageInfos[imageInfoCount].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
5211
5212 currentWriteDescriptorSet->pImageInfo = &imageInfos[imageInfoCount];
5213
5214 writeCount += 1;
5215 imageInfoCount += 1;
5216 }
5217
5218 for (Uint32 i = 0; i < resourceLayout->fragmentStorageTextureCount; i += 1) {
5219 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
5220
5221 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
5222 currentWriteDescriptorSet->pNext = NULL;
5223 currentWriteDescriptorSet->descriptorCount = 1;
5224 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; // Yes, we are declaring a storage image as a sampled image, because shaders are stupid.
5225 currentWriteDescriptorSet->dstArrayElement = 0;
5226 currentWriteDescriptorSet->dstBinding = resourceLayout->fragmentSamplerCount + i;
5227 currentWriteDescriptorSet->dstSet = commandBuffer->fragmentResourceDescriptorSet;
5228 currentWriteDescriptorSet->pTexelBufferView = NULL;
5229 currentWriteDescriptorSet->pBufferInfo = NULL;
5230
5231 imageInfos[imageInfoCount].sampler = VK_NULL_HANDLE;
5232 imageInfos[imageInfoCount].imageView = commandBuffer->fragmentStorageTextures[i]->fullView;
5233 imageInfos[imageInfoCount].imageLayout = VK_IMAGE_LAYOUT_GENERAL;
5234
5235 currentWriteDescriptorSet->pImageInfo = &imageInfos[imageInfoCount];
5236
5237 writeCount += 1;
5238 imageInfoCount += 1;
5239 }
5240
5241 for (Uint32 i = 0; i < resourceLayout->fragmentStorageBufferCount; i += 1) {
5242 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
5243
5244 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
5245 currentWriteDescriptorSet->pNext = NULL;
5246 currentWriteDescriptorSet->descriptorCount = 1;
5247 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
5248 currentWriteDescriptorSet->dstArrayElement = 0;
5249 currentWriteDescriptorSet->dstBinding = resourceLayout->fragmentSamplerCount + resourceLayout->fragmentStorageTextureCount + i;
5250 currentWriteDescriptorSet->dstSet = commandBuffer->fragmentResourceDescriptorSet;
5251 currentWriteDescriptorSet->pTexelBufferView = NULL;
5252 currentWriteDescriptorSet->pImageInfo = NULL;
5253
5254 bufferInfos[bufferInfoCount].buffer = commandBuffer->fragmentStorageBuffers[i]->buffer;
5255 bufferInfos[bufferInfoCount].offset = 0;
5256 bufferInfos[bufferInfoCount].range = VK_WHOLE_SIZE;
5257
5258 currentWriteDescriptorSet->pBufferInfo = &bufferInfos[bufferInfoCount];
5259
5260 writeCount += 1;
5261 bufferInfoCount += 1;
5262 }
5263
5264 commandBuffer->needNewFragmentResourceDescriptorSet = false;
5265 }
5266
5267 if (commandBuffer->needNewFragmentUniformDescriptorSet) {
5268 descriptorSetLayout = resourceLayout->descriptorSetLayouts[3];
5269
5270 commandBuffer->fragmentUniformDescriptorSet = VULKAN_INTERNAL_FetchDescriptorSet(
5271 renderer,
5272 commandBuffer,
5273 descriptorSetLayout);
5274
5275 for (Uint32 i = 0; i < resourceLayout->fragmentUniformBufferCount; i += 1) {
5276 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
5277
5278 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
5279 currentWriteDescriptorSet->pNext = NULL;
5280 currentWriteDescriptorSet->descriptorCount = 1;
5281 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC;
5282 currentWriteDescriptorSet->dstArrayElement = 0;
5283 currentWriteDescriptorSet->dstBinding = i;
5284 currentWriteDescriptorSet->dstSet = commandBuffer->fragmentUniformDescriptorSet;
5285 currentWriteDescriptorSet->pTexelBufferView = NULL;
5286 currentWriteDescriptorSet->pImageInfo = NULL;
5287
5288 bufferInfos[bufferInfoCount].buffer = commandBuffer->fragmentUniformBuffers[i]->buffer->buffer;
5289 bufferInfos[bufferInfoCount].offset = 0;
5290 bufferInfos[bufferInfoCount].range = MAX_UBO_SECTION_SIZE;
5291
5292 currentWriteDescriptorSet->pBufferInfo = &bufferInfos[bufferInfoCount];
5293
5294 writeCount += 1;
5295 bufferInfoCount += 1;
5296 }
5297
5298 commandBuffer->needNewFragmentUniformDescriptorSet = false;
5299 }
5300
5301 for (Uint32 i = 0; i < resourceLayout->fragmentUniformBufferCount; i += 1) {
5302 dynamicOffsets[dynamicOffsetCount] = commandBuffer->fragmentUniformBuffers[i]->drawOffset;
5303 dynamicOffsetCount += 1;
5304 }
5305
5306 renderer->vkUpdateDescriptorSets(
5307 renderer->logicalDevice,
5308 writeCount,
5309 writeDescriptorSets,
5310 0,
5311 NULL);
5312
5313 VkDescriptorSet sets[4];
5314 sets[0] = commandBuffer->vertexResourceDescriptorSet;
5315 sets[1] = commandBuffer->vertexUniformDescriptorSet;
5316 sets[2] = commandBuffer->fragmentResourceDescriptorSet;
5317 sets[3] = commandBuffer->fragmentUniformDescriptorSet;
5318
5319 renderer->vkCmdBindDescriptorSets(
5320 commandBuffer->commandBuffer,
5321 VK_PIPELINE_BIND_POINT_GRAPHICS,
5322 resourceLayout->pipelineLayout,
5323 0,
5324 4,
5325 sets,
5326 dynamicOffsetCount,
5327 dynamicOffsets);
5328
5329 commandBuffer->needNewVertexUniformOffsets = false;
5330 commandBuffer->needNewFragmentUniformOffsets = false;
5331}
5332
5333static void VULKAN_DrawIndexedPrimitives(
5334 SDL_GPUCommandBuffer *commandBuffer,
5335 Uint32 numIndices,
5336 Uint32 numInstances,
5337 Uint32 firstIndex,
5338 Sint32 vertexOffset,
5339 Uint32 firstInstance)
5340{
5341 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
5342 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
5343
5344 VULKAN_INTERNAL_BindGraphicsDescriptorSets(renderer, vulkanCommandBuffer);
5345
5346 renderer->vkCmdDrawIndexed(
5347 vulkanCommandBuffer->commandBuffer,
5348 numIndices,
5349 numInstances,
5350 firstIndex,
5351 vertexOffset,
5352 firstInstance);
5353}
5354
5355static void VULKAN_DrawPrimitives(
5356 SDL_GPUCommandBuffer *commandBuffer,
5357 Uint32 numVertices,
5358 Uint32 numInstances,
5359 Uint32 firstVertex,
5360 Uint32 firstInstance)
5361{
5362 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
5363 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
5364
5365 VULKAN_INTERNAL_BindGraphicsDescriptorSets(renderer, vulkanCommandBuffer);
5366
5367 renderer->vkCmdDraw(
5368 vulkanCommandBuffer->commandBuffer,
5369 numVertices,
5370 numInstances,
5371 firstVertex,
5372 firstInstance);
5373}
5374
5375static void VULKAN_DrawPrimitivesIndirect(
5376 SDL_GPUCommandBuffer *commandBuffer,
5377 SDL_GPUBuffer *buffer,
5378 Uint32 offset,
5379 Uint32 drawCount)
5380{
5381 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
5382 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
5383 VulkanBuffer *vulkanBuffer = ((VulkanBufferContainer *)buffer)->activeBuffer;
5384 Uint32 pitch = sizeof(SDL_GPUIndirectDrawCommand);
5385 Uint32 i;
5386
5387 VULKAN_INTERNAL_BindGraphicsDescriptorSets(renderer, vulkanCommandBuffer);
5388
5389 if (renderer->supportsMultiDrawIndirect) {
5390 // Real multi-draw!
5391 renderer->vkCmdDrawIndirect(
5392 vulkanCommandBuffer->commandBuffer,
5393 vulkanBuffer->buffer,
5394 offset,
5395 drawCount,
5396 pitch);
5397 } else {
5398 // Fake multi-draw...
5399 for (i = 0; i < drawCount; i += 1) {
5400 renderer->vkCmdDrawIndirect(
5401 vulkanCommandBuffer->commandBuffer,
5402 vulkanBuffer->buffer,
5403 offset + (pitch * i),
5404 1,
5405 pitch);
5406 }
5407 }
5408
5409 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, vulkanBuffer);
5410}
5411
5412static void VULKAN_DrawIndexedPrimitivesIndirect(
5413 SDL_GPUCommandBuffer *commandBuffer,
5414 SDL_GPUBuffer *buffer,
5415 Uint32 offset,
5416 Uint32 drawCount)
5417{
5418 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
5419 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
5420 VulkanBuffer *vulkanBuffer = ((VulkanBufferContainer *)buffer)->activeBuffer;
5421 Uint32 pitch = sizeof(SDL_GPUIndexedIndirectDrawCommand);
5422 Uint32 i;
5423
5424 VULKAN_INTERNAL_BindGraphicsDescriptorSets(renderer, vulkanCommandBuffer);
5425
5426 if (renderer->supportsMultiDrawIndirect) {
5427 // Real multi-draw!
5428 renderer->vkCmdDrawIndexedIndirect(
5429 vulkanCommandBuffer->commandBuffer,
5430 vulkanBuffer->buffer,
5431 offset,
5432 drawCount,
5433 pitch);
5434 } else {
5435 // Fake multi-draw...
5436 for (i = 0; i < drawCount; i += 1) {
5437 renderer->vkCmdDrawIndexedIndirect(
5438 vulkanCommandBuffer->commandBuffer,
5439 vulkanBuffer->buffer,
5440 offset + (pitch * i),
5441 1,
5442 pitch);
5443 }
5444 }
5445
5446 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, vulkanBuffer);
5447}
5448
5449// Debug Naming
5450
5451static void VULKAN_INTERNAL_SetBufferName(
5452 VulkanRenderer *renderer,
5453 VulkanBuffer *buffer,
5454 const char *text)
5455{
5456 VkDebugUtilsObjectNameInfoEXT nameInfo;
5457
5458 if (renderer->debugMode && renderer->supportsDebugUtils) {
5459 nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
5460 nameInfo.pNext = NULL;
5461 nameInfo.pObjectName = text;
5462 nameInfo.objectType = VK_OBJECT_TYPE_BUFFER;
5463 nameInfo.objectHandle = (uint64_t)buffer->buffer;
5464
5465 renderer->vkSetDebugUtilsObjectNameEXT(
5466 renderer->logicalDevice,
5467 &nameInfo);
5468 }
5469}
5470
5471static void VULKAN_SetBufferName(
5472 SDL_GPURenderer *driverData,
5473 SDL_GPUBuffer *buffer,
5474 const char *text)
5475{
5476 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
5477 VulkanBufferContainer *container = (VulkanBufferContainer *)buffer;
5478 size_t textLength = SDL_strlen(text) + 1;
5479
5480 if (renderer->debugMode && renderer->supportsDebugUtils) {
5481 container->debugName = SDL_realloc(
5482 container->debugName,
5483 textLength);
5484
5485 SDL_utf8strlcpy(
5486 container->debugName,
5487 text,
5488 textLength);
5489
5490 for (Uint32 i = 0; i < container->bufferCount; i += 1) {
5491 VULKAN_INTERNAL_SetBufferName(
5492 renderer,
5493 container->buffers[i],
5494 text);
5495 }
5496 }
5497}
5498
5499static void VULKAN_INTERNAL_SetTextureName(
5500 VulkanRenderer *renderer,
5501 VulkanTexture *texture,
5502 const char *text)
5503{
5504 VkDebugUtilsObjectNameInfoEXT nameInfo;
5505
5506 if (renderer->debugMode && renderer->supportsDebugUtils) {
5507 nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
5508 nameInfo.pNext = NULL;
5509 nameInfo.pObjectName = text;
5510 nameInfo.objectType = VK_OBJECT_TYPE_IMAGE;
5511 nameInfo.objectHandle = (uint64_t)texture->image;
5512
5513 renderer->vkSetDebugUtilsObjectNameEXT(
5514 renderer->logicalDevice,
5515 &nameInfo);
5516 }
5517}
5518
5519static void VULKAN_SetTextureName(
5520 SDL_GPURenderer *driverData,
5521 SDL_GPUTexture *texture,
5522 const char *text)
5523{
5524 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
5525 VulkanTextureContainer *container = (VulkanTextureContainer *)texture;
5526 size_t textLength = SDL_strlen(text) + 1;
5527
5528 if (renderer->debugMode && renderer->supportsDebugUtils) {
5529 container->debugName = SDL_realloc(
5530 container->debugName,
5531 textLength);
5532
5533 SDL_utf8strlcpy(
5534 container->debugName,
5535 text,
5536 textLength);
5537
5538 for (Uint32 i = 0; i < container->textureCount; i += 1) {
5539 VULKAN_INTERNAL_SetTextureName(
5540 renderer,
5541 container->textures[i],
5542 text);
5543 }
5544 }
5545}
5546
5547static void VULKAN_InsertDebugLabel(
5548 SDL_GPUCommandBuffer *commandBuffer,
5549 const char *text)
5550{
5551 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
5552 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
5553 VkDebugUtilsLabelEXT labelInfo;
5554
5555 if (renderer->supportsDebugUtils) {
5556 SDL_zero(labelInfo);
5557 labelInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
5558 labelInfo.pLabelName = text;
5559
5560 renderer->vkCmdInsertDebugUtilsLabelEXT(
5561 vulkanCommandBuffer->commandBuffer,
5562 &labelInfo);
5563 }
5564}
5565
5566static void VULKAN_PushDebugGroup(
5567 SDL_GPUCommandBuffer *commandBuffer,
5568 const char *name)
5569{
5570 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
5571 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
5572 VkDebugUtilsLabelEXT labelInfo;
5573
5574 if (renderer->supportsDebugUtils) {
5575 SDL_zero(labelInfo);
5576 labelInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
5577 labelInfo.pLabelName = name;
5578
5579 renderer->vkCmdBeginDebugUtilsLabelEXT(
5580 vulkanCommandBuffer->commandBuffer,
5581 &labelInfo);
5582 }
5583}
5584
5585static void VULKAN_PopDebugGroup(
5586 SDL_GPUCommandBuffer *commandBuffer)
5587{
5588 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
5589 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
5590
5591 if (renderer->supportsDebugUtils) {
5592 renderer->vkCmdEndDebugUtilsLabelEXT(vulkanCommandBuffer->commandBuffer);
5593 }
5594}
5595
5596static VulkanTexture *VULKAN_INTERNAL_CreateTexture(
5597 VulkanRenderer *renderer,
5598 const SDL_GPUTextureCreateInfo *createinfo)
5599{
5600 VkResult vulkanResult;
5601 VkImageCreateInfo imageCreateInfo;
5602 VkImageCreateFlags imageCreateFlags = 0;
5603 VkImageViewCreateInfo imageViewCreateInfo;
5604 Uint8 bindResult;
5605 VkImageUsageFlags vkUsageFlags = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
5606 Uint32 layerCount = (createinfo->type == SDL_GPU_TEXTURETYPE_3D) ? 1 : createinfo->layer_count_or_depth;
5607 Uint32 depth = (createinfo->type == SDL_GPU_TEXTURETYPE_3D) ? createinfo->layer_count_or_depth : 1;
5608
5609 VulkanTexture *texture = SDL_calloc(1, sizeof(VulkanTexture));
5610 texture->swizzle = SwizzleForSDLFormat(createinfo->format);
5611 texture->depth = depth;
5612 texture->usage = createinfo->usage;
5613 SDL_SetAtomicInt(&texture->referenceCount, 0);
5614
5615 if (IsDepthFormat(createinfo->format)) {
5616 texture->aspectFlags = VK_IMAGE_ASPECT_DEPTH_BIT;
5617
5618 if (IsStencilFormat(createinfo->format)) {
5619 texture->aspectFlags |= VK_IMAGE_ASPECT_STENCIL_BIT;
5620 }
5621 } else {
5622 texture->aspectFlags = VK_IMAGE_ASPECT_COLOR_BIT;
5623 }
5624
5625 if (createinfo->type == SDL_GPU_TEXTURETYPE_CUBE || createinfo->type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY) {
5626 imageCreateFlags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
5627 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_3D) {
5628 imageCreateFlags |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT;
5629 }
5630
5631 if (createinfo->usage & (SDL_GPU_TEXTUREUSAGE_SAMPLER |
5632 SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ |
5633 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ)) {
5634 vkUsageFlags |= VK_IMAGE_USAGE_SAMPLED_BIT;
5635 }
5636 if (createinfo->usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET) {
5637 vkUsageFlags |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
5638 }
5639 if (createinfo->usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET) {
5640 vkUsageFlags |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
5641 }
5642 if (createinfo->usage & (SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE |
5643 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE)) {
5644 vkUsageFlags |= VK_IMAGE_USAGE_STORAGE_BIT;
5645 }
5646
5647 imageCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
5648 imageCreateInfo.pNext = NULL;
5649 imageCreateInfo.flags = imageCreateFlags;
5650 imageCreateInfo.imageType = createinfo->type == SDL_GPU_TEXTURETYPE_3D ? VK_IMAGE_TYPE_3D : VK_IMAGE_TYPE_2D;
5651 imageCreateInfo.format = SDLToVK_TextureFormat[createinfo->format];
5652 imageCreateInfo.extent.width = createinfo->width;
5653 imageCreateInfo.extent.height = createinfo->height;
5654 imageCreateInfo.extent.depth = depth;
5655 imageCreateInfo.mipLevels = createinfo->num_levels;
5656 imageCreateInfo.arrayLayers = layerCount;
5657 imageCreateInfo.samples = SDLToVK_SampleCount[createinfo->sample_count];
5658 imageCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
5659 imageCreateInfo.usage = vkUsageFlags;
5660 imageCreateInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
5661 imageCreateInfo.queueFamilyIndexCount = 0;
5662 imageCreateInfo.pQueueFamilyIndices = NULL;
5663 imageCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
5664
5665 vulkanResult = renderer->vkCreateImage(
5666 renderer->logicalDevice,
5667 &imageCreateInfo,
5668 NULL,
5669 &texture->image);
5670
5671 if (vulkanResult != VK_SUCCESS) {
5672 VULKAN_INTERNAL_DestroyTexture(renderer, texture);
5673 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateImage, NULL);
5674 }
5675
5676 bindResult = VULKAN_INTERNAL_BindMemoryForImage(
5677 renderer,
5678 texture->image,
5679 &texture->usedRegion);
5680
5681 if (bindResult != 1) {
5682 renderer->vkDestroyImage(
5683 renderer->logicalDevice,
5684 texture->image,
5685 NULL);
5686
5687 VULKAN_INTERNAL_DestroyTexture(renderer, texture);
5688 SET_STRING_ERROR_AND_RETURN("Unable to bind memory for texture!", NULL);
5689 }
5690
5691 texture->usedRegion->vulkanTexture = texture; // lol
5692
5693 if (createinfo->usage & (SDL_GPU_TEXTUREUSAGE_SAMPLER | SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ | SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ)) {
5694
5695 imageViewCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
5696 imageViewCreateInfo.pNext = NULL;
5697 imageViewCreateInfo.flags = 0;
5698 imageViewCreateInfo.image = texture->image;
5699 imageViewCreateInfo.format = SDLToVK_TextureFormat[createinfo->format];
5700 imageViewCreateInfo.components = texture->swizzle;
5701 imageViewCreateInfo.subresourceRange.aspectMask = texture->aspectFlags & ~VK_IMAGE_ASPECT_STENCIL_BIT; // Can't sample stencil values
5702 imageViewCreateInfo.subresourceRange.baseMipLevel = 0;
5703 imageViewCreateInfo.subresourceRange.levelCount = createinfo->num_levels;
5704 imageViewCreateInfo.subresourceRange.baseArrayLayer = 0;
5705 imageViewCreateInfo.subresourceRange.layerCount = layerCount;
5706
5707 if (createinfo->type == SDL_GPU_TEXTURETYPE_CUBE) {
5708 imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_CUBE;
5709 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY) {
5710 imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY;
5711 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_3D) {
5712 imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_3D;
5713 } else if (createinfo->type == SDL_GPU_TEXTURETYPE_2D_ARRAY) {
5714 imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
5715 } else {
5716 imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_2D;
5717 }
5718
5719 vulkanResult = renderer->vkCreateImageView(
5720 renderer->logicalDevice,
5721 &imageViewCreateInfo,
5722 NULL,
5723 &texture->fullView);
5724
5725 if (vulkanResult != VK_SUCCESS) {
5726 VULKAN_INTERNAL_DestroyTexture(renderer, texture);
5727 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, "vkCreateImageView", NULL);
5728 }
5729 }
5730
5731 // Define slices
5732 texture->subresourceCount = layerCount * createinfo->num_levels;
5733 texture->subresources = SDL_calloc(
5734 texture->subresourceCount,
5735 sizeof(VulkanTextureSubresource));
5736
5737 for (Uint32 i = 0; i < layerCount; i += 1) {
5738 for (Uint32 j = 0; j < createinfo->num_levels; j += 1) {
5739 Uint32 subresourceIndex = VULKAN_INTERNAL_GetTextureSubresourceIndex(
5740 j,
5741 i,
5742 createinfo->num_levels);
5743
5744 if (createinfo->usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET) {
5745 texture->subresources[subresourceIndex].renderTargetViews = SDL_malloc(
5746 depth * sizeof(VkImageView));
5747
5748 if (depth > 1) {
5749 for (Uint32 k = 0; k < depth; k += 1) {
5750 if (!VULKAN_INTERNAL_CreateRenderTargetView(
5751 renderer,
5752 texture,
5753 k,
5754 j,
5755 SDLToVK_TextureFormat[createinfo->format],
5756 texture->swizzle,
5757 &texture->subresources[subresourceIndex].renderTargetViews[k])) {
5758 VULKAN_INTERNAL_DestroyTexture(renderer, texture);
5759 return NULL;
5760 }
5761 }
5762 } else {
5763 if (!VULKAN_INTERNAL_CreateRenderTargetView(
5764 renderer,
5765 texture,
5766 i,
5767 j,
5768 SDLToVK_TextureFormat[createinfo->format],
5769 texture->swizzle,
5770 &texture->subresources[subresourceIndex].renderTargetViews[0])) {
5771 VULKAN_INTERNAL_DestroyTexture(renderer, texture);
5772 return NULL;
5773 }
5774 }
5775 }
5776
5777 if ((createinfo->usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE) || (createinfo->usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE)) {
5778 if (!VULKAN_INTERNAL_CreateSubresourceView(
5779 renderer,
5780 createinfo,
5781 texture,
5782 i,
5783 j,
5784 texture->swizzle,
5785 &texture->subresources[subresourceIndex].computeWriteView)) {
5786 VULKAN_INTERNAL_DestroyTexture(renderer, texture);
5787 return NULL;
5788 }
5789 }
5790
5791 if (createinfo->usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET) {
5792 if (!VULKAN_INTERNAL_CreateSubresourceView(
5793 renderer,
5794 createinfo,
5795 texture,
5796 i,
5797 j,
5798 texture->swizzle,
5799 &texture->subresources[subresourceIndex].depthStencilView)) {
5800 VULKAN_INTERNAL_DestroyTexture(renderer, texture);
5801 return NULL;
5802 }
5803 }
5804
5805 texture->subresources[subresourceIndex].parent = texture;
5806 texture->subresources[subresourceIndex].layer = i;
5807 texture->subresources[subresourceIndex].level = j;
5808 }
5809 }
5810
5811 // Set debug name if applicable
5812 if (renderer->debugMode && renderer->supportsDebugUtils && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING)) {
5813 VkDebugUtilsObjectNameInfoEXT nameInfo;
5814 nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
5815 nameInfo.pNext = NULL;
5816 nameInfo.pObjectName = SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING, NULL);
5817 nameInfo.objectType = VK_OBJECT_TYPE_IMAGE;
5818 nameInfo.objectHandle = (uint64_t)texture->image;
5819
5820 renderer->vkSetDebugUtilsObjectNameEXT(
5821 renderer->logicalDevice,
5822 &nameInfo);
5823 }
5824
5825 // Let's transition to the default barrier state, because for some reason Vulkan doesn't let us do that with initialLayout.
5826 VulkanCommandBuffer *barrierCommandBuffer = (VulkanCommandBuffer *)VULKAN_AcquireCommandBuffer((SDL_GPURenderer *)renderer);
5827 VULKAN_INTERNAL_TextureTransitionToDefaultUsage(
5828 renderer,
5829 barrierCommandBuffer,
5830 VULKAN_TEXTURE_USAGE_MODE_UNINITIALIZED,
5831 texture);
5832 VULKAN_INTERNAL_TrackTexture(barrierCommandBuffer, texture);
5833 VULKAN_Submit((SDL_GPUCommandBuffer *)barrierCommandBuffer);
5834
5835 return texture;
5836}
5837
5838static void VULKAN_INTERNAL_CycleActiveBuffer(
5839 VulkanRenderer *renderer,
5840 VulkanBufferContainer *container)
5841{
5842 VulkanBuffer *buffer;
5843
5844 // If a previously-cycled buffer is available, we can use that.
5845 for (Uint32 i = 0; i < container->bufferCount; i += 1) {
5846 buffer = container->buffers[i];
5847 if (SDL_GetAtomicInt(&buffer->referenceCount) == 0) {
5848 container->activeBuffer = buffer;
5849 return;
5850 }
5851 }
5852
5853 // No buffer handle is available, create a new one.
5854 buffer = VULKAN_INTERNAL_CreateBuffer(
5855 renderer,
5856 container->activeBuffer->size,
5857 container->activeBuffer->usage,
5858 container->activeBuffer->type,
5859 container->dedicated,
5860 container->debugName);
5861
5862 if (!buffer) {
5863 return;
5864 }
5865
5866 EXPAND_ARRAY_IF_NEEDED(
5867 container->buffers,
5868 VulkanBuffer *,
5869 container->bufferCount + 1,
5870 container->bufferCapacity,
5871 container->bufferCapacity * 2);
5872
5873 container->buffers[container->bufferCount] = buffer;
5874 buffer->container = container;
5875 buffer->containerIndex = container->bufferCount;
5876 container->bufferCount += 1;
5877
5878 container->activeBuffer = buffer;
5879}
5880
5881static void VULKAN_INTERNAL_CycleActiveTexture(
5882 VulkanRenderer *renderer,
5883 VulkanTextureContainer *container)
5884{
5885 VulkanTexture *texture;
5886
5887 // If a previously-cycled texture is available, we can use that.
5888 for (Uint32 i = 0; i < container->textureCount; i += 1) {
5889 texture = container->textures[i];
5890
5891 if (SDL_GetAtomicInt(&texture->referenceCount) == 0) {
5892 container->activeTexture = texture;
5893 return;
5894 }
5895 }
5896
5897 // No texture is available, generate a new one.
5898 texture = VULKAN_INTERNAL_CreateTexture(
5899 renderer,
5900 &container->header.info);
5901
5902 if (!texture) {
5903 return;
5904 }
5905
5906 EXPAND_ARRAY_IF_NEEDED(
5907 container->textures,
5908 VulkanTexture *,
5909 container->textureCount + 1,
5910 container->textureCapacity,
5911 container->textureCapacity * 2);
5912
5913 container->textures[container->textureCount] = texture;
5914 texture->container = container;
5915 texture->containerIndex = container->textureCount;
5916 container->textureCount += 1;
5917
5918 container->activeTexture = texture;
5919}
5920
5921static VulkanBuffer *VULKAN_INTERNAL_PrepareBufferForWrite(
5922 VulkanRenderer *renderer,
5923 VulkanCommandBuffer *commandBuffer,
5924 VulkanBufferContainer *bufferContainer,
5925 bool cycle,
5926 VulkanBufferUsageMode destinationUsageMode)
5927{
5928 if (
5929 cycle &&
5930 SDL_GetAtomicInt(&bufferContainer->activeBuffer->referenceCount) > 0) {
5931 VULKAN_INTERNAL_CycleActiveBuffer(
5932 renderer,
5933 bufferContainer);
5934 }
5935
5936 VULKAN_INTERNAL_BufferTransitionFromDefaultUsage(
5937 renderer,
5938 commandBuffer,
5939 destinationUsageMode,
5940 bufferContainer->activeBuffer);
5941
5942 return bufferContainer->activeBuffer;
5943}
5944
5945static VulkanTextureSubresource *VULKAN_INTERNAL_PrepareTextureSubresourceForWrite(
5946 VulkanRenderer *renderer,
5947 VulkanCommandBuffer *commandBuffer,
5948 VulkanTextureContainer *textureContainer,
5949 Uint32 layer,
5950 Uint32 level,
5951 bool cycle,
5952 VulkanTextureUsageMode destinationUsageMode)
5953{
5954 VulkanTextureSubresource *textureSubresource = VULKAN_INTERNAL_FetchTextureSubresource(
5955 textureContainer,
5956 layer,
5957 level);
5958
5959 if (
5960 cycle &&
5961 textureContainer->canBeCycled &&
5962 SDL_GetAtomicInt(&textureContainer->activeTexture->referenceCount) > 0) {
5963 VULKAN_INTERNAL_CycleActiveTexture(
5964 renderer,
5965 textureContainer);
5966
5967 textureSubresource = VULKAN_INTERNAL_FetchTextureSubresource(
5968 textureContainer,
5969 layer,
5970 level);
5971 }
5972
5973 // always do barrier because of layout transitions
5974 VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
5975 renderer,
5976 commandBuffer,
5977 destinationUsageMode,
5978 textureSubresource);
5979
5980 return textureSubresource;
5981}
5982
5983static VkRenderPass VULKAN_INTERNAL_CreateRenderPass(
5984 VulkanRenderer *renderer,
5985 VulkanCommandBuffer *commandBuffer,
5986 const SDL_GPUColorTargetInfo *colorTargetInfos,
5987 Uint32 numColorTargets,
5988 const SDL_GPUDepthStencilTargetInfo *depthStencilTargetInfo)
5989{
5990 VkResult vulkanResult;
5991 VkAttachmentDescription attachmentDescriptions[2 * MAX_COLOR_TARGET_BINDINGS + 1 /* depth */];
5992 VkAttachmentReference colorAttachmentReferences[MAX_COLOR_TARGET_BINDINGS];
5993 VkAttachmentReference resolveReferences[MAX_COLOR_TARGET_BINDINGS];
5994 VkAttachmentReference depthStencilAttachmentReference;
5995 VkRenderPassCreateInfo renderPassCreateInfo;
5996 VkSubpassDescription subpass;
5997 VkRenderPass renderPass;
5998 Uint32 i;
5999
6000 Uint32 attachmentDescriptionCount = 0;
6001 Uint32 colorAttachmentReferenceCount = 0;
6002 Uint32 resolveReferenceCount = 0;
6003
6004 for (i = 0; i < numColorTargets; i += 1) {
6005 VulkanTextureContainer *container = (VulkanTextureContainer *)colorTargetInfos[i].texture;
6006 attachmentDescriptions[attachmentDescriptionCount].flags = 0;
6007 attachmentDescriptions[attachmentDescriptionCount].format = SDLToVK_TextureFormat[container->header.info.format];
6008 attachmentDescriptions[attachmentDescriptionCount].samples = SDLToVK_SampleCount[container->header.info.sample_count];
6009 attachmentDescriptions[attachmentDescriptionCount].loadOp = SDLToVK_LoadOp[colorTargetInfos[i].load_op];
6010 attachmentDescriptions[attachmentDescriptionCount].storeOp = SDLToVK_StoreOp[colorTargetInfos[i].store_op];
6011 attachmentDescriptions[attachmentDescriptionCount].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
6012 attachmentDescriptions[attachmentDescriptionCount].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
6013 attachmentDescriptions[attachmentDescriptionCount].initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
6014 attachmentDescriptions[attachmentDescriptionCount].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
6015
6016 colorAttachmentReferences[colorAttachmentReferenceCount].attachment = attachmentDescriptionCount;
6017 colorAttachmentReferences[colorAttachmentReferenceCount].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
6018
6019 attachmentDescriptionCount += 1;
6020 colorAttachmentReferenceCount += 1;
6021
6022 if (colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE || colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE_AND_STORE) {
6023 VulkanTextureContainer *resolveContainer = (VulkanTextureContainer *)colorTargetInfos[i].resolve_texture;
6024
6025 attachmentDescriptions[attachmentDescriptionCount].flags = 0;
6026 attachmentDescriptions[attachmentDescriptionCount].format = SDLToVK_TextureFormat[resolveContainer->header.info.format];
6027 attachmentDescriptions[attachmentDescriptionCount].samples = SDLToVK_SampleCount[resolveContainer->header.info.sample_count];
6028 attachmentDescriptions[attachmentDescriptionCount].loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; // The texture will be overwritten anyway
6029 attachmentDescriptions[attachmentDescriptionCount].storeOp = VK_ATTACHMENT_STORE_OP_STORE; // Always store the resolve texture
6030 attachmentDescriptions[attachmentDescriptionCount].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
6031 attachmentDescriptions[attachmentDescriptionCount].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
6032 attachmentDescriptions[attachmentDescriptionCount].initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
6033 attachmentDescriptions[attachmentDescriptionCount].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
6034
6035 resolveReferences[resolveReferenceCount].attachment = attachmentDescriptionCount;
6036 resolveReferences[resolveReferenceCount].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
6037
6038 attachmentDescriptionCount += 1;
6039 resolveReferenceCount += 1;
6040 }
6041 }
6042
6043 subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
6044 subpass.flags = 0;
6045 subpass.inputAttachmentCount = 0;
6046 subpass.pInputAttachments = NULL;
6047 subpass.colorAttachmentCount = numColorTargets;
6048 subpass.pColorAttachments = colorAttachmentReferences;
6049 subpass.preserveAttachmentCount = 0;
6050 subpass.pPreserveAttachments = NULL;
6051
6052 if (depthStencilTargetInfo == NULL) {
6053 subpass.pDepthStencilAttachment = NULL;
6054 } else {
6055 VulkanTextureContainer *container = (VulkanTextureContainer *)depthStencilTargetInfo->texture;
6056
6057 attachmentDescriptions[attachmentDescriptionCount].flags = 0;
6058 attachmentDescriptions[attachmentDescriptionCount].format = SDLToVK_TextureFormat[container->header.info.format];
6059 attachmentDescriptions[attachmentDescriptionCount].samples = SDLToVK_SampleCount[container->header.info.sample_count];
6060 attachmentDescriptions[attachmentDescriptionCount].loadOp = SDLToVK_LoadOp[depthStencilTargetInfo->load_op];
6061 attachmentDescriptions[attachmentDescriptionCount].storeOp = SDLToVK_StoreOp[depthStencilTargetInfo->store_op];
6062 attachmentDescriptions[attachmentDescriptionCount].stencilLoadOp = SDLToVK_LoadOp[depthStencilTargetInfo->stencil_load_op];
6063 attachmentDescriptions[attachmentDescriptionCount].stencilStoreOp = SDLToVK_StoreOp[depthStencilTargetInfo->stencil_store_op];
6064 attachmentDescriptions[attachmentDescriptionCount].initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
6065 attachmentDescriptions[attachmentDescriptionCount].finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
6066
6067 depthStencilAttachmentReference.attachment = attachmentDescriptionCount;
6068 depthStencilAttachmentReference.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
6069
6070 subpass.pDepthStencilAttachment = &depthStencilAttachmentReference;
6071
6072 attachmentDescriptionCount += 1;
6073 }
6074
6075 if (resolveReferenceCount > 0) {
6076 subpass.pResolveAttachments = resolveReferences;
6077 } else {
6078 subpass.pResolveAttachments = NULL;
6079 }
6080
6081 renderPassCreateInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
6082 renderPassCreateInfo.pNext = NULL;
6083 renderPassCreateInfo.flags = 0;
6084 renderPassCreateInfo.pAttachments = attachmentDescriptions;
6085 renderPassCreateInfo.attachmentCount = attachmentDescriptionCount;
6086 renderPassCreateInfo.subpassCount = 1;
6087 renderPassCreateInfo.pSubpasses = &subpass;
6088 renderPassCreateInfo.dependencyCount = 0;
6089 renderPassCreateInfo.pDependencies = NULL;
6090
6091 vulkanResult = renderer->vkCreateRenderPass(
6092 renderer->logicalDevice,
6093 &renderPassCreateInfo,
6094 NULL,
6095 &renderPass);
6096
6097 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateRenderPass, VK_NULL_HANDLE);
6098
6099 return renderPass;
6100}
6101
6102static VkRenderPass VULKAN_INTERNAL_CreateTransientRenderPass(
6103 VulkanRenderer *renderer,
6104 SDL_GPUGraphicsPipelineTargetInfo targetInfo,
6105 VkSampleCountFlagBits sampleCount)
6106{
6107 VkAttachmentDescription attachmentDescriptions[MAX_COLOR_TARGET_BINDINGS + 1 /* depth */];
6108 VkAttachmentReference colorAttachmentReferences[MAX_COLOR_TARGET_BINDINGS];
6109 VkAttachmentReference depthStencilAttachmentReference;
6110 SDL_GPUColorTargetDescription attachmentDescription;
6111 VkSubpassDescription subpass;
6112 VkRenderPassCreateInfo renderPassCreateInfo;
6113 VkRenderPass renderPass;
6114 VkResult result;
6115
6116 Uint32 attachmentDescriptionCount = 0;
6117 Uint32 colorAttachmentReferenceCount = 0;
6118 Uint32 i;
6119
6120 for (i = 0; i < targetInfo.num_color_targets; i += 1) {
6121 attachmentDescription = targetInfo.color_target_descriptions[i];
6122
6123 attachmentDescriptions[attachmentDescriptionCount].flags = 0;
6124 attachmentDescriptions[attachmentDescriptionCount].format = SDLToVK_TextureFormat[attachmentDescription.format];
6125 attachmentDescriptions[attachmentDescriptionCount].samples = sampleCount;
6126 attachmentDescriptions[attachmentDescriptionCount].loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
6127 attachmentDescriptions[attachmentDescriptionCount].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
6128 attachmentDescriptions[attachmentDescriptionCount].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
6129 attachmentDescriptions[attachmentDescriptionCount].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
6130 attachmentDescriptions[attachmentDescriptionCount].initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
6131 attachmentDescriptions[attachmentDescriptionCount].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
6132
6133 colorAttachmentReferences[colorAttachmentReferenceCount].attachment = attachmentDescriptionCount;
6134 colorAttachmentReferences[colorAttachmentReferenceCount].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
6135
6136 attachmentDescriptionCount += 1;
6137 colorAttachmentReferenceCount += 1;
6138 }
6139
6140 subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
6141 subpass.flags = 0;
6142 subpass.inputAttachmentCount = 0;
6143 subpass.pInputAttachments = NULL;
6144 subpass.colorAttachmentCount = targetInfo.num_color_targets;
6145 subpass.pColorAttachments = colorAttachmentReferences;
6146 subpass.preserveAttachmentCount = 0;
6147 subpass.pPreserveAttachments = NULL;
6148
6149 if (targetInfo.has_depth_stencil_target) {
6150 attachmentDescriptions[attachmentDescriptionCount].flags = 0;
6151 attachmentDescriptions[attachmentDescriptionCount].format = SDLToVK_TextureFormat[targetInfo.depth_stencil_format];
6152 attachmentDescriptions[attachmentDescriptionCount].samples = sampleCount;
6153 attachmentDescriptions[attachmentDescriptionCount].loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
6154 attachmentDescriptions[attachmentDescriptionCount].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
6155 attachmentDescriptions[attachmentDescriptionCount].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
6156 attachmentDescriptions[attachmentDescriptionCount].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
6157 attachmentDescriptions[attachmentDescriptionCount].initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
6158 attachmentDescriptions[attachmentDescriptionCount].finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
6159
6160 depthStencilAttachmentReference.attachment = attachmentDescriptionCount;
6161 depthStencilAttachmentReference.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
6162
6163 subpass.pDepthStencilAttachment = &depthStencilAttachmentReference;
6164
6165 attachmentDescriptionCount += 1;
6166 } else {
6167 subpass.pDepthStencilAttachment = NULL;
6168 }
6169
6170 // Resolve attachments aren't needed for transient passes
6171 subpass.pResolveAttachments = NULL;
6172
6173 renderPassCreateInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
6174 renderPassCreateInfo.pNext = NULL;
6175 renderPassCreateInfo.flags = 0;
6176 renderPassCreateInfo.pAttachments = attachmentDescriptions;
6177 renderPassCreateInfo.attachmentCount = attachmentDescriptionCount;
6178 renderPassCreateInfo.subpassCount = 1;
6179 renderPassCreateInfo.pSubpasses = &subpass;
6180 renderPassCreateInfo.dependencyCount = 0;
6181 renderPassCreateInfo.pDependencies = NULL;
6182
6183 result = renderer->vkCreateRenderPass(
6184 renderer->logicalDevice,
6185 &renderPassCreateInfo,
6186 NULL,
6187 &renderPass);
6188
6189 CHECK_VULKAN_ERROR_AND_RETURN(result, vkCreateRenderPass, VK_NULL_HANDLE);
6190
6191 return renderPass;
6192}
6193
6194static SDL_GPUGraphicsPipeline *VULKAN_CreateGraphicsPipeline(
6195 SDL_GPURenderer *driverData,
6196 const SDL_GPUGraphicsPipelineCreateInfo *createinfo)
6197{
6198 VkResult vulkanResult;
6199 Uint32 i;
6200
6201 VulkanGraphicsPipeline *graphicsPipeline = (VulkanGraphicsPipeline *)SDL_malloc(sizeof(VulkanGraphicsPipeline));
6202 VkGraphicsPipelineCreateInfo vkPipelineCreateInfo;
6203
6204 VkPipelineShaderStageCreateInfo shaderStageCreateInfos[2];
6205
6206 VkPipelineVertexInputStateCreateInfo vertexInputStateCreateInfo;
6207 VkVertexInputBindingDescription *vertexInputBindingDescriptions = SDL_stack_alloc(VkVertexInputBindingDescription, createinfo->vertex_input_state.num_vertex_buffers);
6208 VkVertexInputAttributeDescription *vertexInputAttributeDescriptions = SDL_stack_alloc(VkVertexInputAttributeDescription, createinfo->vertex_input_state.num_vertex_attributes);
6209
6210 VkPipelineInputAssemblyStateCreateInfo inputAssemblyStateCreateInfo;
6211
6212 VkPipelineViewportStateCreateInfo viewportStateCreateInfo;
6213
6214 VkPipelineRasterizationStateCreateInfo rasterizationStateCreateInfo;
6215
6216 VkPipelineMultisampleStateCreateInfo multisampleStateCreateInfo;
6217
6218 VkPipelineDepthStencilStateCreateInfo depthStencilStateCreateInfo;
6219 VkStencilOpState frontStencilState;
6220 VkStencilOpState backStencilState;
6221
6222 VkPipelineColorBlendStateCreateInfo colorBlendStateCreateInfo;
6223 VkPipelineColorBlendAttachmentState *colorBlendAttachmentStates = SDL_stack_alloc(
6224 VkPipelineColorBlendAttachmentState,
6225 createinfo->target_info.num_color_targets);
6226
6227 static const VkDynamicState dynamicStates[] = {
6228 VK_DYNAMIC_STATE_VIEWPORT,
6229 VK_DYNAMIC_STATE_SCISSOR,
6230 VK_DYNAMIC_STATE_BLEND_CONSTANTS,
6231 VK_DYNAMIC_STATE_STENCIL_REFERENCE
6232 };
6233 VkPipelineDynamicStateCreateInfo dynamicStateCreateInfo;
6234
6235 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6236
6237 // Create a "compatible" render pass
6238
6239 VkRenderPass transientRenderPass = VULKAN_INTERNAL_CreateTransientRenderPass(
6240 renderer,
6241 createinfo->target_info,
6242 SDLToVK_SampleCount[createinfo->multisample_state.sample_count]);
6243
6244 // Dynamic state
6245
6246 dynamicStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO;
6247 dynamicStateCreateInfo.pNext = NULL;
6248 dynamicStateCreateInfo.flags = 0;
6249 dynamicStateCreateInfo.dynamicStateCount = SDL_arraysize(dynamicStates);
6250 dynamicStateCreateInfo.pDynamicStates = dynamicStates;
6251
6252 // Shader stages
6253
6254 graphicsPipeline->vertexShader = (VulkanShader *)createinfo->vertex_shader;
6255 SDL_AtomicIncRef(&graphicsPipeline->vertexShader->referenceCount);
6256
6257 shaderStageCreateInfos[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
6258 shaderStageCreateInfos[0].pNext = NULL;
6259 shaderStageCreateInfos[0].flags = 0;
6260 shaderStageCreateInfos[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
6261 shaderStageCreateInfos[0].module = graphicsPipeline->vertexShader->shaderModule;
6262 shaderStageCreateInfos[0].pName = graphicsPipeline->vertexShader->entrypointName;
6263 shaderStageCreateInfos[0].pSpecializationInfo = NULL;
6264
6265 graphicsPipeline->fragmentShader = (VulkanShader *)createinfo->fragment_shader;
6266 SDL_AtomicIncRef(&graphicsPipeline->fragmentShader->referenceCount);
6267
6268 shaderStageCreateInfos[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
6269 shaderStageCreateInfos[1].pNext = NULL;
6270 shaderStageCreateInfos[1].flags = 0;
6271 shaderStageCreateInfos[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
6272 shaderStageCreateInfos[1].module = graphicsPipeline->fragmentShader->shaderModule;
6273 shaderStageCreateInfos[1].pName = graphicsPipeline->fragmentShader->entrypointName;
6274 shaderStageCreateInfos[1].pSpecializationInfo = NULL;
6275
6276 if (renderer->debugMode) {
6277 if (graphicsPipeline->vertexShader->stage != SDL_GPU_SHADERSTAGE_VERTEX) {
6278 SDL_assert_release(!"CreateGraphicsPipeline was passed a fragment shader for the vertex stage");
6279 }
6280 if (graphicsPipeline->fragmentShader->stage != SDL_GPU_SHADERSTAGE_FRAGMENT) {
6281 SDL_assert_release(!"CreateGraphicsPipeline was passed a vertex shader for the fragment stage");
6282 }
6283 }
6284
6285 // Vertex input
6286
6287 for (i = 0; i < createinfo->vertex_input_state.num_vertex_buffers; i += 1) {
6288 vertexInputBindingDescriptions[i].binding = createinfo->vertex_input_state.vertex_buffer_descriptions[i].slot;
6289 vertexInputBindingDescriptions[i].inputRate = SDLToVK_VertexInputRate[createinfo->vertex_input_state.vertex_buffer_descriptions[i].input_rate];
6290 vertexInputBindingDescriptions[i].stride = createinfo->vertex_input_state.vertex_buffer_descriptions[i].pitch;
6291 }
6292
6293 for (i = 0; i < createinfo->vertex_input_state.num_vertex_attributes; i += 1) {
6294 vertexInputAttributeDescriptions[i].binding = createinfo->vertex_input_state.vertex_attributes[i].buffer_slot;
6295 vertexInputAttributeDescriptions[i].format = SDLToVK_VertexFormat[createinfo->vertex_input_state.vertex_attributes[i].format];
6296 vertexInputAttributeDescriptions[i].location = createinfo->vertex_input_state.vertex_attributes[i].location;
6297 vertexInputAttributeDescriptions[i].offset = createinfo->vertex_input_state.vertex_attributes[i].offset;
6298 }
6299
6300 vertexInputStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
6301 vertexInputStateCreateInfo.pNext = NULL;
6302 vertexInputStateCreateInfo.flags = 0;
6303 vertexInputStateCreateInfo.vertexBindingDescriptionCount = createinfo->vertex_input_state.num_vertex_buffers;
6304 vertexInputStateCreateInfo.pVertexBindingDescriptions = vertexInputBindingDescriptions;
6305 vertexInputStateCreateInfo.vertexAttributeDescriptionCount = createinfo->vertex_input_state.num_vertex_attributes;
6306 vertexInputStateCreateInfo.pVertexAttributeDescriptions = vertexInputAttributeDescriptions;
6307
6308 // Topology
6309
6310 inputAssemblyStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;
6311 inputAssemblyStateCreateInfo.pNext = NULL;
6312 inputAssemblyStateCreateInfo.flags = 0;
6313 inputAssemblyStateCreateInfo.primitiveRestartEnable = VK_FALSE;
6314 inputAssemblyStateCreateInfo.topology = SDLToVK_PrimitiveType[createinfo->primitive_type];
6315
6316 graphicsPipeline->primitiveType = createinfo->primitive_type;
6317
6318 // Viewport
6319
6320 // NOTE: viewport and scissor are dynamic, and must be set using the command buffer
6321
6322 viewportStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;
6323 viewportStateCreateInfo.pNext = NULL;
6324 viewportStateCreateInfo.flags = 0;
6325 viewportStateCreateInfo.viewportCount = 1;
6326 viewportStateCreateInfo.pViewports = NULL;
6327 viewportStateCreateInfo.scissorCount = 1;
6328 viewportStateCreateInfo.pScissors = NULL;
6329
6330 // Rasterization
6331
6332 rasterizationStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
6333 rasterizationStateCreateInfo.pNext = NULL;
6334 rasterizationStateCreateInfo.flags = 0;
6335 rasterizationStateCreateInfo.depthClampEnable = !createinfo->rasterizer_state.enable_depth_clip;
6336 rasterizationStateCreateInfo.rasterizerDiscardEnable = VK_FALSE;
6337 rasterizationStateCreateInfo.polygonMode = SDLToVK_PolygonMode(
6338 renderer,
6339 createinfo->rasterizer_state.fill_mode);
6340 rasterizationStateCreateInfo.cullMode = SDLToVK_CullMode[createinfo->rasterizer_state.cull_mode];
6341 rasterizationStateCreateInfo.frontFace = SDLToVK_FrontFace[createinfo->rasterizer_state.front_face];
6342 rasterizationStateCreateInfo.depthBiasEnable =
6343 createinfo->rasterizer_state.enable_depth_bias;
6344 rasterizationStateCreateInfo.depthBiasConstantFactor =
6345 createinfo->rasterizer_state.depth_bias_constant_factor;
6346 rasterizationStateCreateInfo.depthBiasClamp =
6347 createinfo->rasterizer_state.depth_bias_clamp;
6348 rasterizationStateCreateInfo.depthBiasSlopeFactor =
6349 createinfo->rasterizer_state.depth_bias_slope_factor;
6350 rasterizationStateCreateInfo.lineWidth = 1.0f;
6351
6352 // Multisample
6353
6354 Uint32 sampleMask = 0xFFFFFFFF;
6355
6356 multisampleStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;
6357 multisampleStateCreateInfo.pNext = NULL;
6358 multisampleStateCreateInfo.flags = 0;
6359 multisampleStateCreateInfo.rasterizationSamples = SDLToVK_SampleCount[createinfo->multisample_state.sample_count];
6360 multisampleStateCreateInfo.sampleShadingEnable = VK_FALSE;
6361 multisampleStateCreateInfo.minSampleShading = 1.0f;
6362 multisampleStateCreateInfo.pSampleMask = &sampleMask;
6363 multisampleStateCreateInfo.alphaToCoverageEnable = VK_FALSE;
6364 multisampleStateCreateInfo.alphaToOneEnable = VK_FALSE;
6365
6366 // Depth Stencil State
6367
6368 frontStencilState.failOp = SDLToVK_StencilOp[createinfo->depth_stencil_state.front_stencil_state.fail_op];
6369 frontStencilState.passOp = SDLToVK_StencilOp[createinfo->depth_stencil_state.front_stencil_state.pass_op];
6370 frontStencilState.depthFailOp = SDLToVK_StencilOp[createinfo->depth_stencil_state.front_stencil_state.depth_fail_op];
6371 frontStencilState.compareOp = SDLToVK_CompareOp[createinfo->depth_stencil_state.front_stencil_state.compare_op];
6372 frontStencilState.compareMask =
6373 createinfo->depth_stencil_state.compare_mask;
6374 frontStencilState.writeMask =
6375 createinfo->depth_stencil_state.write_mask;
6376 frontStencilState.reference = 0;
6377
6378 backStencilState.failOp = SDLToVK_StencilOp[createinfo->depth_stencil_state.back_stencil_state.fail_op];
6379 backStencilState.passOp = SDLToVK_StencilOp[createinfo->depth_stencil_state.back_stencil_state.pass_op];
6380 backStencilState.depthFailOp = SDLToVK_StencilOp[createinfo->depth_stencil_state.back_stencil_state.depth_fail_op];
6381 backStencilState.compareOp = SDLToVK_CompareOp[createinfo->depth_stencil_state.back_stencil_state.compare_op];
6382 backStencilState.compareMask =
6383 createinfo->depth_stencil_state.compare_mask;
6384 backStencilState.writeMask =
6385 createinfo->depth_stencil_state.write_mask;
6386 backStencilState.reference = 0;
6387
6388 depthStencilStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;
6389 depthStencilStateCreateInfo.pNext = NULL;
6390 depthStencilStateCreateInfo.flags = 0;
6391 depthStencilStateCreateInfo.depthTestEnable =
6392 createinfo->depth_stencil_state.enable_depth_test;
6393 depthStencilStateCreateInfo.depthWriteEnable =
6394 createinfo->depth_stencil_state.enable_depth_write;
6395 depthStencilStateCreateInfo.depthCompareOp = SDLToVK_CompareOp[createinfo->depth_stencil_state.compare_op];
6396 depthStencilStateCreateInfo.depthBoundsTestEnable = VK_FALSE;
6397 depthStencilStateCreateInfo.stencilTestEnable =
6398 createinfo->depth_stencil_state.enable_stencil_test;
6399 depthStencilStateCreateInfo.front = frontStencilState;
6400 depthStencilStateCreateInfo.back = backStencilState;
6401 depthStencilStateCreateInfo.minDepthBounds = 0; // unused
6402 depthStencilStateCreateInfo.maxDepthBounds = 0; // unused
6403
6404 // Color Blend
6405
6406 for (i = 0; i < createinfo->target_info.num_color_targets; i += 1) {
6407 SDL_GPUColorTargetBlendState blendState = createinfo->target_info.color_target_descriptions[i].blend_state;
6408 SDL_GPUColorComponentFlags colorWriteMask = blendState.enable_color_write_mask ?
6409 blendState.color_write_mask :
6410 0xF;
6411
6412 colorBlendAttachmentStates[i].blendEnable =
6413 blendState.enable_blend;
6414 colorBlendAttachmentStates[i].srcColorBlendFactor = SDLToVK_BlendFactor[blendState.src_color_blendfactor];
6415 colorBlendAttachmentStates[i].dstColorBlendFactor = SDLToVK_BlendFactor[blendState.dst_color_blendfactor];
6416 colorBlendAttachmentStates[i].colorBlendOp = SDLToVK_BlendOp[blendState.color_blend_op];
6417 colorBlendAttachmentStates[i].srcAlphaBlendFactor = SDLToVK_BlendFactor[blendState.src_alpha_blendfactor];
6418 colorBlendAttachmentStates[i].dstAlphaBlendFactor = SDLToVK_BlendFactor[blendState.dst_alpha_blendfactor];
6419 colorBlendAttachmentStates[i].alphaBlendOp = SDLToVK_BlendOp[blendState.alpha_blend_op];
6420 colorBlendAttachmentStates[i].colorWriteMask =
6421 colorWriteMask;
6422 }
6423
6424 colorBlendStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
6425 colorBlendStateCreateInfo.pNext = NULL;
6426 colorBlendStateCreateInfo.flags = 0;
6427 colorBlendStateCreateInfo.attachmentCount =
6428 createinfo->target_info.num_color_targets;
6429 colorBlendStateCreateInfo.pAttachments =
6430 colorBlendAttachmentStates;
6431 colorBlendStateCreateInfo.blendConstants[0] = 1.0f;
6432 colorBlendStateCreateInfo.blendConstants[1] = 1.0f;
6433 colorBlendStateCreateInfo.blendConstants[2] = 1.0f;
6434 colorBlendStateCreateInfo.blendConstants[3] = 1.0f;
6435
6436 // We don't support LogicOp, so this is easy.
6437 colorBlendStateCreateInfo.logicOpEnable = VK_FALSE;
6438 colorBlendStateCreateInfo.logicOp = 0;
6439
6440 // Pipeline Layout
6441
6442 graphicsPipeline->resourceLayout =
6443 VULKAN_INTERNAL_FetchGraphicsPipelineResourceLayout(
6444 renderer,
6445 graphicsPipeline->vertexShader,
6446 graphicsPipeline->fragmentShader);
6447
6448 if (graphicsPipeline->resourceLayout == NULL) {
6449 SDL_stack_free(vertexInputBindingDescriptions);
6450 SDL_stack_free(vertexInputAttributeDescriptions);
6451 SDL_stack_free(colorBlendAttachmentStates);
6452 SDL_free(graphicsPipeline);
6453 SET_STRING_ERROR_AND_RETURN("Failed to initialize pipeline resource layout!", NULL);
6454 }
6455
6456 // Pipeline
6457
6458 vkPipelineCreateInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
6459 vkPipelineCreateInfo.pNext = NULL;
6460 vkPipelineCreateInfo.flags = 0;
6461 vkPipelineCreateInfo.stageCount = 2;
6462 vkPipelineCreateInfo.pStages = shaderStageCreateInfos;
6463 vkPipelineCreateInfo.pVertexInputState = &vertexInputStateCreateInfo;
6464 vkPipelineCreateInfo.pInputAssemblyState = &inputAssemblyStateCreateInfo;
6465 vkPipelineCreateInfo.pTessellationState = VK_NULL_HANDLE;
6466 vkPipelineCreateInfo.pViewportState = &viewportStateCreateInfo;
6467 vkPipelineCreateInfo.pRasterizationState = &rasterizationStateCreateInfo;
6468 vkPipelineCreateInfo.pMultisampleState = &multisampleStateCreateInfo;
6469 vkPipelineCreateInfo.pDepthStencilState = &depthStencilStateCreateInfo;
6470 vkPipelineCreateInfo.pColorBlendState = &colorBlendStateCreateInfo;
6471 vkPipelineCreateInfo.pDynamicState = &dynamicStateCreateInfo;
6472 vkPipelineCreateInfo.layout = graphicsPipeline->resourceLayout->pipelineLayout;
6473 vkPipelineCreateInfo.renderPass = transientRenderPass;
6474 vkPipelineCreateInfo.subpass = 0;
6475 vkPipelineCreateInfo.basePipelineHandle = VK_NULL_HANDLE;
6476 vkPipelineCreateInfo.basePipelineIndex = 0;
6477
6478 // TODO: enable pipeline caching
6479 vulkanResult = renderer->vkCreateGraphicsPipelines(
6480 renderer->logicalDevice,
6481 VK_NULL_HANDLE,
6482 1,
6483 &vkPipelineCreateInfo,
6484 NULL,
6485 &graphicsPipeline->pipeline);
6486
6487 SDL_stack_free(vertexInputBindingDescriptions);
6488 SDL_stack_free(vertexInputAttributeDescriptions);
6489 SDL_stack_free(colorBlendAttachmentStates);
6490
6491 renderer->vkDestroyRenderPass(
6492 renderer->logicalDevice,
6493 transientRenderPass,
6494 NULL);
6495
6496 if (vulkanResult != VK_SUCCESS) {
6497 SDL_free(graphicsPipeline);
6498 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateGraphicsPipelines, NULL);
6499 }
6500
6501 SDL_SetAtomicInt(&graphicsPipeline->referenceCount, 0);
6502
6503 if (renderer->debugMode && renderer->supportsDebugUtils && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING)) {
6504 VkDebugUtilsObjectNameInfoEXT nameInfo;
6505 nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
6506 nameInfo.pNext = NULL;
6507 nameInfo.pObjectName = SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING, NULL);
6508 nameInfo.objectType = VK_OBJECT_TYPE_PIPELINE;
6509 nameInfo.objectHandle = (uint64_t)graphicsPipeline->pipeline;
6510
6511 renderer->vkSetDebugUtilsObjectNameEXT(
6512 renderer->logicalDevice,
6513 &nameInfo);
6514 }
6515
6516 return (SDL_GPUGraphicsPipeline *)graphicsPipeline;
6517}
6518
6519static SDL_GPUComputePipeline *VULKAN_CreateComputePipeline(
6520 SDL_GPURenderer *driverData,
6521 const SDL_GPUComputePipelineCreateInfo *createinfo)
6522{
6523 VkShaderModuleCreateInfo shaderModuleCreateInfo;
6524 VkComputePipelineCreateInfo vkShaderCreateInfo;
6525 VkPipelineShaderStageCreateInfo pipelineShaderStageCreateInfo;
6526 VkResult vulkanResult;
6527 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6528 VulkanComputePipeline *vulkanComputePipeline;
6529
6530 if (createinfo->format != SDL_GPU_SHADERFORMAT_SPIRV) {
6531 SET_STRING_ERROR_AND_RETURN("Incompatible shader format for Vulkan!", NULL);
6532 }
6533
6534 vulkanComputePipeline = SDL_malloc(sizeof(VulkanComputePipeline));
6535 shaderModuleCreateInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
6536 shaderModuleCreateInfo.pNext = NULL;
6537 shaderModuleCreateInfo.flags = 0;
6538 shaderModuleCreateInfo.codeSize = createinfo->code_size;
6539 shaderModuleCreateInfo.pCode = (Uint32 *)createinfo->code;
6540
6541 vulkanResult = renderer->vkCreateShaderModule(
6542 renderer->logicalDevice,
6543 &shaderModuleCreateInfo,
6544 NULL,
6545 &vulkanComputePipeline->shaderModule);
6546
6547 if (vulkanResult != VK_SUCCESS) {
6548 SDL_free(vulkanComputePipeline);
6549 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateShaderModule, NULL);
6550 }
6551
6552 pipelineShaderStageCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
6553 pipelineShaderStageCreateInfo.pNext = NULL;
6554 pipelineShaderStageCreateInfo.flags = 0;
6555 pipelineShaderStageCreateInfo.stage = VK_SHADER_STAGE_COMPUTE_BIT;
6556 pipelineShaderStageCreateInfo.module = vulkanComputePipeline->shaderModule;
6557 pipelineShaderStageCreateInfo.pName = createinfo->entrypoint;
6558 pipelineShaderStageCreateInfo.pSpecializationInfo = NULL;
6559
6560 vulkanComputePipeline->resourceLayout = VULKAN_INTERNAL_FetchComputePipelineResourceLayout(
6561 renderer,
6562 createinfo);
6563
6564 if (vulkanComputePipeline->resourceLayout == NULL) {
6565 renderer->vkDestroyShaderModule(
6566 renderer->logicalDevice,
6567 vulkanComputePipeline->shaderModule,
6568 NULL);
6569 SDL_free(vulkanComputePipeline);
6570 return NULL;
6571 }
6572
6573 vkShaderCreateInfo.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
6574 vkShaderCreateInfo.pNext = NULL;
6575 vkShaderCreateInfo.flags = 0;
6576 vkShaderCreateInfo.stage = pipelineShaderStageCreateInfo;
6577 vkShaderCreateInfo.layout = vulkanComputePipeline->resourceLayout->pipelineLayout;
6578 vkShaderCreateInfo.basePipelineHandle = (VkPipeline)VK_NULL_HANDLE;
6579 vkShaderCreateInfo.basePipelineIndex = 0;
6580
6581 vulkanResult = renderer->vkCreateComputePipelines(
6582 renderer->logicalDevice,
6583 (VkPipelineCache)VK_NULL_HANDLE,
6584 1,
6585 &vkShaderCreateInfo,
6586 NULL,
6587 &vulkanComputePipeline->pipeline);
6588
6589 if (vulkanResult != VK_SUCCESS) {
6590 VULKAN_INTERNAL_DestroyComputePipeline(renderer, vulkanComputePipeline);
6591 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateComputePipeline, NULL);
6592 return NULL;
6593 }
6594
6595 SDL_SetAtomicInt(&vulkanComputePipeline->referenceCount, 0);
6596
6597 if (renderer->debugMode && renderer->supportsDebugUtils && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING)) {
6598 VkDebugUtilsObjectNameInfoEXT nameInfo;
6599 nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
6600 nameInfo.pNext = NULL;
6601 nameInfo.pObjectName = SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING, NULL);
6602 nameInfo.objectType = VK_OBJECT_TYPE_PIPELINE;
6603 nameInfo.objectHandle = (uint64_t)vulkanComputePipeline->pipeline;
6604
6605 renderer->vkSetDebugUtilsObjectNameEXT(
6606 renderer->logicalDevice,
6607 &nameInfo);
6608 }
6609
6610 return (SDL_GPUComputePipeline *)vulkanComputePipeline;
6611}
6612
6613static SDL_GPUSampler *VULKAN_CreateSampler(
6614 SDL_GPURenderer *driverData,
6615 const SDL_GPUSamplerCreateInfo *createinfo)
6616{
6617 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6618 VulkanSampler *vulkanSampler = SDL_malloc(sizeof(VulkanSampler));
6619 VkResult vulkanResult;
6620
6621 VkSamplerCreateInfo vkSamplerCreateInfo;
6622 vkSamplerCreateInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
6623 vkSamplerCreateInfo.pNext = NULL;
6624 vkSamplerCreateInfo.flags = 0;
6625 vkSamplerCreateInfo.magFilter = SDLToVK_Filter[createinfo->mag_filter];
6626 vkSamplerCreateInfo.minFilter = SDLToVK_Filter[createinfo->min_filter];
6627 vkSamplerCreateInfo.mipmapMode = SDLToVK_SamplerMipmapMode[createinfo->mipmap_mode];
6628 vkSamplerCreateInfo.addressModeU = SDLToVK_SamplerAddressMode[createinfo->address_mode_u];
6629 vkSamplerCreateInfo.addressModeV = SDLToVK_SamplerAddressMode[createinfo->address_mode_v];
6630 vkSamplerCreateInfo.addressModeW = SDLToVK_SamplerAddressMode[createinfo->address_mode_w];
6631 vkSamplerCreateInfo.mipLodBias = createinfo->mip_lod_bias;
6632 vkSamplerCreateInfo.anisotropyEnable = createinfo->enable_anisotropy;
6633 vkSamplerCreateInfo.maxAnisotropy = createinfo->max_anisotropy;
6634 vkSamplerCreateInfo.compareEnable = createinfo->enable_compare;
6635 vkSamplerCreateInfo.compareOp = SDLToVK_CompareOp[createinfo->compare_op];
6636 vkSamplerCreateInfo.minLod = createinfo->min_lod;
6637 vkSamplerCreateInfo.maxLod = createinfo->max_lod;
6638 vkSamplerCreateInfo.borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK; // arbitrary, unused
6639 vkSamplerCreateInfo.unnormalizedCoordinates = VK_FALSE;
6640
6641 vulkanResult = renderer->vkCreateSampler(
6642 renderer->logicalDevice,
6643 &vkSamplerCreateInfo,
6644 NULL,
6645 &vulkanSampler->sampler);
6646
6647 if (vulkanResult != VK_SUCCESS) {
6648 SDL_free(vulkanSampler);
6649 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateSampler, NULL);
6650 }
6651
6652 SDL_SetAtomicInt(&vulkanSampler->referenceCount, 0);
6653
6654 if (renderer->debugMode && renderer->supportsDebugUtils && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING)) {
6655 VkDebugUtilsObjectNameInfoEXT nameInfo;
6656 nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
6657 nameInfo.pNext = NULL;
6658 nameInfo.pObjectName = SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING, NULL);
6659 nameInfo.objectType = VK_OBJECT_TYPE_SAMPLER;
6660 nameInfo.objectHandle = (uint64_t)vulkanSampler->sampler;
6661
6662 renderer->vkSetDebugUtilsObjectNameEXT(
6663 renderer->logicalDevice,
6664 &nameInfo);
6665 }
6666
6667 return (SDL_GPUSampler *)vulkanSampler;
6668}
6669
6670static SDL_GPUShader *VULKAN_CreateShader(
6671 SDL_GPURenderer *driverData,
6672 const SDL_GPUShaderCreateInfo *createinfo)
6673{
6674 VulkanShader *vulkanShader;
6675 VkResult vulkanResult;
6676 VkShaderModuleCreateInfo vkShaderModuleCreateInfo;
6677 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6678 size_t entryPointNameLength;
6679
6680 vulkanShader = SDL_malloc(sizeof(VulkanShader));
6681 vkShaderModuleCreateInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
6682 vkShaderModuleCreateInfo.pNext = NULL;
6683 vkShaderModuleCreateInfo.flags = 0;
6684 vkShaderModuleCreateInfo.codeSize = createinfo->code_size;
6685 vkShaderModuleCreateInfo.pCode = (Uint32 *)createinfo->code;
6686
6687 vulkanResult = renderer->vkCreateShaderModule(
6688 renderer->logicalDevice,
6689 &vkShaderModuleCreateInfo,
6690 NULL,
6691 &vulkanShader->shaderModule);
6692
6693 if (vulkanResult != VK_SUCCESS) {
6694 SDL_free(vulkanShader);
6695 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateShaderModule, NULL);
6696 }
6697
6698 entryPointNameLength = SDL_strlen(createinfo->entrypoint) + 1;
6699 vulkanShader->entrypointName = SDL_malloc(entryPointNameLength);
6700 SDL_utf8strlcpy((char *)vulkanShader->entrypointName, createinfo->entrypoint, entryPointNameLength);
6701
6702 vulkanShader->stage = createinfo->stage;
6703 vulkanShader->numSamplers = createinfo->num_samplers;
6704 vulkanShader->numStorageTextures = createinfo->num_storage_textures;
6705 vulkanShader->numStorageBuffers = createinfo->num_storage_buffers;
6706 vulkanShader->numUniformBuffers = createinfo->num_uniform_buffers;
6707
6708 SDL_SetAtomicInt(&vulkanShader->referenceCount, 0);
6709
6710 if (renderer->debugMode && SDL_HasProperty(createinfo->props, SDL_PROP_GPU_SHADER_CREATE_NAME_STRING)) {
6711 VkDebugUtilsObjectNameInfoEXT nameInfo;
6712 nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
6713 nameInfo.pNext = NULL;
6714 nameInfo.pObjectName = SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_SHADER_CREATE_NAME_STRING, NULL);
6715 nameInfo.objectType = VK_OBJECT_TYPE_SHADER_MODULE;
6716 nameInfo.objectHandle = (uint64_t)vulkanShader->shaderModule;
6717
6718 renderer->vkSetDebugUtilsObjectNameEXT(
6719 renderer->logicalDevice,
6720 &nameInfo);
6721 }
6722
6723 return (SDL_GPUShader *)vulkanShader;
6724}
6725
6726static bool VULKAN_SupportsSampleCount(
6727 SDL_GPURenderer *driverData,
6728 SDL_GPUTextureFormat format,
6729 SDL_GPUSampleCount sampleCount)
6730{
6731 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6732 VkSampleCountFlags bits = IsDepthFormat(format) ? renderer->physicalDeviceProperties.properties.limits.framebufferDepthSampleCounts : renderer->physicalDeviceProperties.properties.limits.framebufferColorSampleCounts;
6733 VkSampleCountFlagBits vkSampleCount = SDLToVK_SampleCount[sampleCount];
6734 return !!(bits & vkSampleCount);
6735}
6736
6737static SDL_GPUTexture *VULKAN_CreateTexture(
6738 SDL_GPURenderer *driverData,
6739 const SDL_GPUTextureCreateInfo *createinfo)
6740{
6741 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6742 VulkanTexture *texture;
6743 VulkanTextureContainer *container;
6744
6745 texture = VULKAN_INTERNAL_CreateTexture(
6746 renderer,
6747 createinfo);
6748
6749 if (texture == NULL) {
6750 return NULL;
6751 }
6752
6753 container = SDL_malloc(sizeof(VulkanTextureContainer));
6754
6755 // Copy properties so we don't lose information when the client destroys them
6756 container->header.info = *createinfo;
6757 container->header.info.props = SDL_CreateProperties();
6758 SDL_CopyProperties(createinfo->props, container->header.info.props);
6759
6760 container->canBeCycled = true;
6761 container->activeTexture = texture;
6762 container->textureCapacity = 1;
6763 container->textureCount = 1;
6764 container->textures = SDL_malloc(
6765 container->textureCapacity * sizeof(VulkanTexture *));
6766 container->textures[0] = container->activeTexture;
6767 container->debugName = NULL;
6768
6769 if (SDL_HasProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING)) {
6770 container->debugName = SDL_strdup(SDL_GetStringProperty(createinfo->props, SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING, NULL));
6771 }
6772
6773 texture->container = container;
6774 texture->containerIndex = 0;
6775
6776 return (SDL_GPUTexture *)container;
6777}
6778
6779static SDL_GPUBuffer *VULKAN_CreateBuffer(
6780 SDL_GPURenderer *driverData,
6781 SDL_GPUBufferUsageFlags usageFlags,
6782 Uint32 size,
6783 const char *debugName)
6784{
6785 return (SDL_GPUBuffer *)VULKAN_INTERNAL_CreateBufferContainer(
6786 (VulkanRenderer *)driverData,
6787 (VkDeviceSize)size,
6788 usageFlags,
6789 VULKAN_BUFFER_TYPE_GPU,
6790 false,
6791 debugName);
6792}
6793
6794static VulkanUniformBuffer *VULKAN_INTERNAL_CreateUniformBuffer(
6795 VulkanRenderer *renderer,
6796 Uint32 size)
6797{
6798 VulkanUniformBuffer *uniformBuffer = SDL_calloc(1, sizeof(VulkanUniformBuffer));
6799
6800 uniformBuffer->buffer = VULKAN_INTERNAL_CreateBuffer(
6801 renderer,
6802 (VkDeviceSize)size,
6803 0,
6804 VULKAN_BUFFER_TYPE_UNIFORM,
6805 false,
6806 NULL);
6807
6808 uniformBuffer->drawOffset = 0;
6809 uniformBuffer->writeOffset = 0;
6810 uniformBuffer->buffer->uniformBufferForDefrag = uniformBuffer;
6811
6812 return uniformBuffer;
6813}
6814
6815static SDL_GPUTransferBuffer *VULKAN_CreateTransferBuffer(
6816 SDL_GPURenderer *driverData,
6817 SDL_GPUTransferBufferUsage usage,
6818 Uint32 size,
6819 const char *debugName)
6820{
6821 return (SDL_GPUTransferBuffer *)VULKAN_INTERNAL_CreateBufferContainer(
6822 (VulkanRenderer *)driverData,
6823 (VkDeviceSize)size,
6824 0,
6825 VULKAN_BUFFER_TYPE_TRANSFER,
6826 true, // Dedicated allocations preserve the data even if a defrag is triggered.
6827 debugName);
6828}
6829
6830static void VULKAN_INTERNAL_ReleaseTexture(
6831 VulkanRenderer *renderer,
6832 VulkanTexture *vulkanTexture)
6833{
6834 if (vulkanTexture->markedForDestroy) {
6835 return;
6836 }
6837
6838 SDL_LockMutex(renderer->disposeLock);
6839
6840 EXPAND_ARRAY_IF_NEEDED(
6841 renderer->texturesToDestroy,
6842 VulkanTexture *,
6843 renderer->texturesToDestroyCount + 1,
6844 renderer->texturesToDestroyCapacity,
6845 renderer->texturesToDestroyCapacity * 2);
6846
6847 renderer->texturesToDestroy[renderer->texturesToDestroyCount] = vulkanTexture;
6848 renderer->texturesToDestroyCount += 1;
6849
6850 vulkanTexture->markedForDestroy = true;
6851
6852 SDL_UnlockMutex(renderer->disposeLock);
6853}
6854
6855static void VULKAN_ReleaseTexture(
6856 SDL_GPURenderer *driverData,
6857 SDL_GPUTexture *texture)
6858{
6859 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6860 VulkanTextureContainer *vulkanTextureContainer = (VulkanTextureContainer *)texture;
6861 Uint32 i;
6862
6863 SDL_LockMutex(renderer->disposeLock);
6864
6865 for (i = 0; i < vulkanTextureContainer->textureCount; i += 1) {
6866 VULKAN_INTERNAL_ReleaseTexture(renderer, vulkanTextureContainer->textures[i]);
6867 }
6868
6869 // Containers are just client handles, so we can destroy immediately
6870 if (vulkanTextureContainer->debugName != NULL) {
6871 SDL_free(vulkanTextureContainer->debugName);
6872 }
6873 SDL_free(vulkanTextureContainer->textures);
6874 SDL_free(vulkanTextureContainer);
6875
6876 SDL_UnlockMutex(renderer->disposeLock);
6877}
6878
6879static void VULKAN_ReleaseSampler(
6880 SDL_GPURenderer *driverData,
6881 SDL_GPUSampler *sampler)
6882{
6883 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6884 VulkanSampler *vulkanSampler = (VulkanSampler *)sampler;
6885
6886 SDL_LockMutex(renderer->disposeLock);
6887
6888 EXPAND_ARRAY_IF_NEEDED(
6889 renderer->samplersToDestroy,
6890 VulkanSampler *,
6891 renderer->samplersToDestroyCount + 1,
6892 renderer->samplersToDestroyCapacity,
6893 renderer->samplersToDestroyCapacity * 2);
6894
6895 renderer->samplersToDestroy[renderer->samplersToDestroyCount] = vulkanSampler;
6896 renderer->samplersToDestroyCount += 1;
6897
6898 SDL_UnlockMutex(renderer->disposeLock);
6899}
6900
6901static void VULKAN_INTERNAL_ReleaseBuffer(
6902 VulkanRenderer *renderer,
6903 VulkanBuffer *vulkanBuffer)
6904{
6905 if (vulkanBuffer->markedForDestroy) {
6906 return;
6907 }
6908
6909 SDL_LockMutex(renderer->disposeLock);
6910
6911 EXPAND_ARRAY_IF_NEEDED(
6912 renderer->buffersToDestroy,
6913 VulkanBuffer *,
6914 renderer->buffersToDestroyCount + 1,
6915 renderer->buffersToDestroyCapacity,
6916 renderer->buffersToDestroyCapacity * 2);
6917
6918 renderer->buffersToDestroy[renderer->buffersToDestroyCount] = vulkanBuffer;
6919 renderer->buffersToDestroyCount += 1;
6920
6921 vulkanBuffer->markedForDestroy = 1;
6922 vulkanBuffer->container = NULL;
6923
6924 SDL_UnlockMutex(renderer->disposeLock);
6925}
6926
6927static void VULKAN_INTERNAL_ReleaseBufferContainer(
6928 VulkanRenderer *renderer,
6929 VulkanBufferContainer *bufferContainer)
6930{
6931 Uint32 i;
6932
6933 SDL_LockMutex(renderer->disposeLock);
6934
6935 for (i = 0; i < bufferContainer->bufferCount; i += 1) {
6936 VULKAN_INTERNAL_ReleaseBuffer(renderer, bufferContainer->buffers[i]);
6937 }
6938
6939 // Containers are just client handles, so we can free immediately
6940 if (bufferContainer->debugName != NULL) {
6941 SDL_free(bufferContainer->debugName);
6942 bufferContainer->debugName = NULL;
6943 }
6944 SDL_free(bufferContainer->buffers);
6945 SDL_free(bufferContainer);
6946
6947 SDL_UnlockMutex(renderer->disposeLock);
6948}
6949
6950static void VULKAN_ReleaseBuffer(
6951 SDL_GPURenderer *driverData,
6952 SDL_GPUBuffer *buffer)
6953{
6954 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6955 VulkanBufferContainer *vulkanBufferContainer = (VulkanBufferContainer *)buffer;
6956
6957 VULKAN_INTERNAL_ReleaseBufferContainer(
6958 renderer,
6959 vulkanBufferContainer);
6960}
6961
6962static void VULKAN_ReleaseTransferBuffer(
6963 SDL_GPURenderer *driverData,
6964 SDL_GPUTransferBuffer *transferBuffer)
6965{
6966 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6967 VulkanBufferContainer *transferBufferContainer = (VulkanBufferContainer *)transferBuffer;
6968
6969 VULKAN_INTERNAL_ReleaseBufferContainer(
6970 renderer,
6971 transferBufferContainer);
6972}
6973
6974static void VULKAN_ReleaseShader(
6975 SDL_GPURenderer *driverData,
6976 SDL_GPUShader *shader)
6977{
6978 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
6979 VulkanShader *vulkanShader = (VulkanShader *)shader;
6980
6981 SDL_LockMutex(renderer->disposeLock);
6982
6983 EXPAND_ARRAY_IF_NEEDED(
6984 renderer->shadersToDestroy,
6985 VulkanShader *,
6986 renderer->shadersToDestroyCount + 1,
6987 renderer->shadersToDestroyCapacity,
6988 renderer->shadersToDestroyCapacity * 2);
6989
6990 renderer->shadersToDestroy[renderer->shadersToDestroyCount] = vulkanShader;
6991 renderer->shadersToDestroyCount += 1;
6992
6993 SDL_UnlockMutex(renderer->disposeLock);
6994}
6995
6996static void VULKAN_ReleaseComputePipeline(
6997 SDL_GPURenderer *driverData,
6998 SDL_GPUComputePipeline *computePipeline)
6999{
7000 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
7001 VulkanComputePipeline *vulkanComputePipeline = (VulkanComputePipeline *)computePipeline;
7002
7003 SDL_LockMutex(renderer->disposeLock);
7004
7005 EXPAND_ARRAY_IF_NEEDED(
7006 renderer->computePipelinesToDestroy,
7007 VulkanComputePipeline *,
7008 renderer->computePipelinesToDestroyCount + 1,
7009 renderer->computePipelinesToDestroyCapacity,
7010 renderer->computePipelinesToDestroyCapacity * 2);
7011
7012 renderer->computePipelinesToDestroy[renderer->computePipelinesToDestroyCount] = vulkanComputePipeline;
7013 renderer->computePipelinesToDestroyCount += 1;
7014
7015 SDL_UnlockMutex(renderer->disposeLock);
7016}
7017
7018static void VULKAN_ReleaseGraphicsPipeline(
7019 SDL_GPURenderer *driverData,
7020 SDL_GPUGraphicsPipeline *graphicsPipeline)
7021{
7022 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
7023 VulkanGraphicsPipeline *vulkanGraphicsPipeline = (VulkanGraphicsPipeline *)graphicsPipeline;
7024
7025 SDL_LockMutex(renderer->disposeLock);
7026
7027 EXPAND_ARRAY_IF_NEEDED(
7028 renderer->graphicsPipelinesToDestroy,
7029 VulkanGraphicsPipeline *,
7030 renderer->graphicsPipelinesToDestroyCount + 1,
7031 renderer->graphicsPipelinesToDestroyCapacity,
7032 renderer->graphicsPipelinesToDestroyCapacity * 2);
7033
7034 renderer->graphicsPipelinesToDestroy[renderer->graphicsPipelinesToDestroyCount] = vulkanGraphicsPipeline;
7035 renderer->graphicsPipelinesToDestroyCount += 1;
7036
7037 SDL_UnlockMutex(renderer->disposeLock);
7038}
7039
7040// Command Buffer render state
7041
7042static VkRenderPass VULKAN_INTERNAL_FetchRenderPass(
7043 VulkanRenderer *renderer,
7044 VulkanCommandBuffer *commandBuffer,
7045 const SDL_GPUColorTargetInfo *colorTargetInfos,
7046 Uint32 numColorTargets,
7047 const SDL_GPUDepthStencilTargetInfo *depthStencilTargetInfo)
7048{
7049 VulkanRenderPassHashTableValue *renderPassWrapper = NULL;
7050 VkRenderPass renderPassHandle;
7051 RenderPassHashTableKey key;
7052 Uint32 i;
7053
7054 SDL_zero(key);
7055
7056 for (i = 0; i < numColorTargets; i += 1) {
7057 key.colorTargetDescriptions[i].format = SDLToVK_TextureFormat[((VulkanTextureContainer *)colorTargetInfos[i].texture)->header.info.format];
7058 key.colorTargetDescriptions[i].loadOp = colorTargetInfos[i].load_op;
7059 key.colorTargetDescriptions[i].storeOp = colorTargetInfos[i].store_op;
7060
7061 if (colorTargetInfos[i].resolve_texture != NULL) {
7062 key.resolveTargetFormats[key.numResolveTargets] = SDLToVK_TextureFormat[((VulkanTextureContainer *)colorTargetInfos[i].resolve_texture)->header.info.format];
7063 key.numResolveTargets += 1;
7064 }
7065 }
7066
7067 key.sampleCount = VK_SAMPLE_COUNT_1_BIT;
7068 if (numColorTargets > 0) {
7069 key.sampleCount = SDLToVK_SampleCount[((VulkanTextureContainer *)colorTargetInfos[0].texture)->header.info.sample_count];
7070 }
7071
7072 key.numColorTargets = numColorTargets;
7073
7074 if (depthStencilTargetInfo == NULL) {
7075 key.depthStencilTargetDescription.format = 0;
7076 key.depthStencilTargetDescription.loadOp = SDL_GPU_LOADOP_DONT_CARE;
7077 key.depthStencilTargetDescription.storeOp = SDL_GPU_STOREOP_DONT_CARE;
7078 key.depthStencilTargetDescription.stencilLoadOp = SDL_GPU_LOADOP_DONT_CARE;
7079 key.depthStencilTargetDescription.stencilStoreOp = SDL_GPU_STOREOP_DONT_CARE;
7080 } else {
7081 key.depthStencilTargetDescription.format = SDLToVK_TextureFormat[((VulkanTextureContainer *)depthStencilTargetInfo->texture)->header.info.format];
7082 key.depthStencilTargetDescription.loadOp = depthStencilTargetInfo->load_op;
7083 key.depthStencilTargetDescription.storeOp = depthStencilTargetInfo->store_op;
7084 key.depthStencilTargetDescription.stencilLoadOp = depthStencilTargetInfo->stencil_load_op;
7085 key.depthStencilTargetDescription.stencilStoreOp = depthStencilTargetInfo->stencil_store_op;
7086 }
7087
7088 bool result = SDL_FindInHashTable(
7089 renderer->renderPassHashTable,
7090 (const void *)&key,
7091 (const void **)&renderPassWrapper);
7092
7093 if (result) {
7094 return renderPassWrapper->handle;
7095 }
7096
7097 renderPassHandle = VULKAN_INTERNAL_CreateRenderPass(
7098 renderer,
7099 commandBuffer,
7100 colorTargetInfos,
7101 numColorTargets,
7102 depthStencilTargetInfo);
7103
7104 if (renderPassHandle == VK_NULL_HANDLE) {
7105 return VK_NULL_HANDLE;
7106 }
7107
7108 // Have to malloc the key to store it in the hashtable
7109 RenderPassHashTableKey *allocedKey = SDL_malloc(sizeof(RenderPassHashTableKey));
7110 SDL_memcpy(allocedKey, &key, sizeof(RenderPassHashTableKey));
7111
7112 renderPassWrapper = SDL_malloc(sizeof(VulkanRenderPassHashTableValue));
7113 renderPassWrapper->handle = renderPassHandle;
7114
7115 SDL_InsertIntoHashTable(
7116 renderer->renderPassHashTable,
7117 (const void *)allocedKey,
7118 (const void *)renderPassWrapper, true);
7119
7120 return renderPassHandle;
7121}
7122
7123static VulkanFramebuffer *VULKAN_INTERNAL_FetchFramebuffer(
7124 VulkanRenderer *renderer,
7125 VkRenderPass renderPass,
7126 const SDL_GPUColorTargetInfo *colorTargetInfos,
7127 Uint32 numColorTargets,
7128 const SDL_GPUDepthStencilTargetInfo *depthStencilTargetInfo,
7129 Uint32 width,
7130 Uint32 height)
7131{
7132 VulkanFramebuffer *vulkanFramebuffer = NULL;
7133 VkFramebufferCreateInfo framebufferInfo;
7134 VkResult result;
7135 VkImageView imageViewAttachments[2 * MAX_COLOR_TARGET_BINDINGS + 1 /* depth */];
7136 FramebufferHashTableKey key;
7137 Uint32 attachmentCount = 0;
7138 Uint32 i;
7139
7140 SDL_zero(imageViewAttachments);
7141 SDL_zero(key);
7142
7143 key.numColorTargets = numColorTargets;
7144
7145 for (i = 0; i < numColorTargets; i += 1) {
7146 VulkanTextureContainer *container = (VulkanTextureContainer *)colorTargetInfos[i].texture;
7147 VulkanTextureSubresource *subresource = VULKAN_INTERNAL_FetchTextureSubresource(
7148 container,
7149 container->header.info.type == SDL_GPU_TEXTURETYPE_3D ? 0 : colorTargetInfos[i].layer_or_depth_plane,
7150 colorTargetInfos[i].mip_level);
7151
7152 Uint32 rtvIndex =
7153 container->header.info.type == SDL_GPU_TEXTURETYPE_3D ? colorTargetInfos[i].layer_or_depth_plane : 0;
7154 key.colorAttachmentViews[i] = subresource->renderTargetViews[rtvIndex];
7155
7156 if (colorTargetInfos[i].resolve_texture != NULL) {
7157 VulkanTextureContainer *resolveTextureContainer = (VulkanTextureContainer *)colorTargetInfos[i].resolve_texture;
7158 VulkanTextureSubresource *resolveSubresource = VULKAN_INTERNAL_FetchTextureSubresource(
7159 resolveTextureContainer,
7160 colorTargetInfos[i].layer_or_depth_plane,
7161 colorTargetInfos[i].mip_level);
7162
7163 key.resolveAttachmentViews[key.numResolveAttachments] = resolveSubresource->renderTargetViews[0];
7164 key.numResolveAttachments += 1;
7165 }
7166 }
7167
7168 if (depthStencilTargetInfo == NULL) {
7169 key.depthStencilAttachmentView = VK_NULL_HANDLE;
7170 } else {
7171 VulkanTextureSubresource *subresource = VULKAN_INTERNAL_FetchTextureSubresource(
7172 (VulkanTextureContainer *)depthStencilTargetInfo->texture,
7173 0,
7174 0);
7175 key.depthStencilAttachmentView = subresource->depthStencilView;
7176 }
7177
7178 key.width = width;
7179 key.height = height;
7180
7181 SDL_LockMutex(renderer->framebufferFetchLock);
7182
7183 bool findResult = SDL_FindInHashTable(
7184 renderer->framebufferHashTable,
7185 (const void *)&key,
7186 (const void **)&vulkanFramebuffer);
7187
7188 SDL_UnlockMutex(renderer->framebufferFetchLock);
7189
7190 if (findResult) {
7191 return vulkanFramebuffer;
7192 }
7193
7194 vulkanFramebuffer = SDL_malloc(sizeof(VulkanFramebuffer));
7195
7196 SDL_SetAtomicInt(&vulkanFramebuffer->referenceCount, 0);
7197
7198 // Create a new framebuffer
7199
7200 for (i = 0; i < numColorTargets; i += 1) {
7201 VulkanTextureContainer *container = (VulkanTextureContainer *)colorTargetInfos[i].texture;
7202 VulkanTextureSubresource *subresource = VULKAN_INTERNAL_FetchTextureSubresource(
7203 container,
7204 container->header.info.type == SDL_GPU_TEXTURETYPE_3D ? 0 : colorTargetInfos[i].layer_or_depth_plane,
7205 colorTargetInfos[i].mip_level);
7206
7207 Uint32 rtvIndex =
7208 container->header.info.type == SDL_GPU_TEXTURETYPE_3D ? colorTargetInfos[i].layer_or_depth_plane : 0;
7209
7210 imageViewAttachments[attachmentCount] = subresource->renderTargetViews[rtvIndex];
7211
7212 attachmentCount += 1;
7213
7214 if (colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE || colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE_AND_STORE) {
7215 VulkanTextureContainer *resolveContainer = (VulkanTextureContainer *)colorTargetInfos[i].resolve_texture;
7216 VulkanTextureSubresource *resolveSubresource = VULKAN_INTERNAL_FetchTextureSubresource(
7217 resolveContainer,
7218 colorTargetInfos[i].resolve_layer,
7219 colorTargetInfos[i].resolve_mip_level);
7220
7221 imageViewAttachments[attachmentCount] = resolveSubresource->renderTargetViews[0];
7222
7223 attachmentCount += 1;
7224 }
7225 }
7226
7227 if (depthStencilTargetInfo != NULL) {
7228 VulkanTextureSubresource *subresource = VULKAN_INTERNAL_FetchTextureSubresource(
7229 (VulkanTextureContainer *)depthStencilTargetInfo->texture,
7230 0,
7231 0);
7232 imageViewAttachments[attachmentCount] = subresource->depthStencilView;
7233
7234 attachmentCount += 1;
7235 }
7236
7237 framebufferInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
7238 framebufferInfo.pNext = NULL;
7239 framebufferInfo.flags = 0;
7240 framebufferInfo.renderPass = renderPass;
7241 framebufferInfo.attachmentCount = attachmentCount;
7242 framebufferInfo.pAttachments = imageViewAttachments;
7243 framebufferInfo.width = key.width;
7244 framebufferInfo.height = key.height;
7245 framebufferInfo.layers = 1;
7246
7247 result = renderer->vkCreateFramebuffer(
7248 renderer->logicalDevice,
7249 &framebufferInfo,
7250 NULL,
7251 &vulkanFramebuffer->framebuffer);
7252
7253 if (result == VK_SUCCESS) {
7254 // Have to malloc the key to store it in the hashtable
7255 FramebufferHashTableKey *allocedKey = SDL_malloc(sizeof(FramebufferHashTableKey));
7256 SDL_memcpy(allocedKey, &key, sizeof(FramebufferHashTableKey));
7257
7258 SDL_LockMutex(renderer->framebufferFetchLock);
7259
7260 SDL_InsertIntoHashTable(
7261 renderer->framebufferHashTable,
7262 (const void *)allocedKey,
7263 (const void *)vulkanFramebuffer, true);
7264
7265 SDL_UnlockMutex(renderer->framebufferFetchLock);
7266 } else {
7267 SDL_free(vulkanFramebuffer);
7268 CHECK_VULKAN_ERROR_AND_RETURN(result, vkCreateFramebuffer, NULL);
7269 }
7270
7271 return vulkanFramebuffer;
7272}
7273
7274static void VULKAN_INTERNAL_SetCurrentViewport(
7275 VulkanCommandBuffer *commandBuffer,
7276 const SDL_GPUViewport *viewport)
7277{
7278 VulkanCommandBuffer *vulkanCommandBuffer = commandBuffer;
7279 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
7280
7281 vulkanCommandBuffer->currentViewport.x = viewport->x;
7282 vulkanCommandBuffer->currentViewport.width = viewport->w;
7283 vulkanCommandBuffer->currentViewport.minDepth = viewport->min_depth;
7284 vulkanCommandBuffer->currentViewport.maxDepth = viewport->max_depth;
7285
7286 // Viewport flip for consistency with other backends
7287 vulkanCommandBuffer->currentViewport.y = viewport->y + viewport->h;
7288 vulkanCommandBuffer->currentViewport.height = -viewport->h;
7289
7290 renderer->vkCmdSetViewport(
7291 vulkanCommandBuffer->commandBuffer,
7292 0,
7293 1,
7294 &vulkanCommandBuffer->currentViewport);
7295}
7296
7297static void VULKAN_SetViewport(
7298 SDL_GPUCommandBuffer *commandBuffer,
7299 const SDL_GPUViewport *viewport)
7300{
7301 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7302
7303 VULKAN_INTERNAL_SetCurrentViewport(
7304 vulkanCommandBuffer,
7305 viewport);
7306}
7307
7308static void VULKAN_INTERNAL_SetCurrentScissor(
7309 VulkanCommandBuffer *vulkanCommandBuffer,
7310 const SDL_Rect *scissor)
7311{
7312 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
7313
7314 vulkanCommandBuffer->currentScissor.offset.x = scissor->x;
7315 vulkanCommandBuffer->currentScissor.offset.y = scissor->y;
7316 vulkanCommandBuffer->currentScissor.extent.width = scissor->w;
7317 vulkanCommandBuffer->currentScissor.extent.height = scissor->h;
7318
7319 renderer->vkCmdSetScissor(
7320 vulkanCommandBuffer->commandBuffer,
7321 0,
7322 1,
7323 &vulkanCommandBuffer->currentScissor);
7324}
7325
7326static void VULKAN_SetScissor(
7327 SDL_GPUCommandBuffer *commandBuffer,
7328 const SDL_Rect *scissor)
7329{
7330 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7331
7332 VULKAN_INTERNAL_SetCurrentScissor(
7333 vulkanCommandBuffer,
7334 scissor);
7335}
7336
7337static void VULKAN_INTERNAL_SetCurrentBlendConstants(
7338 VulkanCommandBuffer *vulkanCommandBuffer,
7339 SDL_FColor blendConstants)
7340{
7341 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
7342
7343 vulkanCommandBuffer->blendConstants[0] = blendConstants.r;
7344 vulkanCommandBuffer->blendConstants[1] = blendConstants.g;
7345 vulkanCommandBuffer->blendConstants[2] = blendConstants.b;
7346 vulkanCommandBuffer->blendConstants[3] = blendConstants.a;
7347
7348 renderer->vkCmdSetBlendConstants(
7349 vulkanCommandBuffer->commandBuffer,
7350 vulkanCommandBuffer->blendConstants);
7351}
7352
7353static void VULKAN_SetBlendConstants(
7354 SDL_GPUCommandBuffer *commandBuffer,
7355 SDL_FColor blendConstants)
7356{
7357 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7358
7359 VULKAN_INTERNAL_SetCurrentBlendConstants(
7360 vulkanCommandBuffer,
7361 blendConstants);
7362}
7363
7364static void VULKAN_INTERNAL_SetCurrentStencilReference(
7365 VulkanCommandBuffer *vulkanCommandBuffer,
7366 Uint8 reference)
7367{
7368 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
7369
7370 vulkanCommandBuffer->stencilRef = reference;
7371
7372 renderer->vkCmdSetStencilReference(
7373 vulkanCommandBuffer->commandBuffer,
7374 VK_STENCIL_FACE_FRONT_AND_BACK,
7375 vulkanCommandBuffer->stencilRef);
7376}
7377
7378static void VULKAN_SetStencilReference(
7379 SDL_GPUCommandBuffer *commandBuffer,
7380 Uint8 reference)
7381{
7382 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7383
7384 VULKAN_INTERNAL_SetCurrentStencilReference(
7385 vulkanCommandBuffer,
7386 reference);
7387}
7388
7389static void VULKAN_BindVertexSamplers(
7390 SDL_GPUCommandBuffer *commandBuffer,
7391 Uint32 firstSlot,
7392 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
7393 Uint32 numBindings)
7394{
7395 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7396
7397 for (Uint32 i = 0; i < numBindings; i += 1) {
7398 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)textureSamplerBindings[i].texture;
7399 VulkanSampler *sampler = (VulkanSampler *)textureSamplerBindings[i].sampler;
7400
7401 if (vulkanCommandBuffer->vertexSamplers[firstSlot + i] != sampler) {
7402 VULKAN_INTERNAL_TrackSampler(
7403 vulkanCommandBuffer,
7404 (VulkanSampler *)textureSamplerBindings[i].sampler);
7405
7406 vulkanCommandBuffer->vertexSamplers[firstSlot + i] = (VulkanSampler *)textureSamplerBindings[i].sampler;
7407 vulkanCommandBuffer->needNewVertexResourceDescriptorSet = true;
7408 }
7409
7410 if (vulkanCommandBuffer->vertexSamplerTextures[firstSlot + i] != textureContainer->activeTexture) {
7411 VULKAN_INTERNAL_TrackTexture(
7412 vulkanCommandBuffer,
7413 textureContainer->activeTexture);
7414
7415 vulkanCommandBuffer->vertexSamplerTextures[firstSlot + i] = textureContainer->activeTexture;
7416 vulkanCommandBuffer->needNewVertexResourceDescriptorSet = true;
7417 }
7418 }
7419}
7420
7421static void VULKAN_BindVertexStorageTextures(
7422 SDL_GPUCommandBuffer *commandBuffer,
7423 Uint32 firstSlot,
7424 SDL_GPUTexture *const *storageTextures,
7425 Uint32 numBindings)
7426{
7427 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7428
7429 for (Uint32 i = 0; i < numBindings; i += 1) {
7430 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)storageTextures[i];
7431
7432 if (vulkanCommandBuffer->vertexStorageTextures[firstSlot + i] != textureContainer->activeTexture) {
7433 VULKAN_INTERNAL_TrackTexture(
7434 vulkanCommandBuffer,
7435 textureContainer->activeTexture);
7436
7437 vulkanCommandBuffer->vertexStorageTextures[firstSlot + i] = textureContainer->activeTexture;
7438 vulkanCommandBuffer->needNewVertexResourceDescriptorSet = true;
7439 }
7440 }
7441}
7442
7443static void VULKAN_BindVertexStorageBuffers(
7444 SDL_GPUCommandBuffer *commandBuffer,
7445 Uint32 firstSlot,
7446 SDL_GPUBuffer *const *storageBuffers,
7447 Uint32 numBindings)
7448{
7449 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7450
7451 for (Uint32 i = 0; i < numBindings; i += 1) {
7452 VulkanBufferContainer *bufferContainer = (VulkanBufferContainer *)storageBuffers[i];
7453
7454 if (vulkanCommandBuffer->vertexStorageBuffers[firstSlot + i] != bufferContainer->activeBuffer) {
7455 VULKAN_INTERNAL_TrackBuffer(
7456 vulkanCommandBuffer,
7457 bufferContainer->activeBuffer);
7458
7459 vulkanCommandBuffer->vertexStorageBuffers[firstSlot + i] = bufferContainer->activeBuffer;
7460 vulkanCommandBuffer->needNewVertexResourceDescriptorSet = true;
7461 }
7462 }
7463}
7464
7465static void VULKAN_BindFragmentSamplers(
7466 SDL_GPUCommandBuffer *commandBuffer,
7467 Uint32 firstSlot,
7468 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
7469 Uint32 numBindings)
7470{
7471 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7472
7473 for (Uint32 i = 0; i < numBindings; i += 1) {
7474 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)textureSamplerBindings[i].texture;
7475 VulkanSampler *sampler = (VulkanSampler *)textureSamplerBindings[i].sampler;
7476
7477 if (vulkanCommandBuffer->fragmentSamplers[firstSlot + i] != sampler) {
7478 VULKAN_INTERNAL_TrackSampler(
7479 vulkanCommandBuffer,
7480 (VulkanSampler *)textureSamplerBindings[i].sampler);
7481
7482 vulkanCommandBuffer->fragmentSamplers[firstSlot + i] = (VulkanSampler *)textureSamplerBindings[i].sampler;
7483 vulkanCommandBuffer->needNewFragmentResourceDescriptorSet = true;
7484 }
7485
7486 if (vulkanCommandBuffer->fragmentSamplerTextures[firstSlot + i] != textureContainer->activeTexture) {
7487 VULKAN_INTERNAL_TrackTexture(
7488 vulkanCommandBuffer,
7489 textureContainer->activeTexture);
7490
7491 vulkanCommandBuffer->fragmentSamplerTextures[firstSlot + i] = textureContainer->activeTexture;
7492 vulkanCommandBuffer->needNewFragmentResourceDescriptorSet = true;
7493 }
7494 }
7495}
7496
7497static void VULKAN_BindFragmentStorageTextures(
7498 SDL_GPUCommandBuffer *commandBuffer,
7499 Uint32 firstSlot,
7500 SDL_GPUTexture *const *storageTextures,
7501 Uint32 numBindings)
7502{
7503 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7504
7505 for (Uint32 i = 0; i < numBindings; i += 1) {
7506 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)storageTextures[i];
7507
7508 if (vulkanCommandBuffer->fragmentStorageTextures[firstSlot + i] != textureContainer->activeTexture) {
7509 VULKAN_INTERNAL_TrackTexture(
7510 vulkanCommandBuffer,
7511 textureContainer->activeTexture);
7512
7513 vulkanCommandBuffer->fragmentStorageTextures[firstSlot + i] = textureContainer->activeTexture;
7514 vulkanCommandBuffer->needNewFragmentResourceDescriptorSet = true;
7515 }
7516 }
7517}
7518
7519static void VULKAN_BindFragmentStorageBuffers(
7520 SDL_GPUCommandBuffer *commandBuffer,
7521 Uint32 firstSlot,
7522 SDL_GPUBuffer *const *storageBuffers,
7523 Uint32 numBindings)
7524{
7525 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7526 VulkanBufferContainer *bufferContainer;
7527 Uint32 i;
7528
7529 for (i = 0; i < numBindings; i += 1) {
7530 bufferContainer = (VulkanBufferContainer *)storageBuffers[i];
7531
7532 if (vulkanCommandBuffer->fragmentStorageBuffers[firstSlot + i] != bufferContainer->activeBuffer) {
7533 VULKAN_INTERNAL_TrackBuffer(
7534 vulkanCommandBuffer,
7535 bufferContainer->activeBuffer);
7536
7537 vulkanCommandBuffer->fragmentStorageBuffers[firstSlot + i] = bufferContainer->activeBuffer;
7538 vulkanCommandBuffer->needNewFragmentResourceDescriptorSet = true;
7539 }
7540 }
7541}
7542
7543static VulkanUniformBuffer *VULKAN_INTERNAL_AcquireUniformBufferFromPool(
7544 VulkanCommandBuffer *commandBuffer)
7545{
7546 VulkanRenderer *renderer = commandBuffer->renderer;
7547 VulkanUniformBuffer *uniformBuffer;
7548
7549 SDL_LockMutex(renderer->acquireUniformBufferLock);
7550
7551 if (renderer->uniformBufferPoolCount > 0) {
7552 uniformBuffer = renderer->uniformBufferPool[renderer->uniformBufferPoolCount - 1];
7553 renderer->uniformBufferPoolCount -= 1;
7554 } else {
7555 uniformBuffer = VULKAN_INTERNAL_CreateUniformBuffer(
7556 renderer,
7557 UNIFORM_BUFFER_SIZE);
7558 }
7559
7560 SDL_UnlockMutex(renderer->acquireUniformBufferLock);
7561
7562 VULKAN_INTERNAL_TrackUniformBuffer(commandBuffer, uniformBuffer);
7563
7564 return uniformBuffer;
7565}
7566
7567static void VULKAN_INTERNAL_ReturnUniformBufferToPool(
7568 VulkanRenderer *renderer,
7569 VulkanUniformBuffer *uniformBuffer)
7570{
7571 if (renderer->uniformBufferPoolCount >= renderer->uniformBufferPoolCapacity) {
7572 renderer->uniformBufferPoolCapacity *= 2;
7573 renderer->uniformBufferPool = SDL_realloc(
7574 renderer->uniformBufferPool,
7575 renderer->uniformBufferPoolCapacity * sizeof(VulkanUniformBuffer *));
7576 }
7577
7578 renderer->uniformBufferPool[renderer->uniformBufferPoolCount] = uniformBuffer;
7579 renderer->uniformBufferPoolCount += 1;
7580
7581 uniformBuffer->writeOffset = 0;
7582 uniformBuffer->drawOffset = 0;
7583}
7584
7585static void VULKAN_INTERNAL_PushUniformData(
7586 VulkanCommandBuffer *commandBuffer,
7587 VulkanUniformBufferStage uniformBufferStage,
7588 Uint32 slotIndex,
7589 const void *data,
7590 Uint32 length)
7591{
7592 Uint32 blockSize =
7593 VULKAN_INTERNAL_NextHighestAlignment32(
7594 length,
7595 commandBuffer->renderer->minUBOAlignment);
7596
7597 VulkanUniformBuffer *uniformBuffer;
7598
7599 if (uniformBufferStage == VULKAN_UNIFORM_BUFFER_STAGE_VERTEX) {
7600 if (commandBuffer->vertexUniformBuffers[slotIndex] == NULL) {
7601 commandBuffer->vertexUniformBuffers[slotIndex] = VULKAN_INTERNAL_AcquireUniformBufferFromPool(
7602 commandBuffer);
7603 }
7604 uniformBuffer = commandBuffer->vertexUniformBuffers[slotIndex];
7605 } else if (uniformBufferStage == VULKAN_UNIFORM_BUFFER_STAGE_FRAGMENT) {
7606 if (commandBuffer->fragmentUniformBuffers[slotIndex] == NULL) {
7607 commandBuffer->fragmentUniformBuffers[slotIndex] = VULKAN_INTERNAL_AcquireUniformBufferFromPool(
7608 commandBuffer);
7609 }
7610 uniformBuffer = commandBuffer->fragmentUniformBuffers[slotIndex];
7611 } else if (uniformBufferStage == VULKAN_UNIFORM_BUFFER_STAGE_COMPUTE) {
7612 if (commandBuffer->computeUniformBuffers[slotIndex] == NULL) {
7613 commandBuffer->computeUniformBuffers[slotIndex] = VULKAN_INTERNAL_AcquireUniformBufferFromPool(
7614 commandBuffer);
7615 }
7616 uniformBuffer = commandBuffer->computeUniformBuffers[slotIndex];
7617 } else {
7618 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized shader stage!");
7619 return;
7620 }
7621
7622 // If there is no more room, acquire a new uniform buffer
7623 if (uniformBuffer->writeOffset + blockSize + MAX_UBO_SECTION_SIZE >= uniformBuffer->buffer->size) {
7624 uniformBuffer = VULKAN_INTERNAL_AcquireUniformBufferFromPool(commandBuffer);
7625
7626 uniformBuffer->drawOffset = 0;
7627 uniformBuffer->writeOffset = 0;
7628
7629 if (uniformBufferStage == VULKAN_UNIFORM_BUFFER_STAGE_VERTEX) {
7630 commandBuffer->vertexUniformBuffers[slotIndex] = uniformBuffer;
7631 commandBuffer->needNewVertexUniformDescriptorSet = true;
7632 } else if (uniformBufferStage == VULKAN_UNIFORM_BUFFER_STAGE_FRAGMENT) {
7633 commandBuffer->fragmentUniformBuffers[slotIndex] = uniformBuffer;
7634 commandBuffer->needNewFragmentUniformDescriptorSet = true;
7635 } else if (uniformBufferStage == VULKAN_UNIFORM_BUFFER_STAGE_COMPUTE) {
7636 commandBuffer->computeUniformBuffers[slotIndex] = uniformBuffer;
7637 commandBuffer->needNewComputeUniformDescriptorSet = true;
7638 } else {
7639 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized shader stage!");
7640 return;
7641 }
7642 }
7643
7644 uniformBuffer->drawOffset = uniformBuffer->writeOffset;
7645
7646 Uint8 *dst =
7647 uniformBuffer->buffer->usedRegion->allocation->mapPointer +
7648 uniformBuffer->buffer->usedRegion->resourceOffset +
7649 uniformBuffer->writeOffset;
7650
7651 SDL_memcpy(
7652 dst,
7653 data,
7654 length);
7655
7656 uniformBuffer->writeOffset += blockSize;
7657
7658 if (uniformBufferStage == VULKAN_UNIFORM_BUFFER_STAGE_VERTEX) {
7659 commandBuffer->needNewVertexUniformOffsets = true;
7660 } else if (uniformBufferStage == VULKAN_UNIFORM_BUFFER_STAGE_FRAGMENT) {
7661 commandBuffer->needNewFragmentUniformOffsets = true;
7662 } else if (uniformBufferStage == VULKAN_UNIFORM_BUFFER_STAGE_COMPUTE) {
7663 commandBuffer->needNewComputeUniformOffsets = true;
7664 } else {
7665 SDL_LogError(SDL_LOG_CATEGORY_GPU, "Unrecognized shader stage!");
7666 return;
7667 }
7668}
7669
7670static void VULKAN_BeginRenderPass(
7671 SDL_GPUCommandBuffer *commandBuffer,
7672 const SDL_GPUColorTargetInfo *colorTargetInfos,
7673 Uint32 numColorTargets,
7674 const SDL_GPUDepthStencilTargetInfo *depthStencilTargetInfo)
7675{
7676 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7677 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
7678 VkRenderPass renderPass;
7679 VulkanFramebuffer *framebuffer;
7680
7681 Uint32 w, h;
7682 VkClearValue *clearValues;
7683 Uint32 clearCount = 0;
7684 Uint32 totalColorAttachmentCount = 0;
7685 Uint32 i;
7686 SDL_GPUViewport defaultViewport;
7687 SDL_Rect defaultScissor;
7688 SDL_FColor defaultBlendConstants;
7689 Uint32 framebufferWidth = SDL_MAX_UINT32;
7690 Uint32 framebufferHeight = SDL_MAX_UINT32;
7691
7692 for (i = 0; i < numColorTargets; i += 1) {
7693 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)colorTargetInfos[i].texture;
7694
7695 w = textureContainer->header.info.width >> colorTargetInfos[i].mip_level;
7696 h = textureContainer->header.info.height >> colorTargetInfos[i].mip_level;
7697
7698 // The framebuffer cannot be larger than the smallest attachment.
7699
7700 if (w < framebufferWidth) {
7701 framebufferWidth = w;
7702 }
7703
7704 if (h < framebufferHeight) {
7705 framebufferHeight = h;
7706 }
7707 }
7708
7709 if (depthStencilTargetInfo != NULL) {
7710 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)depthStencilTargetInfo->texture;
7711
7712 w = textureContainer->header.info.width;
7713 h = textureContainer->header.info.height;
7714
7715 // The framebuffer cannot be larger than the smallest attachment.
7716
7717 if (w < framebufferWidth) {
7718 framebufferWidth = w;
7719 }
7720
7721 if (h < framebufferHeight) {
7722 framebufferHeight = h;
7723 }
7724 }
7725
7726 for (i = 0; i < numColorTargets; i += 1) {
7727 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)colorTargetInfos[i].texture;
7728 VulkanTextureSubresource *subresource = VULKAN_INTERNAL_PrepareTextureSubresourceForWrite(
7729 renderer,
7730 vulkanCommandBuffer,
7731 textureContainer,
7732 textureContainer->header.info.type == SDL_GPU_TEXTURETYPE_3D ? 0 : colorTargetInfos[i].layer_or_depth_plane,
7733 colorTargetInfos[i].mip_level,
7734 colorTargetInfos[i].cycle,
7735 VULKAN_TEXTURE_USAGE_MODE_COLOR_ATTACHMENT);
7736
7737 vulkanCommandBuffer->colorAttachmentSubresources[vulkanCommandBuffer->colorAttachmentSubresourceCount] = subresource;
7738 vulkanCommandBuffer->colorAttachmentSubresourceCount += 1;
7739 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, subresource->parent);
7740 totalColorAttachmentCount += 1;
7741 clearCount += 1;
7742
7743 if (colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE || colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE_AND_STORE) {
7744 VulkanTextureContainer *resolveContainer = (VulkanTextureContainer *)colorTargetInfos[i].resolve_texture;
7745 VulkanTextureSubresource *resolveSubresource = VULKAN_INTERNAL_PrepareTextureSubresourceForWrite(
7746 renderer,
7747 vulkanCommandBuffer,
7748 resolveContainer,
7749 colorTargetInfos[i].resolve_layer,
7750 colorTargetInfos[i].resolve_mip_level,
7751 colorTargetInfos[i].cycle_resolve_texture,
7752 VULKAN_TEXTURE_USAGE_MODE_COLOR_ATTACHMENT);
7753
7754 vulkanCommandBuffer->resolveAttachmentSubresources[vulkanCommandBuffer->resolveAttachmentSubresourceCount] = resolveSubresource;
7755 vulkanCommandBuffer->resolveAttachmentSubresourceCount += 1;
7756 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, resolveSubresource->parent);
7757 totalColorAttachmentCount += 1;
7758 clearCount += 1;
7759 }
7760 }
7761
7762 if (depthStencilTargetInfo != NULL) {
7763 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)depthStencilTargetInfo->texture;
7764 VulkanTextureSubresource *subresource = VULKAN_INTERNAL_PrepareTextureSubresourceForWrite(
7765 renderer,
7766 vulkanCommandBuffer,
7767 textureContainer,
7768 0,
7769 0,
7770 depthStencilTargetInfo->cycle,
7771 VULKAN_TEXTURE_USAGE_MODE_DEPTH_STENCIL_ATTACHMENT);
7772
7773 vulkanCommandBuffer->depthStencilAttachmentSubresource = subresource;
7774 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, subresource->parent);
7775 clearCount += 1;
7776 }
7777
7778 // Fetch required render objects
7779
7780 renderPass = VULKAN_INTERNAL_FetchRenderPass(
7781 renderer,
7782 vulkanCommandBuffer,
7783 colorTargetInfos,
7784 numColorTargets,
7785 depthStencilTargetInfo);
7786
7787 if (renderPass == VK_NULL_HANDLE) {
7788 return;
7789 }
7790
7791 framebuffer = VULKAN_INTERNAL_FetchFramebuffer(
7792 renderer,
7793 renderPass,
7794 colorTargetInfos,
7795 numColorTargets,
7796 depthStencilTargetInfo,
7797 framebufferWidth,
7798 framebufferHeight);
7799
7800 if (framebuffer == NULL) {
7801 return;
7802 }
7803
7804 VULKAN_INTERNAL_TrackFramebuffer(renderer, vulkanCommandBuffer, framebuffer);
7805
7806 // Set clear values
7807
7808 clearValues = SDL_stack_alloc(VkClearValue, clearCount);
7809
7810 for (i = 0; i < totalColorAttachmentCount; i += 1) {
7811 clearValues[i].color.float32[0] = colorTargetInfos[i].clear_color.r;
7812 clearValues[i].color.float32[1] = colorTargetInfos[i].clear_color.g;
7813 clearValues[i].color.float32[2] = colorTargetInfos[i].clear_color.b;
7814 clearValues[i].color.float32[3] = colorTargetInfos[i].clear_color.a;
7815
7816 if (colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE || colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE_AND_STORE) {
7817 // Skip over the resolve texture, we're not clearing it
7818 i += 1;
7819 }
7820 }
7821
7822 if (depthStencilTargetInfo != NULL) {
7823 clearValues[totalColorAttachmentCount].depthStencil.depth =
7824 depthStencilTargetInfo->clear_depth;
7825 clearValues[totalColorAttachmentCount].depthStencil.stencil =
7826 depthStencilTargetInfo->clear_stencil;
7827 }
7828
7829 VkRenderPassBeginInfo renderPassBeginInfo;
7830 renderPassBeginInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
7831 renderPassBeginInfo.pNext = NULL;
7832 renderPassBeginInfo.renderPass = renderPass;
7833 renderPassBeginInfo.framebuffer = framebuffer->framebuffer;
7834 renderPassBeginInfo.pClearValues = clearValues;
7835 renderPassBeginInfo.clearValueCount = clearCount;
7836 renderPassBeginInfo.renderArea.extent.width = framebufferWidth;
7837 renderPassBeginInfo.renderArea.extent.height = framebufferHeight;
7838 renderPassBeginInfo.renderArea.offset.x = 0;
7839 renderPassBeginInfo.renderArea.offset.y = 0;
7840
7841 renderer->vkCmdBeginRenderPass(
7842 vulkanCommandBuffer->commandBuffer,
7843 &renderPassBeginInfo,
7844 VK_SUBPASS_CONTENTS_INLINE);
7845
7846 SDL_stack_free(clearValues);
7847
7848 // Set sensible default states
7849
7850 defaultViewport.x = 0;
7851 defaultViewport.y = 0;
7852 defaultViewport.w = (float)framebufferWidth;
7853 defaultViewport.h = (float)framebufferHeight;
7854 defaultViewport.min_depth = 0;
7855 defaultViewport.max_depth = 1;
7856
7857 VULKAN_INTERNAL_SetCurrentViewport(
7858 vulkanCommandBuffer,
7859 &defaultViewport);
7860
7861 defaultScissor.x = 0;
7862 defaultScissor.y = 0;
7863 defaultScissor.w = (Sint32)framebufferWidth;
7864 defaultScissor.h = (Sint32)framebufferHeight;
7865
7866 VULKAN_INTERNAL_SetCurrentScissor(
7867 vulkanCommandBuffer,
7868 &defaultScissor);
7869
7870 defaultBlendConstants.r = 1.0f;
7871 defaultBlendConstants.g = 1.0f;
7872 defaultBlendConstants.b = 1.0f;
7873 defaultBlendConstants.a = 1.0f;
7874
7875 VULKAN_INTERNAL_SetCurrentBlendConstants(
7876 vulkanCommandBuffer,
7877 defaultBlendConstants);
7878
7879 VULKAN_INTERNAL_SetCurrentStencilReference(
7880 vulkanCommandBuffer,
7881 0);
7882}
7883
7884static void VULKAN_BindGraphicsPipeline(
7885 SDL_GPUCommandBuffer *commandBuffer,
7886 SDL_GPUGraphicsPipeline *graphicsPipeline)
7887{
7888 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7889 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
7890 VulkanGraphicsPipeline *pipeline = (VulkanGraphicsPipeline *)graphicsPipeline;
7891
7892 renderer->vkCmdBindPipeline(
7893 vulkanCommandBuffer->commandBuffer,
7894 VK_PIPELINE_BIND_POINT_GRAPHICS,
7895 pipeline->pipeline);
7896
7897 vulkanCommandBuffer->currentGraphicsPipeline = pipeline;
7898
7899 VULKAN_INTERNAL_TrackGraphicsPipeline(vulkanCommandBuffer, pipeline);
7900
7901 // Acquire uniform buffers if necessary
7902 for (Uint32 i = 0; i < pipeline->resourceLayout->vertexUniformBufferCount; i += 1) {
7903 if (vulkanCommandBuffer->vertexUniformBuffers[i] == NULL) {
7904 vulkanCommandBuffer->vertexUniformBuffers[i] = VULKAN_INTERNAL_AcquireUniformBufferFromPool(
7905 vulkanCommandBuffer);
7906 }
7907 }
7908
7909 for (Uint32 i = 0; i < pipeline->resourceLayout->fragmentUniformBufferCount; i += 1) {
7910 if (vulkanCommandBuffer->fragmentUniformBuffers[i] == NULL) {
7911 vulkanCommandBuffer->fragmentUniformBuffers[i] = VULKAN_INTERNAL_AcquireUniformBufferFromPool(
7912 vulkanCommandBuffer);
7913 }
7914 }
7915
7916 // Mark bindings as needed
7917 vulkanCommandBuffer->needNewVertexResourceDescriptorSet = true;
7918 vulkanCommandBuffer->needNewFragmentResourceDescriptorSet = true;
7919 vulkanCommandBuffer->needNewVertexUniformDescriptorSet = true;
7920 vulkanCommandBuffer->needNewFragmentUniformDescriptorSet = true;
7921 vulkanCommandBuffer->needNewVertexUniformOffsets = true;
7922 vulkanCommandBuffer->needNewFragmentUniformOffsets = true;
7923}
7924
7925static void VULKAN_BindVertexBuffers(
7926 SDL_GPUCommandBuffer *commandBuffer,
7927 Uint32 firstSlot,
7928 const SDL_GPUBufferBinding *bindings,
7929 Uint32 numBindings)
7930{
7931 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7932
7933 for (Uint32 i = 0; i < numBindings; i += 1) {
7934 VulkanBuffer *buffer = ((VulkanBufferContainer *)bindings[i].buffer)->activeBuffer;
7935 if (vulkanCommandBuffer->vertexBuffers[i] != buffer->buffer || vulkanCommandBuffer->vertexBufferOffsets[i] != bindings[i].offset) {
7936 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, buffer);
7937
7938 vulkanCommandBuffer->vertexBuffers[i] = buffer->buffer;
7939 vulkanCommandBuffer->vertexBufferOffsets[i] = bindings[i].offset;
7940 vulkanCommandBuffer->needVertexBufferBind = true;
7941 }
7942 }
7943
7944 vulkanCommandBuffer->vertexBufferCount =
7945 SDL_max(vulkanCommandBuffer->vertexBufferCount, firstSlot + numBindings);
7946}
7947
7948static void VULKAN_BindIndexBuffer(
7949 SDL_GPUCommandBuffer *commandBuffer,
7950 const SDL_GPUBufferBinding *binding,
7951 SDL_GPUIndexElementSize indexElementSize)
7952{
7953 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7954 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
7955 VulkanBuffer *vulkanBuffer = ((VulkanBufferContainer *)binding->buffer)->activeBuffer;
7956
7957 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, vulkanBuffer);
7958
7959 renderer->vkCmdBindIndexBuffer(
7960 vulkanCommandBuffer->commandBuffer,
7961 vulkanBuffer->buffer,
7962 (VkDeviceSize)binding->offset,
7963 SDLToVK_IndexType[indexElementSize]);
7964}
7965
7966static void VULKAN_PushVertexUniformData(
7967 SDL_GPUCommandBuffer *commandBuffer,
7968 Uint32 slotIndex,
7969 const void *data,
7970 Uint32 length)
7971{
7972 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7973
7974 VULKAN_INTERNAL_PushUniformData(
7975 vulkanCommandBuffer,
7976 VULKAN_UNIFORM_BUFFER_STAGE_VERTEX,
7977 slotIndex,
7978 data,
7979 length);
7980}
7981
7982static void VULKAN_PushFragmentUniformData(
7983 SDL_GPUCommandBuffer *commandBuffer,
7984 Uint32 slotIndex,
7985 const void *data,
7986 Uint32 length)
7987{
7988 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
7989
7990 VULKAN_INTERNAL_PushUniformData(
7991 vulkanCommandBuffer,
7992 VULKAN_UNIFORM_BUFFER_STAGE_FRAGMENT,
7993 slotIndex,
7994 data,
7995 length);
7996}
7997
7998static void VULKAN_EndRenderPass(
7999 SDL_GPUCommandBuffer *commandBuffer)
8000{
8001 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8002 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8003 Uint32 i;
8004
8005 renderer->vkCmdEndRenderPass(
8006 vulkanCommandBuffer->commandBuffer);
8007
8008 for (i = 0; i < vulkanCommandBuffer->colorAttachmentSubresourceCount; i += 1) {
8009 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
8010 renderer,
8011 vulkanCommandBuffer,
8012 VULKAN_TEXTURE_USAGE_MODE_COLOR_ATTACHMENT,
8013 vulkanCommandBuffer->colorAttachmentSubresources[i]);
8014 }
8015 vulkanCommandBuffer->colorAttachmentSubresourceCount = 0;
8016
8017 for (i = 0; i < vulkanCommandBuffer->resolveAttachmentSubresourceCount; i += 1) {
8018 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
8019 renderer,
8020 vulkanCommandBuffer,
8021 VULKAN_TEXTURE_USAGE_MODE_COLOR_ATTACHMENT,
8022 vulkanCommandBuffer->resolveAttachmentSubresources[i]);
8023 }
8024 vulkanCommandBuffer->resolveAttachmentSubresourceCount = 0;
8025
8026 if (vulkanCommandBuffer->depthStencilAttachmentSubresource != NULL) {
8027 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
8028 renderer,
8029 vulkanCommandBuffer,
8030 VULKAN_TEXTURE_USAGE_MODE_DEPTH_STENCIL_ATTACHMENT,
8031 vulkanCommandBuffer->depthStencilAttachmentSubresource);
8032 vulkanCommandBuffer->depthStencilAttachmentSubresource = NULL;
8033 }
8034
8035 vulkanCommandBuffer->currentGraphicsPipeline = NULL;
8036
8037 vulkanCommandBuffer->vertexResourceDescriptorSet = VK_NULL_HANDLE;
8038 vulkanCommandBuffer->vertexUniformDescriptorSet = VK_NULL_HANDLE;
8039 vulkanCommandBuffer->fragmentResourceDescriptorSet = VK_NULL_HANDLE;
8040 vulkanCommandBuffer->fragmentUniformDescriptorSet = VK_NULL_HANDLE;
8041
8042 // Reset bind state
8043 SDL_zeroa(vulkanCommandBuffer->colorAttachmentSubresources);
8044 SDL_zeroa(vulkanCommandBuffer->resolveAttachmentSubresources);
8045 vulkanCommandBuffer->depthStencilAttachmentSubresource = NULL;
8046
8047 SDL_zeroa(vulkanCommandBuffer->vertexBuffers);
8048 SDL_zeroa(vulkanCommandBuffer->vertexBufferOffsets);
8049 vulkanCommandBuffer->vertexBufferCount = 0;
8050
8051 SDL_zeroa(vulkanCommandBuffer->vertexSamplers);
8052 SDL_zeroa(vulkanCommandBuffer->vertexSamplerTextures);
8053 SDL_zeroa(vulkanCommandBuffer->vertexStorageTextures);
8054 SDL_zeroa(vulkanCommandBuffer->vertexStorageBuffers);
8055
8056 SDL_zeroa(vulkanCommandBuffer->fragmentSamplers);
8057 SDL_zeroa(vulkanCommandBuffer->fragmentSamplerTextures);
8058 SDL_zeroa(vulkanCommandBuffer->fragmentStorageTextures);
8059 SDL_zeroa(vulkanCommandBuffer->fragmentStorageBuffers);
8060}
8061
8062static void VULKAN_BeginComputePass(
8063 SDL_GPUCommandBuffer *commandBuffer,
8064 const SDL_GPUStorageTextureReadWriteBinding *storageTextureBindings,
8065 Uint32 numStorageTextureBindings,
8066 const SDL_GPUStorageBufferReadWriteBinding *storageBufferBindings,
8067 Uint32 numStorageBufferBindings)
8068{
8069 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8070 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8071 VulkanBufferContainer *bufferContainer;
8072 VulkanBuffer *buffer;
8073 Uint32 i;
8074
8075 vulkanCommandBuffer->readWriteComputeStorageTextureSubresourceCount = numStorageTextureBindings;
8076
8077 for (i = 0; i < numStorageTextureBindings; i += 1) {
8078 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)storageTextureBindings[i].texture;
8079 VulkanTextureSubresource *subresource = VULKAN_INTERNAL_PrepareTextureSubresourceForWrite(
8080 renderer,
8081 vulkanCommandBuffer,
8082 textureContainer,
8083 storageTextureBindings[i].layer,
8084 storageTextureBindings[i].mip_level,
8085 storageTextureBindings[i].cycle,
8086 VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE);
8087
8088 vulkanCommandBuffer->readWriteComputeStorageTextureSubresources[i] = subresource;
8089
8090 VULKAN_INTERNAL_TrackTexture(
8091 vulkanCommandBuffer,
8092 subresource->parent);
8093 }
8094
8095 for (i = 0; i < numStorageBufferBindings; i += 1) {
8096 bufferContainer = (VulkanBufferContainer *)storageBufferBindings[i].buffer;
8097 buffer = VULKAN_INTERNAL_PrepareBufferForWrite(
8098 renderer,
8099 vulkanCommandBuffer,
8100 bufferContainer,
8101 storageBufferBindings[i].cycle,
8102 VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ);
8103
8104 vulkanCommandBuffer->readWriteComputeStorageBuffers[i] = buffer;
8105
8106 VULKAN_INTERNAL_TrackBuffer(
8107 vulkanCommandBuffer,
8108 buffer);
8109 }
8110}
8111
8112static void VULKAN_BindComputePipeline(
8113 SDL_GPUCommandBuffer *commandBuffer,
8114 SDL_GPUComputePipeline *computePipeline)
8115{
8116 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8117 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8118 VulkanComputePipeline *vulkanComputePipeline = (VulkanComputePipeline *)computePipeline;
8119
8120 renderer->vkCmdBindPipeline(
8121 vulkanCommandBuffer->commandBuffer,
8122 VK_PIPELINE_BIND_POINT_COMPUTE,
8123 vulkanComputePipeline->pipeline);
8124
8125 vulkanCommandBuffer->currentComputePipeline = vulkanComputePipeline;
8126
8127 VULKAN_INTERNAL_TrackComputePipeline(vulkanCommandBuffer, vulkanComputePipeline);
8128
8129 // Acquire uniform buffers if necessary
8130 for (Uint32 i = 0; i < vulkanComputePipeline->resourceLayout->numUniformBuffers; i += 1) {
8131 if (vulkanCommandBuffer->computeUniformBuffers[i] == NULL) {
8132 vulkanCommandBuffer->computeUniformBuffers[i] = VULKAN_INTERNAL_AcquireUniformBufferFromPool(
8133 vulkanCommandBuffer);
8134 }
8135 }
8136
8137 // Mark binding as needed
8138 vulkanCommandBuffer->needNewComputeReadWriteDescriptorSet = true;
8139 vulkanCommandBuffer->needNewComputeReadOnlyDescriptorSet = true;
8140 vulkanCommandBuffer->needNewComputeUniformDescriptorSet = true;
8141 vulkanCommandBuffer->needNewComputeUniformOffsets = true;
8142}
8143
8144static void VULKAN_BindComputeSamplers(
8145 SDL_GPUCommandBuffer *commandBuffer,
8146 Uint32 firstSlot,
8147 const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
8148 Uint32 numBindings)
8149{
8150 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8151
8152 for (Uint32 i = 0; i < numBindings; i += 1) {
8153 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)textureSamplerBindings[i].texture;
8154 VulkanSampler *sampler = (VulkanSampler *)textureSamplerBindings[i].sampler;
8155
8156 if (vulkanCommandBuffer->computeSamplers[firstSlot + i] != sampler) {
8157 VULKAN_INTERNAL_TrackSampler(
8158 vulkanCommandBuffer,
8159 sampler);
8160
8161 vulkanCommandBuffer->computeSamplers[firstSlot + i] = sampler;
8162 vulkanCommandBuffer->needNewComputeReadOnlyDescriptorSet = true;
8163 }
8164
8165 if (vulkanCommandBuffer->computeSamplerTextures[firstSlot + i] != textureContainer->activeTexture) {
8166 VULKAN_INTERNAL_TrackTexture(
8167 vulkanCommandBuffer,
8168 textureContainer->activeTexture);
8169
8170 vulkanCommandBuffer->computeSamplerTextures[firstSlot + i] = textureContainer->activeTexture;
8171 vulkanCommandBuffer->needNewComputeReadOnlyDescriptorSet = true;
8172 }
8173 }
8174}
8175
8176static void VULKAN_BindComputeStorageTextures(
8177 SDL_GPUCommandBuffer *commandBuffer,
8178 Uint32 firstSlot,
8179 SDL_GPUTexture *const *storageTextures,
8180 Uint32 numBindings)
8181{
8182 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8183 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8184
8185 for (Uint32 i = 0; i < numBindings; i += 1) {
8186 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)storageTextures[i];
8187
8188 if (vulkanCommandBuffer->readOnlyComputeStorageTextures[firstSlot + i] != textureContainer->activeTexture) {
8189 /* If a different texture as in this slot, transition it back to its default usage */
8190 if (vulkanCommandBuffer->readOnlyComputeStorageTextures[firstSlot + i] != NULL) {
8191 VULKAN_INTERNAL_TextureTransitionToDefaultUsage(
8192 renderer,
8193 vulkanCommandBuffer,
8194 VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ,
8195 vulkanCommandBuffer->readOnlyComputeStorageTextures[firstSlot + i]);
8196 }
8197
8198 /* Then transition the new texture and prepare it for binding */
8199 VULKAN_INTERNAL_TextureTransitionFromDefaultUsage(
8200 renderer,
8201 vulkanCommandBuffer,
8202 VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ,
8203 textureContainer->activeTexture);
8204
8205
8206 VULKAN_INTERNAL_TrackTexture(
8207 vulkanCommandBuffer,
8208 textureContainer->activeTexture);
8209
8210 vulkanCommandBuffer->readOnlyComputeStorageTextures[firstSlot + i] = textureContainer->activeTexture;
8211 vulkanCommandBuffer->needNewComputeReadOnlyDescriptorSet = true;
8212 }
8213 }
8214}
8215
8216static void VULKAN_BindComputeStorageBuffers(
8217 SDL_GPUCommandBuffer *commandBuffer,
8218 Uint32 firstSlot,
8219 SDL_GPUBuffer *const *storageBuffers,
8220 Uint32 numBindings)
8221{
8222 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8223 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8224
8225 for (Uint32 i = 0; i < numBindings; i += 1) {
8226 VulkanBufferContainer *bufferContainer = (VulkanBufferContainer *)storageBuffers[i];
8227
8228 if (vulkanCommandBuffer->readOnlyComputeStorageBuffers[firstSlot + i] != bufferContainer->activeBuffer) {
8229 /* If a different buffer was in this slot, transition it back to its default usage */
8230 if (vulkanCommandBuffer->readOnlyComputeStorageBuffers[firstSlot + i] != NULL) {
8231 VULKAN_INTERNAL_BufferTransitionToDefaultUsage(
8232 renderer,
8233 vulkanCommandBuffer,
8234 VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ,
8235 vulkanCommandBuffer->readOnlyComputeStorageBuffers[firstSlot + i]);
8236 }
8237
8238 /* Then transition the new buffer and prepare it for binding */
8239 VULKAN_INTERNAL_BufferTransitionFromDefaultUsage(
8240 renderer,
8241 vulkanCommandBuffer,
8242 VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ,
8243 bufferContainer->activeBuffer);
8244
8245 VULKAN_INTERNAL_TrackBuffer(
8246 vulkanCommandBuffer,
8247 bufferContainer->activeBuffer);
8248
8249 vulkanCommandBuffer->readOnlyComputeStorageBuffers[firstSlot + i] = bufferContainer->activeBuffer;
8250 vulkanCommandBuffer->needNewComputeReadOnlyDescriptorSet = true;
8251 }
8252 }
8253}
8254
8255static void VULKAN_PushComputeUniformData(
8256 SDL_GPUCommandBuffer *commandBuffer,
8257 Uint32 slotIndex,
8258 const void *data,
8259 Uint32 length)
8260{
8261 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8262
8263 VULKAN_INTERNAL_PushUniformData(
8264 vulkanCommandBuffer,
8265 VULKAN_UNIFORM_BUFFER_STAGE_COMPUTE,
8266 slotIndex,
8267 data,
8268 length);
8269}
8270
8271static void VULKAN_INTERNAL_BindComputeDescriptorSets(
8272 VulkanRenderer *renderer,
8273 VulkanCommandBuffer *commandBuffer)
8274{
8275 VulkanComputePipelineResourceLayout *resourceLayout;
8276 DescriptorSetLayout *descriptorSetLayout;
8277 VkWriteDescriptorSet writeDescriptorSets[
8278 MAX_TEXTURE_SAMPLERS_PER_STAGE +
8279 MAX_STORAGE_TEXTURES_PER_STAGE +
8280 MAX_STORAGE_BUFFERS_PER_STAGE +
8281 MAX_COMPUTE_WRITE_TEXTURES +
8282 MAX_COMPUTE_WRITE_BUFFERS +
8283 MAX_UNIFORM_BUFFERS_PER_STAGE];
8284 VkDescriptorBufferInfo bufferInfos[MAX_STORAGE_BUFFERS_PER_STAGE + MAX_COMPUTE_WRITE_BUFFERS + MAX_UNIFORM_BUFFERS_PER_STAGE];
8285 VkDescriptorImageInfo imageInfos[MAX_TEXTURE_SAMPLERS_PER_STAGE + MAX_STORAGE_TEXTURES_PER_STAGE + MAX_COMPUTE_WRITE_TEXTURES];
8286 Uint32 dynamicOffsets[MAX_UNIFORM_BUFFERS_PER_STAGE];
8287 Uint32 writeCount = 0;
8288 Uint32 bufferInfoCount = 0;
8289 Uint32 imageInfoCount = 0;
8290 Uint32 dynamicOffsetCount = 0;
8291
8292 if (
8293 !commandBuffer->needNewComputeReadOnlyDescriptorSet &&
8294 !commandBuffer->needNewComputeReadWriteDescriptorSet &&
8295 !commandBuffer->needNewComputeUniformDescriptorSet &&
8296 !commandBuffer->needNewComputeUniformOffsets
8297 ) {
8298 return;
8299 }
8300
8301 resourceLayout = commandBuffer->currentComputePipeline->resourceLayout;
8302
8303 if (commandBuffer->needNewComputeReadOnlyDescriptorSet) {
8304 descriptorSetLayout = resourceLayout->descriptorSetLayouts[0];
8305
8306 commandBuffer->computeReadOnlyDescriptorSet = VULKAN_INTERNAL_FetchDescriptorSet(
8307 renderer,
8308 commandBuffer,
8309 descriptorSetLayout);
8310
8311 for (Uint32 i = 0; i < resourceLayout->numSamplers; i += 1) {
8312 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
8313
8314 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
8315 currentWriteDescriptorSet->pNext = NULL;
8316 currentWriteDescriptorSet->descriptorCount = 1;
8317 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
8318 currentWriteDescriptorSet->dstArrayElement = 0;
8319 currentWriteDescriptorSet->dstBinding = i;
8320 currentWriteDescriptorSet->dstSet = commandBuffer->computeReadOnlyDescriptorSet;
8321 currentWriteDescriptorSet->pTexelBufferView = NULL;
8322 currentWriteDescriptorSet->pBufferInfo = NULL;
8323
8324 imageInfos[imageInfoCount].sampler = commandBuffer->computeSamplers[i]->sampler;
8325 imageInfos[imageInfoCount].imageView = commandBuffer->computeSamplerTextures[i]->fullView;
8326 imageInfos[imageInfoCount].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
8327
8328 currentWriteDescriptorSet->pImageInfo = &imageInfos[imageInfoCount];
8329
8330 writeCount += 1;
8331 imageInfoCount += 1;
8332 }
8333
8334 for (Uint32 i = 0; i < resourceLayout->numReadonlyStorageTextures; i += 1) {
8335 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
8336
8337 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
8338 currentWriteDescriptorSet->pNext = NULL;
8339 currentWriteDescriptorSet->descriptorCount = 1;
8340 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; // Yes, we are declaring the readonly storage texture as a sampled image, because shaders are stupid.
8341 currentWriteDescriptorSet->dstArrayElement = 0;
8342 currentWriteDescriptorSet->dstBinding = resourceLayout->numSamplers + i;
8343 currentWriteDescriptorSet->dstSet = commandBuffer->computeReadOnlyDescriptorSet;
8344 currentWriteDescriptorSet->pTexelBufferView = NULL;
8345 currentWriteDescriptorSet->pBufferInfo = NULL;
8346
8347 imageInfos[imageInfoCount].sampler = VK_NULL_HANDLE;
8348 imageInfos[imageInfoCount].imageView = commandBuffer->readOnlyComputeStorageTextures[i]->fullView;
8349 imageInfos[imageInfoCount].imageLayout = VK_IMAGE_LAYOUT_GENERAL;
8350
8351 currentWriteDescriptorSet->pImageInfo = &imageInfos[imageInfoCount];
8352
8353 writeCount += 1;
8354 imageInfoCount += 1;
8355 }
8356
8357 for (Uint32 i = 0; i < resourceLayout->numReadonlyStorageBuffers; i += 1) {
8358 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
8359
8360 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
8361 currentWriteDescriptorSet->pNext = NULL;
8362 currentWriteDescriptorSet->descriptorCount = 1;
8363 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
8364 currentWriteDescriptorSet->dstArrayElement = 0;
8365 currentWriteDescriptorSet->dstBinding = resourceLayout->numSamplers + resourceLayout->numReadonlyStorageTextures + i;
8366 currentWriteDescriptorSet->dstSet = commandBuffer->computeReadOnlyDescriptorSet;
8367 currentWriteDescriptorSet->pTexelBufferView = NULL;
8368 currentWriteDescriptorSet->pImageInfo = NULL;
8369
8370 bufferInfos[bufferInfoCount].buffer = commandBuffer->readOnlyComputeStorageBuffers[i]->buffer;
8371 bufferInfos[bufferInfoCount].offset = 0;
8372 bufferInfos[bufferInfoCount].range = VK_WHOLE_SIZE;
8373
8374 currentWriteDescriptorSet->pBufferInfo = &bufferInfos[bufferInfoCount];
8375
8376 writeCount += 1;
8377 bufferInfoCount += 1;
8378 }
8379
8380 commandBuffer->needNewComputeReadOnlyDescriptorSet = false;
8381 }
8382
8383 if (commandBuffer->needNewComputeReadWriteDescriptorSet) {
8384 descriptorSetLayout = resourceLayout->descriptorSetLayouts[1];
8385
8386 commandBuffer->computeReadWriteDescriptorSet = VULKAN_INTERNAL_FetchDescriptorSet(
8387 renderer,
8388 commandBuffer,
8389 descriptorSetLayout);
8390
8391 for (Uint32 i = 0; i < resourceLayout->numReadWriteStorageTextures; i += 1) {
8392 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
8393
8394 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
8395 currentWriteDescriptorSet->pNext = NULL;
8396 currentWriteDescriptorSet->descriptorCount = 1;
8397 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
8398 currentWriteDescriptorSet->dstArrayElement = 0;
8399 currentWriteDescriptorSet->dstBinding = i;
8400 currentWriteDescriptorSet->dstSet = commandBuffer->computeReadWriteDescriptorSet;
8401 currentWriteDescriptorSet->pTexelBufferView = NULL;
8402 currentWriteDescriptorSet->pBufferInfo = NULL;
8403
8404 imageInfos[imageInfoCount].sampler = VK_NULL_HANDLE;
8405 imageInfos[imageInfoCount].imageView = commandBuffer->readWriteComputeStorageTextureSubresources[i]->computeWriteView;
8406 imageInfos[imageInfoCount].imageLayout = VK_IMAGE_LAYOUT_GENERAL;
8407
8408 currentWriteDescriptorSet->pImageInfo = &imageInfos[imageInfoCount];
8409
8410 writeCount += 1;
8411 imageInfoCount += 1;
8412 }
8413
8414 for (Uint32 i = 0; i < resourceLayout->numReadWriteStorageBuffers; i += 1) {
8415 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
8416
8417 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
8418 currentWriteDescriptorSet->pNext = NULL;
8419 currentWriteDescriptorSet->descriptorCount = 1;
8420 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
8421 currentWriteDescriptorSet->dstArrayElement = 0;
8422 currentWriteDescriptorSet->dstBinding = resourceLayout->numReadWriteStorageTextures + i;
8423 currentWriteDescriptorSet->dstSet = commandBuffer->computeReadWriteDescriptorSet;
8424 currentWriteDescriptorSet->pTexelBufferView = NULL;
8425 currentWriteDescriptorSet->pImageInfo = NULL;
8426
8427 bufferInfos[bufferInfoCount].buffer = commandBuffer->readWriteComputeStorageBuffers[i]->buffer;
8428 bufferInfos[bufferInfoCount].offset = 0;
8429 bufferInfos[bufferInfoCount].range = VK_WHOLE_SIZE;
8430
8431 currentWriteDescriptorSet->pBufferInfo = &bufferInfos[bufferInfoCount];
8432
8433 writeCount += 1;
8434 bufferInfoCount += 1;
8435 }
8436
8437 commandBuffer->needNewComputeReadWriteDescriptorSet = false;
8438 }
8439
8440 if (commandBuffer->needNewComputeUniformDescriptorSet) {
8441 descriptorSetLayout = resourceLayout->descriptorSetLayouts[2];
8442
8443 commandBuffer->computeUniformDescriptorSet = VULKAN_INTERNAL_FetchDescriptorSet(
8444 renderer,
8445 commandBuffer,
8446 descriptorSetLayout);
8447
8448
8449 for (Uint32 i = 0; i < resourceLayout->numUniformBuffers; i += 1) {
8450 VkWriteDescriptorSet *currentWriteDescriptorSet = &writeDescriptorSets[writeCount];
8451
8452 currentWriteDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
8453 currentWriteDescriptorSet->pNext = NULL;
8454 currentWriteDescriptorSet->descriptorCount = 1;
8455 currentWriteDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC;
8456 currentWriteDescriptorSet->dstArrayElement = 0;
8457 currentWriteDescriptorSet->dstBinding = i;
8458 currentWriteDescriptorSet->dstSet = commandBuffer->computeUniformDescriptorSet;
8459 currentWriteDescriptorSet->pTexelBufferView = NULL;
8460 currentWriteDescriptorSet->pImageInfo = NULL;
8461
8462 bufferInfos[bufferInfoCount].buffer = commandBuffer->computeUniformBuffers[i]->buffer->buffer;
8463 bufferInfos[bufferInfoCount].offset = 0;
8464 bufferInfos[bufferInfoCount].range = MAX_UBO_SECTION_SIZE;
8465
8466 currentWriteDescriptorSet->pBufferInfo = &bufferInfos[bufferInfoCount];
8467
8468 writeCount += 1;
8469 bufferInfoCount += 1;
8470 }
8471
8472 commandBuffer->needNewComputeUniformDescriptorSet = false;
8473 }
8474
8475 for (Uint32 i = 0; i < resourceLayout->numUniformBuffers; i += 1) {
8476 dynamicOffsets[i] = commandBuffer->computeUniformBuffers[i]->drawOffset;
8477 dynamicOffsetCount += 1;
8478 }
8479
8480 renderer->vkUpdateDescriptorSets(
8481 renderer->logicalDevice,
8482 writeCount,
8483 writeDescriptorSets,
8484 0,
8485 NULL);
8486
8487 VkDescriptorSet sets[3];
8488 sets[0] = commandBuffer->computeReadOnlyDescriptorSet;
8489 sets[1] = commandBuffer->computeReadWriteDescriptorSet;
8490 sets[2] = commandBuffer->computeUniformDescriptorSet;
8491
8492 renderer->vkCmdBindDescriptorSets(
8493 commandBuffer->commandBuffer,
8494 VK_PIPELINE_BIND_POINT_COMPUTE,
8495 resourceLayout->pipelineLayout,
8496 0,
8497 3,
8498 sets,
8499 dynamicOffsetCount,
8500 dynamicOffsets);
8501
8502 commandBuffer->needNewVertexUniformOffsets = false;
8503}
8504
8505static void VULKAN_DispatchCompute(
8506 SDL_GPUCommandBuffer *commandBuffer,
8507 Uint32 groupcountX,
8508 Uint32 groupcountY,
8509 Uint32 groupcountZ)
8510{
8511 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8512 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8513
8514 VULKAN_INTERNAL_BindComputeDescriptorSets(renderer, vulkanCommandBuffer);
8515
8516 renderer->vkCmdDispatch(
8517 vulkanCommandBuffer->commandBuffer,
8518 groupcountX,
8519 groupcountY,
8520 groupcountZ);
8521}
8522
8523static void VULKAN_DispatchComputeIndirect(
8524 SDL_GPUCommandBuffer *commandBuffer,
8525 SDL_GPUBuffer *buffer,
8526 Uint32 offset)
8527{
8528 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8529 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8530 VulkanBuffer *vulkanBuffer = ((VulkanBufferContainer *)buffer)->activeBuffer;
8531
8532 VULKAN_INTERNAL_BindComputeDescriptorSets(renderer, vulkanCommandBuffer);
8533
8534 renderer->vkCmdDispatchIndirect(
8535 vulkanCommandBuffer->commandBuffer,
8536 vulkanBuffer->buffer,
8537 offset);
8538
8539 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, vulkanBuffer);
8540}
8541
8542static void VULKAN_EndComputePass(
8543 SDL_GPUCommandBuffer *commandBuffer)
8544{
8545 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8546 Uint32 i;
8547
8548 for (i = 0; i < vulkanCommandBuffer->readWriteComputeStorageTextureSubresourceCount; i += 1) {
8549 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
8550 vulkanCommandBuffer->renderer,
8551 vulkanCommandBuffer,
8552 VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE,
8553 vulkanCommandBuffer->readWriteComputeStorageTextureSubresources[i]);
8554 vulkanCommandBuffer->readWriteComputeStorageTextureSubresources[i] = NULL;
8555 }
8556 vulkanCommandBuffer->readWriteComputeStorageTextureSubresourceCount = 0;
8557
8558 for (i = 0; i < MAX_COMPUTE_WRITE_BUFFERS; i += 1) {
8559 if (vulkanCommandBuffer->readWriteComputeStorageBuffers[i] != NULL) {
8560 VULKAN_INTERNAL_BufferTransitionToDefaultUsage(
8561 vulkanCommandBuffer->renderer,
8562 vulkanCommandBuffer,
8563 VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ_WRITE,
8564 vulkanCommandBuffer->readWriteComputeStorageBuffers[i]);
8565
8566 vulkanCommandBuffer->readWriteComputeStorageBuffers[i] = NULL;
8567 }
8568 }
8569
8570 for (i = 0; i < MAX_STORAGE_TEXTURES_PER_STAGE; i += 1) {
8571 if (vulkanCommandBuffer->readOnlyComputeStorageTextures[i] != NULL) {
8572 VULKAN_INTERNAL_TextureTransitionToDefaultUsage(
8573 vulkanCommandBuffer->renderer,
8574 vulkanCommandBuffer,
8575 VULKAN_TEXTURE_USAGE_MODE_COMPUTE_STORAGE_READ,
8576 vulkanCommandBuffer->readOnlyComputeStorageTextures[i]);
8577
8578 vulkanCommandBuffer->readOnlyComputeStorageTextures[i] = NULL;
8579 }
8580 }
8581
8582 for (i = 0; i < MAX_STORAGE_BUFFERS_PER_STAGE; i += 1) {
8583 if (vulkanCommandBuffer->readOnlyComputeStorageBuffers[i] != NULL) {
8584 VULKAN_INTERNAL_BufferTransitionToDefaultUsage(
8585 vulkanCommandBuffer->renderer,
8586 vulkanCommandBuffer,
8587 VULKAN_BUFFER_USAGE_MODE_COMPUTE_STORAGE_READ,
8588 vulkanCommandBuffer->readOnlyComputeStorageBuffers[i]);
8589
8590 vulkanCommandBuffer->readOnlyComputeStorageBuffers[i] = NULL;
8591 }
8592 }
8593
8594 // we don't need a barrier because sampler state is always the default if sampler bit is set
8595 SDL_zeroa(vulkanCommandBuffer->computeSamplerTextures);
8596 SDL_zeroa(vulkanCommandBuffer->computeSamplers);
8597
8598 vulkanCommandBuffer->currentComputePipeline = NULL;
8599
8600 vulkanCommandBuffer->computeReadOnlyDescriptorSet = VK_NULL_HANDLE;
8601 vulkanCommandBuffer->computeReadWriteDescriptorSet = VK_NULL_HANDLE;
8602 vulkanCommandBuffer->computeUniformDescriptorSet = VK_NULL_HANDLE;
8603}
8604
8605static void *VULKAN_MapTransferBuffer(
8606 SDL_GPURenderer *driverData,
8607 SDL_GPUTransferBuffer *transferBuffer,
8608 bool cycle)
8609{
8610 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
8611 VulkanBufferContainer *transferBufferContainer = (VulkanBufferContainer *)transferBuffer;
8612
8613 if (
8614 cycle &&
8615 SDL_GetAtomicInt(&transferBufferContainer->activeBuffer->referenceCount) > 0) {
8616 VULKAN_INTERNAL_CycleActiveBuffer(
8617 renderer,
8618 transferBufferContainer);
8619 }
8620
8621 Uint8 *bufferPointer =
8622 transferBufferContainer->activeBuffer->usedRegion->allocation->mapPointer +
8623 transferBufferContainer->activeBuffer->usedRegion->resourceOffset;
8624
8625 return bufferPointer;
8626}
8627
8628static void VULKAN_UnmapTransferBuffer(
8629 SDL_GPURenderer *driverData,
8630 SDL_GPUTransferBuffer *transferBuffer)
8631{
8632 // no-op because transfer buffers are persistently mapped
8633 (void)driverData;
8634 (void)transferBuffer;
8635}
8636
8637static void VULKAN_BeginCopyPass(
8638 SDL_GPUCommandBuffer *commandBuffer)
8639{
8640 // no-op
8641 (void)commandBuffer;
8642}
8643
8644static void VULKAN_UploadToTexture(
8645 SDL_GPUCommandBuffer *commandBuffer,
8646 const SDL_GPUTextureTransferInfo *source,
8647 const SDL_GPUTextureRegion *destination,
8648 bool cycle)
8649{
8650 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8651 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8652 VulkanBufferContainer *transferBufferContainer = (VulkanBufferContainer *)source->transfer_buffer;
8653 VulkanTextureContainer *vulkanTextureContainer = (VulkanTextureContainer *)destination->texture;
8654 VulkanTextureSubresource *vulkanTextureSubresource;
8655 VkBufferImageCopy imageCopy;
8656
8657 // Note that the transfer buffer does not need a barrier, as it is synced by the client
8658
8659 vulkanTextureSubresource = VULKAN_INTERNAL_PrepareTextureSubresourceForWrite(
8660 renderer,
8661 vulkanCommandBuffer,
8662 vulkanTextureContainer,
8663 destination->layer,
8664 destination->mip_level,
8665 cycle,
8666 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION);
8667
8668 imageCopy.imageExtent.width = destination->w;
8669 imageCopy.imageExtent.height = destination->h;
8670 imageCopy.imageExtent.depth = destination->d;
8671 imageCopy.imageOffset.x = destination->x;
8672 imageCopy.imageOffset.y = destination->y;
8673 imageCopy.imageOffset.z = destination->z;
8674 imageCopy.imageSubresource.aspectMask = vulkanTextureSubresource->parent->aspectFlags;
8675 imageCopy.imageSubresource.baseArrayLayer = destination->layer;
8676 imageCopy.imageSubresource.layerCount = 1;
8677 imageCopy.imageSubresource.mipLevel = destination->mip_level;
8678 imageCopy.bufferOffset = source->offset;
8679 imageCopy.bufferRowLength = source->pixels_per_row;
8680 imageCopy.bufferImageHeight = source->rows_per_layer;
8681
8682 renderer->vkCmdCopyBufferToImage(
8683 vulkanCommandBuffer->commandBuffer,
8684 transferBufferContainer->activeBuffer->buffer,
8685 vulkanTextureSubresource->parent->image,
8686 VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
8687 1,
8688 &imageCopy);
8689
8690 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
8691 renderer,
8692 vulkanCommandBuffer,
8693 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION,
8694 vulkanTextureSubresource);
8695
8696 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, transferBufferContainer->activeBuffer);
8697 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, vulkanTextureSubresource->parent);
8698}
8699
8700static void VULKAN_UploadToBuffer(
8701 SDL_GPUCommandBuffer *commandBuffer,
8702 const SDL_GPUTransferBufferLocation *source,
8703 const SDL_GPUBufferRegion *destination,
8704 bool cycle)
8705{
8706 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8707 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8708 VulkanBufferContainer *transferBufferContainer = (VulkanBufferContainer *)source->transfer_buffer;
8709 VulkanBufferContainer *bufferContainer = (VulkanBufferContainer *)destination->buffer;
8710 VkBufferCopy bufferCopy;
8711
8712 // Note that the transfer buffer does not need a barrier, as it is synced by the client
8713
8714 VulkanBuffer *vulkanBuffer = VULKAN_INTERNAL_PrepareBufferForWrite(
8715 renderer,
8716 vulkanCommandBuffer,
8717 bufferContainer,
8718 cycle,
8719 VULKAN_BUFFER_USAGE_MODE_COPY_DESTINATION);
8720
8721 bufferCopy.srcOffset = source->offset;
8722 bufferCopy.dstOffset = destination->offset;
8723 bufferCopy.size = destination->size;
8724
8725 renderer->vkCmdCopyBuffer(
8726 vulkanCommandBuffer->commandBuffer,
8727 transferBufferContainer->activeBuffer->buffer,
8728 vulkanBuffer->buffer,
8729 1,
8730 &bufferCopy);
8731
8732 VULKAN_INTERNAL_BufferTransitionToDefaultUsage(
8733 renderer,
8734 vulkanCommandBuffer,
8735 VULKAN_BUFFER_USAGE_MODE_COPY_DESTINATION,
8736 vulkanBuffer);
8737
8738 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, transferBufferContainer->activeBuffer);
8739 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, vulkanBuffer);
8740}
8741
8742// Readback
8743
8744static void VULKAN_DownloadFromTexture(
8745 SDL_GPUCommandBuffer *commandBuffer,
8746 const SDL_GPUTextureRegion *source,
8747 const SDL_GPUTextureTransferInfo *destination)
8748{
8749 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8750 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8751 VulkanTextureContainer *textureContainer = (VulkanTextureContainer *)source->texture;
8752 VulkanTextureSubresource *vulkanTextureSubresource;
8753 VulkanBufferContainer *transferBufferContainer = (VulkanBufferContainer *)destination->transfer_buffer;
8754 VkBufferImageCopy imageCopy;
8755 vulkanTextureSubresource = VULKAN_INTERNAL_FetchTextureSubresource(
8756 textureContainer,
8757 source->layer,
8758 source->mip_level);
8759
8760 // Note that the transfer buffer does not need a barrier, as it is synced by the client
8761
8762 VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
8763 renderer,
8764 vulkanCommandBuffer,
8765 VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE,
8766 vulkanTextureSubresource);
8767
8768 imageCopy.imageExtent.width = source->w;
8769 imageCopy.imageExtent.height = source->h;
8770 imageCopy.imageExtent.depth = source->d;
8771 imageCopy.imageOffset.x = source->x;
8772 imageCopy.imageOffset.y = source->y;
8773 imageCopy.imageOffset.z = source->z;
8774 imageCopy.imageSubresource.aspectMask = vulkanTextureSubresource->parent->aspectFlags;
8775 imageCopy.imageSubresource.baseArrayLayer = source->layer;
8776 imageCopy.imageSubresource.layerCount = 1;
8777 imageCopy.imageSubresource.mipLevel = source->mip_level;
8778 imageCopy.bufferOffset = destination->offset;
8779 imageCopy.bufferRowLength = destination->pixels_per_row;
8780 imageCopy.bufferImageHeight = destination->rows_per_layer;
8781
8782 renderer->vkCmdCopyImageToBuffer(
8783 vulkanCommandBuffer->commandBuffer,
8784 vulkanTextureSubresource->parent->image,
8785 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
8786 transferBufferContainer->activeBuffer->buffer,
8787 1,
8788 &imageCopy);
8789
8790 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
8791 renderer,
8792 vulkanCommandBuffer,
8793 VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE,
8794 vulkanTextureSubresource);
8795
8796 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, transferBufferContainer->activeBuffer);
8797 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, vulkanTextureSubresource->parent);
8798}
8799
8800static void VULKAN_DownloadFromBuffer(
8801 SDL_GPUCommandBuffer *commandBuffer,
8802 const SDL_GPUBufferRegion *source,
8803 const SDL_GPUTransferBufferLocation *destination)
8804{
8805 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8806 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8807 VulkanBufferContainer *bufferContainer = (VulkanBufferContainer *)source->buffer;
8808 VulkanBufferContainer *transferBufferContainer = (VulkanBufferContainer *)destination->transfer_buffer;
8809 VkBufferCopy bufferCopy;
8810
8811 // Note that transfer buffer does not need a barrier, as it is synced by the client
8812
8813 VULKAN_INTERNAL_BufferTransitionFromDefaultUsage(
8814 renderer,
8815 vulkanCommandBuffer,
8816 VULKAN_BUFFER_USAGE_MODE_COPY_SOURCE,
8817 bufferContainer->activeBuffer);
8818
8819 bufferCopy.srcOffset = source->offset;
8820 bufferCopy.dstOffset = destination->offset;
8821 bufferCopy.size = source->size;
8822
8823 renderer->vkCmdCopyBuffer(
8824 vulkanCommandBuffer->commandBuffer,
8825 bufferContainer->activeBuffer->buffer,
8826 transferBufferContainer->activeBuffer->buffer,
8827 1,
8828 &bufferCopy);
8829
8830 VULKAN_INTERNAL_BufferTransitionToDefaultUsage(
8831 renderer,
8832 vulkanCommandBuffer,
8833 VULKAN_BUFFER_USAGE_MODE_COPY_SOURCE,
8834 bufferContainer->activeBuffer);
8835
8836 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, transferBufferContainer->activeBuffer);
8837 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, bufferContainer->activeBuffer);
8838}
8839
8840static void VULKAN_CopyTextureToTexture(
8841 SDL_GPUCommandBuffer *commandBuffer,
8842 const SDL_GPUTextureLocation *source,
8843 const SDL_GPUTextureLocation *destination,
8844 Uint32 w,
8845 Uint32 h,
8846 Uint32 d,
8847 bool cycle)
8848{
8849 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8850 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8851 VulkanTextureSubresource *srcSubresource;
8852 VulkanTextureSubresource *dstSubresource;
8853 VkImageCopy imageCopy;
8854
8855 srcSubresource = VULKAN_INTERNAL_FetchTextureSubresource(
8856 (VulkanTextureContainer *)source->texture,
8857 source->layer,
8858 source->mip_level);
8859
8860 dstSubresource = VULKAN_INTERNAL_PrepareTextureSubresourceForWrite(
8861 renderer,
8862 vulkanCommandBuffer,
8863 (VulkanTextureContainer *)destination->texture,
8864 destination->layer,
8865 destination->mip_level,
8866 cycle,
8867 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION);
8868
8869 VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
8870 renderer,
8871 vulkanCommandBuffer,
8872 VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE,
8873 srcSubresource);
8874
8875 imageCopy.srcOffset.x = source->x;
8876 imageCopy.srcOffset.y = source->y;
8877 imageCopy.srcOffset.z = source->z;
8878 imageCopy.srcSubresource.aspectMask = srcSubresource->parent->aspectFlags;
8879 imageCopy.srcSubresource.baseArrayLayer = source->layer;
8880 imageCopy.srcSubresource.layerCount = 1;
8881 imageCopy.srcSubresource.mipLevel = source->mip_level;
8882 imageCopy.dstOffset.x = destination->x;
8883 imageCopy.dstOffset.y = destination->y;
8884 imageCopy.dstOffset.z = destination->z;
8885 imageCopy.dstSubresource.aspectMask = dstSubresource->parent->aspectFlags;
8886 imageCopy.dstSubresource.baseArrayLayer = destination->layer;
8887 imageCopy.dstSubresource.layerCount = 1;
8888 imageCopy.dstSubresource.mipLevel = destination->mip_level;
8889 imageCopy.extent.width = w;
8890 imageCopy.extent.height = h;
8891 imageCopy.extent.depth = d;
8892
8893 renderer->vkCmdCopyImage(
8894 vulkanCommandBuffer->commandBuffer,
8895 srcSubresource->parent->image,
8896 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
8897 dstSubresource->parent->image,
8898 VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
8899 1,
8900 &imageCopy);
8901
8902 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
8903 renderer,
8904 vulkanCommandBuffer,
8905 VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE,
8906 srcSubresource);
8907
8908 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
8909 renderer,
8910 vulkanCommandBuffer,
8911 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION,
8912 dstSubresource);
8913
8914 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, srcSubresource->parent);
8915 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, dstSubresource->parent);
8916}
8917
8918static void VULKAN_CopyBufferToBuffer(
8919 SDL_GPUCommandBuffer *commandBuffer,
8920 const SDL_GPUBufferLocation *source,
8921 const SDL_GPUBufferLocation *destination,
8922 Uint32 size,
8923 bool cycle)
8924{
8925 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8926 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8927 VulkanBufferContainer *srcContainer = (VulkanBufferContainer *)source->buffer;
8928 VulkanBufferContainer *dstContainer = (VulkanBufferContainer *)destination->buffer;
8929 VkBufferCopy bufferCopy;
8930
8931 VulkanBuffer *dstBuffer = VULKAN_INTERNAL_PrepareBufferForWrite(
8932 renderer,
8933 vulkanCommandBuffer,
8934 dstContainer,
8935 cycle,
8936 VULKAN_BUFFER_USAGE_MODE_COPY_DESTINATION);
8937
8938 VULKAN_INTERNAL_BufferTransitionFromDefaultUsage(
8939 renderer,
8940 vulkanCommandBuffer,
8941 VULKAN_BUFFER_USAGE_MODE_COPY_SOURCE,
8942 srcContainer->activeBuffer);
8943
8944 bufferCopy.srcOffset = source->offset;
8945 bufferCopy.dstOffset = destination->offset;
8946 bufferCopy.size = size;
8947
8948 renderer->vkCmdCopyBuffer(
8949 vulkanCommandBuffer->commandBuffer,
8950 srcContainer->activeBuffer->buffer,
8951 dstBuffer->buffer,
8952 1,
8953 &bufferCopy);
8954
8955 VULKAN_INTERNAL_BufferTransitionToDefaultUsage(
8956 renderer,
8957 vulkanCommandBuffer,
8958 VULKAN_BUFFER_USAGE_MODE_COPY_SOURCE,
8959 srcContainer->activeBuffer);
8960
8961 VULKAN_INTERNAL_BufferTransitionToDefaultUsage(
8962 renderer,
8963 vulkanCommandBuffer,
8964 VULKAN_BUFFER_USAGE_MODE_COPY_DESTINATION,
8965 dstBuffer);
8966
8967 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, srcContainer->activeBuffer);
8968 VULKAN_INTERNAL_TrackBuffer(vulkanCommandBuffer, dstBuffer);
8969}
8970
8971static void VULKAN_GenerateMipmaps(
8972 SDL_GPUCommandBuffer *commandBuffer,
8973 SDL_GPUTexture *texture)
8974{
8975 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
8976 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
8977 VulkanTextureContainer *container = (VulkanTextureContainer *)texture;
8978 VulkanTextureSubresource *srcTextureSubresource;
8979 VulkanTextureSubresource *dstTextureSubresource;
8980 VkImageBlit blit;
8981
8982 // Blit each slice sequentially. Barriers, barriers everywhere!
8983 for (Uint32 layerOrDepthIndex = 0; layerOrDepthIndex < container->header.info.layer_count_or_depth; layerOrDepthIndex += 1)
8984 for (Uint32 level = 1; level < container->header.info.num_levels; level += 1) {
8985 Uint32 layer = container->header.info.type == SDL_GPU_TEXTURETYPE_3D ? 0 : layerOrDepthIndex;
8986 Uint32 depth = container->header.info.type == SDL_GPU_TEXTURETYPE_3D ? layerOrDepthIndex : 0;
8987
8988 Uint32 srcSubresourceIndex = VULKAN_INTERNAL_GetTextureSubresourceIndex(
8989 level - 1,
8990 layer,
8991 container->header.info.num_levels);
8992 Uint32 dstSubresourceIndex = VULKAN_INTERNAL_GetTextureSubresourceIndex(
8993 level,
8994 layer,
8995 container->header.info.num_levels);
8996
8997 srcTextureSubresource = &container->activeTexture->subresources[srcSubresourceIndex];
8998 dstTextureSubresource = &container->activeTexture->subresources[dstSubresourceIndex];
8999
9000 VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
9001 renderer,
9002 vulkanCommandBuffer,
9003 VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE,
9004 srcTextureSubresource);
9005
9006 VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
9007 renderer,
9008 vulkanCommandBuffer,
9009 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION,
9010 dstTextureSubresource);
9011
9012 blit.srcOffsets[0].x = 0;
9013 blit.srcOffsets[0].y = 0;
9014 blit.srcOffsets[0].z = depth;
9015
9016 blit.srcOffsets[1].x = container->header.info.width >> (level - 1);
9017 blit.srcOffsets[1].y = container->header.info.height >> (level - 1);
9018 blit.srcOffsets[1].z = depth + 1;
9019
9020 blit.dstOffsets[0].x = 0;
9021 blit.dstOffsets[0].y = 0;
9022 blit.dstOffsets[0].z = depth;
9023
9024 blit.dstOffsets[1].x = container->header.info.width >> level;
9025 blit.dstOffsets[1].y = container->header.info.height >> level;
9026 blit.dstOffsets[1].z = depth + 1;
9027
9028 blit.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
9029 blit.srcSubresource.baseArrayLayer = layer;
9030 blit.srcSubresource.layerCount = 1;
9031 blit.srcSubresource.mipLevel = level - 1;
9032
9033 blit.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
9034 blit.dstSubresource.baseArrayLayer = layer;
9035 blit.dstSubresource.layerCount = 1;
9036 blit.dstSubresource.mipLevel = level;
9037
9038 renderer->vkCmdBlitImage(
9039 vulkanCommandBuffer->commandBuffer,
9040 container->activeTexture->image,
9041 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
9042 container->activeTexture->image,
9043 VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
9044 1,
9045 &blit,
9046 VK_FILTER_LINEAR);
9047
9048 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
9049 renderer,
9050 vulkanCommandBuffer,
9051 VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE,
9052 srcTextureSubresource);
9053
9054 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
9055 renderer,
9056 vulkanCommandBuffer,
9057 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION,
9058 dstTextureSubresource);
9059
9060 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, srcTextureSubresource->parent);
9061 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, dstTextureSubresource->parent);
9062 }
9063}
9064
9065static void VULKAN_EndCopyPass(
9066 SDL_GPUCommandBuffer *commandBuffer)
9067{
9068 // no-op
9069 (void)commandBuffer;
9070}
9071
9072static void VULKAN_Blit(
9073 SDL_GPUCommandBuffer *commandBuffer,
9074 const SDL_GPUBlitInfo *info)
9075{
9076 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
9077 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
9078 TextureCommonHeader *srcHeader = (TextureCommonHeader *)info->source.texture;
9079 TextureCommonHeader *dstHeader = (TextureCommonHeader *)info->destination.texture;
9080 VkImageBlit region;
9081 Uint32 srcLayer = srcHeader->info.type == SDL_GPU_TEXTURETYPE_3D ? 0 : info->source.layer_or_depth_plane;
9082 Uint32 srcDepth = srcHeader->info.type == SDL_GPU_TEXTURETYPE_3D ? info->source.layer_or_depth_plane : 0;
9083 Uint32 dstLayer = dstHeader->info.type == SDL_GPU_TEXTURETYPE_3D ? 0 : info->destination.layer_or_depth_plane;
9084 Uint32 dstDepth = dstHeader->info.type == SDL_GPU_TEXTURETYPE_3D ? info->destination.layer_or_depth_plane : 0;
9085 int32_t swap;
9086
9087 // Using BeginRenderPass to clear because vkCmdClearColorImage requires barriers anyway
9088 if (info->load_op == SDL_GPU_LOADOP_CLEAR) {
9089 SDL_GPUColorTargetInfo targetInfo;
9090 SDL_zero(targetInfo);
9091 targetInfo.texture = info->destination.texture;
9092 targetInfo.mip_level = info->destination.mip_level;
9093 targetInfo.layer_or_depth_plane = info->destination.layer_or_depth_plane;
9094 targetInfo.load_op = SDL_GPU_LOADOP_CLEAR;
9095 targetInfo.store_op = SDL_GPU_STOREOP_STORE;
9096 targetInfo.clear_color = info->clear_color;
9097 targetInfo.cycle = info->cycle;
9098 VULKAN_BeginRenderPass(
9099 commandBuffer,
9100 &targetInfo,
9101 1,
9102 NULL);
9103 VULKAN_EndRenderPass(commandBuffer);
9104 }
9105
9106 VulkanTextureSubresource *srcSubresource = VULKAN_INTERNAL_FetchTextureSubresource(
9107 (VulkanTextureContainer *)info->source.texture,
9108 srcLayer,
9109 info->source.mip_level);
9110
9111 VulkanTextureSubresource *dstSubresource = VULKAN_INTERNAL_PrepareTextureSubresourceForWrite(
9112 renderer,
9113 vulkanCommandBuffer,
9114 (VulkanTextureContainer *)info->destination.texture,
9115 dstLayer,
9116 info->destination.mip_level,
9117 info->cycle,
9118 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION);
9119
9120 VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
9121 renderer,
9122 vulkanCommandBuffer,
9123 VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE,
9124 srcSubresource);
9125
9126 region.srcSubresource.aspectMask = srcSubresource->parent->aspectFlags;
9127 region.srcSubresource.baseArrayLayer = srcSubresource->layer;
9128 region.srcSubresource.layerCount = 1;
9129 region.srcSubresource.mipLevel = srcSubresource->level;
9130 region.srcOffsets[0].x = info->source.x;
9131 region.srcOffsets[0].y = info->source.y;
9132 region.srcOffsets[0].z = srcDepth;
9133 region.srcOffsets[1].x = info->source.x + info->source.w;
9134 region.srcOffsets[1].y = info->source.y + info->source.h;
9135 region.srcOffsets[1].z = srcDepth + 1;
9136
9137 if (info->flip_mode & SDL_FLIP_HORIZONTAL) {
9138 // flip the x positions
9139 swap = region.srcOffsets[0].x;
9140 region.srcOffsets[0].x = region.srcOffsets[1].x;
9141 region.srcOffsets[1].x = swap;
9142 }
9143
9144 if (info->flip_mode & SDL_FLIP_VERTICAL) {
9145 // flip the y positions
9146 swap = region.srcOffsets[0].y;
9147 region.srcOffsets[0].y = region.srcOffsets[1].y;
9148 region.srcOffsets[1].y = swap;
9149 }
9150
9151 region.dstSubresource.aspectMask = dstSubresource->parent->aspectFlags;
9152 region.dstSubresource.baseArrayLayer = dstSubresource->layer;
9153 region.dstSubresource.layerCount = 1;
9154 region.dstSubresource.mipLevel = dstSubresource->level;
9155 region.dstOffsets[0].x = info->destination.x;
9156 region.dstOffsets[0].y = info->destination.y;
9157 region.dstOffsets[0].z = dstDepth;
9158 region.dstOffsets[1].x = info->destination.x + info->destination.w;
9159 region.dstOffsets[1].y = info->destination.y + info->destination.h;
9160 region.dstOffsets[1].z = dstDepth + 1;
9161
9162 renderer->vkCmdBlitImage(
9163 vulkanCommandBuffer->commandBuffer,
9164 srcSubresource->parent->image,
9165 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
9166 dstSubresource->parent->image,
9167 VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
9168 1,
9169 &region,
9170 SDLToVK_Filter[info->filter]);
9171
9172 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
9173 renderer,
9174 vulkanCommandBuffer,
9175 VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE,
9176 srcSubresource);
9177
9178 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
9179 renderer,
9180 vulkanCommandBuffer,
9181 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION,
9182 dstSubresource);
9183
9184 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, srcSubresource->parent);
9185 VULKAN_INTERNAL_TrackTexture(vulkanCommandBuffer, dstSubresource->parent);
9186}
9187
9188static bool VULKAN_INTERNAL_AllocateCommandBuffer(
9189 VulkanRenderer *renderer,
9190 VulkanCommandPool *vulkanCommandPool)
9191{
9192 VkCommandBufferAllocateInfo allocateInfo;
9193 VkResult vulkanResult;
9194 VkCommandBuffer commandBufferHandle;
9195 VulkanCommandBuffer *commandBuffer;
9196
9197 vulkanCommandPool->inactiveCommandBufferCapacity += 1;
9198
9199 vulkanCommandPool->inactiveCommandBuffers = SDL_realloc(
9200 vulkanCommandPool->inactiveCommandBuffers,
9201 sizeof(VulkanCommandBuffer *) *
9202 vulkanCommandPool->inactiveCommandBufferCapacity);
9203
9204 allocateInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
9205 allocateInfo.pNext = NULL;
9206 allocateInfo.commandPool = vulkanCommandPool->commandPool;
9207 allocateInfo.commandBufferCount = 1;
9208 allocateInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
9209
9210 vulkanResult = renderer->vkAllocateCommandBuffers(
9211 renderer->logicalDevice,
9212 &allocateInfo,
9213 &commandBufferHandle);
9214
9215 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkAllocateCommandBuffers, false);
9216
9217 commandBuffer = SDL_malloc(sizeof(VulkanCommandBuffer));
9218 commandBuffer->renderer = renderer;
9219 commandBuffer->commandPool = vulkanCommandPool;
9220 commandBuffer->commandBuffer = commandBufferHandle;
9221
9222 commandBuffer->inFlightFence = VK_NULL_HANDLE;
9223
9224 // Presentation tracking
9225
9226 commandBuffer->presentDataCapacity = 1;
9227 commandBuffer->presentDataCount = 0;
9228 commandBuffer->presentDatas = SDL_malloc(
9229 commandBuffer->presentDataCapacity * sizeof(VulkanPresentData));
9230
9231 commandBuffer->waitSemaphoreCapacity = 1;
9232 commandBuffer->waitSemaphoreCount = 0;
9233 commandBuffer->waitSemaphores = SDL_malloc(
9234 commandBuffer->waitSemaphoreCapacity * sizeof(VkSemaphore));
9235
9236 commandBuffer->signalSemaphoreCapacity = 1;
9237 commandBuffer->signalSemaphoreCount = 0;
9238 commandBuffer->signalSemaphores = SDL_malloc(
9239 commandBuffer->signalSemaphoreCapacity * sizeof(VkSemaphore));
9240
9241 // Resource bind tracking
9242
9243 commandBuffer->needVertexBufferBind = false;
9244 commandBuffer->needNewVertexResourceDescriptorSet = true;
9245 commandBuffer->needNewVertexUniformDescriptorSet = true;
9246 commandBuffer->needNewVertexUniformOffsets = true;
9247 commandBuffer->needNewFragmentResourceDescriptorSet = true;
9248 commandBuffer->needNewFragmentUniformDescriptorSet = true;
9249 commandBuffer->needNewFragmentUniformOffsets = true;
9250
9251 commandBuffer->needNewComputeReadWriteDescriptorSet = true;
9252 commandBuffer->needNewComputeReadOnlyDescriptorSet = true;
9253 commandBuffer->needNewComputeUniformDescriptorSet = true;
9254 commandBuffer->needNewComputeUniformOffsets = true;
9255
9256 commandBuffer->vertexResourceDescriptorSet = VK_NULL_HANDLE;
9257 commandBuffer->vertexUniformDescriptorSet = VK_NULL_HANDLE;
9258 commandBuffer->fragmentResourceDescriptorSet = VK_NULL_HANDLE;
9259 commandBuffer->fragmentUniformDescriptorSet = VK_NULL_HANDLE;
9260
9261 commandBuffer->computeReadOnlyDescriptorSet = VK_NULL_HANDLE;
9262 commandBuffer->computeReadWriteDescriptorSet = VK_NULL_HANDLE;
9263 commandBuffer->computeUniformDescriptorSet = VK_NULL_HANDLE;
9264
9265 // Resource tracking
9266
9267 commandBuffer->usedBufferCapacity = 4;
9268 commandBuffer->usedBufferCount = 0;
9269 commandBuffer->usedBuffers = SDL_malloc(
9270 commandBuffer->usedBufferCapacity * sizeof(VulkanBuffer *));
9271
9272 commandBuffer->usedTextureCapacity = 4;
9273 commandBuffer->usedTextureCount = 0;
9274 commandBuffer->usedTextures = SDL_malloc(
9275 commandBuffer->usedTextureCapacity * sizeof(VulkanTexture *));
9276
9277 commandBuffer->usedSamplerCapacity = 4;
9278 commandBuffer->usedSamplerCount = 0;
9279 commandBuffer->usedSamplers = SDL_malloc(
9280 commandBuffer->usedSamplerCapacity * sizeof(VulkanSampler *));
9281
9282 commandBuffer->usedGraphicsPipelineCapacity = 4;
9283 commandBuffer->usedGraphicsPipelineCount = 0;
9284 commandBuffer->usedGraphicsPipelines = SDL_malloc(
9285 commandBuffer->usedGraphicsPipelineCapacity * sizeof(VulkanGraphicsPipeline *));
9286
9287 commandBuffer->usedComputePipelineCapacity = 4;
9288 commandBuffer->usedComputePipelineCount = 0;
9289 commandBuffer->usedComputePipelines = SDL_malloc(
9290 commandBuffer->usedComputePipelineCapacity * sizeof(VulkanComputePipeline *));
9291
9292 commandBuffer->usedFramebufferCapacity = 4;
9293 commandBuffer->usedFramebufferCount = 0;
9294 commandBuffer->usedFramebuffers = SDL_malloc(
9295 commandBuffer->usedFramebufferCapacity * sizeof(VulkanFramebuffer *));
9296
9297 commandBuffer->usedUniformBufferCapacity = 4;
9298 commandBuffer->usedUniformBufferCount = 0;
9299 commandBuffer->usedUniformBuffers = SDL_malloc(
9300 commandBuffer->usedUniformBufferCapacity * sizeof(VulkanUniformBuffer *));
9301
9302 // Pool it!
9303
9304 vulkanCommandPool->inactiveCommandBuffers[vulkanCommandPool->inactiveCommandBufferCount] = commandBuffer;
9305 vulkanCommandPool->inactiveCommandBufferCount += 1;
9306
9307 return true;
9308}
9309
9310static VulkanCommandPool *VULKAN_INTERNAL_FetchCommandPool(
9311 VulkanRenderer *renderer,
9312 SDL_ThreadID threadID)
9313{
9314 VulkanCommandPool *vulkanCommandPool = NULL;
9315 VkCommandPoolCreateInfo commandPoolCreateInfo;
9316 VkResult vulkanResult;
9317 CommandPoolHashTableKey key;
9318 key.threadID = threadID;
9319
9320 bool result = SDL_FindInHashTable(
9321 renderer->commandPoolHashTable,
9322 (const void *)&key,
9323 (const void **)&vulkanCommandPool);
9324
9325 if (result) {
9326 return vulkanCommandPool;
9327 }
9328
9329 vulkanCommandPool = (VulkanCommandPool *)SDL_malloc(sizeof(VulkanCommandPool));
9330
9331 commandPoolCreateInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
9332 commandPoolCreateInfo.pNext = NULL;
9333 commandPoolCreateInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
9334 commandPoolCreateInfo.queueFamilyIndex = renderer->queueFamilyIndex;
9335
9336 vulkanResult = renderer->vkCreateCommandPool(
9337 renderer->logicalDevice,
9338 &commandPoolCreateInfo,
9339 NULL,
9340 &vulkanCommandPool->commandPool);
9341
9342 if (vulkanResult != VK_SUCCESS) {
9343 SDL_free(vulkanCommandPool);
9344 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateCommandPool, NULL);
9345 return NULL;
9346 }
9347
9348 vulkanCommandPool->threadID = threadID;
9349
9350 vulkanCommandPool->inactiveCommandBufferCapacity = 0;
9351 vulkanCommandPool->inactiveCommandBufferCount = 0;
9352 vulkanCommandPool->inactiveCommandBuffers = NULL;
9353
9354 if (!VULKAN_INTERNAL_AllocateCommandBuffer(
9355 renderer,
9356 vulkanCommandPool)) {
9357 VULKAN_INTERNAL_DestroyCommandPool(renderer, vulkanCommandPool);
9358 return NULL;
9359 }
9360
9361 CommandPoolHashTableKey *allocedKey = SDL_malloc(sizeof(CommandPoolHashTableKey));
9362 allocedKey->threadID = threadID;
9363
9364 SDL_InsertIntoHashTable(
9365 renderer->commandPoolHashTable,
9366 (const void *)allocedKey,
9367 (const void *)vulkanCommandPool, true);
9368
9369 return vulkanCommandPool;
9370}
9371
9372static VulkanCommandBuffer *VULKAN_INTERNAL_GetInactiveCommandBufferFromPool(
9373 VulkanRenderer *renderer,
9374 SDL_ThreadID threadID)
9375{
9376 VulkanCommandPool *commandPool =
9377 VULKAN_INTERNAL_FetchCommandPool(renderer, threadID);
9378 VulkanCommandBuffer *commandBuffer;
9379
9380 if (commandPool == NULL) {
9381 return NULL;
9382 }
9383
9384 if (commandPool->inactiveCommandBufferCount == 0) {
9385 if (!VULKAN_INTERNAL_AllocateCommandBuffer(
9386 renderer,
9387 commandPool)) {
9388 return NULL;
9389 }
9390 }
9391
9392 commandBuffer = commandPool->inactiveCommandBuffers[commandPool->inactiveCommandBufferCount - 1];
9393 commandPool->inactiveCommandBufferCount -= 1;
9394
9395 return commandBuffer;
9396}
9397
9398static SDL_GPUCommandBuffer *VULKAN_AcquireCommandBuffer(
9399 SDL_GPURenderer *driverData)
9400{
9401 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
9402 VkResult result;
9403 Uint32 i;
9404
9405 SDL_ThreadID threadID = SDL_GetCurrentThreadID();
9406
9407 SDL_LockMutex(renderer->acquireCommandBufferLock);
9408
9409 VulkanCommandBuffer *commandBuffer =
9410 VULKAN_INTERNAL_GetInactiveCommandBufferFromPool(renderer, threadID);
9411
9412 commandBuffer->descriptorSetCache = VULKAN_INTERNAL_AcquireDescriptorSetCache(renderer);
9413
9414 SDL_UnlockMutex(renderer->acquireCommandBufferLock);
9415
9416 if (commandBuffer == NULL) {
9417 return NULL;
9418 }
9419
9420 // Reset state
9421
9422 commandBuffer->currentComputePipeline = NULL;
9423 commandBuffer->currentGraphicsPipeline = NULL;
9424
9425 SDL_zeroa(commandBuffer->colorAttachmentSubresources);
9426 SDL_zeroa(commandBuffer->resolveAttachmentSubresources);
9427 commandBuffer->depthStencilAttachmentSubresource = NULL;
9428 commandBuffer->colorAttachmentSubresourceCount = 0;
9429 commandBuffer->resolveAttachmentSubresourceCount = 0;
9430
9431 for (i = 0; i < MAX_UNIFORM_BUFFERS_PER_STAGE; i += 1) {
9432 commandBuffer->vertexUniformBuffers[i] = NULL;
9433 commandBuffer->fragmentUniformBuffers[i] = NULL;
9434 commandBuffer->computeUniformBuffers[i] = NULL;
9435 }
9436
9437 commandBuffer->needVertexBufferBind = false;
9438 commandBuffer->needNewVertexResourceDescriptorSet = true;
9439 commandBuffer->needNewVertexUniformDescriptorSet = true;
9440 commandBuffer->needNewVertexUniformOffsets = true;
9441 commandBuffer->needNewFragmentResourceDescriptorSet = true;
9442 commandBuffer->needNewFragmentUniformDescriptorSet = true;
9443 commandBuffer->needNewFragmentUniformOffsets = true;
9444
9445 commandBuffer->needNewComputeReadOnlyDescriptorSet = true;
9446 commandBuffer->needNewComputeUniformDescriptorSet = true;
9447 commandBuffer->needNewComputeUniformOffsets = true;
9448
9449 commandBuffer->vertexResourceDescriptorSet = VK_NULL_HANDLE;
9450 commandBuffer->vertexUniformDescriptorSet = VK_NULL_HANDLE;
9451 commandBuffer->fragmentResourceDescriptorSet = VK_NULL_HANDLE;
9452 commandBuffer->fragmentUniformDescriptorSet = VK_NULL_HANDLE;
9453
9454 commandBuffer->computeReadOnlyDescriptorSet = VK_NULL_HANDLE;
9455 commandBuffer->computeReadWriteDescriptorSet = VK_NULL_HANDLE;
9456 commandBuffer->computeUniformDescriptorSet = VK_NULL_HANDLE;
9457
9458 SDL_zeroa(commandBuffer->vertexBuffers);
9459 SDL_zeroa(commandBuffer->vertexBufferOffsets);
9460 commandBuffer->vertexBufferCount = 0;
9461
9462 SDL_zeroa(commandBuffer->vertexSamplerTextures);
9463 SDL_zeroa(commandBuffer->vertexSamplers);
9464 SDL_zeroa(commandBuffer->vertexStorageTextures);
9465 SDL_zeroa(commandBuffer->vertexStorageBuffers);
9466
9467 SDL_zeroa(commandBuffer->fragmentSamplerTextures);
9468 SDL_zeroa(commandBuffer->fragmentSamplers);
9469 SDL_zeroa(commandBuffer->fragmentStorageTextures);
9470 SDL_zeroa(commandBuffer->fragmentStorageBuffers);
9471
9472 SDL_zeroa(commandBuffer->readWriteComputeStorageTextureSubresources);
9473 commandBuffer->readWriteComputeStorageTextureSubresourceCount = 0;
9474 SDL_zeroa(commandBuffer->readWriteComputeStorageBuffers);
9475 SDL_zeroa(commandBuffer->computeSamplerTextures);
9476 SDL_zeroa(commandBuffer->computeSamplers);
9477 SDL_zeroa(commandBuffer->readOnlyComputeStorageTextures);
9478 SDL_zeroa(commandBuffer->readOnlyComputeStorageBuffers);
9479
9480 commandBuffer->autoReleaseFence = true;
9481
9482 commandBuffer->isDefrag = 0;
9483
9484 /* Reset the command buffer here to avoid resets being called
9485 * from a separate thread than where the command buffer was acquired
9486 */
9487 result = renderer->vkResetCommandBuffer(
9488 commandBuffer->commandBuffer,
9489 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT);
9490
9491 CHECK_VULKAN_ERROR_AND_RETURN(result, vkResetCommandBuffer, NULL);
9492
9493 if (!VULKAN_INTERNAL_BeginCommandBuffer(renderer, commandBuffer)) {
9494 return NULL;
9495 }
9496
9497 return (SDL_GPUCommandBuffer *)commandBuffer;
9498}
9499
9500static bool VULKAN_QueryFence(
9501 SDL_GPURenderer *driverData,
9502 SDL_GPUFence *fence)
9503{
9504 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
9505 VkResult result;
9506
9507 result = renderer->vkGetFenceStatus(
9508 renderer->logicalDevice,
9509 ((VulkanFenceHandle *)fence)->fence);
9510
9511 if (result == VK_SUCCESS) {
9512 return true;
9513 } else if (result == VK_NOT_READY) {
9514 return false;
9515 } else {
9516 SET_ERROR_AND_RETURN("vkGetFenceStatus: %s", VkErrorMessages(result), false);
9517 }
9518}
9519
9520static void VULKAN_INTERNAL_ReturnFenceToPool(
9521 VulkanRenderer *renderer,
9522 VulkanFenceHandle *fenceHandle)
9523{
9524 SDL_LockMutex(renderer->fencePool.lock);
9525
9526 EXPAND_ARRAY_IF_NEEDED(
9527 renderer->fencePool.availableFences,
9528 VulkanFenceHandle *,
9529 renderer->fencePool.availableFenceCount + 1,
9530 renderer->fencePool.availableFenceCapacity,
9531 renderer->fencePool.availableFenceCapacity * 2);
9532
9533 renderer->fencePool.availableFences[renderer->fencePool.availableFenceCount] = fenceHandle;
9534 renderer->fencePool.availableFenceCount += 1;
9535
9536 SDL_UnlockMutex(renderer->fencePool.lock);
9537}
9538
9539static void VULKAN_ReleaseFence(
9540 SDL_GPURenderer *driverData,
9541 SDL_GPUFence *fence)
9542{
9543 VulkanFenceHandle *handle = (VulkanFenceHandle *)fence;
9544
9545 if (SDL_AtomicDecRef(&handle->referenceCount)) {
9546 VULKAN_INTERNAL_ReturnFenceToPool((VulkanRenderer *)driverData, handle);
9547 }
9548}
9549
9550static WindowData *VULKAN_INTERNAL_FetchWindowData(
9551 SDL_Window *window)
9552{
9553 SDL_PropertiesID properties = SDL_GetWindowProperties(window);
9554 return (WindowData *)SDL_GetPointerProperty(properties, WINDOW_PROPERTY_DATA, NULL);
9555}
9556
9557static bool VULKAN_INTERNAL_OnWindowResize(void *userdata, SDL_Event *e)
9558{
9559 SDL_Window *w = (SDL_Window *)userdata;
9560 WindowData *data;
9561 if (e->type == SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED && e->window.windowID == SDL_GetWindowID(w)) {
9562 data = VULKAN_INTERNAL_FetchWindowData(w);
9563 data->needsSwapchainRecreate = true;
9564 data->swapchainCreateWidth = e->window.data1;
9565 data->swapchainCreateHeight = e->window.data2;
9566 }
9567
9568 return true;
9569}
9570
9571static bool VULKAN_SupportsSwapchainComposition(
9572 SDL_GPURenderer *driverData,
9573 SDL_Window *window,
9574 SDL_GPUSwapchainComposition swapchainComposition)
9575{
9576 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
9577 WindowData *windowData = VULKAN_INTERNAL_FetchWindowData(window);
9578 VkSurfaceKHR surface;
9579 SwapchainSupportDetails supportDetails;
9580 bool result = false;
9581
9582 if (windowData == NULL) {
9583 SET_STRING_ERROR_AND_RETURN("Must claim window before querying swapchain composition support!", false);
9584 }
9585
9586 surface = windowData->surface;
9587 if (!surface) {
9588 SET_STRING_ERROR_AND_RETURN("Window has no Vulkan surface", false);
9589 }
9590
9591 if (VULKAN_INTERNAL_QuerySwapchainSupport(
9592 renderer,
9593 renderer->physicalDevice,
9594 surface,
9595 &supportDetails)) {
9596
9597 result = VULKAN_INTERNAL_VerifySwapSurfaceFormat(
9598 SwapchainCompositionToFormat[swapchainComposition],
9599 SwapchainCompositionToColorSpace[swapchainComposition],
9600 supportDetails.formats,
9601 supportDetails.formatsLength);
9602
9603 if (!result) {
9604 // Let's try again with the fallback format...
9605 result = VULKAN_INTERNAL_VerifySwapSurfaceFormat(
9606 SwapchainCompositionToFallbackFormat[swapchainComposition],
9607 SwapchainCompositionToColorSpace[swapchainComposition],
9608 supportDetails.formats,
9609 supportDetails.formatsLength);
9610 }
9611
9612 SDL_free(supportDetails.formats);
9613 SDL_free(supportDetails.presentModes);
9614 }
9615
9616 return result;
9617}
9618
9619static bool VULKAN_SupportsPresentMode(
9620 SDL_GPURenderer *driverData,
9621 SDL_Window *window,
9622 SDL_GPUPresentMode presentMode)
9623{
9624 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
9625 WindowData *windowData = VULKAN_INTERNAL_FetchWindowData(window);
9626 VkSurfaceKHR surface;
9627 SwapchainSupportDetails supportDetails;
9628 bool result = false;
9629
9630 if (windowData == NULL) {
9631 SET_STRING_ERROR_AND_RETURN("Must claim window before querying present mode support!", false);
9632 }
9633
9634 surface = windowData->surface;
9635 if (!surface) {
9636 SET_STRING_ERROR_AND_RETURN("Window has no Vulkan surface", false);
9637 }
9638
9639 if (VULKAN_INTERNAL_QuerySwapchainSupport(
9640 renderer,
9641 renderer->physicalDevice,
9642 surface,
9643 &supportDetails)) {
9644
9645 result = VULKAN_INTERNAL_VerifySwapPresentMode(
9646 SDLToVK_PresentMode[presentMode],
9647 supportDetails.presentModes,
9648 supportDetails.presentModesLength);
9649
9650 SDL_free(supportDetails.formats);
9651 SDL_free(supportDetails.presentModes);
9652 }
9653
9654 return result;
9655}
9656
9657static bool VULKAN_ClaimWindow(
9658 SDL_GPURenderer *driverData,
9659 SDL_Window *window)
9660{
9661 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
9662 WindowData *windowData = VULKAN_INTERNAL_FetchWindowData(window);
9663
9664 if (windowData == NULL) {
9665 windowData = SDL_calloc(1, sizeof(WindowData));
9666 windowData->window = window;
9667 windowData->presentMode = SDL_GPU_PRESENTMODE_VSYNC;
9668 windowData->swapchainComposition = SDL_GPU_SWAPCHAINCOMPOSITION_SDR;
9669
9670 // On non-Apple platforms the swapchain capability currentExtent can be different from the window,
9671 // so we have to query the window size.
9672#ifndef SDL_PLATFORM_APPLE
9673 int w, h;
9674 SDL_SyncWindow(window);
9675 SDL_GetWindowSizeInPixels(window, &w, &h);
9676 windowData->swapchainCreateWidth = w;
9677 windowData->swapchainCreateHeight = h;
9678#endif
9679
9680 Uint32 createSwapchainResult = VULKAN_INTERNAL_CreateSwapchain(renderer, windowData);
9681 if (createSwapchainResult == 1) {
9682 SDL_SetPointerProperty(SDL_GetWindowProperties(window), WINDOW_PROPERTY_DATA, windowData);
9683
9684 SDL_LockMutex(renderer->windowLock);
9685 if (renderer->claimedWindowCount >= renderer->claimedWindowCapacity) {
9686 renderer->claimedWindowCapacity *= 2;
9687 renderer->claimedWindows = SDL_realloc(
9688 renderer->claimedWindows,
9689 renderer->claimedWindowCapacity * sizeof(WindowData *));
9690 }
9691
9692 renderer->claimedWindows[renderer->claimedWindowCount] = windowData;
9693 renderer->claimedWindowCount += 1;
9694 SDL_UnlockMutex(renderer->windowLock);
9695
9696 SDL_AddEventWatch(VULKAN_INTERNAL_OnWindowResize, window);
9697
9698 return true;
9699 } else if (createSwapchainResult == VULKAN_INTERNAL_TRY_AGAIN) {
9700 windowData->needsSwapchainRecreate = true;
9701 return true;
9702 } else {
9703 SDL_free(windowData);
9704 return false;
9705 }
9706 } else {
9707 SET_STRING_ERROR_AND_RETURN("Window already claimed!", false);
9708 }
9709}
9710
9711static void VULKAN_ReleaseWindow(
9712 SDL_GPURenderer *driverData,
9713 SDL_Window *window)
9714{
9715 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
9716 WindowData *windowData = VULKAN_INTERNAL_FetchWindowData(window);
9717 Uint32 i;
9718
9719 if (windowData == NULL) {
9720 return;
9721 }
9722
9723 VULKAN_Wait(driverData);
9724
9725 for (i = 0; i < MAX_FRAMES_IN_FLIGHT; i += 1) {
9726 if (windowData->inFlightFences[i] != NULL) {
9727 VULKAN_ReleaseFence(
9728 driverData,
9729 windowData->inFlightFences[i]);
9730 }
9731 }
9732
9733 VULKAN_INTERNAL_DestroySwapchain(
9734 (VulkanRenderer *)driverData,
9735 windowData);
9736
9737
9738 SDL_LockMutex(renderer->windowLock);
9739 for (i = 0; i < renderer->claimedWindowCount; i += 1) {
9740 if (renderer->claimedWindows[i]->window == window) {
9741 renderer->claimedWindows[i] = renderer->claimedWindows[renderer->claimedWindowCount - 1];
9742 renderer->claimedWindowCount -= 1;
9743 break;
9744 }
9745 }
9746 SDL_UnlockMutex(renderer->windowLock);
9747
9748 SDL_free(windowData);
9749
9750 SDL_ClearProperty(SDL_GetWindowProperties(window), WINDOW_PROPERTY_DATA);
9751 SDL_RemoveEventWatch(VULKAN_INTERNAL_OnWindowResize, window);
9752}
9753
9754static Uint32 VULKAN_INTERNAL_RecreateSwapchain(
9755 VulkanRenderer *renderer,
9756 WindowData *windowData)
9757{
9758 Uint32 i;
9759
9760 if (!VULKAN_Wait((SDL_GPURenderer *)renderer)) {
9761 return false;
9762 }
9763
9764 for (i = 0; i < MAX_FRAMES_IN_FLIGHT; i += 1) {
9765 if (windowData->inFlightFences[i] != NULL) {
9766 VULKAN_ReleaseFence(
9767 (SDL_GPURenderer *)renderer,
9768 windowData->inFlightFences[i]);
9769 windowData->inFlightFences[i] = NULL;
9770 }
9771 }
9772
9773 VULKAN_INTERNAL_DestroySwapchain(renderer, windowData);
9774 return VULKAN_INTERNAL_CreateSwapchain(renderer, windowData);
9775}
9776
9777static bool VULKAN_WaitForSwapchain(
9778 SDL_GPURenderer *driverData,
9779 SDL_Window *window)
9780{
9781 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
9782 WindowData *windowData = VULKAN_INTERNAL_FetchWindowData(window);
9783
9784 if (windowData == NULL) {
9785 SET_STRING_ERROR_AND_RETURN("Cannot wait for a swapchain from an unclaimed window!", false);
9786 }
9787
9788 if (windowData->inFlightFences[windowData->frameCounter] != NULL) {
9789 if (!VULKAN_WaitForFences(
9790 driverData,
9791 true,
9792 &windowData->inFlightFences[windowData->frameCounter],
9793 1)) {
9794 return false;
9795 }
9796 }
9797
9798 return true;
9799}
9800
9801static bool VULKAN_INTERNAL_AcquireSwapchainTexture(
9802 bool block,
9803 SDL_GPUCommandBuffer *commandBuffer,
9804 SDL_Window *window,
9805 SDL_GPUTexture **swapchainTexture,
9806 Uint32 *swapchainTextureWidth,
9807 Uint32 *swapchainTextureHeight)
9808{
9809 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
9810 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
9811 Uint32 swapchainImageIndex;
9812 WindowData *windowData;
9813 VkResult acquireResult = VK_SUCCESS;
9814 VulkanTextureContainer *swapchainTextureContainer = NULL;
9815 VulkanPresentData *presentData;
9816
9817 *swapchainTexture = NULL;
9818 if (swapchainTextureWidth) {
9819 *swapchainTextureWidth = 0;
9820 }
9821 if (swapchainTextureHeight) {
9822 *swapchainTextureHeight = 0;
9823 }
9824
9825 windowData = VULKAN_INTERNAL_FetchWindowData(window);
9826 if (windowData == NULL) {
9827 SET_STRING_ERROR_AND_RETURN("Cannot acquire a swapchain texture from an unclaimed window!", false);
9828 }
9829
9830 // If window data marked as needing swapchain recreate, try to recreate
9831 if (windowData->needsSwapchainRecreate) {
9832 Uint32 recreateSwapchainResult = VULKAN_INTERNAL_RecreateSwapchain(renderer, windowData);
9833 if (!recreateSwapchainResult) {
9834 return false;
9835 } else if (recreateSwapchainResult == VULKAN_INTERNAL_TRY_AGAIN) {
9836 // Edge case, texture is filled in with NULL but not an error
9837 if (windowData->inFlightFences[windowData->frameCounter] != NULL) {
9838 VULKAN_ReleaseFence(
9839 (SDL_GPURenderer *)renderer,
9840 windowData->inFlightFences[windowData->frameCounter]);
9841 windowData->inFlightFences[windowData->frameCounter] = NULL;
9842 }
9843 return true;
9844 }
9845 }
9846
9847 if (swapchainTextureWidth) {
9848 *swapchainTextureWidth = windowData->width;
9849 }
9850 if (swapchainTextureHeight) {
9851 *swapchainTextureHeight = windowData->height;
9852 }
9853
9854 if (windowData->inFlightFences[windowData->frameCounter] != NULL) {
9855 if (block) {
9856 // If we are blocking, just wait for the fence!
9857 if (!VULKAN_WaitForFences(
9858 (SDL_GPURenderer *)renderer,
9859 true,
9860 &windowData->inFlightFences[windowData->frameCounter],
9861 1)) {
9862 return false;
9863 }
9864 } else {
9865 // If we are not blocking and the least recent fence is not signaled,
9866 // return true to indicate that there is no error but rendering should be skipped.
9867 if (!VULKAN_QueryFence(
9868 (SDL_GPURenderer *)renderer,
9869 windowData->inFlightFences[windowData->frameCounter])) {
9870 return true;
9871 }
9872 }
9873
9874 VULKAN_ReleaseFence(
9875 (SDL_GPURenderer *)renderer,
9876 windowData->inFlightFences[windowData->frameCounter]);
9877
9878 windowData->inFlightFences[windowData->frameCounter] = NULL;
9879 }
9880
9881 // Finally, try to acquire!
9882 while (true) {
9883 acquireResult = renderer->vkAcquireNextImageKHR(
9884 renderer->logicalDevice,
9885 windowData->swapchain,
9886 SDL_MAX_UINT64,
9887 windowData->imageAvailableSemaphore[windowData->frameCounter],
9888 VK_NULL_HANDLE,
9889 &swapchainImageIndex);
9890
9891 if (acquireResult == VK_SUCCESS || acquireResult == VK_SUBOPTIMAL_KHR) {
9892 break; // we got the next image!
9893 }
9894
9895 // If acquisition is invalid, let's try to recreate
9896 Uint32 recreateSwapchainResult = VULKAN_INTERNAL_RecreateSwapchain(renderer, windowData);
9897 if (!recreateSwapchainResult) {
9898 return false;
9899 } else if (recreateSwapchainResult == VULKAN_INTERNAL_TRY_AGAIN) {
9900 // Edge case, texture is filled in with NULL but not an error
9901 return true;
9902 }
9903 }
9904
9905 swapchainTextureContainer = &windowData->textureContainers[swapchainImageIndex];
9906
9907 // We need a special execution dependency with pWaitDstStageMask or image transition can start before acquire finishes
9908
9909 VkImageMemoryBarrier imageBarrier;
9910 imageBarrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
9911 imageBarrier.pNext = NULL;
9912 imageBarrier.srcAccessMask = 0;
9913 imageBarrier.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
9914 imageBarrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
9915 imageBarrier.newLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
9916 imageBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
9917 imageBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
9918 imageBarrier.image = swapchainTextureContainer->activeTexture->image;
9919 imageBarrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
9920 imageBarrier.subresourceRange.baseMipLevel = 0;
9921 imageBarrier.subresourceRange.levelCount = 1;
9922 imageBarrier.subresourceRange.baseArrayLayer = 0;
9923 imageBarrier.subresourceRange.layerCount = 1;
9924
9925 renderer->vkCmdPipelineBarrier(
9926 vulkanCommandBuffer->commandBuffer,
9927 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
9928 VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
9929 0,
9930 0,
9931 NULL,
9932 0,
9933 NULL,
9934 1,
9935 &imageBarrier);
9936
9937 // Set up present struct
9938
9939 if (vulkanCommandBuffer->presentDataCount == vulkanCommandBuffer->presentDataCapacity) {
9940 vulkanCommandBuffer->presentDataCapacity += 1;
9941 vulkanCommandBuffer->presentDatas = SDL_realloc(
9942 vulkanCommandBuffer->presentDatas,
9943 vulkanCommandBuffer->presentDataCapacity * sizeof(VulkanPresentData));
9944 }
9945
9946 presentData = &vulkanCommandBuffer->presentDatas[vulkanCommandBuffer->presentDataCount];
9947 vulkanCommandBuffer->presentDataCount += 1;
9948
9949 presentData->windowData = windowData;
9950 presentData->swapchainImageIndex = swapchainImageIndex;
9951
9952 // Set up present semaphores
9953
9954 if (vulkanCommandBuffer->waitSemaphoreCount == vulkanCommandBuffer->waitSemaphoreCapacity) {
9955 vulkanCommandBuffer->waitSemaphoreCapacity += 1;
9956 vulkanCommandBuffer->waitSemaphores = SDL_realloc(
9957 vulkanCommandBuffer->waitSemaphores,
9958 vulkanCommandBuffer->waitSemaphoreCapacity * sizeof(VkSemaphore));
9959 }
9960
9961 vulkanCommandBuffer->waitSemaphores[vulkanCommandBuffer->waitSemaphoreCount] =
9962 windowData->imageAvailableSemaphore[windowData->frameCounter];
9963 vulkanCommandBuffer->waitSemaphoreCount += 1;
9964
9965 if (vulkanCommandBuffer->signalSemaphoreCount == vulkanCommandBuffer->signalSemaphoreCapacity) {
9966 vulkanCommandBuffer->signalSemaphoreCapacity += 1;
9967 vulkanCommandBuffer->signalSemaphores = SDL_realloc(
9968 vulkanCommandBuffer->signalSemaphores,
9969 vulkanCommandBuffer->signalSemaphoreCapacity * sizeof(VkSemaphore));
9970 }
9971
9972 vulkanCommandBuffer->signalSemaphores[vulkanCommandBuffer->signalSemaphoreCount] =
9973 windowData->renderFinishedSemaphore[windowData->frameCounter];
9974 vulkanCommandBuffer->signalSemaphoreCount += 1;
9975
9976 *swapchainTexture = (SDL_GPUTexture *)swapchainTextureContainer;
9977 return true;
9978}
9979
9980static bool VULKAN_AcquireSwapchainTexture(
9981 SDL_GPUCommandBuffer *command_buffer,
9982 SDL_Window *window,
9983 SDL_GPUTexture **swapchain_texture,
9984 Uint32 *swapchain_texture_width,
9985 Uint32 *swapchain_texture_height
9986) {
9987 return VULKAN_INTERNAL_AcquireSwapchainTexture(
9988 false,
9989 command_buffer,
9990 window,
9991 swapchain_texture,
9992 swapchain_texture_width,
9993 swapchain_texture_height);
9994}
9995
9996static bool VULKAN_WaitAndAcquireSwapchainTexture(
9997 SDL_GPUCommandBuffer *command_buffer,
9998 SDL_Window *window,
9999 SDL_GPUTexture **swapchain_texture,
10000 Uint32 *swapchain_texture_width,
10001 Uint32 *swapchain_texture_height
10002) {
10003 return VULKAN_INTERNAL_AcquireSwapchainTexture(
10004 true,
10005 command_buffer,
10006 window,
10007 swapchain_texture,
10008 swapchain_texture_width,
10009 swapchain_texture_height);
10010}
10011
10012static SDL_GPUTextureFormat VULKAN_GetSwapchainTextureFormat(
10013 SDL_GPURenderer *driverData,
10014 SDL_Window *window)
10015{
10016 VulkanRenderer *renderer = (VulkanRenderer*)driverData;
10017 WindowData *windowData = VULKAN_INTERNAL_FetchWindowData(window);
10018
10019 if (windowData == NULL) {
10020 SET_STRING_ERROR_AND_RETURN("Cannot get swapchain format, window has not been claimed!", SDL_GPU_TEXTUREFORMAT_INVALID);
10021 }
10022
10023 return SwapchainCompositionToSDLFormat(
10024 windowData->swapchainComposition,
10025 windowData->usingFallbackFormat);
10026}
10027
10028static bool VULKAN_SetSwapchainParameters(
10029 SDL_GPURenderer *driverData,
10030 SDL_Window *window,
10031 SDL_GPUSwapchainComposition swapchainComposition,
10032 SDL_GPUPresentMode presentMode)
10033{
10034 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
10035 WindowData *windowData = VULKAN_INTERNAL_FetchWindowData(window);
10036
10037 if (windowData == NULL) {
10038 SET_STRING_ERROR_AND_RETURN("Cannot set swapchain parameters on unclaimed window!", false);
10039 }
10040
10041 if (!VULKAN_SupportsSwapchainComposition(driverData, window, swapchainComposition)) {
10042 SET_STRING_ERROR_AND_RETURN("Swapchain composition not supported!", false);
10043 }
10044
10045 if (!VULKAN_SupportsPresentMode(driverData, window, presentMode)) {
10046 SET_STRING_ERROR_AND_RETURN("Present mode not supported!", false);
10047 }
10048
10049 windowData->presentMode = presentMode;
10050 windowData->swapchainComposition = swapchainComposition;
10051
10052 Uint32 recreateSwapchainResult = VULKAN_INTERNAL_RecreateSwapchain(renderer, windowData);
10053 if (!recreateSwapchainResult) {
10054 return false;
10055 } else if (recreateSwapchainResult == VULKAN_INTERNAL_TRY_AGAIN) {
10056 // Edge case, swapchain extent is (0, 0) but this is not an error
10057 windowData->needsSwapchainRecreate = true;
10058 return true;
10059 }
10060
10061 return true;
10062}
10063
10064static bool VULKAN_SetAllowedFramesInFlight(
10065 SDL_GPURenderer *driverData,
10066 Uint32 allowedFramesInFlight)
10067{
10068 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
10069
10070 renderer->allowedFramesInFlight = allowedFramesInFlight;
10071
10072 for (Uint32 i = 0; i < renderer->claimedWindowCount; i += 1) {
10073 WindowData *windowData = renderer->claimedWindows[i];
10074
10075 Uint32 recreateResult = VULKAN_INTERNAL_RecreateSwapchain(renderer, windowData);
10076 if (!recreateResult) {
10077 return false;
10078 } else if (recreateResult == VULKAN_INTERNAL_TRY_AGAIN) {
10079 // Edge case, swapchain extent is (0, 0) but this is not an error
10080 windowData->needsSwapchainRecreate = true;
10081 }
10082 }
10083
10084 return true;
10085}
10086
10087// Submission structure
10088
10089static VulkanFenceHandle *VULKAN_INTERNAL_AcquireFenceFromPool(
10090 VulkanRenderer *renderer)
10091{
10092 VulkanFenceHandle *handle;
10093 VkFenceCreateInfo fenceCreateInfo;
10094 VkFence fence;
10095 VkResult vulkanResult;
10096
10097 if (renderer->fencePool.availableFenceCount == 0) {
10098 // Create fence
10099 fenceCreateInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
10100 fenceCreateInfo.pNext = NULL;
10101 fenceCreateInfo.flags = 0;
10102
10103 vulkanResult = renderer->vkCreateFence(
10104 renderer->logicalDevice,
10105 &fenceCreateInfo,
10106 NULL,
10107 &fence);
10108
10109 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateFence, NULL);
10110
10111 handle = SDL_malloc(sizeof(VulkanFenceHandle));
10112 handle->fence = fence;
10113 SDL_SetAtomicInt(&handle->referenceCount, 0);
10114 return handle;
10115 }
10116
10117 SDL_LockMutex(renderer->fencePool.lock);
10118
10119 handle = renderer->fencePool.availableFences[renderer->fencePool.availableFenceCount - 1];
10120 renderer->fencePool.availableFenceCount -= 1;
10121
10122 vulkanResult = renderer->vkResetFences(
10123 renderer->logicalDevice,
10124 1,
10125 &handle->fence);
10126
10127 SDL_UnlockMutex(renderer->fencePool.lock);
10128
10129 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkResetFences, NULL);
10130
10131 return handle;
10132}
10133
10134static void VULKAN_INTERNAL_PerformPendingDestroys(
10135 VulkanRenderer *renderer)
10136{
10137 SDL_LockMutex(renderer->disposeLock);
10138
10139 for (Sint32 i = renderer->texturesToDestroyCount - 1; i >= 0; i -= 1) {
10140 if (SDL_GetAtomicInt(&renderer->texturesToDestroy[i]->referenceCount) == 0) {
10141 VULKAN_INTERNAL_DestroyTexture(
10142 renderer,
10143 renderer->texturesToDestroy[i]);
10144
10145 renderer->texturesToDestroy[i] = renderer->texturesToDestroy[renderer->texturesToDestroyCount - 1];
10146 renderer->texturesToDestroyCount -= 1;
10147 }
10148 }
10149
10150 for (Sint32 i = renderer->buffersToDestroyCount - 1; i >= 0; i -= 1) {
10151 if (SDL_GetAtomicInt(&renderer->buffersToDestroy[i]->referenceCount) == 0) {
10152 VULKAN_INTERNAL_DestroyBuffer(
10153 renderer,
10154 renderer->buffersToDestroy[i]);
10155
10156 renderer->buffersToDestroy[i] = renderer->buffersToDestroy[renderer->buffersToDestroyCount - 1];
10157 renderer->buffersToDestroyCount -= 1;
10158 }
10159 }
10160
10161 for (Sint32 i = renderer->graphicsPipelinesToDestroyCount - 1; i >= 0; i -= 1) {
10162 if (SDL_GetAtomicInt(&renderer->graphicsPipelinesToDestroy[i]->referenceCount) == 0) {
10163 VULKAN_INTERNAL_DestroyGraphicsPipeline(
10164 renderer,
10165 renderer->graphicsPipelinesToDestroy[i]);
10166
10167 renderer->graphicsPipelinesToDestroy[i] = renderer->graphicsPipelinesToDestroy[renderer->graphicsPipelinesToDestroyCount - 1];
10168 renderer->graphicsPipelinesToDestroyCount -= 1;
10169 }
10170 }
10171
10172 for (Sint32 i = renderer->computePipelinesToDestroyCount - 1; i >= 0; i -= 1) {
10173 if (SDL_GetAtomicInt(&renderer->computePipelinesToDestroy[i]->referenceCount) == 0) {
10174 VULKAN_INTERNAL_DestroyComputePipeline(
10175 renderer,
10176 renderer->computePipelinesToDestroy[i]);
10177
10178 renderer->computePipelinesToDestroy[i] = renderer->computePipelinesToDestroy[renderer->computePipelinesToDestroyCount - 1];
10179 renderer->computePipelinesToDestroyCount -= 1;
10180 }
10181 }
10182
10183 for (Sint32 i = renderer->shadersToDestroyCount - 1; i >= 0; i -= 1) {
10184 if (SDL_GetAtomicInt(&renderer->shadersToDestroy[i]->referenceCount) == 0) {
10185 VULKAN_INTERNAL_DestroyShader(
10186 renderer,
10187 renderer->shadersToDestroy[i]);
10188
10189 renderer->shadersToDestroy[i] = renderer->shadersToDestroy[renderer->shadersToDestroyCount - 1];
10190 renderer->shadersToDestroyCount -= 1;
10191 }
10192 }
10193
10194 for (Sint32 i = renderer->samplersToDestroyCount - 1; i >= 0; i -= 1) {
10195 if (SDL_GetAtomicInt(&renderer->samplersToDestroy[i]->referenceCount) == 0) {
10196 VULKAN_INTERNAL_DestroySampler(
10197 renderer,
10198 renderer->samplersToDestroy[i]);
10199
10200 renderer->samplersToDestroy[i] = renderer->samplersToDestroy[renderer->samplersToDestroyCount - 1];
10201 renderer->samplersToDestroyCount -= 1;
10202 }
10203 }
10204
10205 for (Sint32 i = renderer->framebuffersToDestroyCount - 1; i >= 0; i -= 1) {
10206 if (SDL_GetAtomicInt(&renderer->framebuffersToDestroy[i]->referenceCount) == 0) {
10207 VULKAN_INTERNAL_DestroyFramebuffer(
10208 renderer,
10209 renderer->framebuffersToDestroy[i]);
10210
10211 renderer->framebuffersToDestroy[i] = renderer->framebuffersToDestroy[renderer->framebuffersToDestroyCount - 1];
10212 renderer->framebuffersToDestroyCount -= 1;
10213 }
10214 }
10215
10216 SDL_UnlockMutex(renderer->disposeLock);
10217}
10218
10219static void VULKAN_INTERNAL_CleanCommandBuffer(
10220 VulkanRenderer *renderer,
10221 VulkanCommandBuffer *commandBuffer,
10222 bool cancel)
10223{
10224 if (commandBuffer->autoReleaseFence) {
10225 VULKAN_ReleaseFence(
10226 (SDL_GPURenderer *)renderer,
10227 (SDL_GPUFence *)commandBuffer->inFlightFence);
10228
10229 commandBuffer->inFlightFence = NULL;
10230 }
10231
10232 // Uniform buffers are now available
10233
10234 SDL_LockMutex(renderer->acquireUniformBufferLock);
10235
10236 for (Sint32 i = 0; i < commandBuffer->usedUniformBufferCount; i += 1) {
10237 VULKAN_INTERNAL_ReturnUniformBufferToPool(
10238 renderer,
10239 commandBuffer->usedUniformBuffers[i]);
10240 }
10241 commandBuffer->usedUniformBufferCount = 0;
10242
10243 SDL_UnlockMutex(renderer->acquireUniformBufferLock);
10244
10245 // Decrement reference counts
10246
10247 for (Sint32 i = 0; i < commandBuffer->usedBufferCount; i += 1) {
10248 (void)SDL_AtomicDecRef(&commandBuffer->usedBuffers[i]->referenceCount);
10249 }
10250 commandBuffer->usedBufferCount = 0;
10251
10252 for (Sint32 i = 0; i < commandBuffer->usedTextureCount; i += 1) {
10253 (void)SDL_AtomicDecRef(&commandBuffer->usedTextures[i]->referenceCount);
10254 }
10255 commandBuffer->usedTextureCount = 0;
10256
10257 for (Sint32 i = 0; i < commandBuffer->usedSamplerCount; i += 1) {
10258 (void)SDL_AtomicDecRef(&commandBuffer->usedSamplers[i]->referenceCount);
10259 }
10260 commandBuffer->usedSamplerCount = 0;
10261
10262 for (Sint32 i = 0; i < commandBuffer->usedGraphicsPipelineCount; i += 1) {
10263 (void)SDL_AtomicDecRef(&commandBuffer->usedGraphicsPipelines[i]->referenceCount);
10264 }
10265 commandBuffer->usedGraphicsPipelineCount = 0;
10266
10267 for (Sint32 i = 0; i < commandBuffer->usedComputePipelineCount; i += 1) {
10268 (void)SDL_AtomicDecRef(&commandBuffer->usedComputePipelines[i]->referenceCount);
10269 }
10270 commandBuffer->usedComputePipelineCount = 0;
10271
10272 for (Sint32 i = 0; i < commandBuffer->usedFramebufferCount; i += 1) {
10273 (void)SDL_AtomicDecRef(&commandBuffer->usedFramebuffers[i]->referenceCount);
10274 }
10275 commandBuffer->usedFramebufferCount = 0;
10276
10277 // Reset presentation data
10278
10279 commandBuffer->presentDataCount = 0;
10280 commandBuffer->waitSemaphoreCount = 0;
10281 commandBuffer->signalSemaphoreCount = 0;
10282
10283 // Reset defrag state
10284
10285 if (commandBuffer->isDefrag) {
10286 renderer->defragInProgress = 0;
10287 }
10288
10289 // Return command buffer to pool
10290
10291 SDL_LockMutex(renderer->acquireCommandBufferLock);
10292
10293 if (commandBuffer->commandPool->inactiveCommandBufferCount == commandBuffer->commandPool->inactiveCommandBufferCapacity) {
10294 commandBuffer->commandPool->inactiveCommandBufferCapacity += 1;
10295 commandBuffer->commandPool->inactiveCommandBuffers = SDL_realloc(
10296 commandBuffer->commandPool->inactiveCommandBuffers,
10297 commandBuffer->commandPool->inactiveCommandBufferCapacity * sizeof(VulkanCommandBuffer *));
10298 }
10299
10300 commandBuffer->commandPool->inactiveCommandBuffers[commandBuffer->commandPool->inactiveCommandBufferCount] = commandBuffer;
10301 commandBuffer->commandPool->inactiveCommandBufferCount += 1;
10302
10303 // Release descriptor set cache
10304
10305 VULKAN_INTERNAL_ReturnDescriptorSetCacheToPool(
10306 renderer,
10307 commandBuffer->descriptorSetCache);
10308
10309 commandBuffer->descriptorSetCache = NULL;
10310
10311 SDL_UnlockMutex(renderer->acquireCommandBufferLock);
10312
10313 // Remove this command buffer from the submitted list
10314 if (!cancel) {
10315 for (Uint32 i = 0; i < renderer->submittedCommandBufferCount; i += 1) {
10316 if (renderer->submittedCommandBuffers[i] == commandBuffer) {
10317 renderer->submittedCommandBuffers[i] = renderer->submittedCommandBuffers[renderer->submittedCommandBufferCount - 1];
10318 renderer->submittedCommandBufferCount -= 1;
10319 }
10320 }
10321 }
10322}
10323
10324static bool VULKAN_WaitForFences(
10325 SDL_GPURenderer *driverData,
10326 bool waitAll,
10327 SDL_GPUFence *const *fences,
10328 Uint32 numFences)
10329{
10330 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
10331 VkFence *vkFences = SDL_stack_alloc(VkFence, numFences);
10332 VkResult result;
10333
10334 for (Uint32 i = 0; i < numFences; i += 1) {
10335 vkFences[i] = ((VulkanFenceHandle *)fences[i])->fence;
10336 }
10337
10338 result = renderer->vkWaitForFences(
10339 renderer->logicalDevice,
10340 numFences,
10341 vkFences,
10342 waitAll,
10343 SDL_MAX_UINT64);
10344
10345 CHECK_VULKAN_ERROR_AND_RETURN(result, vkWaitForFences, false);
10346
10347 SDL_stack_free(vkFences);
10348
10349 SDL_LockMutex(renderer->submitLock);
10350
10351 for (Sint32 i = renderer->submittedCommandBufferCount - 1; i >= 0; i -= 1) {
10352 result = renderer->vkGetFenceStatus(
10353 renderer->logicalDevice,
10354 renderer->submittedCommandBuffers[i]->inFlightFence->fence);
10355
10356 if (result == VK_SUCCESS) {
10357 VULKAN_INTERNAL_CleanCommandBuffer(
10358 renderer,
10359 renderer->submittedCommandBuffers[i],
10360 false);
10361 }
10362 }
10363
10364 VULKAN_INTERNAL_PerformPendingDestroys(renderer);
10365
10366 SDL_UnlockMutex(renderer->submitLock);
10367
10368 return true;
10369}
10370
10371static bool VULKAN_Wait(
10372 SDL_GPURenderer *driverData)
10373{
10374 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
10375 VulkanCommandBuffer *commandBuffer;
10376 VkResult result;
10377 Sint32 i;
10378
10379 result = renderer->vkDeviceWaitIdle(renderer->logicalDevice);
10380
10381 CHECK_VULKAN_ERROR_AND_RETURN(result, vkDeviceWaitIdle, false);
10382
10383 SDL_LockMutex(renderer->submitLock);
10384
10385 for (i = renderer->submittedCommandBufferCount - 1; i >= 0; i -= 1) {
10386 commandBuffer = renderer->submittedCommandBuffers[i];
10387 VULKAN_INTERNAL_CleanCommandBuffer(renderer, commandBuffer, false);
10388 }
10389
10390 VULKAN_INTERNAL_PerformPendingDestroys(renderer);
10391
10392 SDL_UnlockMutex(renderer->submitLock);
10393
10394 return true;
10395}
10396
10397static SDL_GPUFence *VULKAN_SubmitAndAcquireFence(
10398 SDL_GPUCommandBuffer *commandBuffer)
10399{
10400 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
10401 vulkanCommandBuffer->autoReleaseFence = false;
10402 if (!VULKAN_Submit(commandBuffer)) {
10403 return NULL;
10404 }
10405 return (SDL_GPUFence *)vulkanCommandBuffer->inFlightFence;
10406}
10407
10408static void VULKAN_INTERNAL_ReleaseCommandBuffer(VulkanCommandBuffer *vulkanCommandBuffer)
10409{
10410 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
10411
10412 if (renderer->submittedCommandBufferCount + 1 >= renderer->submittedCommandBufferCapacity) {
10413 renderer->submittedCommandBufferCapacity = renderer->submittedCommandBufferCount + 1;
10414
10415 renderer->submittedCommandBuffers = SDL_realloc(
10416 renderer->submittedCommandBuffers,
10417 sizeof(VulkanCommandBuffer *) * renderer->submittedCommandBufferCapacity);
10418 }
10419
10420 renderer->submittedCommandBuffers[renderer->submittedCommandBufferCount] = vulkanCommandBuffer;
10421 renderer->submittedCommandBufferCount += 1;
10422}
10423
10424static bool VULKAN_Submit(
10425 SDL_GPUCommandBuffer *commandBuffer)
10426{
10427 VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
10428 VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
10429 VkSubmitInfo submitInfo;
10430 VkPresentInfoKHR presentInfo;
10431 VulkanPresentData *presentData;
10432 VkResult vulkanResult, presentResult = VK_SUCCESS;
10433 VkPipelineStageFlags waitStages[MAX_PRESENT_COUNT];
10434 Uint32 swapchainImageIndex;
10435 VulkanTextureSubresource *swapchainTextureSubresource;
10436 Uint8 commandBufferCleaned = 0;
10437 VulkanMemorySubAllocator *allocator;
10438 bool presenting = false;
10439
10440 SDL_LockMutex(renderer->submitLock);
10441
10442 // FIXME: Can this just be permanent?
10443 for (Uint32 i = 0; i < MAX_PRESENT_COUNT; i += 1) {
10444 waitStages[i] = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
10445 }
10446
10447 for (Uint32 j = 0; j < vulkanCommandBuffer->presentDataCount; j += 1) {
10448 swapchainImageIndex = vulkanCommandBuffer->presentDatas[j].swapchainImageIndex;
10449 swapchainTextureSubresource = VULKAN_INTERNAL_FetchTextureSubresource(
10450 &vulkanCommandBuffer->presentDatas[j].windowData->textureContainers[swapchainImageIndex],
10451 0,
10452 0);
10453
10454 VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
10455 renderer,
10456 vulkanCommandBuffer,
10457 VULKAN_TEXTURE_USAGE_MODE_PRESENT,
10458 swapchainTextureSubresource);
10459 }
10460
10461 if (!VULKAN_INTERNAL_EndCommandBuffer(renderer, vulkanCommandBuffer)) {
10462 SDL_UnlockMutex(renderer->submitLock);
10463 return false;
10464 }
10465
10466 vulkanCommandBuffer->inFlightFence = VULKAN_INTERNAL_AcquireFenceFromPool(renderer);
10467 if (vulkanCommandBuffer->inFlightFence == NULL) {
10468 SDL_UnlockMutex(renderer->submitLock);
10469 return false;
10470 }
10471
10472 // Command buffer has a reference to the in-flight fence
10473 (void)SDL_AtomicIncRef(&vulkanCommandBuffer->inFlightFence->referenceCount);
10474
10475 submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
10476 submitInfo.pNext = NULL;
10477 submitInfo.commandBufferCount = 1;
10478 submitInfo.pCommandBuffers = &vulkanCommandBuffer->commandBuffer;
10479
10480 submitInfo.pWaitDstStageMask = waitStages;
10481 submitInfo.pWaitSemaphores = vulkanCommandBuffer->waitSemaphores;
10482 submitInfo.waitSemaphoreCount = vulkanCommandBuffer->waitSemaphoreCount;
10483 submitInfo.pSignalSemaphores = vulkanCommandBuffer->signalSemaphores;
10484 submitInfo.signalSemaphoreCount = vulkanCommandBuffer->signalSemaphoreCount;
10485
10486 vulkanResult = renderer->vkQueueSubmit(
10487 renderer->unifiedQueue,
10488 1,
10489 &submitInfo,
10490 vulkanCommandBuffer->inFlightFence->fence);
10491
10492 if (vulkanResult != VK_SUCCESS) {
10493 SDL_UnlockMutex(renderer->submitLock);
10494 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkQueueSubmit, false);
10495 }
10496
10497 // Present, if applicable
10498 bool result = true;
10499
10500 for (Uint32 j = 0; j < vulkanCommandBuffer->presentDataCount; j += 1) {
10501 presenting = true;
10502
10503 presentData = &vulkanCommandBuffer->presentDatas[j];
10504
10505 presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
10506 presentInfo.pNext = NULL;
10507 presentInfo.pWaitSemaphores =
10508 &presentData->windowData->renderFinishedSemaphore[presentData->windowData->frameCounter];
10509 presentInfo.waitSemaphoreCount = 1;
10510 presentInfo.pSwapchains = &presentData->windowData->swapchain;
10511 presentInfo.swapchainCount = 1;
10512 presentInfo.pImageIndices = &presentData->swapchainImageIndex;
10513 presentInfo.pResults = NULL;
10514
10515 presentResult = renderer->vkQueuePresentKHR(
10516 renderer->unifiedQueue,
10517 &presentInfo);
10518
10519 if (presentResult == VK_SUCCESS || presentResult == VK_SUBOPTIMAL_KHR || presentResult == VK_ERROR_OUT_OF_DATE_KHR) {
10520 // If presenting, the swapchain is using the in-flight fence
10521 presentData->windowData->inFlightFences[presentData->windowData->frameCounter] = (SDL_GPUFence*)vulkanCommandBuffer->inFlightFence;
10522 (void)SDL_AtomicIncRef(&vulkanCommandBuffer->inFlightFence->referenceCount);
10523
10524 if (presentResult == VK_SUBOPTIMAL_KHR || presentResult == VK_ERROR_OUT_OF_DATE_KHR) {
10525 presentData->windowData->needsSwapchainRecreate = true;
10526 }
10527 } else {
10528 if (presentResult != VK_SUCCESS) {
10529 VULKAN_INTERNAL_ReleaseCommandBuffer(vulkanCommandBuffer);
10530 SDL_UnlockMutex(renderer->submitLock);
10531 }
10532
10533 CHECK_VULKAN_ERROR_AND_RETURN(presentResult, vkQueuePresentKHR, false);
10534 }
10535
10536 presentData->windowData->frameCounter =
10537 (presentData->windowData->frameCounter + 1) % renderer->allowedFramesInFlight;
10538 }
10539
10540 // Check if we can perform any cleanups
10541
10542 for (Sint32 i = renderer->submittedCommandBufferCount - 1; i >= 0; i -= 1) {
10543 vulkanResult = renderer->vkGetFenceStatus(
10544 renderer->logicalDevice,
10545 renderer->submittedCommandBuffers[i]->inFlightFence->fence);
10546
10547 if (vulkanResult == VK_SUCCESS) {
10548 VULKAN_INTERNAL_CleanCommandBuffer(
10549 renderer,
10550 renderer->submittedCommandBuffers[i],
10551 false);
10552
10553 commandBufferCleaned = 1;
10554 }
10555 }
10556
10557 if (commandBufferCleaned) {
10558 SDL_LockMutex(renderer->allocatorLock);
10559
10560 for (Uint32 i = 0; i < VK_MAX_MEMORY_TYPES; i += 1) {
10561 allocator = &renderer->memoryAllocator->subAllocators[i];
10562
10563 for (Sint32 j = allocator->allocationCount - 1; j >= 0; j -= 1) {
10564 if (allocator->allocations[j]->usedRegionCount == 0) {
10565 VULKAN_INTERNAL_DeallocateMemory(
10566 renderer,
10567 allocator,
10568 j);
10569 }
10570 }
10571 }
10572
10573 SDL_UnlockMutex(renderer->allocatorLock);
10574 }
10575
10576 // Check pending destroys
10577 VULKAN_INTERNAL_PerformPendingDestroys(renderer);
10578
10579 // Defrag!
10580 if (
10581 presenting &&
10582 renderer->allocationsToDefragCount > 0 &&
10583 !renderer->defragInProgress) {
10584 result = VULKAN_INTERNAL_DefragmentMemory(renderer);
10585 }
10586
10587 // Mark command buffer as submitted
10588 // This must happen after defrag, because it will try to acquire new command buffers.
10589 VULKAN_INTERNAL_ReleaseCommandBuffer(vulkanCommandBuffer);
10590
10591 SDL_UnlockMutex(renderer->submitLock);
10592
10593 return result;
10594}
10595
10596static bool VULKAN_Cancel(
10597 SDL_GPUCommandBuffer *commandBuffer)
10598{
10599 VulkanRenderer *renderer;
10600 VulkanCommandBuffer *vulkanCommandBuffer;
10601 VkResult result;
10602
10603 vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
10604 renderer = vulkanCommandBuffer->renderer;
10605
10606 result = renderer->vkResetCommandBuffer(
10607 vulkanCommandBuffer->commandBuffer,
10608 VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT);
10609 CHECK_VULKAN_ERROR_AND_RETURN(result, vkResetCommandBuffer, false);
10610
10611 vulkanCommandBuffer->autoReleaseFence = false;
10612 SDL_LockMutex(renderer->submitLock);
10613 VULKAN_INTERNAL_CleanCommandBuffer(renderer, vulkanCommandBuffer, true);
10614 SDL_UnlockMutex(renderer->submitLock);
10615
10616 return true;
10617}
10618
10619static bool VULKAN_INTERNAL_DefragmentMemory(
10620 VulkanRenderer *renderer)
10621{
10622 VulkanMemoryAllocation *allocation;
10623 VulkanMemoryUsedRegion *currentRegion;
10624 VulkanBuffer *newBuffer;
10625 VulkanTexture *newTexture;
10626 VkBufferCopy bufferCopy;
10627 VkImageCopy imageCopy;
10628 VulkanCommandBuffer *commandBuffer;
10629 VulkanTextureSubresource *srcSubresource;
10630 VulkanTextureSubresource *dstSubresource;
10631 Uint32 i, subresourceIndex;
10632
10633 renderer->defragInProgress = 1;
10634
10635 commandBuffer = (VulkanCommandBuffer *)VULKAN_AcquireCommandBuffer((SDL_GPURenderer *)renderer);
10636 if (commandBuffer == NULL) {
10637 return false;
10638 }
10639 commandBuffer->isDefrag = 1;
10640
10641 SDL_LockMutex(renderer->allocatorLock);
10642
10643 allocation = renderer->allocationsToDefrag[renderer->allocationsToDefragCount - 1];
10644 renderer->allocationsToDefragCount -= 1;
10645
10646 /* For each used region in the allocation
10647 * create a new resource, copy the data
10648 * and re-point the resource containers
10649 */
10650 for (i = 0; i < allocation->usedRegionCount; i += 1) {
10651 currentRegion = allocation->usedRegions[i];
10652
10653 if (currentRegion->isBuffer && !currentRegion->vulkanBuffer->markedForDestroy) {
10654 currentRegion->vulkanBuffer->usage |= VK_BUFFER_USAGE_TRANSFER_DST_BIT;
10655
10656 newBuffer = VULKAN_INTERNAL_CreateBuffer(
10657 renderer,
10658 currentRegion->vulkanBuffer->size,
10659 currentRegion->vulkanBuffer->usage,
10660 currentRegion->vulkanBuffer->type,
10661 false,
10662 currentRegion->vulkanBuffer->container != NULL ? currentRegion->vulkanBuffer->container->debugName : NULL);
10663
10664 if (newBuffer == NULL) {
10665 SDL_UnlockMutex(renderer->allocatorLock);
10666 return false;
10667 }
10668
10669 // Copy buffer contents if necessary
10670 if (
10671 currentRegion->vulkanBuffer->type == VULKAN_BUFFER_TYPE_GPU && currentRegion->vulkanBuffer->transitioned) {
10672 VULKAN_INTERNAL_BufferTransitionFromDefaultUsage(
10673 renderer,
10674 commandBuffer,
10675 VULKAN_BUFFER_USAGE_MODE_COPY_SOURCE,
10676 currentRegion->vulkanBuffer);
10677
10678 VULKAN_INTERNAL_BufferTransitionFromDefaultUsage(
10679 renderer,
10680 commandBuffer,
10681 VULKAN_BUFFER_USAGE_MODE_COPY_DESTINATION,
10682 newBuffer);
10683
10684 bufferCopy.srcOffset = 0;
10685 bufferCopy.dstOffset = 0;
10686 bufferCopy.size = currentRegion->resourceSize;
10687
10688 renderer->vkCmdCopyBuffer(
10689 commandBuffer->commandBuffer,
10690 currentRegion->vulkanBuffer->buffer,
10691 newBuffer->buffer,
10692 1,
10693 &bufferCopy);
10694
10695 VULKAN_INTERNAL_BufferTransitionToDefaultUsage(
10696 renderer,
10697 commandBuffer,
10698 VULKAN_BUFFER_USAGE_MODE_COPY_DESTINATION,
10699 newBuffer);
10700
10701 VULKAN_INTERNAL_TrackBuffer(commandBuffer, currentRegion->vulkanBuffer);
10702 VULKAN_INTERNAL_TrackBuffer(commandBuffer, newBuffer);
10703 }
10704
10705 // re-point original container to new buffer
10706 newBuffer->container = currentRegion->vulkanBuffer->container;
10707 newBuffer->containerIndex = currentRegion->vulkanBuffer->containerIndex;
10708 if (newBuffer->type == VULKAN_BUFFER_TYPE_UNIFORM) {
10709 currentRegion->vulkanBuffer->uniformBufferForDefrag->buffer = newBuffer;
10710 } else {
10711 newBuffer->container->buffers[newBuffer->containerIndex] = newBuffer;
10712 if (newBuffer->container->activeBuffer == currentRegion->vulkanBuffer) {
10713 newBuffer->container->activeBuffer = newBuffer;
10714 }
10715 }
10716
10717 if (currentRegion->vulkanBuffer->uniformBufferForDefrag) {
10718 newBuffer->uniformBufferForDefrag = currentRegion->vulkanBuffer->uniformBufferForDefrag;
10719 }
10720
10721 VULKAN_INTERNAL_ReleaseBuffer(renderer, currentRegion->vulkanBuffer);
10722 } else if (!currentRegion->isBuffer && !currentRegion->vulkanTexture->markedForDestroy) {
10723 newTexture = VULKAN_INTERNAL_CreateTexture(
10724 renderer,
10725 &currentRegion->vulkanTexture->container->header.info);
10726
10727 if (newTexture == NULL) {
10728 SDL_UnlockMutex(renderer->allocatorLock);
10729 return false;
10730 }
10731
10732 SDL_GPUTextureCreateInfo info = currentRegion->vulkanTexture->container->header.info;
10733 for (subresourceIndex = 0; subresourceIndex < currentRegion->vulkanTexture->subresourceCount; subresourceIndex += 1) {
10734 // copy subresource if necessary
10735 srcSubresource = &currentRegion->vulkanTexture->subresources[subresourceIndex];
10736 dstSubresource = &newTexture->subresources[subresourceIndex];
10737
10738 VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
10739 renderer,
10740 commandBuffer,
10741 VULKAN_TEXTURE_USAGE_MODE_COPY_SOURCE,
10742 srcSubresource);
10743
10744 VULKAN_INTERNAL_TextureSubresourceTransitionFromDefaultUsage(
10745 renderer,
10746 commandBuffer,
10747 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION,
10748 dstSubresource);
10749
10750 imageCopy.srcOffset.x = 0;
10751 imageCopy.srcOffset.y = 0;
10752 imageCopy.srcOffset.z = 0;
10753 imageCopy.srcSubresource.aspectMask = srcSubresource->parent->aspectFlags;
10754 imageCopy.srcSubresource.baseArrayLayer = srcSubresource->layer;
10755 imageCopy.srcSubresource.layerCount = 1;
10756 imageCopy.srcSubresource.mipLevel = srcSubresource->level;
10757 imageCopy.extent.width = SDL_max(1, info.width >> srcSubresource->level);
10758 imageCopy.extent.height = SDL_max(1, info.height >> srcSubresource->level);
10759 imageCopy.extent.depth = info.type == SDL_GPU_TEXTURETYPE_3D ? info.layer_count_or_depth : 1;
10760 imageCopy.dstOffset.x = 0;
10761 imageCopy.dstOffset.y = 0;
10762 imageCopy.dstOffset.z = 0;
10763 imageCopy.dstSubresource.aspectMask = dstSubresource->parent->aspectFlags;
10764 imageCopy.dstSubresource.baseArrayLayer = dstSubresource->layer;
10765 imageCopy.dstSubresource.layerCount = 1;
10766 imageCopy.dstSubresource.mipLevel = dstSubresource->level;
10767
10768 renderer->vkCmdCopyImage(
10769 commandBuffer->commandBuffer,
10770 currentRegion->vulkanTexture->image,
10771 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
10772 newTexture->image,
10773 VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
10774 1,
10775 &imageCopy);
10776
10777 VULKAN_INTERNAL_TextureSubresourceTransitionToDefaultUsage(
10778 renderer,
10779 commandBuffer,
10780 VULKAN_TEXTURE_USAGE_MODE_COPY_DESTINATION,
10781 dstSubresource);
10782
10783 VULKAN_INTERNAL_TrackTexture(commandBuffer, srcSubresource->parent);
10784 VULKAN_INTERNAL_TrackTexture(commandBuffer, dstSubresource->parent);
10785 }
10786
10787 // re-point original container to new texture
10788 newTexture->container = currentRegion->vulkanTexture->container;
10789 newTexture->containerIndex = currentRegion->vulkanTexture->containerIndex;
10790 newTexture->container->textures[currentRegion->vulkanTexture->containerIndex] = newTexture;
10791 if (currentRegion->vulkanTexture == currentRegion->vulkanTexture->container->activeTexture) {
10792 newTexture->container->activeTexture = newTexture;
10793 }
10794
10795 VULKAN_INTERNAL_ReleaseTexture(renderer, currentRegion->vulkanTexture);
10796 }
10797 }
10798
10799 SDL_UnlockMutex(renderer->allocatorLock);
10800
10801 return VULKAN_Submit(
10802 (SDL_GPUCommandBuffer *)commandBuffer);
10803}
10804
10805// Format Info
10806
10807static bool VULKAN_SupportsTextureFormat(
10808 SDL_GPURenderer *driverData,
10809 SDL_GPUTextureFormat format,
10810 SDL_GPUTextureType type,
10811 SDL_GPUTextureUsageFlags usage)
10812{
10813 VulkanRenderer *renderer = (VulkanRenderer *)driverData;
10814 VkFormat vulkanFormat = SDLToVK_TextureFormat[format];
10815 VkImageUsageFlags vulkanUsage = 0;
10816 VkImageCreateFlags createFlags = 0;
10817 VkImageFormatProperties properties;
10818 VkResult vulkanResult;
10819
10820 if (usage & SDL_GPU_TEXTUREUSAGE_SAMPLER) {
10821 vulkanUsage |= VK_IMAGE_USAGE_SAMPLED_BIT;
10822 }
10823 if (usage & SDL_GPU_TEXTUREUSAGE_COLOR_TARGET) {
10824 vulkanUsage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
10825 }
10826 if (usage & SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET) {
10827 vulkanUsage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
10828 }
10829 if (usage & (SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ |
10830 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ |
10831 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE |
10832 SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE)) {
10833 vulkanUsage |= VK_IMAGE_USAGE_STORAGE_BIT;
10834 }
10835
10836 if (type == SDL_GPU_TEXTURETYPE_CUBE || type == SDL_GPU_TEXTURETYPE_CUBE_ARRAY) {
10837 createFlags = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
10838 }
10839
10840 vulkanResult = renderer->vkGetPhysicalDeviceImageFormatProperties(
10841 renderer->physicalDevice,
10842 vulkanFormat,
10843 (type == SDL_GPU_TEXTURETYPE_3D) ? VK_IMAGE_TYPE_3D : VK_IMAGE_TYPE_2D,
10844 VK_IMAGE_TILING_OPTIMAL,
10845 vulkanUsage,
10846 createFlags,
10847 &properties);
10848
10849 return vulkanResult == VK_SUCCESS;
10850}
10851
10852// Device instantiation
10853
10854static inline Uint8 CheckDeviceExtensions(
10855 VkExtensionProperties *extensions,
10856 Uint32 numExtensions,
10857 VulkanExtensions *supports)
10858{
10859 Uint32 i;
10860
10861 SDL_memset(supports, '\0', sizeof(VulkanExtensions));
10862 for (i = 0; i < numExtensions; i += 1) {
10863 const char *name = extensions[i].extensionName;
10864#define CHECK(ext) \
10865 if (SDL_strcmp(name, "VK_" #ext) == 0) { \
10866 supports->ext = 1; \
10867 }
10868 CHECK(KHR_swapchain)
10869 else CHECK(KHR_maintenance1) else CHECK(KHR_driver_properties) else CHECK(KHR_portability_subset) else CHECK(EXT_texture_compression_astc_hdr)
10870#undef CHECK
10871 }
10872
10873 return (supports->KHR_swapchain &&
10874 supports->KHR_maintenance1);
10875}
10876
10877static inline Uint32 GetDeviceExtensionCount(VulkanExtensions *supports)
10878{
10879 return (
10880 supports->KHR_swapchain +
10881 supports->KHR_maintenance1 +
10882 supports->KHR_driver_properties +
10883 supports->KHR_portability_subset +
10884 supports->EXT_texture_compression_astc_hdr);
10885}
10886
10887static inline void CreateDeviceExtensionArray(
10888 VulkanExtensions *supports,
10889 const char **extensions)
10890{
10891 Uint8 cur = 0;
10892#define CHECK(ext) \
10893 if (supports->ext) { \
10894 extensions[cur++] = "VK_" #ext; \
10895 }
10896 CHECK(KHR_swapchain)
10897 CHECK(KHR_maintenance1)
10898 CHECK(KHR_driver_properties)
10899 CHECK(KHR_portability_subset)
10900 CHECK(EXT_texture_compression_astc_hdr)
10901#undef CHECK
10902}
10903
10904static inline Uint8 SupportsInstanceExtension(
10905 const char *ext,
10906 VkExtensionProperties *availableExtensions,
10907 Uint32 numAvailableExtensions)
10908{
10909 Uint32 i;
10910 for (i = 0; i < numAvailableExtensions; i += 1) {
10911 if (SDL_strcmp(ext, availableExtensions[i].extensionName) == 0) {
10912 return 1;
10913 }
10914 }
10915 return 0;
10916}
10917
10918static Uint8 VULKAN_INTERNAL_CheckInstanceExtensions(
10919 const char **requiredExtensions,
10920 Uint32 requiredExtensionsLength,
10921 bool *supportsDebugUtils,
10922 bool *supportsColorspace)
10923{
10924 Uint32 extensionCount, i;
10925 VkExtensionProperties *availableExtensions;
10926 Uint8 allExtensionsSupported = 1;
10927
10928 vkEnumerateInstanceExtensionProperties(
10929 NULL,
10930 &extensionCount,
10931 NULL);
10932 availableExtensions = SDL_malloc(
10933 extensionCount * sizeof(VkExtensionProperties));
10934 vkEnumerateInstanceExtensionProperties(
10935 NULL,
10936 &extensionCount,
10937 availableExtensions);
10938
10939 for (i = 0; i < requiredExtensionsLength; i += 1) {
10940 if (!SupportsInstanceExtension(
10941 requiredExtensions[i],
10942 availableExtensions,
10943 extensionCount)) {
10944 allExtensionsSupported = 0;
10945 break;
10946 }
10947 }
10948
10949 // This is optional, but nice to have!
10950 *supportsDebugUtils = SupportsInstanceExtension(
10951 VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
10952 availableExtensions,
10953 extensionCount);
10954
10955 // Also optional and nice to have!
10956 *supportsColorspace = SupportsInstanceExtension(
10957 VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME,
10958 availableExtensions,
10959 extensionCount);
10960
10961 SDL_free(availableExtensions);
10962 return allExtensionsSupported;
10963}
10964
10965static Uint8 VULKAN_INTERNAL_CheckDeviceExtensions(
10966 VulkanRenderer *renderer,
10967 VkPhysicalDevice physicalDevice,
10968 VulkanExtensions *physicalDeviceExtensions)
10969{
10970 Uint32 extensionCount;
10971 VkExtensionProperties *availableExtensions;
10972 Uint8 allExtensionsSupported;
10973
10974 renderer->vkEnumerateDeviceExtensionProperties(
10975 physicalDevice,
10976 NULL,
10977 &extensionCount,
10978 NULL);
10979 availableExtensions = (VkExtensionProperties *)SDL_malloc(
10980 extensionCount * sizeof(VkExtensionProperties));
10981 renderer->vkEnumerateDeviceExtensionProperties(
10982 physicalDevice,
10983 NULL,
10984 &extensionCount,
10985 availableExtensions);
10986
10987 allExtensionsSupported = CheckDeviceExtensions(
10988 availableExtensions,
10989 extensionCount,
10990 physicalDeviceExtensions);
10991
10992 SDL_free(availableExtensions);
10993 return allExtensionsSupported;
10994}
10995
10996static Uint8 VULKAN_INTERNAL_CheckValidationLayers(
10997 const char **validationLayers,
10998 Uint32 validationLayersLength)
10999{
11000 Uint32 layerCount;
11001 VkLayerProperties *availableLayers;
11002 Uint32 i, j;
11003 Uint8 layerFound = 0;
11004
11005 vkEnumerateInstanceLayerProperties(&layerCount, NULL);
11006 availableLayers = (VkLayerProperties *)SDL_malloc(
11007 layerCount * sizeof(VkLayerProperties));
11008 vkEnumerateInstanceLayerProperties(&layerCount, availableLayers);
11009
11010 for (i = 0; i < validationLayersLength; i += 1) {
11011 layerFound = 0;
11012
11013 for (j = 0; j < layerCount; j += 1) {
11014 if (SDL_strcmp(validationLayers[i], availableLayers[j].layerName) == 0) {
11015 layerFound = 1;
11016 break;
11017 }
11018 }
11019
11020 if (!layerFound) {
11021 break;
11022 }
11023 }
11024
11025 SDL_free(availableLayers);
11026 return layerFound;
11027}
11028
11029static Uint8 VULKAN_INTERNAL_CreateInstance(VulkanRenderer *renderer)
11030{
11031 VkResult vulkanResult;
11032 VkApplicationInfo appInfo;
11033 VkInstanceCreateFlags createFlags;
11034 const char *const *originalInstanceExtensionNames;
11035 const char **instanceExtensionNames;
11036 Uint32 instanceExtensionCount;
11037 VkInstanceCreateInfo createInfo;
11038 static const char *layerNames[] = { "VK_LAYER_KHRONOS_validation" };
11039
11040 appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
11041 appInfo.pNext = NULL;
11042 appInfo.pApplicationName = NULL;
11043 appInfo.applicationVersion = 0;
11044 appInfo.pEngineName = "SDLGPU";
11045 appInfo.engineVersion = SDL_VERSION;
11046 appInfo.apiVersion = VK_MAKE_VERSION(1, 0, 0);
11047
11048 createFlags = 0;
11049
11050 originalInstanceExtensionNames = SDL_Vulkan_GetInstanceExtensions(&instanceExtensionCount);
11051 if (!originalInstanceExtensionNames) {
11052 SDL_LogError(
11053 SDL_LOG_CATEGORY_GPU,
11054 "SDL_Vulkan_GetInstanceExtensions(): getExtensionCount: %s",
11055 SDL_GetError());
11056
11057 return 0;
11058 }
11059
11060 /* Extra space for the following extensions:
11061 * VK_KHR_get_physical_device_properties2
11062 * VK_EXT_swapchain_colorspace
11063 * VK_EXT_debug_utils
11064 * VK_KHR_portability_enumeration
11065 */
11066 instanceExtensionNames = SDL_stack_alloc(
11067 const char *,
11068 instanceExtensionCount + 4);
11069 SDL_memcpy((void *)instanceExtensionNames, originalInstanceExtensionNames, instanceExtensionCount * sizeof(const char *));
11070
11071 // Core since 1.1
11072 instanceExtensionNames[instanceExtensionCount++] =
11073 VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME;
11074
11075#ifdef SDL_PLATFORM_APPLE
11076 instanceExtensionNames[instanceExtensionCount++] =
11077 VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME;
11078 createFlags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
11079#endif
11080
11081 if (!VULKAN_INTERNAL_CheckInstanceExtensions(
11082 instanceExtensionNames,
11083 instanceExtensionCount,
11084 &renderer->supportsDebugUtils,
11085 &renderer->supportsColorspace)) {
11086 SDL_stack_free((char *)instanceExtensionNames);
11087 SET_STRING_ERROR_AND_RETURN("Required Vulkan instance extensions not supported", false);
11088 }
11089
11090 if (renderer->supportsDebugUtils) {
11091 // Append the debug extension
11092 instanceExtensionNames[instanceExtensionCount++] =
11093 VK_EXT_DEBUG_UTILS_EXTENSION_NAME;
11094 } else {
11095 SDL_LogWarn(
11096 SDL_LOG_CATEGORY_GPU,
11097 "%s is not supported!",
11098 VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
11099 }
11100
11101 if (renderer->supportsColorspace) {
11102 // Append colorspace extension
11103 instanceExtensionNames[instanceExtensionCount++] =
11104 VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME;
11105 }
11106
11107 createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
11108 createInfo.pNext = NULL;
11109 createInfo.flags = createFlags;
11110 createInfo.pApplicationInfo = &appInfo;
11111 createInfo.ppEnabledLayerNames = layerNames;
11112 createInfo.enabledExtensionCount = instanceExtensionCount;
11113 createInfo.ppEnabledExtensionNames = instanceExtensionNames;
11114 if (renderer->debugMode) {
11115 createInfo.enabledLayerCount = SDL_arraysize(layerNames);
11116 if (!VULKAN_INTERNAL_CheckValidationLayers(
11117 layerNames,
11118 createInfo.enabledLayerCount)) {
11119 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Validation layers not found, continuing without validation");
11120 createInfo.enabledLayerCount = 0;
11121 } else {
11122 SDL_LogInfo(SDL_LOG_CATEGORY_GPU, "Validation layers enabled, expect debug level performance!");
11123 }
11124 } else {
11125 createInfo.enabledLayerCount = 0;
11126 }
11127
11128 vulkanResult = vkCreateInstance(&createInfo, NULL, &renderer->instance);
11129 SDL_stack_free((char *)instanceExtensionNames);
11130
11131 if (vulkanResult != VK_SUCCESS) {
11132 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateInstance, 0);
11133 }
11134
11135 return 1;
11136}
11137
11138static Uint8 VULKAN_INTERNAL_IsDeviceSuitable(
11139 VulkanRenderer *renderer,
11140 VkPhysicalDevice physicalDevice,
11141 VulkanExtensions *physicalDeviceExtensions,
11142 Uint32 *queueFamilyIndex,
11143 Uint8 *deviceRank)
11144{
11145 Uint32 queueFamilyCount, queueFamilyRank, queueFamilyBest;
11146 VkQueueFamilyProperties *queueProps;
11147 bool supportsPresent;
11148 VkPhysicalDeviceProperties deviceProperties;
11149 VkPhysicalDeviceFeatures deviceFeatures;
11150 Uint32 i;
11151
11152 const Uint8 *devicePriority = renderer->preferLowPower ? DEVICE_PRIORITY_LOWPOWER : DEVICE_PRIORITY_HIGHPERFORMANCE;
11153
11154 /* Get the device rank before doing any checks, in case one fails.
11155 * Note: If no dedicated device exists, one that supports our features
11156 * would be fine
11157 */
11158 renderer->vkGetPhysicalDeviceProperties(
11159 physicalDevice,
11160 &deviceProperties);
11161 if (*deviceRank < devicePriority[deviceProperties.deviceType]) {
11162 /* This device outranks the best device we've found so far!
11163 * This includes a dedicated GPU that has less features than an
11164 * integrated GPU, because this is a freak case that is almost
11165 * never intentionally desired by the end user
11166 */
11167 *deviceRank = devicePriority[deviceProperties.deviceType];
11168 } else if (*deviceRank > devicePriority[deviceProperties.deviceType]) {
11169 /* Device is outranked by a previous device, don't even try to
11170 * run a query and reset the rank to avoid overwrites
11171 */
11172 *deviceRank = 0;
11173 return 0;
11174 }
11175
11176 renderer->vkGetPhysicalDeviceFeatures(
11177 physicalDevice,
11178 &deviceFeatures);
11179 if (!deviceFeatures.independentBlend ||
11180 !deviceFeatures.imageCubeArray ||
11181 !deviceFeatures.depthClamp ||
11182 !deviceFeatures.shaderClipDistance ||
11183 !deviceFeatures.drawIndirectFirstInstance) {
11184 return 0;
11185 }
11186
11187 if (!VULKAN_INTERNAL_CheckDeviceExtensions(
11188 renderer,
11189 physicalDevice,
11190 physicalDeviceExtensions)) {
11191 return 0;
11192 }
11193
11194 renderer->vkGetPhysicalDeviceQueueFamilyProperties(
11195 physicalDevice,
11196 &queueFamilyCount,
11197 NULL);
11198
11199 queueProps = SDL_stack_alloc(
11200 VkQueueFamilyProperties,
11201 queueFamilyCount);
11202 renderer->vkGetPhysicalDeviceQueueFamilyProperties(
11203 physicalDevice,
11204 &queueFamilyCount,
11205 queueProps);
11206
11207 queueFamilyBest = 0;
11208 *queueFamilyIndex = SDL_MAX_UINT32;
11209 for (i = 0; i < queueFamilyCount; i += 1) {
11210 supportsPresent = SDL_Vulkan_GetPresentationSupport(
11211 renderer->instance,
11212 physicalDevice,
11213 i);
11214 if (!supportsPresent ||
11215 !(queueProps[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)) {
11216 // Not a graphics family, ignore.
11217 continue;
11218 }
11219
11220 /* The queue family bitflags are kind of annoying.
11221 *
11222 * We of course need a graphics family, but we ideally want the
11223 * _primary_ graphics family. The spec states that at least one
11224 * graphics family must also be a compute family, so generally
11225 * drivers make that the first one. But hey, maybe something
11226 * genuinely can't do compute or something, and FNA doesn't
11227 * need it, so we'll be open to a non-compute queue family.
11228 *
11229 * Additionally, it's common to see the primary queue family
11230 * have the transfer bit set, which is great! But this is
11231 * actually optional; it's impossible to NOT have transfers in
11232 * graphics/compute but it _is_ possible for a graphics/compute
11233 * family, even the primary one, to just decide not to set the
11234 * bitflag. Admittedly, a driver may want to isolate transfer
11235 * queues to a dedicated family so that queues made solely for
11236 * transfers can have an optimized DMA queue.
11237 *
11238 * That, or the driver author got lazy and decided not to set
11239 * the bit. Looking at you, Android.
11240 *
11241 * -flibit
11242 */
11243 if (queueProps[i].queueFlags & VK_QUEUE_COMPUTE_BIT) {
11244 if (queueProps[i].queueFlags & VK_QUEUE_TRANSFER_BIT) {
11245 // Has all attribs!
11246 queueFamilyRank = 3;
11247 } else {
11248 // Probably has a DMA transfer queue family
11249 queueFamilyRank = 2;
11250 }
11251 } else {
11252 // Just a graphics family, probably has something better
11253 queueFamilyRank = 1;
11254 }
11255 if (queueFamilyRank > queueFamilyBest) {
11256 *queueFamilyIndex = i;
11257 queueFamilyBest = queueFamilyRank;
11258 }
11259 }
11260
11261 SDL_stack_free(queueProps);
11262
11263 if (*queueFamilyIndex == SDL_MAX_UINT32) {
11264 // Somehow no graphics queues existed. Compute-only device?
11265 return 0;
11266 }
11267
11268 // FIXME: Need better structure for checking vs storing swapchain support details
11269 return 1;
11270}
11271
11272static Uint8 VULKAN_INTERNAL_DeterminePhysicalDevice(VulkanRenderer *renderer)
11273{
11274 VkResult vulkanResult;
11275 VkPhysicalDevice *physicalDevices;
11276 VulkanExtensions *physicalDeviceExtensions;
11277 Uint32 i, physicalDeviceCount;
11278 Sint32 suitableIndex;
11279 Uint32 queueFamilyIndex, suitableQueueFamilyIndex;
11280 Uint8 deviceRank, highestRank;
11281
11282 vulkanResult = renderer->vkEnumeratePhysicalDevices(
11283 renderer->instance,
11284 &physicalDeviceCount,
11285 NULL);
11286 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkEnumeratePhysicalDevices, 0);
11287
11288 if (physicalDeviceCount == 0) {
11289 SDL_LogInfo(SDL_LOG_CATEGORY_GPU, "Failed to find any GPUs with Vulkan support");
11290 return 0;
11291 }
11292
11293 physicalDevices = SDL_stack_alloc(VkPhysicalDevice, physicalDeviceCount);
11294 physicalDeviceExtensions = SDL_stack_alloc(VulkanExtensions, physicalDeviceCount);
11295
11296 vulkanResult = renderer->vkEnumeratePhysicalDevices(
11297 renderer->instance,
11298 &physicalDeviceCount,
11299 physicalDevices);
11300
11301 /* This should be impossible to hit, but from what I can tell this can
11302 * be triggered not because the array is too small, but because there
11303 * were drivers that turned out to be bogus, so this is the loader's way
11304 * of telling us that the list is now smaller than expected :shrug:
11305 */
11306 if (vulkanResult == VK_INCOMPLETE) {
11307 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "vkEnumeratePhysicalDevices returned VK_INCOMPLETE, will keep trying anyway...");
11308 vulkanResult = VK_SUCCESS;
11309 }
11310
11311 if (vulkanResult != VK_SUCCESS) {
11312 SDL_LogWarn(
11313 SDL_LOG_CATEGORY_GPU,
11314 "vkEnumeratePhysicalDevices failed: %s",
11315 VkErrorMessages(vulkanResult));
11316 SDL_stack_free(physicalDevices);
11317 SDL_stack_free(physicalDeviceExtensions);
11318 return 0;
11319 }
11320
11321 // Any suitable device will do, but we'd like the best
11322 suitableIndex = -1;
11323 suitableQueueFamilyIndex = 0;
11324 highestRank = 0;
11325 for (i = 0; i < physicalDeviceCount; i += 1) {
11326 deviceRank = highestRank;
11327 if (VULKAN_INTERNAL_IsDeviceSuitable(
11328 renderer,
11329 physicalDevices[i],
11330 &physicalDeviceExtensions[i],
11331 &queueFamilyIndex,
11332 &deviceRank)) {
11333 /* Use this for rendering.
11334 * Note that this may override a previous device that
11335 * supports rendering, but shares the same device rank.
11336 */
11337 suitableIndex = i;
11338 suitableQueueFamilyIndex = queueFamilyIndex;
11339 highestRank = deviceRank;
11340 } else if (deviceRank > highestRank) {
11341 /* In this case, we found a... "realer?" GPU,
11342 * but it doesn't actually support our Vulkan.
11343 * We should disqualify all devices below as a
11344 * result, because if we don't we end up
11345 * ignoring real hardware and risk using
11346 * something like LLVMpipe instead!
11347 * -flibit
11348 */
11349 suitableIndex = -1;
11350 highestRank = deviceRank;
11351 }
11352 }
11353
11354 if (suitableIndex != -1) {
11355 renderer->supports = physicalDeviceExtensions[suitableIndex];
11356 renderer->physicalDevice = physicalDevices[suitableIndex];
11357 renderer->queueFamilyIndex = suitableQueueFamilyIndex;
11358 } else {
11359 SDL_stack_free(physicalDevices);
11360 SDL_stack_free(physicalDeviceExtensions);
11361 return 0;
11362 }
11363
11364 renderer->physicalDeviceProperties.sType =
11365 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2;
11366 if (renderer->supports.KHR_driver_properties) {
11367 renderer->physicalDeviceDriverProperties.sType =
11368 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR;
11369 renderer->physicalDeviceDriverProperties.pNext = NULL;
11370
11371 renderer->physicalDeviceProperties.pNext =
11372 &renderer->physicalDeviceDriverProperties;
11373
11374 renderer->vkGetPhysicalDeviceProperties2KHR(
11375 renderer->physicalDevice,
11376 &renderer->physicalDeviceProperties);
11377 } else {
11378 renderer->physicalDeviceProperties.pNext = NULL;
11379
11380 renderer->vkGetPhysicalDeviceProperties(
11381 renderer->physicalDevice,
11382 &renderer->physicalDeviceProperties.properties);
11383 }
11384
11385 renderer->vkGetPhysicalDeviceMemoryProperties(
11386 renderer->physicalDevice,
11387 &renderer->memoryProperties);
11388
11389 SDL_stack_free(physicalDevices);
11390 SDL_stack_free(physicalDeviceExtensions);
11391 return 1;
11392}
11393
11394static Uint8 VULKAN_INTERNAL_CreateLogicalDevice(
11395 VulkanRenderer *renderer)
11396{
11397 VkResult vulkanResult;
11398 VkDeviceCreateInfo deviceCreateInfo;
11399 VkPhysicalDeviceFeatures desiredDeviceFeatures;
11400 VkPhysicalDeviceFeatures haveDeviceFeatures;
11401 VkPhysicalDevicePortabilitySubsetFeaturesKHR portabilityFeatures;
11402 const char **deviceExtensions;
11403
11404 VkDeviceQueueCreateInfo queueCreateInfo;
11405 float queuePriority = 1.0f;
11406
11407 queueCreateInfo.sType =
11408 VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
11409 queueCreateInfo.pNext = NULL;
11410 queueCreateInfo.flags = 0;
11411 queueCreateInfo.queueFamilyIndex = renderer->queueFamilyIndex;
11412 queueCreateInfo.queueCount = 1;
11413 queueCreateInfo.pQueuePriorities = &queuePriority;
11414
11415 // check feature support
11416
11417 renderer->vkGetPhysicalDeviceFeatures(
11418 renderer->physicalDevice,
11419 &haveDeviceFeatures);
11420
11421 // specifying used device features
11422
11423 SDL_zero(desiredDeviceFeatures);
11424 desiredDeviceFeatures.independentBlend = VK_TRUE;
11425 desiredDeviceFeatures.samplerAnisotropy = VK_TRUE;
11426 desiredDeviceFeatures.imageCubeArray = VK_TRUE;
11427 desiredDeviceFeatures.depthClamp = VK_TRUE;
11428 desiredDeviceFeatures.shaderClipDistance = VK_TRUE;
11429 desiredDeviceFeatures.drawIndirectFirstInstance = VK_TRUE;
11430
11431 if (haveDeviceFeatures.fillModeNonSolid) {
11432 desiredDeviceFeatures.fillModeNonSolid = VK_TRUE;
11433 renderer->supportsFillModeNonSolid = true;
11434 }
11435
11436 if (haveDeviceFeatures.multiDrawIndirect) {
11437 desiredDeviceFeatures.multiDrawIndirect = VK_TRUE;
11438 renderer->supportsMultiDrawIndirect = true;
11439 }
11440
11441 // creating the logical device
11442
11443 deviceCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
11444 if (renderer->supports.KHR_portability_subset) {
11445 portabilityFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR;
11446 portabilityFeatures.pNext = NULL;
11447 portabilityFeatures.constantAlphaColorBlendFactors = VK_FALSE;
11448 portabilityFeatures.events = VK_FALSE;
11449 portabilityFeatures.imageViewFormatReinterpretation = VK_FALSE;
11450 portabilityFeatures.imageViewFormatSwizzle = VK_TRUE;
11451 portabilityFeatures.imageView2DOn3DImage = VK_FALSE;
11452 portabilityFeatures.multisampleArrayImage = VK_FALSE;
11453 portabilityFeatures.mutableComparisonSamplers = VK_FALSE;
11454 portabilityFeatures.pointPolygons = VK_FALSE;
11455 portabilityFeatures.samplerMipLodBias = VK_FALSE; // Technically should be true, but eh
11456 portabilityFeatures.separateStencilMaskRef = VK_FALSE;
11457 portabilityFeatures.shaderSampleRateInterpolationFunctions = VK_FALSE;
11458 portabilityFeatures.tessellationIsolines = VK_FALSE;
11459 portabilityFeatures.tessellationPointMode = VK_FALSE;
11460 portabilityFeatures.triangleFans = VK_FALSE;
11461 portabilityFeatures.vertexAttributeAccessBeyondStride = VK_FALSE;
11462 deviceCreateInfo.pNext = &portabilityFeatures;
11463 } else {
11464 deviceCreateInfo.pNext = NULL;
11465 }
11466 deviceCreateInfo.flags = 0;
11467 deviceCreateInfo.queueCreateInfoCount = 1;
11468 deviceCreateInfo.pQueueCreateInfos = &queueCreateInfo;
11469 deviceCreateInfo.enabledLayerCount = 0;
11470 deviceCreateInfo.ppEnabledLayerNames = NULL;
11471 deviceCreateInfo.enabledExtensionCount = GetDeviceExtensionCount(
11472 &renderer->supports);
11473 deviceExtensions = SDL_stack_alloc(
11474 const char *,
11475 deviceCreateInfo.enabledExtensionCount);
11476 CreateDeviceExtensionArray(&renderer->supports, deviceExtensions);
11477 deviceCreateInfo.ppEnabledExtensionNames = deviceExtensions;
11478 deviceCreateInfo.pEnabledFeatures = &desiredDeviceFeatures;
11479
11480 vulkanResult = renderer->vkCreateDevice(
11481 renderer->physicalDevice,
11482 &deviceCreateInfo,
11483 NULL,
11484 &renderer->logicalDevice);
11485 SDL_stack_free((void *)deviceExtensions);
11486 CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateDevice, 0);
11487
11488 // Load vkDevice entry points
11489
11490#define VULKAN_DEVICE_FUNCTION(func) \
11491 renderer->func = (PFN_##func) \
11492 renderer->vkGetDeviceProcAddr( \
11493 renderer->logicalDevice, \
11494 #func);
11495#include "SDL_gpu_vulkan_vkfuncs.h"
11496
11497 renderer->vkGetDeviceQueue(
11498 renderer->logicalDevice,
11499 renderer->queueFamilyIndex,
11500 0,
11501 &renderer->unifiedQueue);
11502
11503 return 1;
11504}
11505
11506static void VULKAN_INTERNAL_LoadEntryPoints(void)
11507{
11508 // Required for MoltenVK support
11509 SDL_setenv_unsafe("MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE", "1", 1);
11510
11511 // Load Vulkan entry points
11512 if (!SDL_Vulkan_LoadLibrary(NULL)) {
11513 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Vulkan: SDL_Vulkan_LoadLibrary failed!");
11514 return;
11515 }
11516
11517#ifdef HAVE_GCC_DIAGNOSTIC_PRAGMA
11518#pragma GCC diagnostic push
11519#pragma GCC diagnostic ignored "-Wpedantic"
11520#endif
11521 vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)SDL_Vulkan_GetVkGetInstanceProcAddr();
11522#ifdef HAVE_GCC_DIAGNOSTIC_PRAGMA
11523#pragma GCC diagnostic pop
11524#endif
11525 if (vkGetInstanceProcAddr == NULL) {
11526 SDL_LogWarn(
11527 SDL_LOG_CATEGORY_GPU,
11528 "SDL_Vulkan_GetVkGetInstanceProcAddr(): %s",
11529 SDL_GetError());
11530 return;
11531 }
11532
11533#define VULKAN_GLOBAL_FUNCTION(name) \
11534 name = (PFN_##name)vkGetInstanceProcAddr(VK_NULL_HANDLE, #name); \
11535 if (name == NULL) { \
11536 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "vkGetInstanceProcAddr(VK_NULL_HANDLE, \"" #name "\") failed"); \
11537 return; \
11538 }
11539#include "SDL_gpu_vulkan_vkfuncs.h"
11540}
11541
11542static bool VULKAN_INTERNAL_PrepareVulkan(
11543 VulkanRenderer *renderer)
11544{
11545 VULKAN_INTERNAL_LoadEntryPoints();
11546
11547 if (!VULKAN_INTERNAL_CreateInstance(renderer)) {
11548 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Vulkan: Could not create Vulkan instance");
11549 return false;
11550 }
11551
11552#define VULKAN_INSTANCE_FUNCTION(func) \
11553 renderer->func = (PFN_##func)vkGetInstanceProcAddr(renderer->instance, #func);
11554#include "SDL_gpu_vulkan_vkfuncs.h"
11555
11556 if (!VULKAN_INTERNAL_DeterminePhysicalDevice(renderer)) {
11557 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Vulkan: Failed to determine a suitable physical device");
11558 return false;
11559 }
11560 return true;
11561}
11562
11563static bool VULKAN_PrepareDriver(SDL_VideoDevice *_this)
11564{
11565 // Set up dummy VulkanRenderer
11566 VulkanRenderer *renderer;
11567 Uint8 result;
11568
11569 if (_this->Vulkan_CreateSurface == NULL) {
11570 return false;
11571 }
11572
11573 if (!SDL_Vulkan_LoadLibrary(NULL)) {
11574 return false;
11575 }
11576
11577 renderer = (VulkanRenderer *)SDL_malloc(sizeof(VulkanRenderer));
11578 SDL_memset(renderer, '\0', sizeof(VulkanRenderer));
11579
11580 result = VULKAN_INTERNAL_PrepareVulkan(renderer);
11581
11582 if (result) {
11583 renderer->vkDestroyInstance(renderer->instance, NULL);
11584 }
11585 SDL_free(renderer);
11586 SDL_Vulkan_UnloadLibrary();
11587 return result;
11588}
11589
11590static SDL_GPUDevice *VULKAN_CreateDevice(bool debugMode, bool preferLowPower, SDL_PropertiesID props)
11591{
11592 VulkanRenderer *renderer;
11593
11594 SDL_GPUDevice *result;
11595 Uint32 i;
11596
11597 if (!SDL_Vulkan_LoadLibrary(NULL)) {
11598 SDL_assert(!"This should have failed in PrepareDevice first!");
11599 return NULL;
11600 }
11601
11602 renderer = (VulkanRenderer *)SDL_malloc(sizeof(VulkanRenderer));
11603 SDL_memset(renderer, '\0', sizeof(VulkanRenderer));
11604 renderer->debugMode = debugMode;
11605 renderer->preferLowPower = preferLowPower;
11606 renderer->allowedFramesInFlight = 2;
11607
11608 if (!VULKAN_INTERNAL_PrepareVulkan(renderer)) {
11609 SDL_free(renderer);
11610 SDL_Vulkan_UnloadLibrary();
11611 SET_STRING_ERROR_AND_RETURN("Failed to initialize Vulkan!", NULL);
11612 }
11613
11614 SDL_LogInfo(SDL_LOG_CATEGORY_GPU, "SDL_GPU Driver: Vulkan");
11615 SDL_LogInfo(
11616 SDL_LOG_CATEGORY_GPU,
11617 "Vulkan Device: %s",
11618 renderer->physicalDeviceProperties.properties.deviceName);
11619 if (renderer->supports.KHR_driver_properties) {
11620 SDL_LogInfo(
11621 SDL_LOG_CATEGORY_GPU,
11622 "Vulkan Driver: %s %s",
11623 renderer->physicalDeviceDriverProperties.driverName,
11624 renderer->physicalDeviceDriverProperties.driverInfo);
11625 SDL_LogInfo(
11626 SDL_LOG_CATEGORY_GPU,
11627 "Vulkan Conformance: %u.%u.%u",
11628 renderer->physicalDeviceDriverProperties.conformanceVersion.major,
11629 renderer->physicalDeviceDriverProperties.conformanceVersion.minor,
11630 renderer->physicalDeviceDriverProperties.conformanceVersion.patch);
11631 } else {
11632 SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "KHR_driver_properties unsupported! Bother your vendor about this!");
11633 }
11634
11635 if (!VULKAN_INTERNAL_CreateLogicalDevice(
11636 renderer)) {
11637 SDL_free(renderer);
11638 SDL_Vulkan_UnloadLibrary();
11639 SET_STRING_ERROR_AND_RETURN("Failed to create logical device!", NULL);
11640 }
11641
11642 // FIXME: just move this into this function
11643 result = (SDL_GPUDevice *)SDL_malloc(sizeof(SDL_GPUDevice));
11644 ASSIGN_DRIVER(VULKAN)
11645
11646 result->driverData = (SDL_GPURenderer *)renderer;
11647
11648 /*
11649 * Create initial swapchain array
11650 */
11651
11652 renderer->claimedWindowCapacity = 1;
11653 renderer->claimedWindowCount = 0;
11654 renderer->claimedWindows = SDL_malloc(
11655 renderer->claimedWindowCapacity * sizeof(WindowData *));
11656
11657 // Threading
11658
11659 renderer->allocatorLock = SDL_CreateMutex();
11660 renderer->disposeLock = SDL_CreateMutex();
11661 renderer->submitLock = SDL_CreateMutex();
11662 renderer->acquireCommandBufferLock = SDL_CreateMutex();
11663 renderer->acquireUniformBufferLock = SDL_CreateMutex();
11664 renderer->framebufferFetchLock = SDL_CreateMutex();
11665 renderer->windowLock = SDL_CreateMutex();
11666
11667 /*
11668 * Create submitted command buffer list
11669 */
11670
11671 renderer->submittedCommandBufferCapacity = 16;
11672 renderer->submittedCommandBufferCount = 0;
11673 renderer->submittedCommandBuffers = SDL_malloc(sizeof(VulkanCommandBuffer *) * renderer->submittedCommandBufferCapacity);
11674
11675 // Memory Allocator
11676
11677 renderer->memoryAllocator = (VulkanMemoryAllocator *)SDL_malloc(
11678 sizeof(VulkanMemoryAllocator));
11679
11680 for (i = 0; i < VK_MAX_MEMORY_TYPES; i += 1) {
11681 renderer->memoryAllocator->subAllocators[i].memoryTypeIndex = i;
11682 renderer->memoryAllocator->subAllocators[i].allocations = NULL;
11683 renderer->memoryAllocator->subAllocators[i].allocationCount = 0;
11684 renderer->memoryAllocator->subAllocators[i].sortedFreeRegions = SDL_malloc(
11685 sizeof(VulkanMemoryFreeRegion *) * 4);
11686 renderer->memoryAllocator->subAllocators[i].sortedFreeRegionCount = 0;
11687 renderer->memoryAllocator->subAllocators[i].sortedFreeRegionCapacity = 4;
11688 }
11689
11690 // Create uniform buffer pool
11691
11692 renderer->uniformBufferPoolCount = 32;
11693 renderer->uniformBufferPoolCapacity = 32;
11694 renderer->uniformBufferPool = SDL_malloc(
11695 renderer->uniformBufferPoolCapacity * sizeof(VulkanUniformBuffer *));
11696
11697 for (i = 0; i < renderer->uniformBufferPoolCount; i += 1) {
11698 renderer->uniformBufferPool[i] = VULKAN_INTERNAL_CreateUniformBuffer(
11699 renderer,
11700 UNIFORM_BUFFER_SIZE);
11701 }
11702
11703 renderer->descriptorSetCachePoolCapacity = 8;
11704 renderer->descriptorSetCachePoolCount = 0;
11705 renderer->descriptorSetCachePool = SDL_calloc(renderer->descriptorSetCachePoolCapacity, sizeof(DescriptorSetCache *));
11706
11707 SDL_SetAtomicInt(&renderer->layoutResourceID, 0);
11708
11709 // Device limits
11710
11711 renderer->minUBOAlignment = (Uint32)renderer->physicalDeviceProperties.properties.limits.minUniformBufferOffsetAlignment;
11712
11713 // Initialize caches
11714
11715 renderer->commandPoolHashTable = SDL_CreateHashTable(
11716 0, // !!! FIXME: a real guess here, for a _minimum_ if not a maximum, could be useful.
11717 false, // manually synchronized due to submission timing
11718 VULKAN_INTERNAL_CommandPoolHashFunction,
11719 VULKAN_INTERNAL_CommandPoolHashKeyMatch,
11720 VULKAN_INTERNAL_CommandPoolHashDestroy,
11721 (void *)renderer);
11722
11723 renderer->renderPassHashTable = SDL_CreateHashTable(
11724 0, // !!! FIXME: a real guess here, for a _minimum_ if not a maximum, could be useful.
11725 true, // thread-safe
11726 VULKAN_INTERNAL_RenderPassHashFunction,
11727 VULKAN_INTERNAL_RenderPassHashKeyMatch,
11728 VULKAN_INTERNAL_RenderPassHashDestroy,
11729 (void *)renderer);
11730
11731 renderer->framebufferHashTable = SDL_CreateHashTable(
11732 0, // !!! FIXME: a real guess here, for a _minimum_ if not a maximum, could be useful.
11733 false, // manually synchronized due to iteration
11734 VULKAN_INTERNAL_FramebufferHashFunction,
11735 VULKAN_INTERNAL_FramebufferHashKeyMatch,
11736 VULKAN_INTERNAL_FramebufferHashDestroy,
11737 (void *)renderer);
11738
11739 renderer->graphicsPipelineResourceLayoutHashTable = SDL_CreateHashTable(
11740 0, // !!! FIXME: a real guess here, for a _minimum_ if not a maximum, could be useful.
11741 true, // thread-safe
11742 VULKAN_INTERNAL_GraphicsPipelineResourceLayoutHashFunction,
11743 VULKAN_INTERNAL_GraphicsPipelineResourceLayoutHashKeyMatch,
11744 VULKAN_INTERNAL_GraphicsPipelineResourceLayoutHashDestroy,
11745 (void *)renderer);
11746
11747 renderer->computePipelineResourceLayoutHashTable = SDL_CreateHashTable(
11748 0, // !!! FIXME: a real guess here, for a _minimum_ if not a maximum, could be useful.
11749 true, // thread-safe
11750 VULKAN_INTERNAL_ComputePipelineResourceLayoutHashFunction,
11751 VULKAN_INTERNAL_ComputePipelineResourceLayoutHashKeyMatch,
11752 VULKAN_INTERNAL_ComputePipelineResourceLayoutHashDestroy,
11753 (void *)renderer);
11754
11755 renderer->descriptorSetLayoutHashTable = SDL_CreateHashTable(
11756 0, // !!! FIXME: a real guess here, for a _minimum_ if not a maximum, could be useful.
11757 true, // thread-safe
11758 VULKAN_INTERNAL_DescriptorSetLayoutHashFunction,
11759 VULKAN_INTERNAL_DescriptorSetLayoutHashKeyMatch,
11760 VULKAN_INTERNAL_DescriptorSetLayoutHashDestroy,
11761 (void *)renderer);
11762
11763 // Initialize fence pool
11764
11765 renderer->fencePool.lock = SDL_CreateMutex();
11766
11767 renderer->fencePool.availableFenceCapacity = 4;
11768 renderer->fencePool.availableFenceCount = 0;
11769 renderer->fencePool.availableFences = SDL_malloc(
11770 renderer->fencePool.availableFenceCapacity * sizeof(VulkanFenceHandle *));
11771
11772 // Deferred destroy storage
11773
11774 renderer->texturesToDestroyCapacity = 16;
11775 renderer->texturesToDestroyCount = 0;
11776
11777 renderer->texturesToDestroy = (VulkanTexture **)SDL_malloc(
11778 sizeof(VulkanTexture *) *
11779 renderer->texturesToDestroyCapacity);
11780
11781 renderer->buffersToDestroyCapacity = 16;
11782 renderer->buffersToDestroyCount = 0;
11783
11784 renderer->buffersToDestroy = SDL_malloc(
11785 sizeof(VulkanBuffer *) *
11786 renderer->buffersToDestroyCapacity);
11787
11788 renderer->samplersToDestroyCapacity = 16;
11789 renderer->samplersToDestroyCount = 0;
11790
11791 renderer->samplersToDestroy = SDL_malloc(
11792 sizeof(VulkanSampler *) *
11793 renderer->samplersToDestroyCapacity);
11794
11795 renderer->graphicsPipelinesToDestroyCapacity = 16;
11796 renderer->graphicsPipelinesToDestroyCount = 0;
11797
11798 renderer->graphicsPipelinesToDestroy = SDL_malloc(
11799 sizeof(VulkanGraphicsPipeline *) *
11800 renderer->graphicsPipelinesToDestroyCapacity);
11801
11802 renderer->computePipelinesToDestroyCapacity = 16;
11803 renderer->computePipelinesToDestroyCount = 0;
11804
11805 renderer->computePipelinesToDestroy = SDL_malloc(
11806 sizeof(VulkanComputePipeline *) *
11807 renderer->computePipelinesToDestroyCapacity);
11808
11809 renderer->shadersToDestroyCapacity = 16;
11810 renderer->shadersToDestroyCount = 0;
11811
11812 renderer->shadersToDestroy = SDL_malloc(
11813 sizeof(VulkanShader *) *
11814 renderer->shadersToDestroyCapacity);
11815
11816 renderer->framebuffersToDestroyCapacity = 16;
11817 renderer->framebuffersToDestroyCount = 0;
11818 renderer->framebuffersToDestroy = SDL_malloc(
11819 sizeof(VulkanFramebuffer *) *
11820 renderer->framebuffersToDestroyCapacity);
11821
11822 // Defrag state
11823
11824 renderer->defragInProgress = 0;
11825
11826 renderer->allocationsToDefragCount = 0;
11827 renderer->allocationsToDefragCapacity = 4;
11828 renderer->allocationsToDefrag = SDL_malloc(
11829 renderer->allocationsToDefragCapacity * sizeof(VulkanMemoryAllocation *));
11830
11831 return result;
11832}
11833
11834SDL_GPUBootstrap VulkanDriver = {
11835 "vulkan",
11836 SDL_GPU_SHADERFORMAT_SPIRV,
11837 VULKAN_PrepareDriver,
11838 VULKAN_CreateDevice
11839};
11840
11841#endif // SDL_GPU_VULKAN
diff --git a/contrib/SDL-3.2.8/src/gpu/vulkan/SDL_gpu_vulkan_vkfuncs.h b/contrib/SDL-3.2.8/src/gpu/vulkan/SDL_gpu_vulkan_vkfuncs.h
new file mode 100644
index 0000000..7316eb9
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/gpu/vulkan/SDL_gpu_vulkan_vkfuncs.h
@@ -0,0 +1,176 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/*
23 * Global functions from the Vulkan Loader
24 */
25
26#ifndef VULKAN_GLOBAL_FUNCTION
27#define VULKAN_GLOBAL_FUNCTION(name)
28#endif
29VULKAN_GLOBAL_FUNCTION(vkCreateInstance)
30VULKAN_GLOBAL_FUNCTION(vkEnumerateInstanceExtensionProperties)
31VULKAN_GLOBAL_FUNCTION(vkEnumerateInstanceLayerProperties)
32
33/*
34 * vkInstance, created by global vkCreateInstance function
35 */
36
37#ifndef VULKAN_INSTANCE_FUNCTION
38#define VULKAN_INSTANCE_FUNCTION(name)
39#endif
40
41// Vulkan 1.0
42VULKAN_INSTANCE_FUNCTION(vkGetDeviceProcAddr)
43VULKAN_INSTANCE_FUNCTION(vkCreateDevice)
44VULKAN_INSTANCE_FUNCTION(vkDestroyInstance)
45VULKAN_INSTANCE_FUNCTION(vkEnumerateDeviceExtensionProperties)
46VULKAN_INSTANCE_FUNCTION(vkEnumeratePhysicalDevices)
47VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceFeatures)
48VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceQueueFamilyProperties)
49VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceFormatProperties)
50VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceImageFormatProperties)
51VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceMemoryProperties)
52VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceProperties)
53
54// VK_KHR_get_physical_device_properties2, needed for KHR_driver_properties
55VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceProperties2KHR)
56
57// VK_KHR_surface
58VULKAN_INSTANCE_FUNCTION(vkDestroySurfaceKHR)
59VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceCapabilitiesKHR)
60VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceFormatsKHR)
61VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfacePresentModesKHR)
62VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceSupportKHR)
63
64// VK_EXT_debug_utils
65VULKAN_INSTANCE_FUNCTION(vkCmdBeginDebugUtilsLabelEXT)
66VULKAN_INSTANCE_FUNCTION(vkSetDebugUtilsObjectNameEXT)
67VULKAN_INSTANCE_FUNCTION(vkCmdEndDebugUtilsLabelEXT)
68VULKAN_INSTANCE_FUNCTION(vkCmdInsertDebugUtilsLabelEXT)
69
70/*
71 * vkDevice, created by a vkInstance
72 */
73
74#ifndef VULKAN_DEVICE_FUNCTION
75#define VULKAN_DEVICE_FUNCTION(name)
76#endif
77
78// Vulkan 1.0
79VULKAN_DEVICE_FUNCTION(vkAllocateCommandBuffers)
80VULKAN_DEVICE_FUNCTION(vkAllocateDescriptorSets)
81VULKAN_DEVICE_FUNCTION(vkAllocateMemory)
82VULKAN_DEVICE_FUNCTION(vkBeginCommandBuffer)
83VULKAN_DEVICE_FUNCTION(vkBindBufferMemory)
84VULKAN_DEVICE_FUNCTION(vkBindImageMemory)
85VULKAN_DEVICE_FUNCTION(vkCmdBeginRenderPass)
86VULKAN_DEVICE_FUNCTION(vkCmdBindDescriptorSets)
87VULKAN_DEVICE_FUNCTION(vkCmdBindIndexBuffer)
88VULKAN_DEVICE_FUNCTION(vkCmdBindPipeline)
89VULKAN_DEVICE_FUNCTION(vkCmdBindVertexBuffers)
90VULKAN_DEVICE_FUNCTION(vkCmdBlitImage)
91VULKAN_DEVICE_FUNCTION(vkCmdClearAttachments)
92VULKAN_DEVICE_FUNCTION(vkCmdClearColorImage)
93VULKAN_DEVICE_FUNCTION(vkCmdClearDepthStencilImage)
94VULKAN_DEVICE_FUNCTION(vkCmdCopyBuffer)
95VULKAN_DEVICE_FUNCTION(vkCmdCopyImage)
96VULKAN_DEVICE_FUNCTION(vkCmdCopyBufferToImage)
97VULKAN_DEVICE_FUNCTION(vkCmdCopyImageToBuffer)
98VULKAN_DEVICE_FUNCTION(vkCmdDispatch)
99VULKAN_DEVICE_FUNCTION(vkCmdDispatchIndirect)
100VULKAN_DEVICE_FUNCTION(vkCmdDraw)
101VULKAN_DEVICE_FUNCTION(vkCmdDrawIndexed)
102VULKAN_DEVICE_FUNCTION(vkCmdDrawIndexedIndirect)
103VULKAN_DEVICE_FUNCTION(vkCmdDrawIndirect)
104VULKAN_DEVICE_FUNCTION(vkCmdEndRenderPass)
105VULKAN_DEVICE_FUNCTION(vkCmdPipelineBarrier)
106VULKAN_DEVICE_FUNCTION(vkCmdResolveImage)
107VULKAN_DEVICE_FUNCTION(vkCmdSetBlendConstants)
108VULKAN_DEVICE_FUNCTION(vkCmdSetDepthBias)
109VULKAN_DEVICE_FUNCTION(vkCmdSetScissor)
110VULKAN_DEVICE_FUNCTION(vkCmdSetStencilReference)
111VULKAN_DEVICE_FUNCTION(vkCmdSetViewport)
112VULKAN_DEVICE_FUNCTION(vkCreateBuffer)
113VULKAN_DEVICE_FUNCTION(vkCreateCommandPool)
114VULKAN_DEVICE_FUNCTION(vkCreateDescriptorPool)
115VULKAN_DEVICE_FUNCTION(vkCreateDescriptorSetLayout)
116VULKAN_DEVICE_FUNCTION(vkCreateFence)
117VULKAN_DEVICE_FUNCTION(vkCreateFramebuffer)
118VULKAN_DEVICE_FUNCTION(vkCreateComputePipelines)
119VULKAN_DEVICE_FUNCTION(vkCreateGraphicsPipelines)
120VULKAN_DEVICE_FUNCTION(vkCreateImage)
121VULKAN_DEVICE_FUNCTION(vkCreateImageView)
122VULKAN_DEVICE_FUNCTION(vkCreatePipelineCache)
123VULKAN_DEVICE_FUNCTION(vkCreatePipelineLayout)
124VULKAN_DEVICE_FUNCTION(vkCreateRenderPass)
125VULKAN_DEVICE_FUNCTION(vkCreateSampler)
126VULKAN_DEVICE_FUNCTION(vkCreateSemaphore)
127VULKAN_DEVICE_FUNCTION(vkCreateShaderModule)
128VULKAN_DEVICE_FUNCTION(vkDestroyBuffer)
129VULKAN_DEVICE_FUNCTION(vkDestroyCommandPool)
130VULKAN_DEVICE_FUNCTION(vkDestroyDescriptorPool)
131VULKAN_DEVICE_FUNCTION(vkDestroyDescriptorSetLayout)
132VULKAN_DEVICE_FUNCTION(vkDestroyDevice)
133VULKAN_DEVICE_FUNCTION(vkDestroyFence)
134VULKAN_DEVICE_FUNCTION(vkDestroyFramebuffer)
135VULKAN_DEVICE_FUNCTION(vkDestroyImage)
136VULKAN_DEVICE_FUNCTION(vkDestroyImageView)
137VULKAN_DEVICE_FUNCTION(vkDestroyPipeline)
138VULKAN_DEVICE_FUNCTION(vkDestroyPipelineCache)
139VULKAN_DEVICE_FUNCTION(vkDestroyPipelineLayout)
140VULKAN_DEVICE_FUNCTION(vkDestroyRenderPass)
141VULKAN_DEVICE_FUNCTION(vkDestroySampler)
142VULKAN_DEVICE_FUNCTION(vkDestroySemaphore)
143VULKAN_DEVICE_FUNCTION(vkDestroyShaderModule)
144VULKAN_DEVICE_FUNCTION(vkDeviceWaitIdle)
145VULKAN_DEVICE_FUNCTION(vkEndCommandBuffer)
146VULKAN_DEVICE_FUNCTION(vkFreeCommandBuffers)
147VULKAN_DEVICE_FUNCTION(vkFreeMemory)
148VULKAN_DEVICE_FUNCTION(vkGetDeviceQueue)
149VULKAN_DEVICE_FUNCTION(vkGetPipelineCacheData)
150VULKAN_DEVICE_FUNCTION(vkGetFenceStatus)
151VULKAN_DEVICE_FUNCTION(vkGetBufferMemoryRequirements)
152VULKAN_DEVICE_FUNCTION(vkGetImageMemoryRequirements)
153VULKAN_DEVICE_FUNCTION(vkMapMemory)
154VULKAN_DEVICE_FUNCTION(vkQueueSubmit)
155VULKAN_DEVICE_FUNCTION(vkQueueWaitIdle)
156VULKAN_DEVICE_FUNCTION(vkResetCommandBuffer)
157VULKAN_DEVICE_FUNCTION(vkResetCommandPool)
158VULKAN_DEVICE_FUNCTION(vkResetDescriptorPool)
159VULKAN_DEVICE_FUNCTION(vkResetFences)
160VULKAN_DEVICE_FUNCTION(vkUnmapMemory)
161VULKAN_DEVICE_FUNCTION(vkUpdateDescriptorSets)
162VULKAN_DEVICE_FUNCTION(vkWaitForFences)
163
164// VK_KHR_swapchain
165VULKAN_DEVICE_FUNCTION(vkAcquireNextImageKHR)
166VULKAN_DEVICE_FUNCTION(vkCreateSwapchainKHR)
167VULKAN_DEVICE_FUNCTION(vkDestroySwapchainKHR)
168VULKAN_DEVICE_FUNCTION(vkQueuePresentKHR)
169VULKAN_DEVICE_FUNCTION(vkGetSwapchainImagesKHR)
170
171/*
172 * Redefine these every time you include this header!
173 */
174#undef VULKAN_GLOBAL_FUNCTION
175#undef VULKAN_INSTANCE_FUNCTION
176#undef VULKAN_DEVICE_FUNCTION